Signed infinity and signed zero Re: [Maxima] proposal to change acos



There are lots of rules, most of which are consistent,
and some of which help with branch cuts.

For signed stuff, we can use
0/0 = und rational
1/0 = pos inf
-1/0 = neg inf
0/-1 = neg zero
0/1 = 0 = pos or unsigned zero

at least that was my proposal.

Modeling stuff on the IEEE floats is not necessarily
a good idea though.  Remember that the goal for IEEE
floats was to make best use of a finite collection of
bits  (32, 64,  or extended [maybe 80]), for representing
floats, with a few extra pieces.   A CAS comes at this
from another direction, where any number of bits can be
used, even names and symbols, for values.  Some values
are floating point numbers.

But then you can't use float division to do 1/0  if you
want the answer to come out "infinity".

RJF


Raymond Toy wrote:

>>>>>>"Richard" == Richard Fateman  writes:
>>>>>>            
>>>>>>
>
>    Richard> Basically, if you have a system that has signed
>    Richard> infinities (as IEEE 754) you end up with signed zeros.
>
>    Richard> For a probably too-long discussion of this, see extrat.pdf
>    Richard> in www.cs.berkeley.edu/~fateman/papers/   also refs.
>
>    Richard> Projective and affine mode rational numbers are also
>    Richard> possible. This would give us in affine mode,
>    Richard> one (unsigned + or -   infinity) which is 1/0.
>
>    Richard> Why introduce this?  because a +b/c  should be
>    Richard> computed as   a    if  c=1/0.   This allows one
>    Richard> to continue to compute, even after a division by 0.
>
>    Richard> If you have +inf and -inf you should also have +0 and -0,
>    Richard> and 0/0= undef. (projective mode)
>
>    Richard> This could/should be added to the Lisp, and then allowed
>    Richard> to show through for Maxima.
>
>Hmm.  This complicates things quite a bit because as far as I know,
>only cmucl and sbcl support signed zeroes.  Thus, we can't just
>convert log(-1.0 - 0.0 *%i) into (cl:log #c(-1.0 -0.0)).  We have to
>do this ourselves.  Of course, we would have to do this ourselves for
>bigfloats, so perhaps that's not so bad.
>
>We will also have to prevent maxima from converting -0.0*%i to 0.
>(Curiously, maxima cvs on cmucl says -0.0*%i is -0.0)
>
>Ray
>
>  
>