Advertisement

Intel computation errors strike back?

Started by October 11, 2014 12:09 AM
1 comment, last by Sik_the_hedgehog 9 years, 11 months ago

Did you remember the Pentium FDIV bug? Well apparently Intel lies for years about it's FSIN instruction precision and only now they are correcting their own documentation. D:

Here's the complete story (code sample included): http://randomascii.wordpress.com/2014/10/09/intel-underestimates-error-bounds-by-1-3-quintillion/

..

Isn't all this a little scary? O_O

"Recursion is the first step towards madness." - "Skegg?ld, Skálm?ld, Skildir ro Klofnir!"
Direct3D 12 quick reference: https://github.com/alessiot89/D3D12QuickRef/

No, it isn't scary.

Read the details.

The issue, deep down, stems from the fact that the FPU processor works internally at 80 bits (64 bit mantissa) and stores values at 64 bits (52 bit mantissa). This is well-known, well-documented behavior.

The error is 4e-21. It is relative based on the scale of your stuff.

Put that number in perspective. When working at the meter scale (like most games do) the error is on the same magnitude of a sub-atomic particle. Or, if you were measuring the distance between the Sun and the closest star, you could measure it in millimeters instead of light years.

Consider what that means, then consider that you are talking about trig functions interacting with those measurements.

This has been a known concern about the processor since forever. I remember reading and hearing about it in the 1980s. It affects all x87 functionality, including AMD's chips, but also the old chips by companies that are long extinct. If you had an old Tandy PC with a floating point chip, it would be affected.

Ancient and well-known problem. Basically any serious scientific simulation that needs to work at that level has already been using high-precision math libraries. Intel and AMD have both responded with a simple comment: We'll update our documentation.

Advertisement

Lesson: never trust floating point precision. Ever. Learn to live with the small inaccuracies. (heck, I would never use the built-in floating point types for anything that requires accuracy)

Don't pay much attention to "the hedgehog" in my nick, it's just because "Sik" was already taken =/ By the way, Sik is pronounced like seek, not like sick.

This topic is closed to new replies.

Advertisement