Re: +-Inf and NaN
Richard Fateman <[email protected]> Sun, 25 Feb 2024 08:41:44 -0800
| Newsgroups | gmane.comp.mathematics.maxima.general,gmane.lisp.gcl.devel |
|---|---|
| Message-ID | <CADB8Zm5h=rAbtPZr50d=K6rvGXB2pTsxuw0jJgLw3+PYq0Ry=Q@mail.gmail.com> |
The unums (posit..) number formats are described in the wikipedia article "unum (number format). John Gustafson has been working on this since before the IEEE committee on floating point convened. He was a contributor to that standard. While it is interesting, there are some significant downsides which are discussed in several of the references to the Wikipedia entry, typically by W. Kahan. for instance https://people.eecs.berkeley.edu/~wkahan/UnumSORN.pdf or see, for a more detailed analysis https://people.eecs.berkeley.edu/~demmel/ma221_Fall20/Dinechin_etal_2019.pdf For the particular situation of computer algebra systems, it may be more useful to support arbitrary (i.e. growing) precision arithmetic, interval arithmetic (for which there is a new IEEE standard), and (for compatibility with the huge and growing software collection) IEEE 754 floats. If there is some interest in the Maxima community for working on "new" arithmetic, I suggest that finishing the implementation of intervals would be of some benefit, rather than posits (which sometimes are intervals). Integrating mpfr (external fast bigfloat library) would be nice but runs into the political problem, in the Maxima community, that different Lisps need different interface code, so requires considerable effort. What makes CAS different? 1. symbols for Infinity etc are available. 2. bigfloats are already part of the system. 3. exact rational numbers of arbitrary precision are available. 4. people may not agree on the model of extended real numbers, either affine or projective. 5. (generally) there are considerable resources of memory and CPU. There is a software implementation of unums in Lisp (SBCL) here. https://github.com/amb007/cl-unum so it is possible to experiment with interfacing it to Maxima. RJF On Sat, Feb 24, 2024 at 7:08 PM James Cloos <[email protected]> wrote: > >>>>> "RT" == Raymond Toy <[email protected]> writes: > > RT> Is there any existing lisp that doesn't support IEEE single and double > RT> precision floats? > > I don't know of any cl implementations, but not all interesting hardware > has hw fp. And while packages like maxima may not get run on such > systems, lisp in general still makes sense. > > And as fpga and the like grow larger, lisps -- including common -- would > make great programming environments for them. > > In either case, if the fp has to be done in software, I strongly suspect > posit or gmp-style will be better than 754. > > -JimC > -- > James Cloos <[email protected]> > OpenPGP: https://jhcloos.com/0x997A9F17ED7DAEA6.asc > > > _______________________________________________ > Maxima-discuss mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/maxima-discuss > _______________________________________________ Maxima-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/maxima-discuss