On Thursday, March 10, 2016 at 3:50:21 PM UTC+1, Volker Braun wrote: > > On Thursday, March 10, 2016 at 8:17:47 AM UTC+1, Jeroen Demeyer wrote: >> >> RR represents the real numbers > > > IMHO we should be very careful to never ever say that. > > RR is floating point arithmetic which is a useful approximation to reals. > > But if you are not aware of the differences then you very quickly run into > problems with == comparisons. Since RR is not the reals the question is: > what is it. The answer to that should always be IEEE floating point or as > close as possible to that, since that is the by far most common definition. >
Not really disagreeing with this, but I think it's important to remember that the IEEE floating-point format was designed to cram the most possible information into a space of 32/64 bits and provide the most versatility while being possible to implement efficiently in hardware, on a limited instruction set. This is why it has hacks like negative zero, NaN, NaN != NaN, gradual underflow, very limited exponent range, global state, etc. It was *not* necessarily designed to provide the most useful abstraction for high-level mathematics software. When you work in a high-level language with classes, operator overloading, exceptions, garbage collection, category-theoretical coercions, etc., some aspects of the floating-point format make less sense. Certainly, for raw numerical performance, IEEE floating-point numbers are incredibly well crafted. In Sage, this doesn't matter as much when it takes 100 cycles just to wrap and unwrap a Python object, but it's still very important for arrays and matrices of course. Familiarity is also a good thing. To the extent that IEEE floating-point numbers are broken, they are broken in a way that is well understood. Fredrik -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.