* ( x y -- z )
Factor documentation > Factor handbook > The language > Numbers > Arithmetic > Number protocol
Prev:- ( x y -- z )
Next:/ ( x y -- z )


Vocabulary
math

Inputs and outputs
xa number
ya number
za number


Word description
Multiplies two numbers.
Multiplication of fixnums may overflow and convert the result to a bignum.
Multiplication of bignums always yields a bignum.
Multiplication of floats always yields a float.
Multiplication of ratios and complex numbers proceeds using the relevant mathematical rules.


Definition
IN: math

MATH: * ( x y -- z ) foldable flushable


Methods
USING: math math.private ;

M: bignum * bignum* ; inline


USING: kernel math math.complex.private math.functions ;

M: complex * [ *re - ] [ *im + ] 2bi rect> ; inline


USING: math math.private ;

M: fixnum * fixnum* ; inline


USING: math math.private ;

M: float * float* ; inline


USING: kernel math math.ratios ;

M: ratio * 2>fraction [ * ] 2bi@ / ;