[Maxima] sign non-forgetfulness

Stavros Macrakis macrakis at alum.mit.edu
Tue Jul 27 08:21:31 CDT 2010


Barton,

The scope of temporary facts is by default one command-line interaction.
This is definitely intentional!  You don't want to ask the user the same
thing multiple times, especially since she/he doesn't have any context to
determine what they mean!

There is a mechanism for defining contexts -- I haven't used it in a long
while, but it is documented (not superbly, but...).

                -s

On Tue, Jul 27, 2010 at 00:26, Barton Willis <willisb at unk.edu> wrote:

> Apparently csign (and sign) temporarily place facts in the fact database,
> but
> the temporary facts aren't removed immediately. An example:
>
> A simple-minded function that calls csign:
>
> (%i1) possible_singular_pts(e) := block([inflag : true],
>  e : factor(e),
>  if mapatom(e) then set()
>  else if op(e) = "^" and csign(second(e)) # 'pos and not
> constantp(first(e)) then set(first(e))
>  else xreduce('union, map('possible_singular_pts, args(e))))$
>
> Some tests:
>
>  (%i2) e : integrate(exp(a^2*x^2+b*x),x)$
>
> All is well:
>
>  (%i3) possible_singular_pts(e);
>  (%o3) {a}
>
>  (%i4) facts(a);
>  (%o4) []
>
> Same calculation, but inside a function larry:
>
>  (%i5) larry(e) := (possible_singular_pts(e), facts(a))$
>
> After the call to possible_singular_pts, notequal(a,0) is still in the fact
> database:
>
>  (%i6) larry(e);
>  (%o6) [notequal(a,0)]
>
> But after larry exits, notequal(a,0) isn't in the fact database:
>
>  (%i7) facts(a);
>  (%o7) []
>
> It's not difficult to workaround this (putative) bug, but it make me :(
>
> --Barton
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.math.utexas.edu/pipermail/maxima/attachments/20100727/d1cd7dd1/attachment.html>


More information about the Maxima mailing list