On 26/03/2010, at 6:32 PM, Adam Heath wrote:

> Scott Gray wrote:
>> On 26/03/2010, at 5:13 PM, Adam Heath wrote:
>> 
>>> The above method makes use of a BigDecimal.  This is wrong.  It should
>>> be an int.  Originally, before the BigDecimal conversion, it was a
>>> Double.  This method should have never been converted.
>> 
>> It looked like a good candidate at the time and looking at it now, it still 
>> looks like a good candidate for BigDecimal.  Why should it never have been 
>> converted?
> 
> Days is a whole number.  2 billion days is over 5.8 million years.
> Why would it need to be a Double previously, and a BigDecimal now?

Days is not a whole number, 1.5 days is perfectly valid.  I have no idea why it 
needed to be a double previously but when you're converting thousands of 
doubles to BigDecimals then you don't dwell on each one for too long.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to