product(sum(f(i),i,1,inf),j,1,inf) simplifies to inf
This is wrong. The simplest counterexample is f(i):=0,
where the product = 0.
If you want to get fancier, consider f(i):=2^-i;
product = 1.
5.9.3 Windows GCL
Logged In: YES
Changing the two instances of MGRP to MGREATERP in SIMPPROD1
(src/asum.lisp) makes this problem go away.
MEVALP routes ((MGREATERP) ...) to the function MGRP
(src/compar.lisp). I speculate the presence of MGRP (instead
of MGREATERP) in SIMPPROD1 is an optimization. (MEVALP
'((MGRP) ((%SUM) (($F) $I) $I 1 $INF) 1)) returns T, which
is spurious, and which then leads SIMPPROD1 to conclude the
product is infinite. MGRP refers to special variables ODDS
and EVENS which is probably part of the problem. However, I
confess that I don't fully understand what is going on.
Grepping for MGRP, it looks like MGRP is called elsewhere.
Maybe we should review the use of MGRP and friends.
Change MGRP to MGREATERP in SIMPPROD1 (committed as r1.15
src/asum.lisp) and add a test case (committed as r1.6
tests/rtestsum.mac). Closing this report as fixed.
Although MGRP is called in other files, I didn't change any
other use of MGRP.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.