Re: @sum and BigDecimal

2007-03-12 Thread Mike Schrag
The problem lies in _NSUtilities.convertNumberIntoCompatibleValue (Number, Class) method, and not in the @sum operator itself: if you use a Number subclass that is not exactly an Integer, Long, Short, Byte, BigInteger or BigDecimal, it build up a new BigDecimal instance using the doubleValue

Re: @sum and BigDecimal

2007-03-12 Thread Francis Labrie
Hi Mike, Mike Schrag wrote: It looks like @sum doesn't properly propagate BigDecimal scale and rounding modes ... I'm guessing somewhere in the code path it turns the big decimal into a double or float (which is a terrible no- no). Just a heads up in case you're using @sum for anything wher

@sum and BigDecimal

2007-03-11 Thread Mike Schrag
It looks like @sum doesn't properly propagate BigDecimal scale and rounding modes ... I'm guessing somewhere in the code path it turns the big decimal into a double or float (which is a terrible no-no). Just a heads up in case you're using @sum for anything where scale and rounding mode ar