This crate is a rust wrapper of fdlibm.
Run the following Cargo command in your project directory:
cargo add fdlibm-rs
use fdlibm_rs::sin;
let value = unsafe {sin(1.0)};
println!("sin(1)={}",value);
- This lib is currently in beta version, some of functions doesn't have unit tests and some are buggy (
gamma
). Other modes decribed in fdlibm are not supported yet.
-
Avoid usingstd::
, instead usecore::
when possible. -
Support other targets (wip):
- []
aarch64-pc-windows-gnullvm
-
aarch64-linux-android
-
aarch64-unknown-linux-gnu
-
aarch64-unknown-linux-musl
-
x86_64-linux-android
-
x86_64-pc-windows-gnu
-
x86_64-unknown-linux-gnu
-
x86_64-unknown-linux-musl
- []
-
Support other Modes. -
Benchmarks (wip, only on
x86_64-unknown-linux-gnu
).