david135 / ypsilon

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

wrong exp with inf argument #144

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Compute:

(exp +inf.0+0.0i) 

What is the expected output? What do you see instead?
+inf.0+0.0i.  +inf.0+nan.0i.

What version of the product are you using? On what operating system?
Ypsilon 0.9.6-trunk/r503 Copyright (c) 2009 Y.Fujita, LittleWing Company 
Limited.  i686-pc-linux-gnu.

Original issue reported on code.google.com by mrc....@gmail.com on 14 Sep 2010 at 6:31

GoogleCodeExporter commented 9 years ago
Sorry this is a wrong report.  In general:

e^x = e^(xr + xi i) = e^xr cos(xi) + e^xr sin(xi) i

but:

e^(xr+0.0i) = e^xr * e^(0.0 i) = e^xr * 1.0+0.0i

and in the special case xr=+inf.0, the imaginary part becomes:

+inf.0 * 0.0 * i = +nan.0 * i

Original comment by mrc....@gmail.com on 17 Sep 2010 at 6:20