On Wed, Apr 15, 2015 at 9:17 AM, Joerg Arndt <arndt@jjj.de> wrote:
* Mike Stay <metaweta@gmail.com> [Apr 15. 2015 17:38]:
Addition isn't even associative in floating point: http://en.wikipedia.org/wiki/Associative_property#Nonassociativity_of_floati... so floating point numbers don't even form a monoid under addition. Is addition commutative?
I don't think so: Take one value L so large that adding 1.0 does not change it at all. Also take very many 1.0's (indeed take L of them). Now 1.0 + 1.0 + 1.0 + ... + 1.0 + L ==> 2.0 * L but L + 1.0 + 1.0 + 1.0 + ... + 1.0 ==> L
So large floating point numbers behave rather like countably infinite ordinals in that sense: 1 + ω = ω ≠ ω + 1.
Suggest to check out (no idea how helpful as I never asked myself the question above):
Thank you! -- Mike Stay - metaweta@gmail.com http://www.cs.auckland.ac.nz/~mike http://reperiendi.wordpress.com