libm
libm copied to clipboard
Start removing force_eval uses
I'm starting here by deleting all the force_eval uses that are for raising floating-point exceptions.
@programmerjake is interested in some breadcrumbs for the non-default rounding modes uses, so I'm going to do something different for those.
force_eval!(0.0 / 0.0) appears to not do anything at all:
https://play.rust-lang.org/?version=nightly&mode=release&edition=2021&gist=2621c439604f11b4ef53462f228f8c33
fn main() {
unsafe {
println!("{:032b}", _mm_getcsr());
force_eval!(0.0 / 0.0);
println!("{:032b}", _mm_getcsr());
}
}
prints the same value twice.
Oh neat, this bug was directly ported from musl.
Since there's now effort port new implementations from musl, I'm more against changes like this that would cause implementation divergence.