Hello,
Sorry for the late feedback.

I think that it is good to have the possibility to set a bit width, just because otherwise the two complement signing display ('O d 6') would be broken, same for the leading zeros ('d z').


I agree that it is unwise to change anything in the way that it works. Changes should be backward compatible only, unless there is a very good reason for the change.

What could be improved would be to add some more functions, like (some ideas) :

   Vincent.

De : Lars Ingebrigtsen <larsi@gnus.org>
Envoyé : mardi 6 octobre 2020 03:28
À : Mattias Engdegård <mattiase@acm.org>
Cc : Vincent Belaïche <vincent.b.1@hotmail.fr>; 43764@debbugs.gnu.org <43764@debbugs.gnu.org>
Objet : Re: bug#43764: Calc shift right broken
 
Mattias Engdegård <mattiase@acm.org> writes:

>> But if we're changing the number of default bits, perhaps it would make
>> more sense to default to having no bit width restrictions?  Or would
>> that entail major Calc surgery? 
>
> Any changes to Calc, however minor, are fraught with danger and excitement!

:-)

> Fun as it may be, better not making changes speculatively though.
> (On the other hand it could be that everyone have been bothered about
> this for years. I have no way of knowing.)

In olden times, I would guess most people thought that it just had to be
this way.  But now that the rest of Emacs has bignums, it's perhaps more
surprising that Calc behaves this way when doing shifts.

On the other hand, I don't know what people use Calc for here.  If
people are going "I wonder what would happen on a 32-bit machine if I
were to do this shift operation", then it'd be something else...

--
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no