Description
Niclas Hedman suggest using the values 0.1 and -0.1 as test values for double to test for rounding problems:
On Wednesday 18 May 2005 06:01, Craig Russell wrote:
>> We decided to use these values for double in the AllTypes class:
>> public static final double DOUBLE_SMALLEST = -9999999999999.9;
>> public static final double DOUBLE_LARGEST = 9999999999999.9;
>> public static final double[] double_values =
>>
;
>>
>> I'd be happy to use DOUBLE_LARGEST and DOUBLE_SMALLEST from AllTypes.
>>
>> What do you all think?
May I suggest that 0.1 and -0.1 are included in the suite of numbers??
Over the years, they have been involved in a lot of rounding issues (granted;
because people errenously use floats and doubles for monetary and other
fixed-point decimal numbers) and I would be happy if the expected behaviour
is "documented" in tests.
Cheers
Niclas