lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

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, PUC-Rio (complex)
  > a=1i
  > =a^2

Should something be done about this (like handling real powers separately)?

Pavol Severa kirjoitti 7.9.2006 kello 16.46:

I got
5.436563659181 +5.436563659181i

(I hope I didn't screw up something; anyway =a*a prints -1 :)

Best regards