math-upgrade ( class1 class2 -- quot )


Vocabulary
generic.math

Inputs
class1a class
class2a class


Outputs
quota quotation with stack effect ( n n -- n n )


Word description
Outputs a quotation for upgrading numerical types. It takes two numbers on the stack, an instance of class1, and an instance of class2, and converts the one with the lower priority to the higher priority type.

Examples
USING: generic.math math kernel prettyprint ; fixnum bignum math-upgrade .
[ [ >bignum ] dip ]


Definition