From 6f15bb2de29e3cfd7247f3ee9d48c8ab7a171fc2 Mon Sep 17 00:00:00 2001 From: Michael Dyck Date: Thu, 25 Nov 2021 23:09:24 -0500 Subject: [PATCH] Editorial: Change "method" to "function" in several spots ... mainly the Math.* functions. See Issue #2576 for some discussion. --- spec.html | 78 +++++++++++++++++++++++++++---------------------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/spec.html b/spec.html index b7705600e0..fb3cdd0c83 100644 --- a/spec.html +++ b/spec.html @@ -29487,7 +29487,7 @@

Object.freeze ( _O_ )

Object.fromEntries ( _iterable_ )

-

When the `fromEntries` method is called with argument _iterable_, the following steps are taken:

+

When the `fromEntries` function is called with argument _iterable_, the following steps are taken:

1. Perform ? RequireObjectCoercible(_iterable_). 1. Let _obj_ be OrdinaryObjectCreate(%Object.prototype%). @@ -29577,7 +29577,7 @@

Object.getPrototypeOf ( _O_ )

Object.hasOwn ( _O_, _P_ )

-

When the `hasOwn` method is called, the following steps are taken:

+

When the `hasOwn` function is called, the following steps are taken:

1. Let _obj_ be ? ToObject(_O_). 1. Let _key_ be ? ToPropertyKey(_P_). @@ -31485,7 +31485,7 @@

Function Properties of the Math Object

Math.abs ( _x_ )

Returns the absolute value of _x_; the result has the same magnitude as _x_ but has positive sign.

-

When the `Math.abs` method is called with argument _x_, the following steps are taken:

+

When the `Math.abs` function is called with argument _x_, the following steps are taken:

1. Let _n_ be ? ToNumber(_x_). 1. If _n_ is *NaN*, return *NaN*. @@ -31499,7 +31499,7 @@

Math.abs ( _x_ )

Math.acos ( _x_ )

Returns the inverse cosine of _x_. The result is expressed in radians and ranges from *+0*𝔽 to 𝔽(π), inclusive.

-

When the `Math.acos` method is called with argument _x_, the following steps are taken:

+

When the `Math.acos` function is called with argument _x_, the following steps are taken:

1. Let _n_ be ? ToNumber(_x_). 1. If _n_ is *NaN*, _n_ > *1*𝔽, or _n_ < *-1*𝔽, return *NaN*. @@ -31511,7 +31511,7 @@

Math.acos ( _x_ )

Math.acosh ( _x_ )

Returns the inverse hyperbolic cosine of _x_.

-

When the `Math.acosh` method is called with argument _x_, the following steps are taken:

+

When the `Math.acosh` function is called with argument _x_, the following steps are taken:

1. Let _n_ be ? ToNumber(_x_). 1. If _n_ is *NaN* or _n_ is *+∞*𝔽, return _n_. @@ -31524,7 +31524,7 @@

Math.acosh ( _x_ )

Math.asin ( _x_ )

Returns the inverse sine of _x_. The result is expressed in radians and ranges from 𝔽(-π / 2) to 𝔽(π / 2), inclusive.

-

When the `Math.asin` method is called with argument _x_, the following steps are taken:

+

When the `Math.asin` function is called with argument _x_, the following steps are taken:

1. Let _n_ be ? ToNumber(_x_). 1. If _n_ is *NaN*, _n_ is *+0*𝔽, or _n_ is *-0*𝔽, return _n_. @@ -31536,7 +31536,7 @@

Math.asin ( _x_ )

Math.asinh ( _x_ )

Returns the inverse hyperbolic sine of _x_.

-

When the `Math.asinh` method is called with argument _x_, the following steps are taken:

+

When the `Math.asinh` function is called with argument _x_, the following steps are taken:

1. Let _n_ be ? ToNumber(_x_). 1. If _n_ is *NaN*, _n_ is *+0*𝔽, _n_ is *-0*𝔽, _n_ is *+∞*𝔽, or _n_ is *-∞*𝔽, return _n_. @@ -31547,7 +31547,7 @@

Math.asinh ( _x_ )

Math.atan ( _x_ )

Returns the inverse tangent of _x_. The result is expressed in radians and ranges from 𝔽(-π / 2) to 𝔽(π / 2), inclusive.

-

When the `Math.atan` method is called with argument _x_, the following steps are taken:

+

When the `Math.atan` function is called with argument _x_, the following steps are taken:

1. Let _n_ be ? ToNumber(_x_). 1. If _n_ is *NaN*, _n_ is *+0*𝔽, or _n_ is *-0*𝔽, return _n_. @@ -31560,7 +31560,7 @@

Math.atan ( _x_ )

Math.atanh ( _x_ )

Returns the inverse hyperbolic tangent of _x_.

-

When the `Math.atanh` method is called with argument _x_, the following steps are taken:

+

When the `Math.atanh` function is called with argument _x_, the following steps are taken:

1. Let _n_ be ? ToNumber(_x_). 1. If _n_ is *NaN*, _n_ is *+0*𝔽, or _n_ is *-0*𝔽, return _n_. @@ -31574,7 +31574,7 @@

Math.atanh ( _x_ )

Math.atan2 ( _y_, _x_ )

Returns the inverse tangent of the quotient _y_ / _x_ of the arguments _y_ and _x_, where the signs of _y_ and _x_ are used to determine the quadrant of the result. Note that it is intentional and traditional for the two-argument inverse tangent function that the argument named _y_ be first and the argument named _x_ be second. The result is expressed in radians and ranges from -π to +π, inclusive.

-

When the `Math.atan2` method is called with arguments _y_ and _x_, the following steps are taken:

+

When the `Math.atan2` function is called with arguments _y_ and _x_, the following steps are taken:

1. Let _ny_ be ? ToNumber(_y_). 1. Let _nx_ be ? ToNumber(_x_). @@ -31610,7 +31610,7 @@

Math.atan2 ( _y_, _x_ )

Math.cbrt ( _x_ )

Returns the cube root of _x_.

-

When the `Math.cbrt` method is called with argument _x_, the following steps are taken:

+

When the `Math.cbrt` function is called with argument _x_, the following steps are taken:

1. Let _n_ be ? ToNumber(_x_). 1. If _n_ is *NaN*, _n_ is *+0*𝔽, _n_ is *-0*𝔽, _n_ is *+∞*𝔽, or _n_ is *-∞*𝔽, return _n_. @@ -31621,7 +31621,7 @@

Math.cbrt ( _x_ )

Math.ceil ( _x_ )

Returns the smallest (closest to -∞) integral Number value that is not less than _x_. If _x_ is already an integral Number, the result is _x_.

-

When the `Math.ceil` method is called with argument _x_, the following steps are taken:

+

When the `Math.ceil` function is called with argument _x_, the following steps are taken:

1. Let _n_ be ? ToNumber(_x_). 1. If _n_ is *NaN*, _n_ is *+0*𝔽, _n_ is *-0*𝔽, _n_ is *+∞*𝔽, or _n_ is *-∞*𝔽, return _n_. @@ -31636,7 +31636,7 @@

Math.ceil ( _x_ )

Math.clz32 ( _x_ )

-

When the `Math.clz32` method is called with argument _x_, the following steps are taken:

+

When the `Math.clz32` function is called with argument _x_, the following steps are taken:

1. Let _n_ be ? ToUint32(_x_). 1. Let _p_ be the number of leading zero bits in the unsigned 32-bit binary representation of _n_. @@ -31650,7 +31650,7 @@

Math.clz32 ( _x_ )

Math.cos ( _x_ )

Returns the cosine of _x_. The argument is expressed in radians.

-

When the `Math.cos` method is called with argument _x_, the following steps are taken:

+

When the `Math.cos` function is called with argument _x_, the following steps are taken:

1. Let _n_ be ? ToNumber(_x_). 1. If _n_ is *NaN*, _n_ is *+∞*𝔽, or _n_ is *-∞*𝔽, return *NaN*. @@ -31662,7 +31662,7 @@

Math.cos ( _x_ )

Math.cosh ( _x_ )

Returns the hyperbolic cosine of _x_.

-

When the `Math.cosh` method is called with argument _x_, the following steps are taken:

+

When the `Math.cosh` function is called with argument _x_, the following steps are taken:

1. Let _n_ be ? ToNumber(_x_). 1. If _n_ is *NaN*, return *NaN*. @@ -31678,7 +31678,7 @@

Math.cosh ( _x_ )

Math.exp ( _x_ )

Returns the exponential function of _x_ (_e_ raised to the power of _x_, where _e_ is the base of the natural logarithms).

-

When the `Math.exp` method is called with argument _x_, the following steps are taken:

+

When the `Math.exp` function is called with argument _x_, the following steps are taken:

1. Let _n_ be ? ToNumber(_x_). 1. If _n_ is *NaN* or _n_ is *+∞*𝔽, return _n_. @@ -31691,7 +31691,7 @@

Math.exp ( _x_ )

Math.expm1 ( _x_ )

Returns the result of subtracting 1 from the exponential function of _x_ (_e_ raised to the power of _x_, where _e_ is the base of the natural logarithms). The result is computed in a way that is accurate even when the value of _x_ is close to 0.

-

When the `Math.expm1` method is called with argument _x_, the following steps are taken:

+

When the `Math.expm1` function is called with argument _x_, the following steps are taken:

1. Let _n_ be ? ToNumber(_x_). 1. If _n_ is *NaN*, _n_ is *+0*𝔽, _n_ is *-0*𝔽, or _n_ is *+∞*𝔽, return _n_. @@ -31703,7 +31703,7 @@

Math.expm1 ( _x_ )

Math.floor ( _x_ )

Returns the greatest (closest to +∞) integral Number value that is not greater than _x_. If _x_ is already an integral Number, the result is _x_.

-

When the `Math.floor` method is called with argument _x_, the following steps are taken:

+

When the `Math.floor` function is called with argument _x_, the following steps are taken:

1. Let _n_ be ? ToNumber(_x_). 1. If _n_ is *NaN*, _n_ is *+0*𝔽, _n_ is *-0*𝔽, _n_ is *+∞*𝔽, or _n_ is *-∞*𝔽, return _n_. @@ -31718,7 +31718,7 @@

Math.floor ( _x_ )

Math.fround ( _x_ )

-

When the `Math.fround` method is called with argument _x_, the following steps are taken:

+

When the `Math.fround` function is called with argument _x_, the following steps are taken:

1. Let _n_ be ? ToNumber(_x_). 1. If _n_ is *NaN*, return *NaN*. @@ -31732,7 +31732,7 @@

Math.fround ( _x_ )

Math.hypot ( ..._args_ )

Returns the square root of the sum of squares of its arguments.

-

When the `Math.hypot` method is called with zero or more arguments which form the rest parameter ..._args_, the following steps are taken:

+

When the `Math.hypot` function is called with zero or more arguments which form the rest parameter ..._args_, the following steps are taken:

1. Let _coerced_ be a new empty List. 1. For each element _arg_ of _args_, do @@ -31747,7 +31747,7 @@

Math.hypot ( ..._args_ )

1. If _onlyZero_ is *true*, return *+0*𝔽. 1. Return an implementation-approximated Number value representing the square root of the sum of squares of the mathematical values of the elements of _coerced_.
-

The *"length"* property of the `hypot` method is *2*𝔽.

+

The *"length"* property of the `hypot` function is *2*𝔽.

Implementations should take care to avoid the loss of precision from overflows and underflows that are prone to occur in naive implementations when this function is called with two or more arguments.

@@ -31767,7 +31767,7 @@

Math.imul ( _x_, _y_ )

Math.log ( _x_ )

Returns the natural logarithm of _x_.

-

When the `Math.log` method is called with argument _x_, the following steps are taken:

+

When the `Math.log` function is called with argument _x_, the following steps are taken:

1. Let _n_ be ? ToNumber(_x_). 1. If _n_ is *NaN* or _n_ is *+∞*𝔽, return _n_. @@ -31781,7 +31781,7 @@

Math.log ( _x_ )

Math.log1p ( _x_ )

Returns the natural logarithm of 1 + _x_. The result is computed in a way that is accurate even when the value of x is close to zero.

-

When the `Math.log1p` method is called with argument _x_, the following steps are taken:

+

When the `Math.log1p` function is called with argument _x_, the following steps are taken:

1. Let _n_ be ? ToNumber(_x_). 1. If _n_ is *NaN*, _n_ is *+0*𝔽, _n_ is *-0*𝔽, or _n_ is *+∞*𝔽, return _n_. @@ -31794,7 +31794,7 @@

Math.log1p ( _x_ )

Math.log10 ( _x_ )

Returns the base 10 logarithm of _x_.

-

When the `Math.log10` method is called with argument _x_, the following steps are taken:

+

When the `Math.log10` function is called with argument _x_, the following steps are taken:

1. Let _n_ be ? ToNumber(_x_). 1. If _n_ is *NaN* or _n_ is *+∞*𝔽, return _n_. @@ -31808,7 +31808,7 @@

Math.log10 ( _x_ )

Math.log2 ( _x_ )

Returns the base 2 logarithm of _x_.

-

When the `Math.log2` method is called with argument _x_, the following steps are taken:

+

When the `Math.log2` function is called with argument _x_, the following steps are taken:

1. Let _n_ be ? ToNumber(_x_). 1. If _n_ is *NaN* or _n_ is *+∞*𝔽, return _n_. @@ -31822,7 +31822,7 @@

Math.log2 ( _x_ )

Math.max ( ..._args_ )

Given zero or more arguments, calls ToNumber on each of the arguments and returns the largest of the resulting values.

-

When the `Math.max` method is called with zero or more arguments which form the rest parameter ..._args_, the following steps are taken:

+

When the `Math.max` function is called with zero or more arguments which form the rest parameter ..._args_, the following steps are taken:

1. Let _coerced_ be a new empty List. 1. For each element _arg_ of _args_, do @@ -31838,13 +31838,13 @@

Math.max ( ..._args_ )

The comparison of values to determine the largest value is done using the IsLessThan algorithm except that *+0*𝔽 is considered to be larger than *-0*𝔽.

-

The *"length"* property of the `max` method is *2*𝔽.

+

The *"length"* property of the `max` function is *2*𝔽.

Math.min ( ..._args_ )

Given zero or more arguments, calls ToNumber on each of the arguments and returns the smallest of the resulting values.

-

When the `Math.min` method is called with zero or more arguments which form the rest parameter ..._args_, the following steps are taken:

+

When the `Math.min` function is called with zero or more arguments which form the rest parameter ..._args_, the following steps are taken:

1. Let _coerced_ be a new empty List. 1. For each element _arg_ of _args_, do @@ -31860,12 +31860,12 @@

Math.min ( ..._args_ )

The comparison of values to determine the largest value is done using the IsLessThan algorithm except that *+0*𝔽 is considered to be larger than *-0*𝔽.

-

The *"length"* property of the `min` method is *2*𝔽.

+

The *"length"* property of the `min` function is *2*𝔽.

Math.pow ( _base_, _exponent_ )

-

When the `Math.pow` method is called with arguments _base_ and _exponent_, the following steps are taken:

+

When the `Math.pow` function is called with arguments _base_ and _exponent_, the following steps are taken:

1. Set _base_ to ? ToNumber(_base_). 1. Set _exponent_ to ? ToNumber(_exponent_). @@ -31882,7 +31882,7 @@

Math.random ( )

Math.round ( _x_ )

Returns the Number value that is closest to _x_ and is integral. If two integral Numbers are equally close to _x_, then the result is the Number value that is closer to +∞. If _x_ is already integral, the result is _x_.

-

When the `Math.round` method is called with argument _x_, the following steps are taken:

+

When the `Math.round` function is called with argument _x_, the following steps are taken:

1. Let _n_ be ? ToNumber(_x_). 1. If _n_ is *NaN*, *+∞*𝔽, *-∞*𝔽, or an integral Number, return _n_. @@ -31901,7 +31901,7 @@

Math.round ( _x_ )

Math.sign ( _x_ )

Returns the sign of _x_, indicating whether _x_ is positive, negative, or zero.

-

When the `Math.sign` method is called with argument _x_, the following steps are taken:

+

When the `Math.sign` function is called with argument _x_, the following steps are taken:

1. Let _n_ be ? ToNumber(_x_). 1. If _n_ is *NaN*, _n_ is *+0*𝔽, or _n_ is *-0*𝔽, return _n_. @@ -31913,7 +31913,7 @@

Math.sign ( _x_ )

Math.sin ( _x_ )

Returns the sine of _x_. The argument is expressed in radians.

-

When the `Math.sin` method is called with argument _x_, the following steps are taken:

+

When the `Math.sin` function is called with argument _x_, the following steps are taken:

1. Let _n_ be ? ToNumber(_x_). 1. If _n_ is *NaN*, _n_ is *+0*𝔽, or _n_ is *-0*𝔽, return _n_. @@ -31925,7 +31925,7 @@

Math.sin ( _x_ )

Math.sinh ( _x_ )

Returns the hyperbolic sine of _x_.

-

When the `Math.sinh` method is called with argument _x_, the following steps are taken:

+

When the `Math.sinh` function is called with argument _x_, the following steps are taken:

1. Let _n_ be ? ToNumber(_x_). 1. If _n_ is *NaN*, _n_ is *+0*𝔽, _n_ is *-0*𝔽, _n_ is *+∞*𝔽, or _n_ is *-∞*𝔽, return _n_. @@ -31939,7 +31939,7 @@

Math.sinh ( _x_ )

Math.sqrt ( _x_ )

Returns the square root of _x_.

-

When the `Math.sqrt` method is called with argument _x_, the following steps are taken:

+

When the `Math.sqrt` function is called with argument _x_, the following steps are taken:

1. Let _n_ be ? ToNumber(_x_). 1. If _n_ is *NaN*, _n_ is *+0*𝔽, _n_ is *-0*𝔽, or _n_ is *+∞*𝔽, return _n_. @@ -31951,7 +31951,7 @@

Math.sqrt ( _x_ )

Math.tan ( _x_ )

Returns the tangent of _x_. The argument is expressed in radians.

-

When the `Math.tan` method is called with argument _x_, the following steps are taken:

+

When the `Math.tan` function is called with argument _x_, the following steps are taken:

1. Let _n_ be ? ToNumber(_x_). 1. If _n_ is *NaN*, _n_ is *+0*𝔽, or _n_ is *-0*𝔽, return _n_. @@ -31963,7 +31963,7 @@

Math.tan ( _x_ )

Math.tanh ( _x_ )

Returns the hyperbolic tangent of _x_.

-

When the `Math.tanh` method is called with argument _x_, the following steps are taken:

+

When the `Math.tanh` function is called with argument _x_, the following steps are taken:

1. Let _n_ be ? ToNumber(_x_). 1. If _n_ is *NaN*, _n_ is *+0*𝔽, or _n_ is *-0*𝔽, return _n_. @@ -31979,7 +31979,7 @@

Math.tanh ( _x_ )

Math.trunc ( _x_ )

Returns the integral part of the number _x_, removing any fractional digits. If _x_ is already integral, the result is _x_.

-

When the `Math.trunc` method is called with argument _x_, the following steps are taken:

+

When the `Math.trunc` function is called with argument _x_, the following steps are taken:

1. Let _n_ be ? ToNumber(_x_). 1. If _n_ is *NaN*, _n_ is *+0*𝔽, _n_ is *-0*𝔽, _n_ is *+∞*𝔽, or _n_ is *-∞*𝔽, return _n_. @@ -36971,7 +36971,7 @@

Array.from ( _items_ [ , _mapfn_ [ , _thisArg_ ] ] )

Array.isArray ( _arg_ )

-

When the `isArray` method is called, the following steps are taken:

+

When the `isArray` function is called, the following steps are taken:

1. Return ? IsArray(_arg_).