Category: Language-Data types
Superclass: LargePositiveInteger
I am quite a strange class. Indeed, the concept of a "large integer" that is zero is a weird one. Actually my only instance is zero but is represented like LargeIntegers, has the same generality as LargeIntegers, and so on. That only instance is stored in the class variable Zero, and is used in arithmetical methods, when we have to coerce a parameter that is zero.

Method category index

accessing (instance)
arithmetic (instance)
numeric testing (instance)
printing (instance)

accessing (instance)

at: anIndex
Answer `0'.

hash

Answer `0'.

size

Answer `0'.

top


arithmetic (instance)

* aNumber
Multiply aNumber and the receiver, answer the result

+ aNumber

Sum the receiver and aNumber, answer the result

- aNumber

Subtract aNumber from the receiver, answer the result

/ aNumber

Divide aNumber and the receiver, answer the result (an Integer or Fraction)

// aNumber

Divide aNumber and the receiver, answer the result truncated towards -infinity

\\ aNumber

Divide aNumber and the receiver, answer the remainder truncated towards -infinity

quo: aNumber

Divide aNumber and the receiver, answer the result truncated towards 0

rem: aNumber

Divide aNumber and the receiver, answer the remainder truncated towards 0

top


numeric testing (instance)

sign
Answer the receiver's sign

strictlyPositive

Answer whether the receiver is > 0

top


printing (instance)

replace: str withStringBase: radix
Return in a string the base radix representation of the receiver.

top