For extended real number arithmetic, I think that both special
variables errorsw and limitp need to be considered--it seems that
limitp should override errorsw; thus no error when limitp is true.
I added a check for limitp in my altsimp code---that speed it up
considerably--before it would sometimes throw errorsw when limitp
was true. Now altsimp runs the testsuite in about 603 seconds and
allocates 1,296,248,744 bytes of memory; the standard simplus runs the
testsuite in about 587 seconds and allocates 4,167,894,632 bytes of
memory.
I'm surprised at the difference between the allocated memory with
and without altsimp.
Barton
-----maxima-bounces at math.utexas.edu wrote: -----
>To:?Dieter?Kaiser?<drdieterkaiser at web.de>
>From:?Dieter?Kaiser?<drdieterkaiser at web.de>
>Sent?by:?maxima-bounces at math.utexas.edu
>Date:?12/07/2009?06:35PM
>cc:?"maxima at math.utexas.edu"?<maxima at math.utexas.edu>
>Subject:?Re:?[Maxima]?Simplification?of?infinities
>
>Am?Montag,?den?07.12.2009,?23:05?+0100?schrieb?Dieter?Kaiser:
>
>I?have?replaced?the?function?intersection?with?the?following
>implementation:
>
>(defun?not-freeof-infinities-p?(expr)
>??(let?((flag?nil))
>??(dolist?(sym?'($inf?$minf?$infinity?$ind?$und))
>????(if?(member?sym?expr?:test?#'eq)
>??????(return?(setq?flag?t))))
>??flag))
>
>This?functions?seems?to?be?somewhat?more?efficient?than?the?function
>intersection.?These?are?the?results?for?one?of?the?examples:
>
>(%i2)?qq:?ratsimp((x^50000-1)/(x-1))$
>Evaluation?took?2.1121?seconds?(2.1806?elapsed)?using?7.631?MB.
>
>We?test?the?expressions?to?be?free?of?infinities:
>
>(%i3)?for?i?thru?1000?do?qq:qq+1$
>Evaluation?took?22.4814?seconds?(22.5831?elapsed)?using?381.737?MB.
>(%i4)?for?i?thru?1000?do?qq:qq+1$
>Evaluation?took?22.4614?seconds?(22.5891?elapsed)?using?381.737?MB.
>(%i5)?for?i?thru?1000?do?qq:qq+1$
>Evaluation?took?22.2574?seconds?(22.3724?elapsed)?using?381.737?MB.
>
>We?switch?off?the?test:
>
>(%i6)?for?i?thru?1000?do?qq:qq+1,simpinfinities:false$
>Evaluation?took?22.3414?seconds?(22.7901?elapsed)?using?381.738?MB.
>(%i7)?for?i?thru?1000?do?qq:qq+1,simpinfinities:false$
>Evaluation?took?22.3614?seconds?(22.4699?elapsed)?using?381.738?MB.
>(%i8)?for?i?thru?1000?do?qq:qq+1,simpinfinities:false$
>Evaluation?took?22.4134?seconds?(22.5303?elapsed)?using?381.738?MB.
>
>I?do?not?get?a?significant?increase?of?the?runtime?of?the?testsuite?with
>this?implementation.
>
>Dieter?Kaiser
>
>
>_______________________________________________
>Maxima?mailing?list
>Maxima at math.utexas.edu
>http://www.math.utexas.edu/mailman/listinfo/maxima