3 ms·
Funny how when I posted more or less exactly this comment in another context recently a lot of people refused to take me seriously! https://news.ycombinator.co
by TylerE 3y ago
Funny how when I posted more or less exactly this comment in another context recently a lot of people refused to take me seriously!
https://news.ycombinator.com/context?id=39633730 https://news.ycombinator.com/context?id=39633730
- Retr0id 3y agoFloats are deterministic, though (if they weren't, this wouldn't be a workable fingerprinting vector). Reordering of operations (etc.) in a way that would actually change the results needs to be done by human edits, or with compiler options like ffast-math that explicitly allow the compiler to "break the rules" and make such changes. In either case, the concrete instructions emitted by the compiler will have deterministic behavior (and if they don't, that's a hardware bug)
- TylerE 3y agoWhat word would you use if sin(x) returns a different value on different platforms, or even different OS or librsry version? Sure smells like a fiction that depends on external state rather than simply its input.
- Retr0id 3y agoThe existence of platforms that do not conform to their own specifications does not make an operator non-deterministic. Edit: I found this pretty great article on the subject https://randomascii.wordpress.com/2013/07/16/floating-point-determinism/ https://randomascii.wordpress.com/2013/07/16/floating-point-... We're both right, depending on how you frame the question.
- heinrich5991 3y agosin(x) is platform-dependent.