michaelengel / crosstalk

Smalltalk-80 bare metal implementation for the Raspberry Pi
362 stars 21 forks source link

primitiveBitShift and loss of precision #6

Open kdabwl opened 2 years ago

kdabwl commented 2 years ago

The routine primitiveBitShift as it is written now may lose significant bits, therefore it should fail if, for LSB to MSB, a checking reverse shift is not equal to integerReceiver.

Try (1 bitShift: 32) class => LargePositiveInteger, with e.g. this image.