GNU bug report logs - #43764
Calc shift right broken

Previous Next

Package: emacs;

Reported by: Vincent Belaïche <vincent.b.1 <at> hotmail.fr>

Date: Fri, 2 Oct 2020 15:29:02 UTC

Severity: normal

Done: Mattias Engdegård <mattiase <at> acm.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Mattias Engdegård <mattiase <at> acm.org>
To: Vincent Belaïche <vincent.b.1 <at> hotmail.fr>
Cc: 43764 <at> debbugs.gnu.org
Subject: bug#43764: Calc shift right broken
Date: Fri, 2 Oct 2020 22:49:07 +0200
This actually works as designed; see the Calc manual. In short, Calc maintains a 'word size' and clips all results of binary operations to that size. Apparently, Calc clips the argument for good measure before even performing the right-shift. The default word size is 32 bits; you can change it using "b w".

Whether this is the best design can be debated, of course. Tell us if you are happy with this explanation, or if you think it should work in a different way. (Can't promise any major changes, though.)

A very modest reform would be to set the default word size to 64 bits, to keep up with the times.





This bug report was last modified 4 years and 196 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.