axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Axiom-developer] algebra cycles again (was: Left shifts of n egativ


From: Page, Bill
Subject: RE: [Axiom-developer] algebra cycles again (was: Left shifts of n egative numbers)
Date: Tue, 14 Oct 2003 22:29:55 -0400

Tim,

Thanks for taking the time to explain all this.

I was especially mystified by the code in float.spad that
defines:

  shift(x:%,n:I) == [x.mantissa,x.exponent+n]

but you wrote:

> ...
> Things to know:
> 
> ...   
> 2 The shift function in SingleInteger has the SPADreplace property
>   (see SINT.NRLIB/code.lsp). That means that algebra code that uses
>   shift will be replaced by a call to QSLEFTSHIFT at compile time.
>   The line you are looking for reads:
> 
>   (PUT (QUOTE |SINT;shift;3$;44|) (QUOTE |SPADreplace|) 
> (QUOTE QSLEFTSHIFT))
> 
>   In the interpreter you'll find the symbol |SINT;shift;3$;44|
>   has the property |SPADreplace| on the property list 
>   with the value QSLEFTSHIFT
>   which the compiler uses to open-code the shift function.
> 

Wow! I think that explains a lot...

Cheers,
Bill Page.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]