idmiddle on Wed, 19 Aug 2009 23:57:57 +0200


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

Re: division by zero in intnum


Yes, I had noticed that. Intnum seems to avoid rational divide-by-zero errors, but not floating-point ones.


On Wed, 19 Aug 2009, Kurt Foster wrote:

Hmmm, look what happened when I specified the left endpoint a bit differently -- I simply replaced the t_REAL 0.5 with the t_FRAC 1/2, which is exact.:

? intnum(r=[1/2,-1/2], 1, 1/sqrt(4*r^2-1))
time = 6 ms.
%1 = 0.65847894846240835431252317365398422201

Perhaps that will say something about the nature of the problem.

Hope that helps!


On Aug 19, 2009, at 2:20 PM, idmiddle@umich.edu wrote:

I've been having trouble with intnum, and managed to distill it down to the following, which occurs in both 2.3.4 and the latest svn:

? intnum(r=[0.5,-1/2], 1, 1/sqrt(4*r^2-1))
***   at top-level: intnum(r=[0.5,-1/2],1,1/sqrt(4*r^2-1))
***                                        ^---------------
*** _/_: division by zero

(It makes no difference whether the order of the singularity is specified or not.)

Ivan