Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #38334

Re: Arithmetic Accuracy Question

Newsgroups comp.lang.javascript
Date 2020-03-26 12:04 -0700
References <2e6b89f4-5561-43ab-8bc0-7d5c24f96db5@googlegroups.com> <2a154a66-7f18-4c67-b6e9-ffe1f9b5d395@googlegroups.com>
Message-ID <6d96c3dc-925e-4e8d-aeba-05cf5d4c5629@googlegroups.com> (permalink)
Subject Re: Arithmetic Accuracy Question
From dr.j.r.stockton@gmail.com

Show all headers | View raw


On Thursday, 27 February 2020 14:29:24 UTC, Michael Haufe (TNO)  wrote:
> On Thursday, February 27, 2020 at 6:08:45 AM UTC-6, dr.j.r...@gmail.com wrote:
> > [...]
> 
> > TwoToPowerOf63	= Math.pow(2, 63)		// 2^63
> 
> In modern JavaScript:
> 
> let twoToPowerOf63 = 2**63;

I fear that to be too modern for at least one current browser, probably MS IE 11 :-( .


> > And, does currently predominantly-used JavaScript natively have
> > greater-precision types of numbers, such as 64-bit unsigned
> > integers?  
> 
> Yes:
> 
> <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt>
> 
> and BigDecimal is in progress:
> 
> <https://twitter.com/mlhaufe/status/1185611526482354176>

Good.

<G> - but how about other bases?  Two decades ago, I would have already been able to calculate, in Base 7 (or other in 2..16) integer arithmetic, the date of this year's Easter Sunday :-

prompt>longcalc 2020 dup 7 bas wrt #ge  wrt wrt
+5,614 +4 +15
</G>

-- 
  (c) John Stockton, near London, UK.  Using Google Groups.           |
 Mail: J.R.""""""""@physics.org - or as Reply-To, if any.             |

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Arithmetic Accuracy Question dr.j.r.stockton@gmail.com - 2020-02-27 04:08 -0800
  Re: Arithmetic Accuracy Question Julio Di Egidio <julio@diegidio.name> - 2020-02-27 06:02 -0800
  Re: Arithmetic Accuracy Question "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2020-02-27 06:29 -0800
    Re: Arithmetic Accuracy Question Julio Di Egidio <julio@diegidio.name> - 2020-02-27 06:39 -0800
      Re: Arithmetic Accuracy Question "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2020-02-27 07:49 -0800
        Re: Arithmetic Accuracy Question Julio Di Egidio <julio@diegidio.name> - 2020-02-27 08:00 -0800
          Re: Arithmetic Accuracy Question "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2020-02-27 08:20 -0800
      Re: Arithmetic Accuracy Question Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2020-02-27 22:54 +0100
        Re: Arithmetic Accuracy Question Arno Welzel <usenet@arnowelzel.de> - 2020-02-28 09:24 +0100
          Re: Arithmetic Accuracy Question "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2020-02-28 06:48 -0800
        Re: Arithmetic Accuracy Question John G Harris <niam@jghnorth.org.uk.invalid> - 2020-02-28 08:32 +0000
      Re: Arithmetic Accuracy Question Arno Welzel <usenet@arnowelzel.de> - 2020-02-28 09:20 +0100
        Re: Arithmetic Accuracy Question "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2020-02-28 11:06 +0100
    Re: Arithmetic Accuracy Question dr.j.r.stockton@gmail.com - 2020-03-26 12:04 -0700
      Re: Arithmetic Accuracy Question "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2020-03-26 13:17 -0700
  Re: Arithmetic Accuracy Question dr.j.r.stockton@gmail.com - 2020-03-26 11:24 -0700

csiph-web