[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] algebra cycles again (was: Left shifts of negative num
[Axiom-developer] algebra cycles again (was: Left shifts of negative numbers)
Tue, 14 Oct 2003 19:40:52 -0400
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
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 ...
- [Axiom-developer] algebra cycles again (was: Left shifts of negative numbers),
Page, Bill <=