I discovered this bug while I am digging another one:
Martin's orignal integral: integrate((a + b*x)/((3 + x^2)*(1 - x^2)^(1/3)), x)
fails. However integrate(1/((3 + x^2)*(1 - x^2)^(1/3)), x) succeeds
while integrate(a/((3 + x^2)*(1 - x^2)^(1/3)), x) fails:
(1) -> integrate(a/((3 + x^2)*(1 - x^2)^(1/3)), x)
>> Error detected within library code:
catdef: division by zero
Note that this is not an "integration error", it comes from catdef.
More interestingly, the third time you invok this expression,
it stucks instead of giving this error.
")set break break" and the backtrace leads me to bringDown
from FunctionSpaceReduce from pfo.spad.
After some "print", I find that there's:
nn : Integer := 1
K2Z k == ... setelt!(redmap, k, random(nn)$Z)::F
eval(f, lk := kernels f, [K2Z k for k in lk])
The nn is supposed to be the initial seed, however
random(nn) will always return 0 before nn get modified
elsewhere. So when f includes a kernel in denominator,
the divesion by zero error will occur.
This part of code is modified by r1976, which seems to
1) The default value for nn is incorrect, and nn is not
updated after being used in K2Z.
Actually, I think argumentless 'random' is a good idea.
2) Seems the type of random is Integer -> NNI, in this
case it should require a PI. But I'm not very clear with
3) Before r1976, seems this integration still doesn't return
in a long time, maybe there's a bug somewhere else.
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to firstname.lastname@example.org.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.