Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LIBM - sin, cos, ln, exp and friends. #126

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
Ignore sign on NaN checks.
  • Loading branch information
andy-thomason committed Mar 7, 2022
commit 5a5472cb9d52e4ef0deb446afc927fff53ded4a0
2 changes: 1 addition & 1 deletion crates/std_float/src/test_libm.rs
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ macro_rules! test_vec {
let yref = <$vector_type>::from_array([sf($x[0]), sf($x[1]), sf($x[2]), sf($x[3])]);
let y = vf($x);
let e = (y - yref);
let bit_match = y.to_bits().lanes_eq(yref.to_bits());
let bit_match = y.abs().to_bits().lanes_eq(yref.abs().to_bits());
let val_ok = bit_match | e.abs().lanes_le($limit);
if !val_ok.all() || y.is_nan() != yref.is_nan() {
panic!("\nx ={:20.16?}\ne ={:20.16?}\nlimit ={:20.16?}\nvector={:20.16?}\nscalar={:20.16?}\nvector={:020x?}\nscalar={:020x?}\nvector_fn={}",