From 08c52bba86fc95dc1dadbf10988f3c8e2514da04 Mon Sep 17 00:00:00 2001 From: Jesse Alama Date: Thu, 30 May 2024 22:37:39 +0200 Subject: [PATCH] Add algorithms for `isNaN` and `isFinite` --- spec.emu | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/spec.emu b/spec.emu index 203b23a8..113c85ce 100644 --- a/spec.emu +++ b/spec.emu @@ -296,13 +296,25 @@ location: https://github.com/tc39/proposal-decimal/

Properties of the Decimal128 Prototype

-

get Decimal128.prototype.isNaN

-

An accessor property indicating whether *this* value represents a Decimal128 NaN value. The possible values are *true* and *false*.

+

Decimal128.prototype.isNaN ( )

+

This method performs the following steps when called:

+ + 1. Let _O_ be the *this* value. + 1. Perform ? RequireInternalSlot(_O_, [[Decimal128Data]]). + 1. Let _d_ be _O_.[[Decimal128Data]]. + 1. If _d_ is *NaN*𝔻, return *true*. + 1. Otherwise, return *false*.
-

get Decimal128.prototype.isFinite

-

An accessor property indicating whether *this* value represents a finite Decimal128 value. The possible values are *true* and *false*.

+

Decimal128.prototype.isFinite ( )

+

This method performs the following steps when called:

+ + 1. Let _O_ be the *this* value. + 1. Perform ? RequireInternalSlot(_O_, [[Decimal128Data]]). + 1. Let _d_ be _O_.[[Decimal128Data]]. + 1. If _d_ is *+∞*𝔻 or *-∞*𝔻, return *true*. + 1. Otherwise, return *false*.