Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Commit fae0b0a

Browse files
committed
Add readmes to the two new crates
1 parent a3838d9 commit fae0b0a

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

crates/libm-analyze/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# libm-analyze
2+
3+
This crate provides a single macro, `for_each_api`:
4+
5+
```rust
6+
macro_rules! nop {
7+
(
8+
id: $id:ident;
9+
arg_tys: $($arg_tys:ty),*;
10+
arg_ids: $($arg_ids:ident),*;
11+
ret: $ty:ty;
12+
) => {};
13+
}
14+
15+
libm_analyze::for_each_api!(nop);
16+
```
17+
18+
This macro takes a user-provided macro, and expands it for all libm APIs.
19+
20+
For example, see how the `libm-test` crate `tests/system.rs` test uses it to
21+
test all `libm` APIs against random inputs, and verify the results against the
22+
system's libm library.

crates/libm-test/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# libm-test
2+
3+
This crate contains different types of test for the `libm` crate.
4+
5+
* `tests/system.rs`: generate random inputs, and tests that the results of the
6+
`libm` crate are within the tolerance required by the IEEE from those of the
7+
system's libm library (e.g. musl, glibc's libm, libSystem_m, etc.).
8+
9+
* `tests/unit.rs`: contains some small unit tests.

0 commit comments

Comments
 (0)