H
Hyun chul Park
hi.
i'm confused by float point calculation.
like this!
i'm confused by float point calculation.
like this!
hi.
i'm confused by float point calculation.
like this!
Zoran said:Hi,
try using BigDecimal, like:
irb(main):001:0> require 'bigdecimal'
=> true
irb(main):002:0> x = BigDecimal("123.6") - BigDecimal("123")
=> #<BigDecimal:8b13c,'0.6E0',4(16)>
irb(main):003:0> x.to_f
=> 0.6
zoran
Datum: Tue, 8 Jul 2008 17:39:50 +0900
Von: Hyun chul Park <[email protected]>
An: (e-mail address removed)
Betreff: Floating point calculation problem
hi.
i'm confused by float point calculation.
like this!
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.