1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-28 07:50:48 -08:00
emacs/test/lisp/calc
Mattias Engdegård 35478f3f76 Calc: fix arithmetic right shift sign bit detection
Arithmetic right shift didn't compute the bit to shift in correctly.
For example, #x600000000 right-shifted 8 steps (with 32 bit word size)
resulted in #xff000000 rather than 0. (Bug#43764)

* lisp/calc/calc-bin.el (calcFunc-ash): Fix condition.
* test/lisp/calc/calc-tests.el (calc-tests--clip, calc-tests--lsh)
(calc-tests--rsh, calc-tests--ash, calc-tests--rash, calc-tests--rot):
New.
(calc-shift-binary): New test.
2020-10-09 11:24:15 +02:00
..
calc-tests.el Calc: fix arithmetic right shift sign bit detection 2020-10-09 11:24:15 +02:00