[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua evolution and C99
- From: Leo Razoumov <slonik.az@...>
- Date: Mon, 8 Aug 2011 20:46:07 -0400
On Fri, Aug 5, 2011 at 07:45, Luiz Henrique de Figueiredo
<lhf@tecgraf.puc-rio.br> wrote:
> What C99 features would enhance Lua? Some interesting ones, like complex
> numbers and a larger math library are available as external Lua libraries
> at http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/ . I think there is even
> a patch to make lua_Numbers complex.
>
Actually, making lua_Numbers complex is a bad idea. Complex numbers do
not have a natural ordering relationship like real numbers do.
With integers or real numbers you can assert that for any x,y
assert((not (x<y) and not (y<x)) == (x==y))
For complex numbers such an ordering operator does not exist.
--Leo--