← Back to context

Comment by weinzierl

20 hours ago

sin(x) can produce different results at comptime and runtime. In Rust there is no sin(x) at comptime for precisely this reason.

Interesting, I hadn’t run across that but that’s probably just my problem domain. I did find this bug that looks like it was resolved a year ago https://github.com/ziglang/zig/issues/24184 and I have also read they are doing some other work on floating point that will hopefully address other cross-platform inconsistencies.