Re: +-Inf and NaN
Stavros Macrakis <[email protected]> Fri, 23 Feb 2024 14:05:40 -0500
| Newsgroups | gmane.comp.mathematics.maxima.general,gmane.lisp.gcl.devel |
|---|---|
| Message-ID | <CACLVabX=uRTt4Ti78v206msT=pj8q3LdSo-KGsW6KudfiHc1Zw@mail.gmail.com> |
On Fri, Feb 23, 2024 at 12:20 PM Henry Baker <[email protected]> wrote: > ...There was a reason why Maclisp used a separate function name for float > > arithmetic functions, and it wasn't just to speed up float arithmetic. > Actually, that was precisely why. (plus a b) was be translated to (+$ a b) if a and b were of type float. The real reason is that *floats don't adhere to standard algebraic axioms*. > Well, since *plus* invokes floating point operations, it has the same issues. > In particular, standard "=" needs to be an *equivalence relation*, which > > means transitivity, among other things, so floating point needs its own > > brain-damaged 'equality' predicate -- perhaps IEEE-= > Extending data types with an NA value is pretty standard and useful, and not just for floats. One of these days (ha ha), we'll even get Maxima to realize that INF-INF does not equal 0, and that not all INFs are equal. _______________________________________________ Maxima-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/maxima-discuss