Next: , Previous: , Up: Number   [Index]


1.122.3 Number: arithmetic

* aNumber

Subtract the receiver and aNumber, answer the result

+ aNumber

Sum the receiver and aNumber, answer the result

- aNumber

Subtract aNumber from the receiver, answer the result

/ aNumber

Divide the receiver by aNumber, answer the result (no loss of precision). Raise a ZeroDivide exception or return a valid (possibly infinite) continuation value if aNumber is zero.

// aNumber

Return the integer quotient of dividing the receiver by aNumber with truncation towards negative infinity. Raise a ZeroDivide exception if aNumber is zero

\\ aNumber

Return the remainder of dividing the receiver by aNumber with truncation towards negative infinity. Raise a ZeroDivide exception if aNumber is zero

quo: aNumber

Return the integer quotient of dividing the receiver by aNumber with truncation towards zero. Raise a ZeroDivide exception if aNumber is zero

reciprocal

Return the reciprocal of the receiver

rem: aNumber

Return the remainder of dividing the receiver by aNumber with truncation towards zero. Raise a ZeroDivide exception if aNumber is zero