I Can't Believe It's Not Zero!

(replying to Félix)

@fay59 @saagar Right, but the actual answer here is "because different math libraries make different implementation choices," not "because floating-point is black fucking magic"

(Also IEEE 754 guarantees _nothing_ about sin, it only recommends)

1 replies →
1 replies

Itai Ferber

(replying to I Can't Believe It's Not Zero!)

@steve @fay59 @saagar Yeah, for guarantees about sin you're gonna have to turn to religion

I Can't Believe It's Not Zero!

(replying to I Can't Believe It's Not Zero!)

@fay59 @saagar also, for anyone who does want to get the same answer everywhere: core-math.gitlabpages.inria.fr

Philip Trettner

(replying to I Can't Believe It's Not Zero!)

@steve @fay59 @saagar "these implementations were tested on x86_64-linux, with and without the use of fma (fused multiply add)." Ok I'm impressed.

I know this thread is about facing the unknown but I was bitten by fma one time too many. Last personal highlight was non-determinism because the same function was inlined in two different places leading to two different fma substitutions and thus different results.