Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Don't sweat it -- it's only ones and zeros. -- P. Skelly


devel / comp.lang.javascript / Are Floating Point Numbers still a Can of Worms?

SubjectAuthor
* Are Floating Point Numbers still a Can of Worms?Mostowski Collapse
+- Re: Are Floating Point Numbers still a Can of Worms?Ben Bacarisse
+* Re: Are Floating Point Numbers still a Can of Worms?R.Wieser
|+- Re: Are Floating Point Numbers still a Can of Worms?R.Wieser
|`* Re: Are Floating Point Numbers still a Can of Worms?John Harris
| `* Re: Are Floating Point Numbers still a Can of Worms?R.Wieser
|  `* Re: Are Floating Point Numbers still a Can of Worms?John Harris
|   `- Re: Are Floating Point Numbers still a Can of Worms?R.Wieser
+* Re: Are Floating Point Numbers still a Can of Worms?Mostowski Collapse
|`* Re: Are Floating Point Numbers still a Can of Worms?R.Wieser
| `* Re: Are Floating Point Numbers still a Can of Worms?John Harris
|  `* Re: Are Floating Point Numbers still a Can of Worms?Ben Bacarisse
|   `* Re: Are Floating Point Numbers still a Can of Worms?Mostowski Collapse
|    `* Re: Are Floating Point Numbers still a Can of Worms?Mostowski Collapse
|     `* Re: Are Floating Point Numbers still a Can of Worms?Mostowski Collapse
|      `- Re: Are Floating Point Numbers still a Can of Worms?Mostowski Collapse
`* Re: Are Floating Point Numbers still a Can of Worms?Julio Di Egidio
 `- Re: Are Floating Point Numbers still a Can of Worms?Mostowski Collapse

1
Are Floating Point Numbers still a Can of Worms?

<31753076-4806-4dd3-8577-40a4ed23b57dn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17962&group=comp.lang.javascript#17962

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:a05:6214:c42:b0:4b4:189:363d with SMTP id r2-20020a0562140c4200b004b40189363dmr54104qvj.25.1665787946762;
Fri, 14 Oct 2022 15:52:26 -0700 (PDT)
X-Received: by 2002:a05:6808:3010:b0:351:4ed2:cb27 with SMTP id
ay16-20020a056808301000b003514ed2cb27mr8510370oib.109.1665787946456; Fri, 14
Oct 2022 15:52:26 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Fri, 14 Oct 2022 15:52:26 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=80.218.40.218; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 80.218.40.218
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <31753076-4806-4dd3-8577-40a4ed23b57dn@googlegroups.com>
Subject: Are Floating Point Numbers still a Can of Worms?
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Fri, 14 Oct 2022 22:52:26 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1135
 by: Mostowski Collapse - Fri, 14 Oct 2022 22:52 UTC

Welcome to Node.js v18.9.0.

> 1889**29
1.0250068783051206e+95
> Number(BigInt(1889)**BigInt(29))
1.0250068783051207e+95

Re: Are Floating Point Numbers still a Can of Worms?

<87v8oloqlc.fsf@bsb.me.uk>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17963&group=comp.lang.javascript#17963

  copy link   Newsgroups: comp.lang.javascript
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ben.usenet@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.lang.javascript
Subject: Re: Are Floating Point Numbers still a Can of Worms?
Date: Sat, 15 Oct 2022 01:52:47 +0100
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <87v8oloqlc.fsf@bsb.me.uk>
References: <31753076-4806-4dd3-8577-40a4ed23b57dn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: reader01.eternal-september.org; posting-host="8e1c2f508dc719b9b49d4fb1f451084c";
logging-data="2473769"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18ma4d+EgBCDrzVBzrS1d5tH3BpZukBt58="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:L/U5kPcF8Fk4xlR3BEi3pVm3utU=
sha1:TABe6kd00lh5e6MzxvkVSVxrRW0=
X-BSB-Auth: 1.94dad69309211c63b216.20221015015247BST.87v8oloqlc.fsf@bsb.me.uk
 by: Ben Bacarisse - Sat, 15 Oct 2022 00:52 UTC

Mostowski Collapse <bursejan@gmail.com> writes:

> Welcome to Node.js v18.9.0.
>
>> 1889**29
> 1.0250068783051206e+95
>> Number(BigInt(1889)**BigInt(29))
> 1.0250068783051207e+95

You question (in the subject) was "Are Floating Point Numbers still a
Can of Worms?" If you once considered them a can of worms, why might
you not consider them so now? And what has your example got to do with
the question?

--
Ben.

Re: Are Floating Point Numbers still a Can of Worms?

<tidnpc$1vh5$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17964&group=comp.lang.javascript#17964

  copy link   Newsgroups: comp.lang.javascript
Path: i2pn2.org!i2pn.org!aioe.org!XakcSTEO51npqVb7OVl71w.user.46.165.242.75.POSTED!not-for-mail
From: address@not.available (R.Wieser)
Newsgroups: comp.lang.javascript
Subject: Re: Are Floating Point Numbers still a Can of Worms?
Date: Sat, 15 Oct 2022 09:33:56 +0200
Organization: Aioe.org NNTP Server
Lines: 22
Message-ID: <tidnpc$1vh5$1@gioia.aioe.org>
References: <31753076-4806-4dd3-8577-40a4ed23b57dn@googlegroups.com>
Injection-Info: gioia.aioe.org; logging-data="65061"; posting-host="XakcSTEO51npqVb7OVl71w.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Priority: 3
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-RFC2646: Format=Flowed; Original
X-Notice: Filtered by postfilter v. 0.9.2
X-MSMail-Priority: Normal
 by: R.Wieser - Sat, 15 Oct 2022 07:33 UTC

Mostowski,

>> 1889**29
> 1.0250068783051206e+95
>> Number(BigInt(1889)**BigInt(29))
> 1.0250068783051207e+95

You're looking at the lowest significant digit of a 64-bit IEE float - which
might not have all of its bits defined and thus being zero - against a
"BigFloat" digit which, for that digit, has all its bits defined.

IOW, you could be looking at a 01xxb (with "x" being zero) for the 64-bit
float against a 0110b for the BigInt float.

Bottom line : the lowest significant digit of a float is most always
incomplete, and as such might not accuratily represent the number it was
created from.

Regards,
Rudy Wieser

Re: Are Floating Point Numbers still a Can of Worms?

<tidpbg$hm1$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17965&group=comp.lang.javascript#17965

  copy link   Newsgroups: comp.lang.javascript
Path: i2pn2.org!i2pn.org!aioe.org!XakcSTEO51npqVb7OVl71w.user.46.165.242.75.POSTED!not-for-mail
From: address@not.available (R.Wieser)
Newsgroups: comp.lang.javascript
Subject: Re: Are Floating Point Numbers still a Can of Worms?
Date: Sat, 15 Oct 2022 10:00:45 +0200
Organization: Aioe.org NNTP Server
Lines: 13
Message-ID: <tidpbg$hm1$1@gioia.aioe.org>
References: <31753076-4806-4dd3-8577-40a4ed23b57dn@googlegroups.com> <tidnpc$1vh5$1@gioia.aioe.org>
Injection-Info: gioia.aioe.org; logging-data="18113"; posting-host="XakcSTEO51npqVb7OVl71w.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-MSMail-Priority: Normal
X-Notice: Filtered by postfilter v. 0.9.2
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-Priority: 3
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
 by: R.Wieser - Sat, 15 Oct 2022 08:00 UTC

> IOW, you could be looking at a 01xxb (with "x" being zero) for the 64-bit
> float against a 0110b for the BigInt float.

My bad, I should have been :

> IOW, you could be looking at a 011xb (with "x" being zero) for the 64-bit
> float against a 0111b for the BigInt float.

Regards,
Rudy Wieser

Re: Are Floating Point Numbers still a Can of Worms?

<tie14h$2lmqv$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17966&group=comp.lang.javascript#17966

  copy link   Newsgroups: comp.lang.javascript
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!weretis.net!feeder8.news.weretis.net!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: niam@jghnorth.org.uk.invalid (John Harris)
Newsgroups: comp.lang.javascript
Subject: Re: Are Floating Point Numbers still a Can of Worms?
Date: Sat, 15 Oct 2022 11:13:37 +0100
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <tie14h$2lmqv$1@dont-email.me>
References: <31753076-4806-4dd3-8577-40a4ed23b57dn@googlegroups.com>
<tidnpc$1vh5$1@gioia.aioe.org>
Reply-To: jgharris@ic4life.net
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 15 Oct 2022 10:13:37 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="fba7a86cdcdbc1170d2ef1573aaf4322";
logging-data="2808671"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18S6RJh7eVCFG2Cao36NuhCV/3JK5h/Alk="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.3.3
Cancel-Lock: sha1:P3oEvCZMgLm1muVc7ZFCbIUB5OM=
In-Reply-To: <tidnpc$1vh5$1@gioia.aioe.org>
Content-Language: en-US
 by: John Harris - Sat, 15 Oct 2022 10:13 UTC

On 15/10/2022 08:33, R.Wieser wrote:
> Mostowski,
>
>>> 1889**29
>> 1.0250068783051206e+95
>>> Number(BigInt(1889)**BigInt(29))
>> 1.0250068783051207e+95
>
> You're looking at the lowest significant digit of a 64-bit IEE float - which
> might not have all of its bits defined and thus being zero - against a
> "BigFloat" digit which, for that digit, has all its bits defined.
>
> IOW, you could be looking at a 01xxb (with "x" being zero) for the 64-bit
> float against a 0110b for the BigInt float.
>
> Bottom line : the lowest significant digit of a float is most always
> incomplete, and as such might not accuratily represent the number it was
> created from.
>
> Regards,
> Rudy Wieser

There's also the translation from binary to decimal to consider.

Anyway, floating point numbers are accurate enough to indicate the
relativity effect of someone going past you on a bicycle so I don't
think there's a problem.

John

Re: Are Floating Point Numbers still a Can of Worms?

<tie6cf$1rda$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17967&group=comp.lang.javascript#17967

  copy link   Newsgroups: comp.lang.javascript
Path: i2pn2.org!i2pn.org!aioe.org!XakcSTEO51npqVb7OVl71w.user.46.165.242.75.POSTED!not-for-mail
From: address@not.available (R.Wieser)
Newsgroups: comp.lang.javascript
Subject: Re: Are Floating Point Numbers still a Can of Worms?
Date: Sat, 15 Oct 2022 13:43:05 +0200
Organization: Aioe.org NNTP Server
Lines: 23
Message-ID: <tie6cf$1rda$1@gioia.aioe.org>
References: <31753076-4806-4dd3-8577-40a4ed23b57dn@googlegroups.com> <tidnpc$1vh5$1@gioia.aioe.org> <tie14h$2lmqv$1@dont-email.me>
Injection-Info: gioia.aioe.org; logging-data="60842"; posting-host="XakcSTEO51npqVb7OVl71w.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-MSMail-Priority: Normal
X-Priority: 3
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-Notice: Filtered by postfilter v. 0.9.2
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-RFC2646: Format=Flowed; Response
 by: R.Wieser - Sat, 15 Oct 2022 11:43 UTC

John,

> There's also the translation from binary to decimal to consider.

That sounds as if you know of a problem with it. What might that be ?

> Anyway, floating point numbers are accurate enough to indicate the
> relativity effect of someone going past you on a bicycle so I don't think
> there's a problem.

:-) The fact that that BigInt float exists (or even a 80-bit float) does
seem to indicate that there are people out there that disagree with you.

And if being able to do a certain (rather random) task is the yardstick than
I declare that an 8-bit "minifloat" is "big enough for anybody" :-p

.... but its not about if you think there is a/no problem, but about
explaining why the OP sees what he does.

Regards,
Rudy Wieser

Re: Are Floating Point Numbers still a Can of Worms?

<tie8s2$am5d$1@solani.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17968&group=comp.lang.javascript#17968

  copy link   Newsgroups: comp.lang.javascript
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: janburse@fastmail.fm (Mostowski Collapse)
Newsgroups: comp.lang.javascript
Subject: Re: Are Floating Point Numbers still a Can of Worms?
Date: Sat, 15 Oct 2022 14:25:39 +0200
Message-ID: <tie8s2$am5d$1@solani.org>
References: <31753076-4806-4dd3-8577-40a4ed23b57dn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 15 Oct 2022 12:25:38 -0000 (UTC)
Injection-Info: solani.org;
logging-data="350381"; mail-complaints-to="abuse@news.solani.org"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101
Firefox/68.0 SeaMonkey/2.53.14
Cancel-Lock: sha1:72wgh1fGUYbcWPjEP2hEedUSj3M=
In-Reply-To: <31753076-4806-4dd3-8577-40a4ed23b57dn@googlegroups.com>
X-User-ID: eJwVysEBADEEBdGWCD7KSYT+S9jsdd6YgFGuMKiNDaWy1L6U2eyLXuzjHRL0H2vAHVvYw6zqqgCJXnKu8zz5ACwoFLQ=
 by: Mostowski Collapse - Sat, 15 Oct 2022 12:25 UTC

I stepped over the example originally via Java and
not JavaScript. I find the following discrepancy between
JDK 19 and JDK 1.8, using Math.pow(), on Windows:

/* JDK 1.8 Windows Nok */
?- X is 1889**29.
X = 1.0250068783051206E95.

/* JDK 19 Windows Ok */
?- X is 1889**29.
X = 1.0250068783051207E95.

?- X is 1.0250068783051207E95-1.0250068783051206E95.
X = 1.4821387422376473E79.

Then I went on and tested nodeJS a little bit. You
can compare with Python as well. I get the following
result, namely the more accurate result, what the

HALF_EVEN rounding of the exact pow() gives:

/* Python 3.11.0rc1 Windows Ok */
>>> 1889**29.0
1.0250068783051207e+95

Would it be possible to upgrade nodeJS somehow?
Maybe I should post in a nodeJS forum. But the error
happens also in Browsers JavaScript, like in Chrome:

/* Chrome Windows Nok */
?- X is 1889**29.
X = 1.0250068783051206E95.

So I guess nodeJS might have imported the error from
Chrome V8 or something. It doesn't happen in FireFox:

/* FireFox Windows Ok */
?- X is 1889**29.
X = 1.0250068783051207E95.

Mostowski Collapse schrieb:
> Welcome to Node.js v18.9.0.
>
>> 1889**29
> 1.0250068783051206e+95
>> Number(BigInt(1889)**BigInt(29))
> 1.0250068783051207e+95
>

Re: Are Floating Point Numbers still a Can of Worms?

<tieg7a$5h9$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17969&group=comp.lang.javascript#17969

  copy link   Newsgroups: comp.lang.javascript
Path: i2pn2.org!i2pn.org!aioe.org!XakcSTEO51npqVb7OVl71w.user.46.165.242.75.POSTED!not-for-mail
From: address@not.available (R.Wieser)
Newsgroups: comp.lang.javascript
Subject: Re: Are Floating Point Numbers still a Can of Worms?
Date: Sat, 15 Oct 2022 16:31:04 +0200
Organization: Aioe.org NNTP Server
Lines: 78
Message-ID: <tieg7a$5h9$1@gioia.aioe.org>
References: <31753076-4806-4dd3-8577-40a4ed23b57dn@googlegroups.com> <tie8s2$am5d$1@solani.org>
Injection-Info: gioia.aioe.org; logging-data="5673"; posting-host="XakcSTEO51npqVb7OVl71w.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-Notice: Filtered by postfilter v. 0.9.2
X-Priority: 3
X-MSMail-Priority: Normal
X-RFC2646: Format=Flowed; Response
 by: R.Wieser - Sat, 15 Oct 2022 14:31 UTC

Mostowski,

>I stepped over the example originally via Java and
> not JavaScript. I find the following discrepancy between
> JDK 19 and JDK 1.8, using Math.pow(), on Windows:
>
> /* JDK 1.8 Windows Nok */
> ?- X is 1889**29.
> X = 1.0250068783051206E95.
>
> /* JDK 19 Windows Ok */
> ?- X is 1889**29.
> X = 1.0250068783051207E95.
>
> ?- X is 1.0250068783051207E95-1.0250068783051206E95.
> X = 1.4821387422376473E79.

And what do you think you've proven there ?

may I also point out to you that the difference between E95 and E79 is about
exactly the precision of a 64-bit float (~16 digits). IOW, you are again
trying to work with the least-significant bit in a 64-bit float. And that
that most always causes problems. For instance, I would not at all be
surprised when that last number is a simple power of two ...

I think Ben Bacarisse asked you a good question : what is the problem (that
you seem to think you are seeing), and what has it to do with your
subjectline ?

Regards,
Rudy Wieser

P.s.
I've got some numbers for you :

-- 1889*1889*1889*1889*1889* etc. calculated thru the FPU
53A891D176398773 - 1.0250068783051204e+095

The first part is the hexadecimal representation of the resulting 64-bit
float, the latter part is how its represented when displayed for human
consumption (thru fprint "%1.16f"). You might notice it ends on a 4
instead of a 6. This is likely because I didn't bother with any kind of
"fixing up". Adding 1 to the hexadecimal number gives your 6 result.

-- These below two are what I get when my program parses, and than displays
the same two floats you gave in your current post. It looks that my
programming language (parsing the value and storing it in its binary form)
does the same fixing-up JS does.

Notice that the hexadecimal representation shows a single point difference,
just as the displayed human consumption numbers next to them.

53A891D176398774 - 1.0250068783051206e+095
53A891D176398775 - 1.0250068783051207e+095

Notice that both of the numbers you gave can be stored into the binary
representation of a 64-bit float, and my suggestion that it might be a
64-bit vs BigInt float doesn't seem to be the cause of the difference you're
seeing.

Another possibility is that the rounding method (after calculation /
parsing) between the two JDK versions has changed. That /should/ be
mentioned in the "whats changed" section.

-- This is the result of the subtraction of the above first from the second.
As expected the hexadecimal representation shows the fractional part (the
lower 22 bits) as all Zero. Only the exponent part (bits 22 thru 30)
contain some bits set to One.

5060000000000000 - 1.4821387422376473e+079

Bottom line :
1) The rounding method between two JDK versions seem to have changed.
2) The subtraction showing a large, seemingly "random" number is quite
normal. (an effect similar to how decimal fractions cannot always be stored
in a binary representation, but now the other way around).

Re: Are Floating Point Numbers still a Can of Worms?

<tiehnp$2pf9o$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17970&group=comp.lang.javascript#17970

  copy link   Newsgroups: comp.lang.javascript
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!weretis.net!feeder8.news.weretis.net!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: niam@jghnorth.org.uk.invalid (John Harris)
Newsgroups: comp.lang.javascript
Subject: Re: Are Floating Point Numbers still a Can of Worms?
Date: Sat, 15 Oct 2022 15:56:57 +0100
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <tiehnp$2pf9o$1@dont-email.me>
References: <31753076-4806-4dd3-8577-40a4ed23b57dn@googlegroups.com>
<tidnpc$1vh5$1@gioia.aioe.org> <tie14h$2lmqv$1@dont-email.me>
<tie6cf$1rda$1@gioia.aioe.org>
Reply-To: jgharris@ic4life.net
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 15 Oct 2022 14:56:57 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="fba7a86cdcdbc1170d2ef1573aaf4322";
logging-data="2932024"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/vGs3R+7FpwZytMcTOT8q8ZSVTpEepsis="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.3.3
Cancel-Lock: sha1:VLu3pwsbAiD56+jeKPxfsFL0jhY=
In-Reply-To: <tie6cf$1rda$1@gioia.aioe.org>
Content-Language: en-US
 by: John Harris - Sat, 15 Oct 2022 14:56 UTC

On 15/10/2022 12:43, R.Wieser wrote:

<snip>
>> Anyway, floating point numbers are accurate enough to indicate the
>> relativity effect of someone going past you on a bicycle so I don't think
>> there's a problem.
>
> :-) The fact that that BigInt float exists (or even a 80-bit float) does
> seem to indicate that there are people out there that disagree with you.
<Snip>

I was indicating that it's not a "can of worms".

John

Re: Are Floating Point Numbers still a Can of Worms?

<tiej7q$2pf9o$2@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17971&group=comp.lang.javascript#17971

  copy link   Newsgroups: comp.lang.javascript
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!weretis.net!feeder8.news.weretis.net!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: niam@jghnorth.org.uk.invalid (John Harris)
Newsgroups: comp.lang.javascript
Subject: Re: Are Floating Point Numbers still a Can of Worms?
Date: Sat, 15 Oct 2022 16:22:33 +0100
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <tiej7q$2pf9o$2@dont-email.me>
References: <31753076-4806-4dd3-8577-40a4ed23b57dn@googlegroups.com>
<tie8s2$am5d$1@solani.org> <tieg7a$5h9$1@gioia.aioe.org>
Reply-To: jgharris@ic4life.net
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 15 Oct 2022 15:22:34 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="fba7a86cdcdbc1170d2ef1573aaf4322";
logging-data="2932024"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/uGy/Sf1gswYnCvKl5OIEqTnxUnUgAdA4="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.3.3
Cancel-Lock: sha1:KjcXrTz9QKGFgdOYFtGI+pODPKc=
Content-Language: en-US
In-Reply-To: <tieg7a$5h9$1@gioia.aioe.org>
 by: John Harris - Sat, 15 Oct 2022 15:22 UTC

On 15/10/2022 15:31, R.Wieser wrote:

<snip>
> P.s.
> I've got some numbers for you :
>
> -- 1889*1889*1889*1889*1889* etc. calculated thru the FPU
> 53A891D176398773 - 1.0250068783051204e+095
<snip>

For what it's worth, the correct value of 1889**29 is :

102500687830512064253064716070601123218909116358654017979384519544555980744900395407329380298209

so the ...206 value is most accurate and ...207 is only slightly less
accurate. The ...204 value illustrates why you want to cut down the
number of floating point operations to get an answer. Even so, it is
still good enough for many purposes

John

Re: Are Floating Point Numbers still a Can of Worms?

<tiekgs$8c2$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17972&group=comp.lang.javascript#17972

  copy link   Newsgroups: comp.lang.javascript
Path: i2pn2.org!i2pn.org!aioe.org!XakcSTEO51npqVb7OVl71w.user.46.165.242.75.POSTED!not-for-mail
From: address@not.available (R.Wieser)
Newsgroups: comp.lang.javascript
Subject: Re: Are Floating Point Numbers still a Can of Worms?
Date: Sat, 15 Oct 2022 17:44:22 +0200
Organization: Aioe.org NNTP Server
Lines: 30
Message-ID: <tiekgs$8c2$1@gioia.aioe.org>
References: <31753076-4806-4dd3-8577-40a4ed23b57dn@googlegroups.com> <tidnpc$1vh5$1@gioia.aioe.org> <tie14h$2lmqv$1@dont-email.me> <tie6cf$1rda$1@gioia.aioe.org> <tiehnp$2pf9o$1@dont-email.me>
Injection-Info: gioia.aioe.org; logging-data="8578"; posting-host="XakcSTEO51npqVb7OVl71w.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-Priority: 3
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MSMail-Priority: Normal
X-Notice: Filtered by postfilter v. 0.9.2
 by: R.Wieser - Sat, 15 Oct 2022 15:44 UTC

John,

>> :-) The fact that that BigInt float exists (or even a 80-bit float) does
>> seem to indicate that there are people out there that disagree with you.
> <Snip>
>
> I was indicating that it's not a "can of worms".

Ah thataway. Well, in that case I don't fully agree with you there. You
have to know what you're dealing with not to stumble into a floats pitfalls.

.... as you've eloquently shown in your next message :

> For what it's worth, the correct value of 1889**29 is :
>
> 102500687830512064253064716070601123218909116358654017979384519544555980744900395407329380298209
>
> so the ...206 value is most accurate and ...207 is only slightly less
> accurate. The ...204 value illustrates why you want to cut down the number
> of floating point operations to get an answer.

Although I was aware that multiple divisions (creating small fractional
results) could easily lead to precision problems, I fully overlooked that
those same problems could creep up on you when doing integer multiplications
resulting in big numbers. :-\

Regards,
Rudy Wieser

Re: Are Floating Point Numbers still a Can of Worms?

<87h705nke7.fsf@bsb.me.uk>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17973&group=comp.lang.javascript#17973

  copy link   Newsgroups: comp.lang.javascript
Path: i2pn2.org!i2pn.org!paganini.bofh.team!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ben.usenet@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.lang.javascript
Subject: Re: Are Floating Point Numbers still a Can of Worms?
Date: Sat, 15 Oct 2022 17:04:16 +0100
Organization: A noiseless patient Spider
Lines: 35
Message-ID: <87h705nke7.fsf@bsb.me.uk>
References: <31753076-4806-4dd3-8577-40a4ed23b57dn@googlegroups.com>
<tie8s2$am5d$1@solani.org> <tieg7a$5h9$1@gioia.aioe.org>
<tiej7q$2pf9o$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: reader01.eternal-september.org; posting-host="8e1c2f508dc719b9b49d4fb1f451084c";
logging-data="2957872"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1873MJQOG32+i+3ctqFP3GR6GRpWOZnO74="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:HSRZMr9dNS9Bvu5cMwAVrlpGl2M=
sha1:yQnGBGj/K0oewFSvBe9pyu1LzFw=
X-BSB-Auth: 1.bdd5c5e595f03eb497ca.20221015170416BST.87h705nke7.fsf@bsb.me.uk
 by: Ben Bacarisse - Sat, 15 Oct 2022 16:04 UTC

John Harris <niam@jghnorth.org.uk.invalid> writes:

> On 15/10/2022 15:31, R.Wieser wrote:
>
> <snip>
>> P.s.
>> I've got some numbers for you :
>> -- 1889*1889*1889*1889*1889* etc. calculated thru the FPU
>> 53A891D176398773 - 1.0250068783051204e+095
> <snip>
>
> For what it's worth, the correct value of 1889**29 is :
>
> 102500687830512064253064716070601123218909116358654017979384519544555980744900395407329380298209
>
> so the ...206 value is most accurate and ...207 is only slightly less
> accurate.

True. But neither 1.0250068783051206e95 nor 1.0250068783051207e95 can
be represented in binary floating point. The two representable
numbers closest to 1889**29 are

1025006878305120[5]6620692472528153354473784341513556365963141787204703693721957646169653433597952

and

1025006878305120[7]1442079894904626368690870422625608571181699824406695890772528399182534027509760

So the larger of the two is, in fact, the more accurate. There are two
kinds of accuracy at this level: (1) what binary floating point number
is the closest and, (2) what decimal is the closest representation to
/that/ binary number?

--
Ben.

Re: Are Floating Point Numbers still a Can of Worms?

<c6e54aaa-618b-4a5d-9c0e-3c074880d356n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17974&group=comp.lang.javascript#17974

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:a05:620a:b51:b0:6cf:68b2:d86e with SMTP id x17-20020a05620a0b5100b006cf68b2d86emr2401150qkg.176.1665852428577;
Sat, 15 Oct 2022 09:47:08 -0700 (PDT)
X-Received: by 2002:a05:6808:d4f:b0:351:62ce:d99c with SMTP id
w15-20020a0568080d4f00b0035162ced99cmr1505423oik.244.1665852428333; Sat, 15
Oct 2022 09:47:08 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Sat, 15 Oct 2022 09:47:08 -0700 (PDT)
In-Reply-To: <87h705nke7.fsf@bsb.me.uk>
Injection-Info: google-groups.googlegroups.com; posting-host=80.218.40.218; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 80.218.40.218
References: <31753076-4806-4dd3-8577-40a4ed23b57dn@googlegroups.com>
<tie8s2$am5d$1@solani.org> <tieg7a$5h9$1@gioia.aioe.org> <tiej7q$2pf9o$2@dont-email.me>
<87h705nke7.fsf@bsb.me.uk>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c6e54aaa-618b-4a5d-9c0e-3c074880d356n@googlegroups.com>
Subject: Re: Are Floating Point Numbers still a Can of Worms?
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Sat, 15 Oct 2022 16:47:08 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3082
 by: Mostowski Collapse - Sat, 15 Oct 2022 16:47 UTC

I wonder whether FireFox always yields the more
accurate values, or whether this is just one example.

Here are some more failures of Chrome,
accuracy of B**E:

B = 1889, E = 29;
B = 1470, E = 56;
B = -1976, E = -49;
B = 3240, E = -18;
B = 2154, E = -6;
B = -182, E = -32;
B = 852, E = 43;
B = 3316, E = -37;
B = 2830, E = 25;
B = 4075, E = -29;
B = -2128, E = 64;

On the other hand Firefox fails here, BTW Python
fails also here, JDK 19 gives a different result:

B = 396, E = -1;

LoL

Ben Bacarisse schrieb am Samstag, 15. Oktober 2022 um 18:04:24 UTC+2:
> John Harris <ni...@jghnorth.org.uk.invalid> writes:
>
> > On 15/10/2022 15:31, R.Wieser wrote:
> >
> > <snip>
> >> P.s.
> >> I've got some numbers for you :
> >> -- 1889*1889*1889*1889*1889* etc. calculated thru the FPU
> >> 53A891D176398773 - 1.0250068783051204e+095
> > <snip>
> >
> > For what it's worth, the correct value of 1889**29 is :
> >
> > 102500687830512064253064716070601123218909116358654017979384519544555980744900395407329380298209
> >
> > so the ...206 value is most accurate and ...207 is only slightly less
> > accurate.
> True. But neither 1.0250068783051206e95 nor 1.0250068783051207e95 can
> be represented in binary floating point. The two representable
> numbers closest to 1889**29 are
>
> 1025006878305120[5]6620692472528153354473784341513556365963141787204703693721957646169653433597952
>
> and
>
> 1025006878305120[7]1442079894904626368690870422625608571181699824406695890772528399182534027509760
>
> So the larger of the two is, in fact, the more accurate. There are two
> kinds of accuracy at this level: (1) what binary floating point number
> is the closest and, (2) what decimal is the closest representation to
> /that/ binary number?
>
> --
> Ben.

Re: Are Floating Point Numbers still a Can of Worms?

<tieofb$av1b$1@solani.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17975&group=comp.lang.javascript#17975

  copy link   Newsgroups: comp.lang.javascript
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: janburse@fastmail.fm (Mostowski Collapse)
Newsgroups: comp.lang.javascript
Subject: Re: Are Floating Point Numbers still a Can of Worms?
Date: Sat, 15 Oct 2022 18:51:56 +0200
Message-ID: <tieofb$av1b$1@solani.org>
References: <31753076-4806-4dd3-8577-40a4ed23b57dn@googlegroups.com>
<tie8s2$am5d$1@solani.org> <tieg7a$5h9$1@gioia.aioe.org>
<tiej7q$2pf9o$2@dont-email.me> <87h705nke7.fsf@bsb.me.uk>
<c6e54aaa-618b-4a5d-9c0e-3c074880d356n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 15 Oct 2022 16:51:55 -0000 (UTC)
Injection-Info: solani.org;
logging-data="359467"; mail-complaints-to="abuse@news.solani.org"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101
Firefox/68.0 SeaMonkey/2.53.14
Cancel-Lock: sha1:pVtABzLoaZI/fAsf5ElcRi4IBsU=
In-Reply-To: <c6e54aaa-618b-4a5d-9c0e-3c074880d356n@googlegroups.com>
X-User-ID: eJwFwQERADEIAzBLQGk35Dzj8C/hE0Kud1JUcrlN29OukDluV45HQTWEnQsrJrL1cgeab9xiuzCgsybjBxyMFA8=
 by: Mostowski Collapse - Sat, 15 Oct 2022 16:51 UTC

Versions used, both 64-bit on Windows 10:

Chrome 106.0.5249.119
Firefox 105.0.3

Mostowski Collapse schrieb:
> I wonder whether FireFox always yields the more
> accurate values, or whether this is just one example.
>
> Here are some more failures of Chrome,
> accuracy of B**E:
>
> B = 1889, E = 29;
> B = 1470, E = 56;
> B = -1976, E = -49;
> B = 3240, E = -18;
> B = 2154, E = -6;
> B = -182, E = -32;
> B = 852, E = 43;
> B = 3316, E = -37;
> B = 2830, E = 25;
> B = 4075, E = -29;
> B = -2128, E = 64;
>
> On the other hand Firefox fails here, BTW Python
> fails also here, JDK 19 gives a different result:
>
> B = 396, E = -1;
>
> LoL
>
> Ben Bacarisse schrieb am Samstag, 15. Oktober 2022 um 18:04:24 UTC+2:
>> John Harris <ni...@jghnorth.org.uk.invalid> writes:
>>
>>> On 15/10/2022 15:31, R.Wieser wrote:
>>>
>>> <snip>
>>>> P.s.
>>>> I've got some numbers for you :
>>>> -- 1889*1889*1889*1889*1889* etc. calculated thru the FPU
>>>> 53A891D176398773 - 1.0250068783051204e+095
>>> <snip>
>>>
>>> For what it's worth, the correct value of 1889**29 is :
>>>
>>> 102500687830512064253064716070601123218909116358654017979384519544555980744900395407329380298209
>>>
>>> so the ...206 value is most accurate and ...207 is only slightly less
>>> accurate.
>> True. But neither 1.0250068783051206e95 nor 1.0250068783051207e95 can
>> be represented in binary floating point. The two representable
>> numbers closest to 1889**29 are
>>
>> 1025006878305120[5]6620692472528153354473784341513556365963141787204703693721957646169653433597952
>>
>> and
>>
>> 1025006878305120[7]1442079894904626368690870422625608571181699824406695890772528399182534027509760
>>
>> So the larger of the two is, in fact, the more accurate. There are two
>> kinds of accuracy at this level: (1) what binary floating point number
>> is the closest and, (2) what decimal is the closest representation to
>> /that/ binary number?
>>
>> --
>> Ben.

Re: Are Floating Point Numbers still a Can of Worms?

<1bab974f-8147-48b7-9ec4-489c3e785415n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17977&group=comp.lang.javascript#17977

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:ae9:f214:0:b0:6e4:35ec:a7fe with SMTP id m20-20020ae9f214000000b006e435eca7femr6726223qkg.253.1665997220029;
Mon, 17 Oct 2022 02:00:20 -0700 (PDT)
X-Received: by 2002:a05:6870:638d:b0:133:2337:864b with SMTP id
t13-20020a056870638d00b001332337864bmr5122760oap.205.1665997219793; Mon, 17
Oct 2022 02:00:19 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Mon, 17 Oct 2022 02:00:19 -0700 (PDT)
In-Reply-To: <31753076-4806-4dd3-8577-40a4ed23b57dn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=93.41.98.242; posting-account=F3H0JAgAAADcYVukktnHx7hFG5stjWse
NNTP-Posting-Host: 93.41.98.242
References: <31753076-4806-4dd3-8577-40a4ed23b57dn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <1bab974f-8147-48b7-9ec4-489c3e785415n@googlegroups.com>
Subject: Re: Are Floating Point Numbers still a Can of Worms?
From: julio@diegidio.name (Julio Di Egidio)
Injection-Date: Mon, 17 Oct 2022 09:00:20 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1696
 by: Julio Di Egidio - Mon, 17 Oct 2022 09:00 UTC

On Saturday, 15 October 2022 at 00:52:31 UTC+2, Mostowski Collapse wrote:
> Welcome to Node.js v18.9.0.
>
> > 1889**29
> 1.0250068783051206e+95
> > Number(BigInt(1889)**BigInt(29))
> 1.0250068783051207e+95

Numerics: another thing you have never known shit
about and still manage to write bullshit across all
groups ad nauseam.

You really don't understand the damage you are doing,
here as elsewhere, do you, you piece of retarded shit,
or you too just working for the nazi monster??

*Troll-spammer-crank alert*

Julio

Re: Are Floating Point Numbers still a Can of Worms?

<3b8fe28c-1c81-474f-9c27-3c14ac8f41een@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17980&group=comp.lang.javascript#17980

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:a05:620a:2601:b0:6bc:70bb:c56b with SMTP id z1-20020a05620a260100b006bc70bbc56bmr2096155qko.416.1666104026919;
Tue, 18 Oct 2022 07:40:26 -0700 (PDT)
X-Received: by 2002:a05:6808:14c1:b0:354:d3bf:67b with SMTP id
f1-20020a05680814c100b00354d3bf067bmr16143541oiw.160.1666104026696; Tue, 18
Oct 2022 07:40:26 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Tue, 18 Oct 2022 07:40:26 -0700 (PDT)
In-Reply-To: <1bab974f-8147-48b7-9ec4-489c3e785415n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=80.218.40.218; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 80.218.40.218
References: <31753076-4806-4dd3-8577-40a4ed23b57dn@googlegroups.com> <1bab974f-8147-48b7-9ec4-489c3e785415n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3b8fe28c-1c81-474f-9c27-3c14ac8f41een@googlegroups.com>
Subject: Re: Are Floating Point Numbers still a Can of Worms?
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Tue, 18 Oct 2022 14:40:26 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1919
 by: Mostowski Collapse - Tue, 18 Oct 2022 14:40 UTC

Nazi Monster. Do you mean Putin?

LoL

ju...@diegidio.name schrieb am Montag, 17. Oktober 2022 um 11:00:24 UTC+2:
> On Saturday, 15 October 2022 at 00:52:31 UTC+2, Mostowski Collapse wrote:
> > Welcome to Node.js v18.9.0.
> >
> > > 1889**29
> > 1.0250068783051206e+95
> > > Number(BigInt(1889)**BigInt(29))
> > 1.0250068783051207e+95
> Numerics: another thing you have never known shit
> about and still manage to write bullshit across all
> groups ad nauseam.
>
> You really don't understand the damage you are doing,
> here as elsewhere, do you, you piece of retarded shit,
> or you too just working for the nazi monster??
>
> *Troll-spammer-crank alert*
>
> Julio

Re: Are Floating Point Numbers still a Can of Worms?

<bcd7ae88-f705-413b-a976-2c3770c1fa9an@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17982&group=comp.lang.javascript#17982

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:a05:6214:2a47:b0:4bb:5bc0:626d with SMTP id jf7-20020a0562142a4700b004bb5bc0626dmr5834687qvb.130.1666474529443;
Sat, 22 Oct 2022 14:35:29 -0700 (PDT)
X-Received: by 2002:a05:6870:d626:b0:13b:1a98:6ada with SMTP id
a38-20020a056870d62600b0013b1a986adamr7339405oaq.277.1666474529059; Sat, 22
Oct 2022 14:35:29 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Sat, 22 Oct 2022 14:35:28 -0700 (PDT)
In-Reply-To: <tieofb$av1b$1@solani.org>
Injection-Info: google-groups.googlegroups.com; posting-host=80.218.40.218; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 80.218.40.218
References: <31753076-4806-4dd3-8577-40a4ed23b57dn@googlegroups.com>
<tie8s2$am5d$1@solani.org> <tieg7a$5h9$1@gioia.aioe.org> <tiej7q$2pf9o$2@dont-email.me>
<87h705nke7.fsf@bsb.me.uk> <c6e54aaa-618b-4a5d-9c0e-3c074880d356n@googlegroups.com>
<tieofb$av1b$1@solani.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <bcd7ae88-f705-413b-a976-2c3770c1fa9an@googlegroups.com>
Subject: Re: Are Floating Point Numbers still a Can of Worms?
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Sat, 22 Oct 2022 21:35:29 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Mostowski Collapse - Sat, 22 Oct 2022 21:35 UTC

I also get, on Windows:

Welcome to Node.js v18.9.0.
> 2.718281828459045**0.8618974796837966
2.367649

Nice try, but isn't this one the more correct?

?- X is 2.718281828459045**0.8618974796837966.
X = 2.3676489999999997.

Mostowski Collapse schrieb am Samstag, 15. Oktober 2022 um 18:52:04 UTC+2:
> Versions used, both 64-bit on Windows 10:
>
> Chrome 106.0.5249.119
> Firefox 105.0.3
>
> Mostowski Collapse schrieb:
> > I wonder whether FireFox always yields the more
> > accurate values, or whether this is just one example.
> >
> > Here are some more failures of Chrome,
> > accuracy of B**E:
> >
> > B = 1889, E = 29;
> > B = 1470, E = 56;
> > B = -1976, E = -49;
> > B = 3240, E = -18;
> > B = 2154, E = -6;
> > B = -182, E = -32;
> > B = 852, E = 43;
> > B = 3316, E = -37;
> > B = 2830, E = 25;
> > B = 4075, E = -29;
> > B = -2128, E = 64;
> >
> > On the other hand Firefox fails here, BTW Python
> > fails also here, JDK 19 gives a different result:
> >
> > B = 396, E = -1;
> >
> > LoL
> >
> > Ben Bacarisse schrieb am Samstag, 15. Oktober 2022 um 18:04:24 UTC+2:
> >> John Harris <ni...@jghnorth.org.uk.invalid> writes:
> >>
> >>> On 15/10/2022 15:31, R.Wieser wrote:
> >>>
> >>> <snip>
> >>>> P.s.
> >>>> I've got some numbers for you :
> >>>> -- 1889*1889*1889*1889*1889* etc. calculated thru the FPU
> >>>> 53A891D176398773 - 1.0250068783051204e+095
> >>> <snip>
> >>>
> >>> For what it's worth, the correct value of 1889**29 is :
> >>>
> >>> 102500687830512064253064716070601123218909116358654017979384519544555980744900395407329380298209
> >>>
> >>> so the ...206 value is most accurate and ...207 is only slightly less
> >>> accurate.
> >> True. But neither 1.0250068783051206e95 nor 1.0250068783051207e95 can
> >> be represented in binary floating point. The two representable
> >> numbers closest to 1889**29 are
> >>
> >> 1025006878305120[5]6620692472528153354473784341513556365963141787204703693721957646169653433597952
> >>
> >> and
> >>
> >> 1025006878305120[7]1442079894904626368690870422625608571181699824406695890772528399182534027509760
> >>
> >> So the larger of the two is, in fact, the more accurate. There are two
> >> kinds of accuracy at this level: (1) what binary floating point number
> >> is the closest and, (2) what decimal is the closest representation to
> >> /that/ binary number?
> >>
> >> --
> >> Ben.

Re: Are Floating Point Numbers still a Can of Worms?

<7c978307-9366-4310-b649-2dafb3709916n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17990&group=comp.lang.javascript#17990

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:a05:620a:66e:b0:6cb:c12c:9759 with SMTP id a14-20020a05620a066e00b006cbc12c9759mr3168725qkh.214.1669050191590;
Mon, 21 Nov 2022 09:03:11 -0800 (PST)
X-Received: by 2002:a4a:97d3:0:b0:49c:6436:5b18 with SMTP id
x19-20020a4a97d3000000b0049c64365b18mr8721899ooi.31.1669050184870; Mon, 21
Nov 2022 09:03:04 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Mon, 21 Nov 2022 09:02:59 -0800 (PST)
In-Reply-To: <bcd7ae88-f705-413b-a976-2c3770c1fa9an@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=80.218.40.218; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 80.218.40.218
References: <31753076-4806-4dd3-8577-40a4ed23b57dn@googlegroups.com>
<tie8s2$am5d$1@solani.org> <tieg7a$5h9$1@gioia.aioe.org> <tiej7q$2pf9o$2@dont-email.me>
<87h705nke7.fsf@bsb.me.uk> <c6e54aaa-618b-4a5d-9c0e-3c074880d356n@googlegroups.com>
<tieofb$av1b$1@solani.org> <bcd7ae88-f705-413b-a976-2c3770c1fa9an@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <7c978307-9366-4310-b649-2dafb3709916n@googlegroups.com>
Subject: Re: Are Floating Point Numbers still a Can of Worms?
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Mon, 21 Nov 2022 17:03:11 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1811
 by: Mostowski Collapse - Mon, 21 Nov 2022 17:02 UTC

Ha Ha, these Machin like formulas are
undershooting and overshooting:

Welcome to Node.js v19.1.0.
> 28*Math.atan(1/9)+4*Math.atan(4765/441284)
3.1415926535897927
> 20*Math.atan(1/7)+8*Math.atan(3/79)
3.141592653589793
> 48*Math.atan(1/16)+4*Math.atan(14818029403841/407217467325761)
3.1415926535897936

Credits: Machin's Merit
https://www.mathpages.com/home/kmath373/kmath373.htm

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor