[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua evolution and C99
- From: Dirk Laurie <dpl@...>
- Date: Fri, 5 Aug 2011 13:54:52 +0200
On Fri, Aug 05, 2011 at 01:12:28PM +0200, Gavin Wraith wrote:
> The trouble is, addition and multiplication cannot be commutative
> ( x + y == y + x) or associative ( x + ( y + z ) == ( x + y ) + z )
> for floating point numbers.
We're straying off-topic, but I can't let this pass. Addition and
multiplication _are_ commutative. Granted, if you have three numbers,
order of addition becomes important, but that is a consequence of
non-associativity. You have three possible answers, depending only
on which of the three numbers sits out in the first addition.
Dirk