Determinism for floating point operations in Rust


#1

Is it possible to achieve deterministic floating point operations in Rust? Rust already carefully follows IEEE-754; but can it also guarantee determinism across hardware configurations? - assuming the same compiler rustc version used.


#2

You may find this internals thread interesting: https://internals.rust-lang.org/t/pre-rfc-dealing-with-broken-floating-point/2673.


#3

Alternatively, is it possible to compile rust code with flags that #forbid non-deterministic operations? in particular random and float ops?