Ancestors

Toot

Written by Adam Chalmers on 2024-11-17 at 18:13

Today I learned that f64::tan (or maybe f64::to_radians?) produces different results (given the same inputs) on my ARM MacBook and on x86_64 Linux.

The math consistently returns -3.40476137196133 on one, and -3.4047613719613308 on the other. At least it's deterministic. Happening on both debug and release builds.

=> More informations about this toot | More toots from adam_chal@hachyderm.io

Descendants

Written by Adam Chalmers on 2024-11-17 at 18:28

OK it's definitely the tan call. https://github.com/adamchalmers/fp-repro if anyone is interested in a repro.

=> More informations about this toot | More toots from adam_chal@hachyderm.io

Written by rain 🌦️ on 2024-11-17 at 18:55

@adam_chal Yeah there's no particular guarantee that floating point operations are exactly the same across machines

=> More informations about this toot | More toots from rain@hachyderm.io

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113499649737328293
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
258.541393 milliseconds
Gemini-to-HTML Time
0.941517 milliseconds

This content has been proxied by September (3851b).