[Maxima-commits] CVS: maxima/src gamma.lisp,1.44,1.45



Dieter Kaiser wrote:

....

> We have some more ways in Maxima to get the rational constant ((rat
> simp) 1 2). These macros and variables are defined in Maxima core:
>
> (defvar 1//2 '((rat simp) 1 2))
> (defmacro 1//2 () ''((rat simp) 1 2))	;1/2
> (defmacro half () ''((rat simp) 1 2))	;1/2
> (defmvar 1//2 '((rat simp) 1 2))
>
> Dieter Kaiser
>
>   
Clearly these are not all necessary!  If we have a suitable compilation 
environment we can have
#.(div 1 2)   be used for any of these.  The appropriate constant will 
be computed at compile time,
whether it is common lisp 1/2  or '((rat simp) 1 2)   or something else, 
like (list (get 'rat 'simpind) 1 2)

The problem with inserting ((rat simp) 1 2)  as constant code should be 
clear -- it means that a change
to common lisp 1/2  needs to be done in each place.  relatively easy 
with a good editor, I suppose.
RJF

> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>