paines / ypsilon

Automatically exported from code.google.com/p/ypsilon
Other
0 stars 0 forks source link

weird behaviour of MAGNITUDE when applied to ~zero #136

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

$ ypsilon
Ypsilon 0.9.6-trunk/r503 Copyright (c) 2009 Y.Fujita, LittleWing Company
Limited.
> (- -3.29-2.39i -3.29-2.39i)
0.0+0.0i
> (magnitude (- -3.29-2.39i -3.29-2.39i))
+nan.0

What is the expected output? What do you see instead?
The magnitude should be inexact zero.  A NaN.

What version of the product are you using? On what operating system?
r503. i686-pc-linux-gnu.

Please provide any additional information below.
The other Scheme implementations I tested return zero.

Original issue reported on code.google.com by mrc....@gmail.com on 10 Feb 2010 at 8:48

GoogleCodeExporter commented 9 years ago
Simpler:

(magnitude +0.0i) => +nan.0

Original comment by mrc....@gmail.com on 10 Feb 2010 at 8:51