[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## [Axiom-developer] algebra cycles again (was: Left shifts of negative num

**From**: |
Page, Bill |

**Subject**: |
[Axiom-developer] algebra cycles again (was: Left shifts of negative numbers) |

**Date**: |
Tue, 14 Oct 2003 19:40:52 -0400 |

Dylan,
On Tuesday, October 14, 2003 7:19 PM you wrote:
>* ... *
>* > Failing finding a native Lisp function that does the*
>* > job, how about defining it as*
>* > *
>* > shift(x,y) == integer(ASH(x-1,y)$Lisp)+1*
>* *
>* In the case when x and y are both negative, I think this gives the*
>* "round towards zero" semantics that seem to be expected. An*
>* alternative is*
>* *
>* shift(x,y) == -integer(ASH(-x,y)$LISP)*
>* *
>* which might be clearer.*
>* *
Ok, I will buy that.
Unfortunately INT, SINT, and NNI are all bootstrapped so
replacing the code and testing is a little more involved.
Do you want to try it, or shall I?
BTW, I noticed that in the algebra/Makefile.pamphlet Tim
uses
SETCAT -> SINT -> UFD -> GCDDOM -> COMRING -> RING ->
RNG -> ABELGRP -> CABMON -> ABELMON -> ABELSG -> SETCAT
as an example of cycle in Axiom's type system. It occurs
to me that perhaps changes such as you suggested (removing
the Latex stuff from SETCAT) might help to eliminate *some*
of this sort of thing.
I am still not sure whether cycles of this kind are a
good thing or a bad thing ...
Regards,
Bill Page.

**[Axiom-developer] algebra cycles again (was: Left shifts of negative numbers)**,
*Page, Bill* **<=**