From: andg Date: 2012-12-24T05:03:14+09:00 Subject: Re: simple division: -9 / 5 = -2 what? You are looking for (0.0-9)/5 or -9.0/5 or -9/5.0 To ruby numerals are integers unless they are bigints. On Dec 21, 2012, at 9:08 PM, Derrick B. wrote: > $ irb > irb(main):001:0> -9 / 5 > => -2 > irb(main):002:0> -9.to_f / 5.to_f > => -1.8 > irb(main):003:0> (-9.to_f / 5.to_f).to_i > => -1 > > If I want to assign the integer quotient of the above example, do I > really need to go from float to integer? > > Thanks, > > -- > Posted via http://www.ruby-forum.com/. >