Re: +-Inf and NaN

Richard Fateman <[email protected]> Mon, 26 Feb 2024 17:13:11 -0800
Newsgroups gmane.comp.mathematics.maxima.general,gmane.lisp.gcl.devel
Message-ID <CADB8Zm6coXRBbSXWys1EjnUQFcZA3NU2=dS1xg4_b+u7wX7Cwg@mail.gmail.com>
I'm not sure what the algebraists would call it exactly, but there is
a domain in which x-x is always zero, and this is where rational function
manipulation is done.
There is another concept, valuation, associated with expressions, which
asserts
the values you are talking about.  Certainly saying that x-x is zero
doesn't make sense
if x is, say, a banana, where subtraction doesn't make sense.  And then
there are the
foolish programming languages where x+x means xx since "+" is also
concatenation.
CAS try to mimic mathematics rather than programming, but there is enough
slush in
mathematics to make it impossible to have a simple universal language for
all of it.
Modeling high-school algebra is some basic goal; ventures into higher
mathematics
(calculus, group theory, complex variables, tensors, ...) sometimes work.
Numerical
evaluation, tends to be tricky.
I think that rather than caveats, some kind of context-setting may make
life easier.
e.g. a chatbot prompt --
Computing like a specialist in non-commutative algebra, simplify the
following expression:...

RJF

On Mon, Feb 26, 2024 at 8:53 AM Stavros Macrakis <[email protected]> wrote:

> 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