Elektrine lite

← Feed

@Doomed_Daniel@mastodon.gamedev.place

Post #2797246

2026-04-14 16:47 UTC

@lisyarus@mastodon.gamedev.place > In reality it is a pretty deterministic (modulo compiler options, CPU flags, etc) and then det(v, v) suddenly doesn't return 0.0 anymore because the compiler now targets a newer CPU with FMA and uses regular multiplication for `a.y * b.x` and FMA for `a.x * b.y - prev_result`, and FMA uses infinite precision so `a.x * b.y` can be slightly different from the result of the regular multiplication -_- It annoys me that IEEE754 allows this and compilers (ab)use it

Replies (1)

  • @zeux@mastodon.gamedev.place 2026-04-14 20:53

    @Doomed_Daniel@mastodon.gamedev.place @lisyarus@mastodon.gamedev.place This is not an IEEE754 problem; IEEE754 defines FMA and unfused mul/add. It's up to each language to figure out how to compile compound expressions and what is permissible; C/C++ allow contraction by default, so you do get different results based on the platform or the underlying model - but you can also turn contraction off to fix this, or use languages that don't allow this implicit conversion.

    Open ##2797247