[HN Gopher] GNU GCC does not round floating-point divisions to t... ___________________________________________________________________ GNU GCC does not round floating-point divisions to the nearest value Author : guiambros Score : 14 points Date : 2020-06-27 22:24 UTC (35 minutes ago) (HTM) web link (lemire.me) (TXT) w3m dump (lemire.me) | wiml wrote: | This seems like a property of the Intel 8087 math coprocessor and | its distant descendants found in x86 chips, not anything to do | with gcc? | bhouston wrote: | But then why does python and JavaScript on the same machines | get it right? | montalbano wrote: | Learning C recently, I ran into confusion around FLT_EVAL_METHOD | as my dirty (not recommended) trick for getting machine epsilon | didn't work (7.0/3.0 - 4.0/3.0 - 1.0). With strict IEEE 754 | floating points it works fine (Python, Julia, Go all work as | expected). But gcc, with c11 flags at least, performed the | computation using the 80 bit upsampling mentioned in this post. | Caused some head-scratching initially. ___________________________________________________________________ (page generated 2020-06-27 23:00 UTC)