Class Index | File Index

Classes


Class Math.BigInt.arith

hapint arith interface
Defined in: <hapint-1_9_2.es>.

Class Summary
Constructor Attributes Constructor Name and Description
 
gets an object compatible with arith interface.
Method Summary
Method Attributes Method Name and Description
<static>  
Math.BigInt.arith.abs(x)
absolute value.
<static>  
Math.BigInt.arith.add(x, y)
addition.
<static>  
Math.BigInt.arith.compare(x, y)
compares two hapint objects.
<static>  
Math.BigInt.arith.divide(x, y)
division.
<static>  
Math.BigInt.arith.divideAndRemainder(x, y)
division with a remainder.
<static>  
Math.BigInt.arith.equals(x, y)
equality.
<static>  
Math.BigInt.arith.gcd(x, var_args)
greatest common divisor of 2 or more integers.
<static>  
Math.BigInt.arith.isArith(x)
determine whether the given object is a hapint.
<static>  
Math.BigInt.arith.isZero(x)
determine whether the given hapint is zero.
<static>  
Math.BigInt.arith.max(x, var_args)
maximum value.
<static>  
Math.BigInt.arith.min(x, var_args)
minimum value.
<static>  
Math.BigInt.arith.mod(x, y)
modulo operation.
<static>  
Math.BigInt.arith.multiply(x, y)
multiplication.
<static>  
Math.BigInt.arith.negate(x)
negation.
<static>  
Math.BigInt.arith.power(x, y)
exponentiation.
<static>  
Math.BigInt.arith.product(x, var_args)
product.
<static>  
Math.BigInt.arith.remainder(x, y)
remainder after division.
<static>  
Math.BigInt.arith.sign(x)
gets a sign value.
<static>  
Math.BigInt.arith.square(x)
square.
<static>  
Math.BigInt.arith.subtract(x, y)
subtraction.
<static>  
Math.BigInt.arith.sum(x, var_args)
summation.
<static>  
Math.BigInt.arith.toFloat(x)
gets a floating-point number from the given hapint.
<static>  
Math.BigInt.arith.toInt(x)
gets an integer number from the given hapint.
<static>  
Math.BigInt.arith.toString(x, radix)
gets a string expression of the given hapint.
<static>  
Math.BigInt.arith.xgcd(x, y)
extended greatest common divisor.
Class Detail
Math.BigInt.arith(a)
gets an object compatible with arith interface. Call it as function, not as constructor.
Parameters:
{(number|string)} a
Method Detail
<static> {hapint} Math.BigInt.arith.abs(x)
absolute value.
Parameters:
{hapint} x
a hapint
Returns:
{hapint}

<static> {hapint} Math.BigInt.arith.add(x, y)
addition.
Parameters:
{hapint} x
a hapint
{hapint} y
a hapint
Returns:
{hapint}

<static> {number} Math.BigInt.arith.compare(x, y)
compares two hapint objects.
Parameters:
{hapint} x
a hapint
{hapint} y
a hapint
Returns:
{number} 1, 0, or -1, each indicating x is greater than, equal to, or less than, y

<static> {hapint} Math.BigInt.arith.divide(x, y)
division. returns an integer quotient.
Parameters:
{hapint} x
a hapint
{hapint} y
a hapint
Returns:
{hapint}

<static> {hapint} Math.BigInt.arith.divideAndRemainder(x, y)
division with a remainder. returns both a quotient and a remainder as 2-length array.
Parameters:
{hapint} x
a hapint
{hapint} y
a hapint
Returns:
{hapint}

<static> {boolean} Math.BigInt.arith.equals(x, y)
equality.
Parameters:
{hapint} x
a hapint
{hapint} y
a hapint
Returns:
{boolean} true if x equals y

<static> {hapint} Math.BigInt.arith.gcd(x, var_args)
greatest common divisor of 2 or more integers.
Parameters:
{(hapint|string)} x
a hapint, or a name of algorithm
{...hapint} var_args
any number of hapints
Returns:
{hapint} gcd

<static> {boolean} Math.BigInt.arith.isArith(x)
determine whether the given object is a hapint.
Parameters:
{*} x
Returns:
{boolean} true if the given is a hapint object

<static> {boolean} Math.BigInt.arith.isZero(x)
determine whether the given hapint is zero.
Parameters:
{hapint} x
a hapint
Returns:
{boolean} true if the given is zero

<static> {hapint} Math.BigInt.arith.max(x, var_args)
maximum value.
Parameters:
{hapint} x
a hapint
{...hapint} var_args
Returns:
{hapint}

<static> {hapint} Math.BigInt.arith.min(x, var_args)
minimum value.
Parameters:
{hapint} x
a hapint
{...hapint} var_args
Returns:
{hapint}

<static> {hapint} Math.BigInt.arith.mod(x, y)
modulo operation.
Parameters:
{hapint} x
a hapint
{hapint} y
a hapint
Returns:
{hapint} x mod y.

<static> {hapint} Math.BigInt.arith.multiply(x, y)
multiplication.
Parameters:
{hapint} x
a hapint
{hapint} y
a hapint
Returns:
{hapint}

<static> {hapint} Math.BigInt.arith.negate(x)
negation.
Parameters:
{hapint} x
a hapint
Returns:
{hapint}

<static> {hapint} Math.BigInt.arith.power(x, y)
exponentiation. returns xy.
Parameters:
{hapint} x
a hapint
{hapint} y
a hapint
Returns:
{hapint}

<static> {hapint} Math.BigInt.arith.product(x, var_args)
product.
Parameters:
{hapint} x
{...hapint} var_args
Returns:
{hapint}

<static> {hapint} Math.BigInt.arith.remainder(x, y)
remainder after division.
Parameters:
{hapint} x
a hapint
{hapint} y
a hapint
Returns:
{hapint}

<static> {number} Math.BigInt.arith.sign(x)
gets a sign value.
Parameters:
{hapint} x
a hapint
Returns:
{number} 1 or -1

<static> {hapint} Math.BigInt.arith.square(x)
square. returns x2.
Parameters:
{hapint} x
a hapint
Returns:
{hapint}

<static> {hapint} Math.BigInt.arith.subtract(x, y)
subtraction.
Parameters:
{hapint} x
a hapint
{hapint} y
a hapint
Returns:
{hapint}

<static> {hapint} Math.BigInt.arith.sum(x, var_args)
summation.
Parameters:
{hapint} x
{...hapint} var_args
Returns:
{hapint}

<static> {number} Math.BigInt.arith.toFloat(x)
gets a floating-point number from the given hapint.
Parameters:
{hapint} x
a hapint
Returns:
{number}

<static> {number} Math.BigInt.arith.toInt(x)
gets an integer number from the given hapint.
Parameters:
{hapint} x
a hapint
Returns:
{number}

<static> {string} Math.BigInt.arith.toString(x, radix)
gets a string expression of the given hapint.
Parameters:
{hapint} x
a hapint
{number=} radix
optional. The valid range is from 2 to 36. The default is 10.
Returns:
{string}

<static> {hapint} Math.BigInt.arith.xgcd(x, y)
extended greatest common divisor. returns integers a, b, c such that ax + by = c = gcd(x, y).
Parameters:
{hapint} x
a hapint
{hapint} y
a hapint
Returns:
{hapint} [ a, b, c ].

Documentation generated by JsDoc Toolkit