Vocabulary

generic.math

Inputs

None

Outputs

None

Word description

Generates a double-dispatching word definition. Only methods defined on numerical classes and object take effect in the math combination. Methods defined on numerical classes are guaranteed to have their two inputs upgraded to the highest priority type of the two.

The math method combination is used for binary operators such as + and *.

A method can only be added to a generic word using the math combination if the method specializes on one of the below classes, or a union defined over one or more of the below classes:

The math combination performs numerical upgrading as described in Number protocol.

Definition

Methods

generic.math

Inputs

None

Outputs

None

Word description

Generates a double-dispatching word definition. Only methods defined on numerical classes and object take effect in the math combination. Methods defined on numerical classes are guaranteed to have their two inputs upgraded to the highest priority type of the two.

The math method combination is used for binary operators such as + and *.

A method can only be added to a generic word using the math combination if the method specializes on one of the below classes, or a union defined over one or more of the below classes:

fixnum
bignum
ratio
float
complex
object

The math combination performs numerical upgrading as described in Number protocol.

Definition

Methods