From: Paolo Bonzini Date: 2008-02-09T01:10:10+09:00 Subject: Re: how can 1/100=0 On Feb 8, 5:06 pm, Junkone wrote: > cannot belive my eyes. how can 1/100 be equal to 0. > E:\Documents and Settings\Roasty>irb > irb(main):001:0> TRAILING_STOP=1/100 > => 0 > irb(main):002:0> TRAILING_STOP > => 0 > irb(main):003:0> in what languages it isn't? $ python Python 2.5.1 (r251:54863, May 12 2007, 11:15:25) [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> 1/100 0 (and C too, though I won't write the program here). anyway, you can have 1/100 return a rational: $ irb irb(main):001:0> require 'mathn' => true irb(main):002:0> 1/100 => 1/100 irb(main):003:0> (1/100).denominator => 100 Paolo