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 where scale and rounding mode are important.


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() Number method... :-(


--
Francis Labrie, Architecte de systèmes, OS communications informatiques - Votre moteur de communication [EMAIL PROTECTED] | Téléphone : (450) 676-1238, poste 27 | Télécopieur : (450) 676-5276

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to