|Jeroen Demeyer on Sun, 28 Sep 2014 09:36:46 +0200|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
|Re: [PATCH] enable basic arithmetic with infinity|
Hi Karim, On 2014-09-27 15:44, Karim Belabas wrote:
Now that you are breaking backwards compatibility anyway, then this would be a good time to reconsider that decision.Unfortunately, I made the mistake of allowing valuation(0) a long time ago (circa 1995).
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.
I personally think (B) would be the best, but I much prefer (A) to what we have now. The current situation is a very strange middle ground: it's like PARI cannot really decide whether they want to allow or disallow people calling valuation(0,p). At least with (A) you get an error immediately instead of at some later time, which would make debugging easier. It also sends a clear message to PARI users about valuation(0,p).
I never asked for that and I also don't think that allowing 2*oo would force you to consider oo everywhere.I really don't want to instrument essentially all numerical functions to make sense of infinities-as-actual-numbers, including beasts such as a+I*oo which make perfect sense for complex integrals. A related former TODO item was to introduce IEEE754 special values as t_REALs (infinities, signed 0s, NaN, etc.): I decided against it a long time ago.