Re: +-Inf and NaN

Stavros Macrakis <[email protected]> Mon, 26 Feb 2024 11:53:31 -0500
Newsgroups gmane.comp.mathematics.maxima.general,gmane.lisp.gcl.devel
Message-ID <CACLVabXZgiD27=PvsSvXC+1HtiPUjTdGO1ALUpTp9uNKDRx_PQ@mail.gmail.com>
On Mon, Feb 26, 2024 at 9:51 AM Camm Maguire <[email protected]> wrote:

> > On Fri, Feb 23, 2024 at 12:20 PM Henry Baker <[email protected]>
> wrote:
> ...
> > One of these days (ha ha), we'll even get Maxima to realize that
> > INF-INF does not equal 0,
>


> COMPILER>(- +inf +inf)
> #<-nan>


I was referring specifically to *Maxima **inf*, which is currently
implemented as the symbol *$inf* and where the symbolic expression *(sub
'$inf '$inf) *simplifies to *0*.

The problem with symbolic calculations is similar to the compiler
optimization issue -- can you simplify *(sub $x $x*) to *0*, knowing that
some time later, someone may substitute *$inf* for *$x*; similarly, can you
simplify *(div $x $x) *to *1*, knowing that *0 *may be substituted for *$x*?
Maxima currently blithely assumes that's OK. There are proposals to keep
track of implicit assumptions (called "caveats") so the simplification of *(sub
$x $x*) would be *0 {caveat: $x is a number} *(i.e., not *INF,* *IND*, or
*UND*).

           -s

_______________________________________________
Maxima-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maxima-discuss