[Newbies] Re: Float-Subclasses?

nicolas cellier nicolas.cellier.aka.nice at gmail.com
Thu Jun 30 18:34:50 UTC 2011

Ralph Johnson <johnson <at> cs.uiuc.edu> writes:

> On Wed, Jun 29, 2011 at 8:34 AM, bb <bblochl <at> arcor.de> wrote:
> > I found that there are some Float-Subclasses:
> > FloatD
> > FloatE
> > FloatQ
> > How can I use them and what are they good for?
> > I do not understand the use of
> > LargeZeroInteger
> > as well.
> Squeak does not have these classes.  In fact, most Smalltalks do not,
> even though it is part of the ANSI standard.  The only numeric classes
> that are part of the regular image are  Float, Fraction and Integer,
> with its subclasses LargePositiveInteger, LargeNegativeInteger, and
> SmallInteger.  There are other numeric classes out there, such as
> Complex, but these are the ones that get used by everybody.
> It has been a while since I have used VisualWorks.  It has a fixed
> decimal number, in addition to the ones I just mentioned.  But I don't
> think it has the subclasses of Float, either.
> -Ralph Johnson

VW has Float = FloatE and Double = FloatD, but no FloatQ.
Beside, it has SmallDouble = optimized FloatD in case of limitefd exponent.

Smalltalk-X has the three classes.

Dolphin only has Float = FloatD if I remember well.

VA ?

I also checked about asInteger, VW does the same as Squeak, truncate, and I
think it is inherited directly from st-80.
Being both Smalltalk-80 and ANSI is somehow a bit uncompatible, though I'm not
sure Smalltalk-80 is normative...


More information about the Beginners mailing list