[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-developer] Left shifts of negative numbers
From: |
Dylan Thurston |
Subject: |
Re: [Axiom-developer] Left shifts of negative numbers |
Date: |
Tue, 14 Oct 2003 21:30:40 -0400 |
User-agent: |
Mutt/1.5.4i |
On Tue, Oct 14, 2003 at 09:09:50PM -0400, Page, Bill wrote:
> Does
>
> shift(x,y) == -integer(ASH(-x,y)$Lisp
>
> involve two (potential long) integer multiplications?
> I.e. -1*integer(ASH(-1*x,y)$Lisp
I don't know whether adding/subtracting 1 or negation will be faster,
but either one should be faster than any multiplication (unless
multiplication by -1 is special cased somewhere). There are no carries
to worry about.
I suspect the additions are probably faster, actually.
Peace,
Dylan
signature.asc
Description: Digital signature
- [Axiom-developer] Left shifts of negative numbers, Dylan Thurston, 2003/10/14
- RE: [Axiom-developer] Left shifts of negative numbers, Page, Bill, 2003/10/14
- RE: [Axiom-developer] Left shifts of negative numbers, Page, Bill, 2003/10/14
- RE: [Axiom-developer] Left shifts of negative numbers, Page, Bill, 2003/10/14
- Re: [Axiom-developer] Left shifts of negative numbers,
Dylan Thurston <=