Why is *print-circle* set to T by default? WAS: grinding, etc.



I agree that *print-circle* = T is probably more generally preferable.
I agree w/ Fateman's suggestion to modify other printing parameters.
Let's change those and set *print-circle* back to nil.

best

Robert Dodier

On 2/9/11, Stavros Macrakis <macrakis at alum.mit.edu> wrote:
> Michel,
>
> The problems you describe below go away if you set *print-circle* to NIL.
>  As for creating a formula suitable for evaluation by C, I don't understand
> why you're looking at grind or print at all: I'd think that you'd want to
> start with the code of the fortran command and modify it as necessary.  (I'd
> have thought someone has already written a Maxima-to-C printer.)
>
>               -s
>
> On Wed, Feb 9, 2011 at 11:40, Michel Talon <talon at lpthe.jussieu.fr> wrote:
>
>> Stavros Macrakis wrote:
>>
>> > I don't know why *print-circle* is set to T by default in Maxima -- it
>> > makes human reading of printed sexpressions much harder, even when there
>> > *are*
>> > repeated subexpressions -- see examples below.
>>
>> Indeed doing that allows to always see the pair (operator SIMP) in the
>> correct place, and thus reconstruct a formula appropriate for
>> C evaluation, by locating the operator and its arguments.
>> With x:y*(z + t^2 ) i had (as in your example) :
>>
>> MAXIMA> #$x^2$
>>
>> ((MTIMES . #1=(SIMP)) (#2=(MEXPT . #1#) $Y 2)
>>  (#2# ((MPLUS . #1#) (#2# $T 2) $Z) 2))
>>
>> and the #2 was even more worrisome for my purpose than the #1. Here the
>> expression is "simplified" to y^2*(z+t^2)^2 so now we have three
>> (MEXPT SIMP) which are shared under #2, not that obvious to the beginner.
>>
>>
>> Grind doesn't mess with print-circle, but from what i have tested when
>> picking sufficiently small parts of the above expression with car cdr cddr
>> etc. the #n automatically get substituted at some point.
>>
>> --
>> Michel Talon
>>
>> _______________________________________________
>> Maxima mailing list
>> Maxima at math.utexas.edu
>> http://www.math.utexas.edu/mailman/listinfo/maxima
>>
>