Inconsistency when using previously defined variables as arguments to functions
Subject: Inconsistency when using previously defined variables as arguments to functions
From: Richard Fateman
Date: Mon, 31 Jan 2011 15:30:16 -0800
On 1/31/2011 3:14 PM, thomas wrote:
> On 01/31/2011 04:29 PM, Stavros Macrakis wrote:
>>
>> > * ev( ... , simp ) is synonymous with ev( ... ) unless you have
>> previously
>> > set simp to false (which is a bad idea). What did you expect
>> it to do?
>>
>> I disagree that simp:false is a bad idea. The effect is exactly what
>> one would expect; it disables built-in simplifications. If that's
>> what
>> you want, then great.
>>
>>
>> Certainly, simp:false has its uses. But in this case, I very much
>> doubt that the user actually needed or wanted simp:false.
>>
>
> This is probably not relevant to the discussion that evolved out of
> this, but: yes, we (meaning Geogebra, a math-software that's currently
> trying to interface maxima) actually use simp: false.
I forget the exact context of your project, but if you are not using the
simplifier, then perhaps what you want to use is
just the parser and the display.
Then occasionally you could call the simplifier or the evaluator.
These are all Lisp programs.
Note that neither the display nor the evaluator will necessarily work on
forms that come from the parser and are not
simplified, but they probably will for expressions that are
> The background is that since Maxima doesn't have any kind of
> "Hold"-statement,
There are 2 operations, somewhat separable. simplification and
evaluation. If you just use the parser to
obtain an expression it is neither simplified nor evaluated.
> we sometimes need to send statements to maxima without having them
> simplified, to mimic the behaviour of "hold". Everything that we want
> to send to Maxima simplified will go through ev(..., simp) instead.
> This actually works pretty well for our purposes, we've yet to
> encounter any problems with this approach. The one with the
> limit('(..), 'i) was the first one I witnessed. Is there a better way
> to do this?
Probably you could use the specific Lisp programs to do exactly what you
want done, and if there is something
you do not want to do, then you don't call those programs.
They include
simplifya
meval1
displa
and I'm not sure what you would use for parsing, since it depends
somewhat on how you interface with your data.
RJF