[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: native complex numbers - testers wanted
- From: Asko Kauppi <askok@...>
- Date: Thu, 7 Sep 2006 23:57:48 +0300
Thanks: was simply using the wrong formulas for pow.
Now, it still gives innacurate answers, but close to -1:
Lua 5.1.1 Copyright (C) 1994-2006 Lua.org, PUC-Rio (complex)
> a=1i
> =a^2
-1+1.2246467991474e-16i
Should something be done about this (like handling real powers
separately)?
Pavol Severa kirjoitti 7.9.2006 kello 16.46:
I got
a=1i
=a^2
5.436563659181 +5.436563659181i
(I hope I didn't screw up something; anyway =a*a prints -1 :)
Best regards
P.