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

This documentation was generated offline from a
`load-all`

image. If you want, you can also
browse the documentation from within the UI developer tools. See
the Factor website
for more information.

Factor 0.101 x86.64 (2284, heads/master-4a32b2801d, Nov 5 2024 16:06:40)