Wait, that's not a feature. Was: What does "01" mean?
Colin Putney
cputney at wiresong.ca
Wed Jun 22 01:55:32 UTC 2005
On Jun 21, 2005, at 7:43 PM, Don McLane wrote:
> Everyone's done a great job on Squeak, I'm not criticizing. But
> this stuff about needing to 'normalize' a Large...Integer before
> comparing seems dangerous. It appears as though integers can be
> magically coerced into LargeIntegers (which is nice), but if you
> don't expect it, it can be quite surprising. Surprises should be
> minimized.
Quite correct, Don. This should be considered a bug. If you change
#raisedTo:modulo: to use #\\ instead of #\\\, it'll return a properly
normalized integer, and your comparison will work correctly.
Judging by the comment in LargePositiveInteger>>\\\, it looks like a
non-normalizing optimized version for use in cryptographic number
crunching.
Colin
More information about the Squeak-dev
mailing list
|