[Rails] Re: any body can help me ?? why is this happen??
Nm... this explains it: http://rubypond.com/blog/when-ruby-floating-just-isn-t-good-enough -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: any body can help me ?? why is this happen??
(0.29*100).to_s.to_i will return what you expect. On Mar 31, 10:27 am, Jimish Jobanputra wrote: > Scary! > > irb(main):019:0> (0.57 * 100).to_i > => 56 > irb(main):020:0> (0.58 * 100).to_i > => 57 > > This is totally out of my understanding Will look into core... seems > like some bug... > -- > Posted viahttp://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: any body can help me ?? why is this happen??
Scary! irb(main):019:0> (0.57 * 100).to_i => 56 irb(main):020:0> (0.58 * 100).to_i => 57 This is totally out of my understanding Will look into core... seems like some bug... -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.