[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#43764: Calc shift right broken
From: |
Mattias Engdegård |
Subject: |
bug#43764: Calc shift right broken |
Date: |
Tue, 13 Oct 2020 11:56:50 +0200 |
9 okt. 2020 kl. 17.34 skrev Vincent Belaïche <vincent.b.1@hotmail.fr>:
> • set bit width 0 would remove the automatic clipping meaning infinite
> width.
The previously mentioned patch implementing this has now been pushed to Emacs
master. Thanks again for the suggestion!
I should also note the rationale for disabling left/right rotation when the
word size is set to zero: while it would make sense to define
(rotate-left x 1) =>
x≥0: (shift-left x 1)
x<0: (+ (shift-left x 1) 1)
(rotate-right x 1) =>
x≥0, x even: (shift-right x 1)
x<0, x odd: (shift-right x 1),
the two remaining cases of rotate right with {x≥0, x odd} or {x<0, x even}
cannot result in a finite integer.
If someone has a better idea, or would like rotation to be implemented as a
partial function according to the above definition, please comment. For now the
bug is closed.