The mathematical constant e. This is Euler's number, the base of natural logarithms.
ReadonlyLN10
LN10:number
The natural logarithm of 10.
ReadonlyLN2
LN2:number
The natural logarithm of 2.
ReadonlyLOG10E
LOG10E:number
The base-10 logarithm of e.
ReadonlyLOG2E
LOG2E:number
The base-2 logarithm of e.
ReadonlyPI
PI:number
Pi. This is the ratio of the circumference of a circle to its diameter.
ReadonlySQRT1_2
SQRT1_2:number
The square root of 0.5, or, equivalently, one divided by the square root of 2.
ReadonlySQRT2
SQRT2:number
The square root of 2.
Readonly[toStringTag]
[toStringTag]:string
Methods
abs
abs(x): number
Returns the absolute value of a number (the value without regard to whether it is positive or negative).
For example, the absolute value of -5 is the same as the absolute value of 5.
Parameters
x: number
A numeric expression for which the absolute value is needed.
Returns number
acos
acos(x): number
Returns the arc cosine (or inverse cosine) of a number.
Parameters
x: number
A numeric expression.
Returns number
acosh
acosh(x): number
Returns the inverse hyperbolic cosine of a number.
Parameters
x: number
A numeric expression that contains an angle measured in radians.
Returns number
asin
asin(x): number
Returns the arcsine of a number.
Parameters
x: number
A numeric expression.
Returns number
asinh
asinh(x): number
Returns the inverse hyperbolic sine of a number.
Parameters
x: number
A numeric expression that contains an angle measured in radians.
Returns number
atan
atan(x): number
Returns the arctangent of a number.
Parameters
x: number
A numeric expression for which the arctangent is needed.
Returns number
atan2
atan2(y, x): number
Returns the angle (in radians) from the X axis to a point.
Parameters
y: number
A numeric expression representing the cartesian y-coordinate.
x: number
A numeric expression representing the cartesian x-coordinate.
Returns number
atanh
atanh(x): number
Returns the inverse hyperbolic tangent of a number.
Parameters
x: number
A numeric expression that contains an angle measured in radians.
Returns number
cbrt
cbrt(x): number
Returns an implementation-dependent approximation to the cube root of number.
Parameters
x: number
A numeric expression.
Returns number
ceil
ceil(x): number
Returns the smallest integer greater than or equal to its numeric argument.
Returns the number of leading zero bits in the 32-bit binary representation of a number.
Parameters
x: number
A numeric expression.
Returns number
cos
cos(x): number
Returns the cosine of a number.
Parameters
x: number
A numeric expression that contains an angle measured in radians.
Returns number
cosh
cosh(x): number
Returns the hyperbolic cosine of a number.
Parameters
x: number
A numeric expression that contains an angle measured in radians.
Returns number
exp
exp(x): number
Returns e (the base of natural logarithms) raised to a power.
Parameters
x: number
A numeric expression representing the power of e.
Returns number
expm1
expm1(x): number
Returns the result of (e^x - 1), which is an implementation-dependent approximation to
subtracting 1 from the exponential function of x (e raised to the power of x, where e
is the base of the natural logarithms).
Parameters
x: number
A numeric expression.
Returns number
floor
floor(x): number
Returns the greatest integer less than or equal to its numeric argument.
Returns the nearest single precision float representation of a number.
Parameters
x: number
A numeric expression.
Returns number
gcd
gcd(a, b): number
最大公約数を求める
Parameters
a: number
値 1
b: number
値 2
Returns number
最大公約数
hypot
hypot(...values): number
Returns the square root of the sum of squares of its arguments.
Parameters
Rest...values: number[]
Values to compute the square root for.
If no arguments are passed, the result is +0.
If there is only one argument, the result is the absolute value.
If any argument is +Infinity or -Infinity, the result is +Infinity.
If any argument is NaN, the result is NaN.
If all arguments are either +0 or −0, the result is +0.
Returns number
imul
imul(x, y): number
Returns the result of 32-bit multiplication of two numbers.
Parameters
x: number
First number
y: number
Second number
Returns number
log
log(x): number
Returns the natural logarithm (base e) of a number.
Parameters
x: number
A numeric expression.
Returns number
log10
log10(x): number
Returns the base 10 logarithm of a number.
Parameters
x: number
A numeric expression.
Returns number
log1p
log1p(x): number
Returns the natural logarithm of 1 + x.
Parameters
x: number
A numeric expression.
Returns number
log2
log2(x): number
Returns the base 2 logarithm of a number.
Parameters
x: number
A numeric expression.
Returns number
max
max(...values): number
Returns the larger of a set of supplied numeric expressions.
Parameters
Rest...values: number[]
Numeric expressions to be evaluated.
Returns number
min
min(...values): number
Returns the smaller of a set of supplied numeric expressions.
Parameters
Rest...values: number[]
Numeric expressions to be evaluated.
Returns number
pow
pow(x, y): number
Returns the value of a base expression taken to a specified power.
Parameters
x: number
The base value of the expression.
y: number
The exponent value of the expression.
Returns number
random
random(): number
Returns a pseudorandom number between 0 and 1.
Returns number
round
round(x): number
Returns a supplied numeric expression rounded to the nearest integer.
The mathematical constant e. This is Euler's number, the base of natural logarithms.