tags 979002 +patch
thanks

I just whipped up a patch which made cargo test pass on debian i386, it's not particularly pretty though.

floor, ceil, round, roundf and rem_pio2f (but not floorf or ceilf) use an add/sub trick to round stuff to the nearest integer. Unfortunately while this trick works on architectures that use modern FPUs it seems to break on x87. Presumably due to excess precision.


For floor and ceil I made the functions use alternative implementations based on the proposal at
https://github.com/rust-lang/libm/issues/219

For the other functions I added a conversion to/from bits, this seems to force rounding and make the tests pass, though I don't know for sure how robust that solution is. The finer points of rust floating point on x87 do not seem to be documented anywhere.

Finally I loosened the test slightly for j1f

I've pushed my changes at https://github.com/plugwash/libm <https://github.com/plugwash/libm> and also posted about them upstream
at https://github.com/rust-lang/libm/issues/243

I may or may not add these changes to the Debian package later.

Reply via email to