S
Samuel Lown
Hi,
Some more not so fun rounding issues.
Using Floats:
=> true
Cool, so you'd think it would work with BigDecimal:
=> "30.0000000000000000000000002"
I'm clearly missing something here as I thought BigDecimal was supposed
to fix this type of thing.
Tested in:
ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0]
ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-darwin9.6.0]
Can anyone offer an explanation?
Cheers, sam
Some more not so fun rounding issues.
Using Floats:
=> true
Cool, so you'd think it would work with BigDecimal:
=> "30.0000000000000000000000002"
I'm clearly missing something here as I thought BigDecimal was supposed
to fix this type of thing.
Tested in:
ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0]
ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-darwin9.6.0]
Can anyone offer an explanation?
Cheers, sam