A
Andriy Tabachyn
Hi,
I located very strange behavior of float under Linux. 0.123 is converted
to 123.0
under windows 0.123 is converted correctly to 0.123.
Here is samples:
=> "123.0"
C:\>ruby -v
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
C:\>irb
irb(main):001:0> 0.123.to_s
=> "0.123"
How to receive correct float under Linux. Please advice.
Thank you.
Andriy.
I located very strange behavior of float under Linux. 0.123 is converted
to 123.0
under windows 0.123 is converted correctly to 0.123.
Here is samples:
irb(main):001:0> 0.123.to_sruby -v ruby 1.8.6 (2009-08-04 patchlevel 383) [i686-linux]
irb
=> "123.0"
C:\>ruby -v
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
C:\>irb
irb(main):001:0> 0.123.to_s
=> "0.123"
How to receive correct float under Linux. Please advice.
Thank you.
Andriy.