Remix.run Logo
bruckie an hour ago

I assumed that it meant that if you ran code at compile time or at runtime, the results should be exactly the same given the same inputs.

chaz72 42 minutes ago | parent [-]

And they believe Zig comptime wouldn’t do that? For the same inputs? I’d love an example.

vlovich123 a minute ago | parent | next [-]

Traditional stuff in this space are:

* floating point differences between the build machine and the target. By far the most common

* endiannes - code assumes little median runs on big endian

There’s other more subtle issues that can crop up but those are the big two.

5 minutes ago | parent | prev | next [-]
[deleted]
weinzierl 6 minutes ago | parent | prev [-]

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