Create a boxed NaN.
Full CBOR encoding of the NaN, including leading MT/AI byte.
Create a boxed NaN from constituent parts.
Integer with absolute value < 2**52 - 1. If negative, sign will be promoted to the float, and the absolute value will be used as the payload.
Optionalquiet: booleanTrue if quiet.
Optionalsize: NAN_SIZEEncoded size of the resulting CBOR bytes, as from encoding indicator. 1 = 3 bytes, 2 = 5 bytes, 3 = 9 bytes. -1 (the default) means to use the payload to pick the minimum size.
Create a boxed NaN from a raw integer equivalent.
Raw integer, such as 0x7e00n. Can be 16-, 32- or 64-bits wide, but the exponent bits must be set correctly.
Optionalignored: booleanThis parameter is ignored in bigint mode.
Optionalsize: NAN_SIZEUse NAN_SIZE.NATURAL to copy the bigint size.
Static ReadonlyEPSILONThe value of Number.EPSILON is the difference between 1 and the smallest value greater than 1 that is representable as a Number value, which is approximately: 2.2204460492503130808472633361816 x 10−16.
Static ReadonlyMAX_The value of the largest integer n such that n and n + 1 are both exactly representable as a Number value. The value of Number.MAX_SAFE_INTEGER is 9007199254740991 2^53 − 1.
Static ReadonlyMAX_The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308.
Static ReadonlyMIN_The value of the smallest integer n such that n and n − 1 are both exactly representable as a Number value. The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)).
Static ReadonlyMIN_The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324.
Static ReadonlyNaA value that is not a number. In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function.
Static ReadonlyNEGATIVE_A value that is less than the largest negative number that can be represented in JavaScript. JavaScript displays NEGATIVE_INFINITY values as -infinity.
Static ReadonlyPOSITIVE_A value greater than the largest number that can be represented in JavaScript. JavaScript displays POSITIVE_INFINITY values as infinity.
Get the CBOR bytes for this NaN.
Encoding indicator, based on the preferred size.
Is this currrently configured for preferred encoding?
Payload, as in IEEE754-2019.
How many bytes should this NaN be encoded as in prefrerred encoding?
Is the quiet bit set?
Full 64-bit encoding, with sign and quiet bit intact.
If negative -1, otherwise 1. Should never be 0, since you should use a real NaN or Infinity for those.
The desired encoding size (2, 4, or 8).
StaticisReturns true if passed value is finite. Unlike the global isFinite, Number.isFinite doesn't forcibly convert the parameter to a number. Only finite values of the type number, result in true.
A numeric value.
StaticisReturns true if the value passed is an integer, false otherwise.
A numeric value.
StaticisReturns a Boolean value that indicates whether a value is the reserved value NaN (not a number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter to a number. Only values of the type number, that are also NaN, result in true.
A numeric value.
StaticisReturns true if the value passed is a safe integer.
A numeric value.
StaticparseConverts a string to a floating-point number.
A string that contains a floating-point number.
StaticparseConverts A string to an integer.
A string to convert into a number.
Optionalradix: numberA value between 2 and 36 that specifies the base of the number in string.
If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
All other strings are considered decimal.
Returns a string containing a number represented in exponential notation.
OptionalfractionDigits: numberNumber of digits after the decimal point. Must be in the range 0 - 20, inclusive.
Returns a string representing a number in fixed-point notation.
OptionalfractionDigits: numberNumber of digits after the decimal point. Must be in the range 0 - 20, inclusive.
Converts a number to a string by using the current or specified locale.
Optionallocales: string | string[]A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
Optionaloptions: NumberFormatOptionsAn object that contains one or more properties that specify comparison options.
Converts a number to a string by using the current or specified locale.
Optionallocales: LocalesArgumentA locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
Optionaloptions: NumberFormatOptionsAn object that contains one or more properties that specify comparison options.
Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.
Optionalprecision: numberNumber of significant digits. Must be in the range 1 - 21, inclusive.
Convert to a string in the given radix.
Base for output. Valid values: 2, 8, 10, and 16.
String in the selected radix, with the correct radix prefix if radix is not 10.
Returns the primitive value of the specified object.
Wrapper for NaN with payload. Note: the CBOR data model is always f64. All of the size mechanics here are ONLY for getting EDN encoding indicators correct.