mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-24 22:17:08 +00:00
Introduce a simple binary that can run arbitrary input against any of
the available implementations (musl, MPFR, our libm). This provides an
easy way to check results, or run specific cases against a debugger.
Examples:
$ cargo run -p util -- eval libm pow 1.6 2.4
3.089498284311124
$ cargo run -p util -- eval mpfr pow 1.6 2.4
3.089498284311124
$ cargo run -p util -- eval musl tgamma 1.2344597839132
0.9097442657960874
$ cargo run -p util -- eval mpfr tgamma 1.2344597839132
0.9097442657960874
$ cargo run -p util -- eval libm tgamma 1.2344597839132
0.9097442657960871
$ cargo run -p util -- eval musl sincos 3.1415926535
(8.979318433952318e-11, -1.0)
10 lines
173 B
Rust
10 lines
173 B
Rust
#![allow(unexpected_cfgs)]
|
|
|
|
#[path = "../../configure.rs"]
|
|
mod configure;
|
|
|
|
fn main() {
|
|
let cfg = configure::Config::from_env();
|
|
configure::emit_libm_config(&cfg);
|
|
}
|