G
Geert Fannes
------_=_NextPart_001_01C53901.3DA362B8
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Hello, the following statement gives different results on windows and
linux:
=20
Linux:
irb(main):003:0> Math.sqrt(0.0/0.0)
* NaN
=20
=20
Windows:
irb(main):002:0> Math.sqrt(0.0/0.0)
Errno::EDOM: Domain error - sqrt
from (irb):2:in `sqrt'
from (irb):2
=20
I guess this is not as it should be. Which is the correct way to handle
NaNs?
How can I generate NaN without using the trick 0.0/0.0. Why does 0/0
give a ZeroDivisionError and 0.0/0.0 a NaN
=20
Greetings,
Geert Fannes.
------_=_NextPart_001_01C53901.3DA362B8--
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Hello, the following statement gives different results on windows and
linux:
=20
Linux:
irb(main):003:0> Math.sqrt(0.0/0.0)
* NaN
=20
=20
Windows:
irb(main):002:0> Math.sqrt(0.0/0.0)
Errno::EDOM: Domain error - sqrt
from (irb):2:in `sqrt'
from (irb):2
=20
I guess this is not as it should be. Which is the correct way to handle
NaNs?
How can I generate NaN without using the trick 0.0/0.0. Why does 0/0
give a ZeroDivisionError and 0.0/0.0 a NaN
=20
Greetings,
Geert Fannes.
------_=_NextPart_001_01C53901.3DA362B8--