• Subject: Re: Lua evolution and C99
• From: Tymur Gubayev <tymur.gubayev@...>
• Date: Tue, 9 Aug 2011 13:27:37 +0200

```I think David Kastrup means following:

"Unlike the reals, C is not an ordered field, that is to say, it is
not possible to define a relation z1 < z2 that is compatible with the

And yes, this has no bearing on making lua_Numbers complex.

Wbr,
Tymur

On 9 August 2011 12:58, David Kastrup <dak@gnu.org> wrote:
> Leo Razoumov <slonik.az@gmail.com> writes:
>
>> On Tue, Aug 9, 2011 at 01:33, David Kastrup <dak@gnu.org> wrote:
>>> Leo Razoumov <slonik.az@gmail.com> writes:
>>>
>>>> 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.
>>>
>>> Lexicographical ordering works just fine and fulfills that condition.
>>> You could also just order the bit patterns.  Lots of other
>>> possibilities.
>>>
>>
>> When ordering by bit-patterns you don't really care whether underlying
>> entities are Complex Numbers or not. For example, such ordering would
>> not preserve arithmetic operations. For example, for real numbers
>> statements x>y and 3*x>3*y are equivalent. But I doubt that you can
>> achieve the same equivalence for lexicographical order (for any
>> positive constant in place of 3).
>
> Lexicographic order is ordering first by real part, then (on equality)
> by imaginary part.  Or vice versa.  It preserves that equivalence for
> any positive real constant.
>
> Not that this has _any_ bearing on why it should be a bad idea to make
> lua_Numbers complex.
>
> The only reason I can discern up to now from the discussion about why it
> should be a bad idea to make lua_Numbers complex is that it will at
> least triple the amount of non sequiturs posted to the list.
>
> --
> David Kastrup
>
>
>

```