@metreeca/core - v0.9.22
    Preparing search index...

    Function mul

    • Internal

      Multiplies a numeric value by a factor.

      The product keeps the numeric type of the multiplicand. A number multiplicand multiplies as an IEEE 754 double. A bigint multiplicand yields an exact bigint product, whatever the magnitude of the operands.

      Multiplying a bigint requires a finite integral factor, as the factor is converted to a bigint first.

      Type Parameters

      • V extends number | bigint

        The numeric type of the multiplicand and of the product

      Parameters

      • x: V

        The multiplicand

      • y: number

        The factor

      Returns V

      The product of x by y, as a value of the numeric type of x

      If x is a bigint and y is not a finite integer