3 ms·
Also, if I understand the proposed solution correctly, it doesn’t make sense. I think the article says “replace the relatively rare inexact calculations by (mo
by Someone 6y ago
Also, if I understand the proposed solution correctly, it doesn’t make sense.
I think the article says “replace the relatively rare inexact calculations by (more expensive) calls to libraries that produce correct results, then stuff the result in a IEEE float/double, so that the less rare calls can run cheaply. Problems with that approach:
- a computation at a given location in the code can be exact zillions of times, only to be inexact on the zillion+1th call, so instrumenting cannot prove a computation to be safe for doing on the hardware.
- worse, the “stuff the result in a IEEE float/double” will cause inexact rounding (there may be extremely rare instances where the value of a trig function or something equally complex is exactly representable, but the CPU doesn’t compute that exact number, but those will be extremely rare)