
218 GPGPU Programming for Games and Science
For 32-bit floating-point numbers, some of the deviations from the rules are
about the handling of quiet or signaling NaNs. Two variations that potentially
have more impact when comparing the results from the GPU and from an FPU
associated with the CPU are the following.
• The default rounding rule for IEEE 754-2008 is round-to-nearest ties-
to-even. This rule is discussed in Section 2.5.2.1. The idea is that a
floating-point operation produces the floating-point number nearest to
the theoretical result. When the theoretical result has a fractional part
that is one-half, you round down if the integer part is