For a solution that works without change in 32/64 migration, one could use
self class maxVal digitLength

... but there's quite a bit of calculation in digitLength.

Speaking of excessive calculation;
SmallInteger class >> startUp: isImageStarting
        "The image is either being newly started (isImageStarting is true), or 
it's
just been snapshotted.
         If this has just been a snapshot, skip all the startup stuff."
        | next val |
        isImageStarting ifFalse: [^self].
        val := -32768. "Assume at least 16 bits"
        [next := val + val.
        next class == self] whileTrue:
                [val := next].
        minVal := val.
        maxVal := -1 - val

... really? If this actually runs on 64bit image startup, that's quite
impressive!



--
View this message in context: 
http://forum.world.st/Confused-about-Floats-on-64-bit-Pharo-6-tp4948805p4948834.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.

Reply via email to