typeOfDoubleSum is wrong for when NaN can be produced