Karim Belabas on Sun, 28 Sep 2014 18:00:09 +0200

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 Re: [PATCH] enable basic arithmetic with infinity

```* Loïc Grenié [2014-09-28 16:49]:
> 2014-09-28 9:36 GMT+02:00 Jeroen Demeyer <jdemeyer@cage.ugent.be>:
> > Hi Karim,
> >
> > On 2014-09-27 15:44, Karim Belabas wrote:
> >>
> >> Unfortunately, I made the mistake of allowing valuation(0) a long time
> >> ago (circa 1995).
> >
> > Now that you are breaking backwards compatibility anyway, then this would be
> > a good time to reconsider that decision.
> >
> > Consider the following two "extreme" cases:
> > (A) valuation(0,p) is not allowed in any case and always raises an error.
> > (B) valuation(0,p) is allowed and using it in mathematical operations (like
> > 2*valuation(0,p)) works.
>
>      Even though there is no formal vote, I vote for (B), then (A),
>      then actual situation.
>
>     I've tried to implement infinity arithmetic as well, some time
> ago, and I came
>   to the conclusion that it is actually tricky, so (A) may be the best solution
>   after all (even though (B) is my prefered one).

Altough there is no formal vote, note that (A) should actually read

(A) valuation(0,p) AND poldegree(0) are not allowed in any case and
always raise an error.

Otherwise we have essentially the same problem with poldegree(), together with
a new inconsistency between analogous functions.

Cheers,

K.B.

P.S. We could also define

vecmin([]) = +oo
vecmax([]) = -oo

:-)

--
Karim Belabas, IMB (UMR 5251)  Tel: (+33) (0)5 40 00 26 17
Universite de Bordeaux         Fax: (+33) (0)5 40 00 69 50
351, cours de la Liberation    http://www.math.u-bordeaux1.fr/~kbelabas/
F-33405 Talence (France)       http://pari.math.u-bordeaux1.fr/  [PARI/GP]
`

```