- You are here
- Comp Newsgroups Archived.At
- comp.lang.javascript
- 2020 February
- Arithmetic Accuracy Question

Subject: | Arithmetic Accuracy Question |

Posted by: | dr.j.r.stocktâ€¦@gmail.com |

Date: | Thu, 27 Feb 2020 |

I have the following script. In infinite-accuracy arithmetic, all

variables will have integer values; but 2^63, although represented

exactly in an IEEE Double, is outside the range in which all

integers can be represented exactly. Am I entitled to say that,

script using IEEE Doubles, all the variables will take the

infinite-accuracy values?

TwoToPowerOf63 = Math.pow(2, 63) // 2^63

SecsIn400Years = (400*365+100-3) * (60*60*24) // Seconds in 400 years

Quadrennia = TwoToPowerOf63 / SecsIn400Years | 0 // DIV

Remainder = TwoToPowerOf63 % SecsIn400Years // MOD

And, does currently predominantly-used JavaScript natively have

greater-precision types of numbers, such as 64-bit unsigned

integers? I do have a Pascal/Delphi vast-integer program

(IIRC, up to +- 15^99999999), but I want something simpler here).

If so, recommended URL(s)?

--

(c) John Stockton, near London, UK. Using Google Groups. |

Mail: J.R.""""""""@physics.org - or as Reply-To, if any. |

- Re: Arithmetic Accuracy Question posted by Michael Haufe (TNO) on Thu, 27 Feb 2020