L
lovebyte2000
Hi,
I am reading from a file a list of floating point numbers, some of
which are high precision. When I read such a number, I get a float out
of range warning:
% ff = Kernel.Float("1.0e-309")
% puts ff
test.rb:3: warning: Float 1.0e-309 out of range
0.0
The number is converted to 0.0 which is fine, but I would like to get
rid of this warning within the code.
Could anyone tell me how? Sorry if this is trivial, I am new to ruby,
and I haven't found a solution on the net (-W0 is not what I am looking
for).
Thank you
Denis
I am reading from a file a list of floating point numbers, some of
which are high precision. When I read such a number, I get a float out
of range warning:
% ff = Kernel.Float("1.0e-309")
% puts ff
test.rb:3: warning: Float 1.0e-309 out of range
0.0
The number is converted to 0.0 which is fine, but I would like to get
rid of this warning within the code.
Could anyone tell me how? Sorry if this is trivial, I am new to ruby,
and I haven't found a solution on the net (-W0 is not what I am looking
for).
Thank you
Denis