From b9e724b64028b1b4a9e362ac193e08f8da0f2c09 Mon Sep 17 00:00:00 2001 From: Michael Dyck Date: Wed, 5 Jun 2024 15:41:26 -0400 Subject: [PATCH] Editorial: Replace `IsIntegralNumber` with `is an integral Number` Also, add "finite" to the definition of "integral Number". --- spec.html | 33 ++++++++------------------------- 1 file changed, 8 insertions(+), 25 deletions(-) diff --git a/spec.html b/spec.html index d762d150f5..6d2ee2d61d 100644 --- a/spec.html +++ b/spec.html @@ -1056,7 +1056,7 @@

Mathematical Operations

In the language of this specification, numerical values are distinguished among different numeric kinds using subscript suffixes. The subscript 𝔽 refers to Numbers, and the subscript refers to BigInts. Numeric values without a subscript suffix refer to mathematical values. This specification denotes most numeric values in base 10; it also uses numeric values of the form 0x followed by digits 0-9 or A-F as base-16 values.

In general, when this specification refers to a numerical value, such as in the phrase, "the length of _y_" or "the integer represented by the four hexadecimal digits ...", without explicitly specifying a numeric kind, the phrase refers to a mathematical value. Phrases which refer to a Number or a BigInt value are explicitly annotated as such; for example, "the Number value for the number of code points in …" or "the BigInt value for …".

-

When the term integer is used in this specification, it refers to a mathematical value which is in the set of integers, unless otherwise stated. When the term integral Number is used in this specification, it refers to a Number value whose mathematical value is in the set of integers.

+

When the term integer is used in this specification, it refers to a mathematical value which is in the set of integers, unless otherwise stated. When the term integral Number is used in this specification, it refers to a finite Number value whose mathematical value is in the set of integers.

Numeric operators such as +, ×, =, and ≥ refer to those operations as determined by the type of the operands. When applied to mathematical values, the operators refer to the usual mathematical operations. When applied to extended mathematical values, the operators refer to the usual mathematical operations over the extended real numbers; indeterminate forms are not defined and their use in this specification should be considered an editorial error. When applied to Numbers, the operators refer to the relevant operations within IEEE 754-2019. When applied to BigInts, the operators refer to the usual mathematical operations applied to the mathematical value of the BigInt. Numeric operators applied to mixed-type operands (such as a Number and a mathematical value) are not defined and should be considered an editorial error in this specification.

Conversions between mathematical values and Numbers or BigInts are always explicit in this document. A conversion from a mathematical value or extended mathematical value _x_ to a Number is denoted as "the Number value for _x_" or 𝔽(_x_), and is defined in . A conversion from an integer _x_ to a BigInt is denoted as "the BigInt value for _x_" or ℤ(_x_). A conversion from a Number or BigInt _x_ to a mathematical value is denoted as "the mathematical value of _x_", or ℝ(_x_). The mathematical value of *+0*𝔽 and *-0*𝔽 is the mathematical value 0. The mathematical value of non-finite values is not defined. The extended mathematical value of _x_ is the mathematical value of _x_ for finite values, and is +∞ and -∞ for *+∞*𝔽 and *-∞*𝔽 respectively; it is not defined for *NaN*.

The mathematical function abs(_x_) produces the absolute value of _x_, which is -_x_ if _x_ < 0 and otherwise is _x_ itself.

@@ -5781,24 +5781,6 @@

- -

- IsIntegralNumber ( - _argument_: an ECMAScript language value, - ): a Boolean -

-
-
description
-
It determines if _argument_ is a finite integral Number value.
-
- - 1. If _argument_ is not a Number, return *false*. - 1. If _argument_ is not finite, return *false*. - 1. If truncate(ℝ(_argument_)) ≠ ℝ(_argument_), return *false*. - 1. Return *true*. - -
-

IsRegExp ( @@ -14237,7 +14219,7 @@

1. If _P_ is not a String, return *undefined*. 1. Let _index_ be CanonicalNumericIndexString(_P_). 1. If _index_ is *undefined*, return *undefined*. - 1. If IsIntegralNumber(_index_) is *false*, return *undefined*. + 1. If _index_ is not an integral Number, return *undefined*. 1. If _index_ is *-0*𝔽, return *undefined*. 1. Let _str_ be _S_.[[StringData]]. 1. Assert: _str_ is a String. @@ -14830,7 +14812,7 @@

1. If IsDetachedBuffer(_O_.[[ViewedArrayBuffer]]) is *true*, return *false*. - 1. If IsIntegralNumber(_index_) is *false*, return *false*. + 1. If _index_ is not an integral Number, return *false*. 1. If _index_ is *-0*𝔽, return *false*. 1. Let _taRecord_ be MakeTypedArrayWithBufferWitnessRecord(_O_, ~unordered~). 1. NOTE: Bounds checking is not a synchronizing operation when _O_'s backing buffer is a growable SharedArrayBuffer. @@ -31181,7 +31163,8 @@

Number.isFinite ( _number_ )

Number.isInteger ( _number_ )

This function performs the following steps when called:

- 1. Return IsIntegralNumber(_number_). + 1. If _number_ is an integral Number, return *true*. + 1. Return *false*. @@ -31205,7 +31188,7 @@

Number.isSafeInteger ( _number_ )

This function performs the following steps when called:

- 1. If IsIntegralNumber(_number_) is *true*, then + 1. If _number_ is an integral Number, then 1. If abs(ℝ(_number_)) ≤ 253 - 1, return *true*. 1. Return *false*. @@ -31520,7 +31503,7 @@

- 1. If IsIntegralNumber(_number_) is *false*, throw a *RangeError* exception. + 1. If _number_ is not an integral Number, throw a *RangeError* exception. 1. Return ℤ(ℝ(_number_)). @@ -34367,7 +34350,7 @@

String.fromCodePoint ( ..._codePoints_ )

1. Let _result_ be the empty String. 1. For each element _next_ of _codePoints_, do 1. Let _nextCP_ be ? ToNumber(_next_). - 1. If IsIntegralNumber(_nextCP_) is *false*, throw a *RangeError* exception. + 1. If _nextCP_ is not an integral Number, throw a *RangeError* exception. 1. If ℝ(_nextCP_) < 0 or ℝ(_nextCP_) > 0x10FFFF, throw a *RangeError* exception. 1. Set _result_ to the string-concatenation of _result_ and UTF16EncodeCodePoint(ℝ(_nextCP_)). 1. Assert: If _codePoints_ is empty, then _result_ is the empty String.