If the original code was written in Rust, then I don't think the Rust compiler is allowed to do any of these "optimizations" of rewriting floating point expressions.
Not sure if this was written with AI assistance of not, but I've become allergic to linguistic triples as LLMs use them so much, reading "Same code. Same input. Different answer" makes me not want to read the rest.
I wish the blog would reveal the values of the 3 floats that make their
cross_sign(A, B, C)
to give different results in different platforms.
I love seeing a Shewchuk citation other than my ML background of learning conjugate gradient! He is truly a great educator!