lua-users home
lua-l archive

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



No, I think the situation is clear and I removed % operator from complex numbers in future LNUM revisions.

Haven't heard the norm been called modulus ever; I'm using 'math.abs ()' for getting the norm.

Lua 5.1.2 Copyright (C) 1994-2007 Lua.org, PUC-Rio (complex double int32)
> = math.abs( 2+3i )
3.605551275464

-asko


manel kirjoitti 5.10.2007 kello 11:10:

Hello

Perhaps you are mixing concepts between modulus of an integer number
and modulus of a complex one. Both are not related. For an integer number
modulus is related to the rest of quotient. For a complex one it is
a norm: for z = a+bi is |z| = sqrt{a^2+b^2}. As you see both definitions
have not relationship.

Manel