Here are a few notable values, for anyone looking to calculate the rate of rounding, for anyone looking to avoid it, or for other purposes.
Numbers expressed in scientific notation will be equally accurate, unless the degree itself is also rounded.
BigInt can be used with several operators, including bitwise operators, but omits any decimals.
Certain scenarios may limit the usability of BigInt.
179769313486231580793728971405303415079934132710037826936173778980444968292764750946649017977587207096330286416692887910946555547851940402630657488671505820681908902000708383676273854845817711531764475730270069855571366959622842914819860834936475292719074168444365510704342711559699508093042880177904174497791+9979201547673598504324897285072871471186213993555970510405882466533898272496291900571175780142852257200163724564939022373763785492381006715959384438336167193578868484000098586299213046281059798601446904646187766350716006315149259876521361241978618923324738012834739836717385472725200706469887+...
999999999999999934463 or 1e21-65536.0000000000072759576141834259033203126
9007199254740992
1.00000000000000011102230246251565404236316680908203125
0.999999999999999944488848768742172978818416595458984375
2.4703282292062327208828439643411068618252990130716238221279284125033775363510437593264991818081799618989828234772285886546332835517796989819938739800539093906315035659515570226392290858392449105184435931802849936536152500319370457678249219365623669863658480757001585769269903706311928279558551332927834338409351978015531246597263579574622766465272827220056374006485499977096599470454020828166226237857393450736339007967761930577506740176324673600968951340535537458516661134223766678604162159680461914467291840300530057530849048765391711386591646239524912623653881879636239373280423891018672348497668235089863388587925628302755995657524455507255189313690836254779186948667994968324049705821028513185451396213837722826145437693412532098591327667236328126e-324 Use 2e-16 to make an actual difference
- Some of the values listed above can also be found as properties of the
Numberobject, although the values may differ slightly. - The exponentiation operator does not necessarily process from left to right. Instead, something like
2**3**2is processed as2**(3**2). - Bitwise operators will treat
NaNandInfinityas0. - Arrays have a maximum length of
2**32-1. While attempting to create any longer arrays will throw an error, maximum length arrays can still be stored inside of other arrays. String.fromCodePointaccepts integers from0to1114111. Any other integers will throw an error, unlike withString.fromCharCode, which effectively usesarguments[0]%65536.