by adrian_b · 4y ago · 0 comments
The real disadvantage appears to be that a fast implementation is likely to be more expensive, i.e. it requires more complex circuits, thus a greater chip area. Most designers of recent CPUs or GPUs appear to be much more concerned with obtaining a greater speed and a minimum chip area than with obtaining adequate numeric accuracy, because most buyers are influenced by speed benchmark results and know little or nothing about the accuracy required by their computations.
Moreover, the subnormals are an optional feature of the floating-point standard, the alternative to using subnormals is to enable the underflow exception. However, an overwhelming majority of the programmers are too lazy to enable and handle overflow exceptions, much less to enable and handle underflow exceptions.
Unlike using either underflow exceptions or subnormals, the use of flush-to-zero and denormals-are-zero is acceptable only in the programs where computation errors do not matter at all, such as games.
That is not true. FTZ and DAZ are perfectly reasonable in a lot of scientific computing scenario's, where computation errors in general are closely scrutinized.
FTZ and DAZ and any other methods that are certain to introduce errors can be accepted only inside a computation for which there is an independent way to verify the results and that way is always used, without exceptions.
For example, it is indeed OK to use FTZ and DAZ when solving a system of equations, if, and only if, after obtaining a solution it is inserted in the original equations and a residual error is computed, this time without using FTZ and DAZ, and an excessive residual error triggers an appropriate means of notifying the user about the failure.