db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig Russell <Craig.Russ...@Sun.COM>
Subject Re: FieldsOfDouble problem
Date Wed, 18 May 2005 17:24:04 GMT
Hi Niclas,

Your idea seems reasonable. I believe we already have a rounding 
algorithm in the tests, so putting in some explicit known tricky cases 
would be a good test.

Craig

On May 17, 2005, at 10:37 PM, Niclas Hedhman wrote:

> 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 =
>>          { DOUBLE_SMALLEST, DOUBLE_LARGEST, 0.0, 100.0, 100.0,
>>              50000000.0, -234234.234, 1000000000.0, 350.5, -25.5 };
>>
>> 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
>
Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!

Mime
View raw message