|
|
|
|
|
by ynik
1093 days ago
|
|
Is zig's optimized float mode also extremely error-prone like gcc ffastmath? Reminder: With gcc/clang, -ffastmath makes it undefined behavior to run a calculation that results in an infinity or NaN. Due to the way UB works, the compiler can end up miscompiling not just the floating-point calculation, but also other code nearby (e.g. delete array bounds checks). This is why Rust does not have any fastmath-equivalent: it would allow violating memory safety in safe code. |
|