[Maxima] Simplification of infinities
Barton Willis
willisb at unk.edu
Tue Dec 8 06:57:18 CST 2009
I committed some (obvious) changes to altsimp. With these changes,
altsimp runs the testsuite with fewer errors (and maybe no
mathematical errors), and it fixes two (minor) known bugs:
taylor(exp(x), x, 0, 2) - taylor(exp(x), x, 0, 0) --> 0 + ... (not 0)
is(compare(inf, 7 + inf) = "=") --> true (not false).
Using altsimp, rtest_expintegral test #148 reports
-1.387778780781446b-17, instead of the expected 0.0b0. The number
-1.387778780781446b-17 looks suspect--is it due to a bogus double to
big float conversion?
It's a bit surprising that sum(sqrt(3), i, - 1, 1) --> 3 * sqrt(3) with
altsimp and
3^(3/2) with the standard.
Finally, timings for the testsuite: with altsimp: (Clozure CL 1.4 + XP)
874,563 milliseconds (874.563 seconds) to run with 1 available CPU core.
During that period, 735,719 milliseconds (735.719 seconds) were spent in
user mode
31,594 milliseconds (31.594 seconds) were spent in
system mode
182,703 milliseconds (182.703 seconds) was spent in GC.
3,247,185,512 bytes of memory allocated.
Without simplus:
538,547 milliseconds (538.547 seconds) to run with 1 available CPU core.
During that period, 497,031 milliseconds (497.031 seconds) were spent in
user mode
7,484 milliseconds (7.484 seconds) were spent in system
mode
24,359 milliseconds (24.359 seconds) was spent in GC.
3,982,627,096 bytes of memory allocated.
One big timing difference is that altsimp spends 159 more seconds in GC.
This might be due
to creating a new hash table each time through simplus?
Again, altsimp is educational (for me), but it might be more of a
distraction than useful. A good
algorithm shouldn't depend on the details of simplification, so there might
be some use
in having an alternative simplifier for testing some algorithms.
Barton
-----maxima-bounces at math.utexas.edu wrote: -----
>Am Sonntag, den 06.12.2009, 21:19 -0600 schrieb Barton Willis:
>> For what it is worth:
>>
>> In /share/contrib/altsimp there is a file altsimp.lisp that has some of
>my
>> ideas about an
>> infinity correct simplus function. There are some source code comments
>that
>> might be useful;
>> After loading altsimp, the testsuite gives bugs for
>>
>> rtest15.mac, problem (190 212)
>> rtest16.mac, problem: (77 134 186 190 218 221 224)
>> rtestsum.mac, problem: (141 142 171 226)
>> rtest_taylor.mac, problem: (34 36 63)
>> rtest_gamma.mac, problem: (504 505 506 507 508 509)
>> rtest_expintegral.mac, problem: (148 149)
>>
>> It runs the testsuite in about 1388.235 seconds, compared to about 488
>> seconds without
>> altsimp. That's humbling. There are sums for which altsimp is much
>faster,
>> I think.
>
>Hello Barton,
>
>thank you for the hint. I was not aware of this code.
>
>Dieter Kaiser
>
>
>_______________________________________________
>Maxima mailing list
>Maxima at math.utexas.edu
>http://www.math.utexas.edu/mailman/listinfo/maxima
More information about the Maxima
mailing list