Category: Language-Data types
Superclass: Float
My instances represent floating point numbers that have the same accuracy as C's "double" numbers.

Method category index

byte-order dependencies (class)
characterization (class)
converting (class)
built ins (instance)
coercing (instance)
converting (instance)

byte-order dependencies (class)

fromBytes: aByteArray
Answer a float with the bytes in aByteArray, which are in big-endian format.

signByte

Answer the byte of the receiver that contains the sign bit

top


characterization (class)

decimalDigits
Return the number of decimal digits of precision for a FloatD. Technically, if P is the precision for the representation, then the decimal precision Q is the maximum number of decimal digits such that any floating point number with Q base 10 digits can be rounded to a floating point number with P base 2 digits and back again, without change to the Q decimal digits.

emax

Return the maximum allowable exponent for a FloatD that is finite.

emin

Return the maximum allowable exponent for a FloatD that is finite.

fmax

Return the largest normalized FloatD that is not infinite.

fminNormalized

Return the smallest normalized FloatD that is > 0

infinity

Return a FloatD that represents positive infinity.

nan

Return a FloatD that represents a mathematically indeterminate value (e.g. Inf - Inf, Inf / Inf).

negativeInfinity

Return a FloatD that represents negative infinity.

precision

Answer the number of bits in the mantissa. 1 + (2^-precision) = 1

top


converting (class)

coerce: aNumber
Answer aNumber converted to a FloatD

top


built ins (instance)

* arg
Multiply the receiver and arg and answer another Number

+ arg

Sum the receiver and arg and answer another Number

- arg

Subtract arg from the receiver and answer another Number

/ arg

Divide the receiver by arg and answer another FloatD

< arg

Answer whether the receiver is less than arg

<= arg

Answer whether the receiver is less than or equal to arg

= arg

Answer whether the receiver is equal to arg

> arg

Answer whether the receiver is greater than arg

>= arg

Answer whether the receiver is greater than or equal to arg

asFloatE

Answer the receiver converted to a FloatE

asFloatQ

Answer the receiver converted to a FloatQ

exponent

Answer the exponent of the receiver in mantissa*2^exponent representation ( |mantissa|<=1 )

fractionPart

Answer the fractional part of the receiver

timesTwoPower: arg

Answer the receiver multiplied by 2^arg

truncated

Truncate the receiver towards zero and answer the result

~= arg

Answer whether the receiver is not equal to arg

top


coercing (instance)

asFloatD
Just defined for completeness. Return the receiver.

coerce: aNumber

Coerce aNumber to the receiver's class

generality

Answer the receiver's generality

unity

Coerce 1 to the receiver's class

zero

Coerce 0 to the receiver's class

top


converting (instance)

half
Coerce 0.5 to the receiver's class

top