Doug
unread,Nov 9, 2009, 1:48:55 PM11/9/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ruby on Rails: Talk
what does /2 or /5.5 represent to ruby?
in a division caclulation: x / 5.5
if you only put a space between x and the /, then
the console hangs
in irb it does this:
irb(main):014:0> x = BigDecimal("10.00")
=> #<BigDecimal:31a5ccc,'0.1E2',4(8)>
irb(main):015:0> x * 5
=> #<BigDecimal:31a3760,'0.5E2',4(16)>
irb(main):016:0> x / 2
=> #<BigDecimal:31a11a4,'0.5E1',4(32)>
irb(main):017:0> x /2
irb(main):018:0/ x/2
=> #<BigDecimal:319e24c,'0.5E1',4(32)>
irb(main):019:0> x /2.5
irb(main):020:0/
thanks