Suggestion on implementation of floating-point computations with different rounding mode
Rust Internals
Suggestion on implementation of floating-point computations with different rounding mode
Hello everyone! Some FPUs support different rounding mode, so if the floating-point operation yields a value that cannot be represented exactly, it is rounded according to the rounding mode. As far as I understand, the Rust compiler expects a "round to nearest" mode, and the behavior of a Rust program in any other rounding mode is undefined. Currently, the only way to perform computations in different rounding mode is with inline assembly, something like that: unsafe { core::arch::asm!( ...
Hello everyone! Some FPUs support different rounding mode, so if the floating-point operation yields a value that cannot be represented exactly, it is rounded according to the…
0 comments
No comments yet.