Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

The meek are contesting the will.


devel / comp.lang.forth / Re: What do floating point words do with NAN?

SubjectAuthor
* What do floating point words do with NAN?Rick C
+- Re: What do floating point words do with NAN?dxforth
+- Re: What do floating point words do with NAN?Anton Ertl
`* Re: What do floating point words do with NAN?minf...@arcor.de
 +- Re: What do floating point words do with NAN?Rick C
 `* Re: What do floating point words do with NAN?Krishna Myneni
  `* Re: What do floating point words do with NAN?minf...@arcor.de
   +* Re: What do floating point words do with NAN?Krishna Myneni
   |`* Re: What do floating point words do with NAN?minf...@arcor.de
   | +* Re: What do floating point words do with NAN?Krishna Myneni
   | |+* Re: What do floating point words do with NAN?minf...@arcor.de
   | ||+* Re: What do floating point words do with NAN?Krishna Myneni
   | |||`- Re: What do floating point words do with NAN?minf...@arcor.de
   | ||`* Re: What do floating point words do with NAN?none
   | || +* Re: What do floating point words do with NAN?minf...@arcor.de
   | || |`* Re: What do floating point words do with NAN?Anton Ertl
   | || | `* Re: What do floating point words do with NAN?Marcel Hendrix
   | || |  `- Re: What do floating point words do with NAN?Anton Ertl
   | || +- Re: What do floating point words do with NAN?dxforth
   | || `- Re: What do floating point words do with NAN?Anton Ertl
   | |+- Re: What do floating point words do with NAN?dxforth
   | |`* Re: What do floating point words do with NAN?Anton Ertl
   | | `* Re: What do floating point words do with NAN?dxforth
   | |  +* Re: What do floating point words do with NAN?Paul Rubin
   | |  |+- Re: What do floating point words do with NAN?dxforth
   | |  |`* Re: What do floating point words do with NAN?Anton Ertl
   | |  | `* Re: What do floating point words do with NAN?Paul Rubin
   | |  |  +- Re: What do floating point words do with NAN?dxforth
   | |  |  `- Re: What do floating point words do with NAN?Anton Ertl
   | |  `* Re: What do floating point words do with NAN?Anton Ertl
   | |   `* Re: What do floating point words do with NAN?dxforth
   | |    +- Re: What do floating point words do with NAN?Marcel Hendrix
   | |    +- Re: What do floating point words do with NAN?Marcel Hendrix
   | |    +* Re: What do floating point words do with NAN?Marcel Hendrix
   | |    |+* Re: What do floating point words do with NAN?dxforth
   | |    ||`- Re: What do floating point words do with NAN?Marcel Hendrix
   | |    |`* Re: What do floating point words do with NAN?none
   | |    | `- Re: What do floating point words do with NAN?dxforth
   | |    +* Re: What do floating point words do with NAN?Paul Rubin
   | |    |`- Re: What do floating point words do with NAN?dxforth
   | |    `* Re: What do floating point words do with NAN?Anton Ertl
   | |     +* Re: What do floating point words do with NAN?dxforth
   | |     |`- Re: What do floating point words do with NAN?Anton Ertl
   | |     +* Re: What do floating point words do with NAN?minf...@arcor.de
   | |     |+* Re: What do floating point words do with NAN?Marcel Hendrix
   | |     ||+* Re: What do floating point words do with NAN?minf...@arcor.de
   | |     |||`- Re: What do floating point words do with NAN?Marcel Hendrix
   | |     ||`* Re: What do floating point words do with NAN?dxforth
   | |     || +* Re: What do floating point words do with NAN?Marcel Hendrix
   | |     || |`- Re: What do floating point words do with NAN?dxforth
   | |     || `* Re: What do floating point words do with NAN?Anton Ertl
   | |     ||  +- Re: What do floating point words do with NAN?dxforth
   | |     ||  `* Re: What do floating point words do with NAN?dxforth
   | |     ||   `* Re: What do floating point words do with NAN?minf...@arcor.de
   | |     ||    `* Re: What do floating point words do with NAN?Krishna Myneni
   | |     ||     +* Re: What do floating point words do with NAN?minf...@arcor.de
   | |     ||     |`- Re: What do floating point words do with NAN?Krishna Myneni
   | |     ||     `* Re: What do floating point words do with NAN?Krishna Myneni
   | |     ||      +* Re: What do floating point words do with NAN?dxforth
   | |     ||      |`- Re: What do floating point words do with NAN?Krishna Myneni
   | |     ||      `* Re: What do floating point words do with NAN?Krishna Myneni
   | |     ||       `- Re: What do floating point words do with NAN?Krishna Myneni
   | |     |`- Re: What do floating point words do with NAN?dxforth
   | |     `- Re: What do floating point words do with NAN?Paul Rubin
   | `- Re: What do floating point words do with NAN?Anton Ertl
   +- Re: What do floating point words do with NAN?dxforth
   `- Re: What do floating point words do with NAN?Anton Ertl

Pages:123
Re: What do floating point words do with NAN?

<875yjtptaq.fsf@nightsong.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19215&group=comp.lang.forth#19215

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: no.em...@nospam.invalid (Paul Rubin)
Newsgroups: comp.lang.forth
Subject: Re: What do floating point words do with NAN?
Date: Mon, 18 Jul 2022 22:26:05 -0700
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <875yjtptaq.fsf@nightsong.com>
References: <1f9b7495-91de-4063-ad0e-480a5a438cd8n@googlegroups.com>
<2d539c96-8864-45ef-943e-6ac058acd6f3n@googlegroups.com>
<tap0g8$2n35d$1@dont-email.me>
<3675fe47-7109-431c-a953-6e7b922d8817n@googlegroups.com>
<tap7jo$2ns97$1@dont-email.me>
<5067298c-db15-408e-8403-58dbae82f1f6n@googlegroups.com>
<tapfik$2onhk$1@dont-email.me>
<2022Jul18.174825@mips.complang.tuwien.ac.at>
<tb5370$rrp$1@gioia.aioe.org>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: reader01.eternal-september.org; posting-host="9ce75c65d21ec9a7cb1a941d4b07e954";
logging-data="939717"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+IQpWcGwvy6l5FBWkup0CR"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:mrN3s6G56hxzPMGPYVQBfemKT6M=
sha1:Z8AcnS5fgLDfPLA//cchXhe1scc=
 by: Paul Rubin - Tue, 19 Jul 2022 05:26 UTC

dxforth <dxforth@gmail.com> writes:
> But chose to provide it as hardware didn't? 'Negative zero' is only
> meaningful if a system expressly supports it.

Negative zero is supported by essentially all floating point hardware
these days. But oh man, F~ is ugly. 0e and -0e have different
encodings (bit patterns) even though F= compares them as equal.

> E.g. there doesn't seem much point having F~ do:
> 0e -0e 0e f~ . 0 ok

On that system 0e and -0e have the same bit pattern, so

> if one couldn't print it out:
> -0e f. 0. ok

should operate as you describe. On an IEEE system (most systems now),
-0e f. prints -0.

Re: What do floating point words do with NAN?

<tb5h4k$nt6$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19217&group=comp.lang.forth#19217

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!aioe.org!7AktqsUqy5CCvnKa3S0Dkw.user.46.165.242.75.POSTED!not-for-mail
From: dxfo...@gmail.com (dxforth)
Newsgroups: comp.lang.forth
Subject: Re: What do floating point words do with NAN?
Date: Tue, 19 Jul 2022 15:57:42 +1000
Organization: Aioe.org NNTP Server
Message-ID: <tb5h4k$nt6$1@gioia.aioe.org>
References: <1f9b7495-91de-4063-ad0e-480a5a438cd8n@googlegroups.com>
<2d539c96-8864-45ef-943e-6ac058acd6f3n@googlegroups.com>
<tap0g8$2n35d$1@dont-email.me>
<3675fe47-7109-431c-a953-6e7b922d8817n@googlegroups.com>
<tap7jo$2ns97$1@dont-email.me>
<5067298c-db15-408e-8403-58dbae82f1f6n@googlegroups.com>
<tapfik$2onhk$1@dont-email.me> <2022Jul18.174825@mips.complang.tuwien.ac.at>
<tb5370$rrp$1@gioia.aioe.org> <875yjtptaq.fsf@nightsong.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="24486"; posting-host="7AktqsUqy5CCvnKa3S0Dkw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.11.0
Content-Language: en-GB
X-Notice: Filtered by postfilter v. 0.9.2
 by: dxforth - Tue, 19 Jul 2022 05:57 UTC

On 19/07/2022 15:26, Paul Rubin wrote:
> dxforth <dxforth@gmail.com> writes:
>> But chose to provide it as hardware didn't? 'Negative zero' is only
>> meaningful if a system expressly supports it.
>
> Negative zero is supported by essentially all floating point hardware
> these days. But oh man, F~ is ugly. 0e and -0e have different
> encodings (bit patterns) even though F= compares them as equal.
>
>> E.g. there doesn't seem much point having F~ do:
>> 0e -0e 0e f~ . 0 ok
>
> On that system 0e and -0e have the same bit pattern, so
>
>> if one couldn't print it out:
>> -0e f. 0. ok
>
> should operate as you describe. On an IEEE system (most systems now),
> -0e f. prints -0.

Expected though not mandated. There's something re-assuring about not
seeing -0.0 in a table of values. Ideally a system that supports negative-
zero should be able to turn it off. When it's off, I'd expect 0e -0e 0e f~
to return a true result.

Re: What do floating point words do with NAN?

<2022Jul19.100827@mips.complang.tuwien.ac.at>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19218&group=comp.lang.forth#19218

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: What do floating point words do with NAN?
Date: Tue, 19 Jul 2022 08:08:27 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 49
Message-ID: <2022Jul19.100827@mips.complang.tuwien.ac.at>
References: <1f9b7495-91de-4063-ad0e-480a5a438cd8n@googlegroups.com> <5067298c-db15-408e-8403-58dbae82f1f6n@googlegroups.com> <tapfik$2onhk$1@dont-email.me> <55fa52eb-dcc3-42c9-b5db-c4318bfa1d29n@googlegroups.com> <nnd$5afdaf07$0f739777@976aec1373dce1fb> <ba421131-f666-4780-b99c-4a328d316e8an@googlegroups.com> <2022Jul18.181509@mips.complang.tuwien.ac.at> <3e202349-4501-4e33-80d5-47fe01d08c43n@googlegroups.com>
Injection-Info: reader01.eternal-september.org; posting-host="48c24764d4b603c0bb43718cf5317673";
logging-data="1008275"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/gvQyOv6z9YvF7AZTaqW7f"
Cancel-Lock: sha1:Xk2bunjXTToWjJHqKzXO2rsaoSQ=
X-newsreader: xrn 10.00-beta-3
 by: Anton Ertl - Tue, 19 Jul 2022 08:08 UTC

Marcel Hendrix <mhx@iae.nl> writes:
>On Monday, July 18, 2022 at 6:27:54 PM UTC+2, Anton Ertl wrote:
>> AFAIK the typical use for signaling NaNs is uninitialized data. But
>> at least in Gforth there is no difference in behaviour between
>> signaling and quiet NaNs; none of them causes a Forth exception when
>> performing an operation.
>
>#10000 VALUE #times 0e FVALUE a 0e FVALUE b
>: testoverhead CR TIMER-RESET #times 0 ?DO a b F/ FDROP LOOP .ELAPSED ;
>: BENCH ( u -- ) TO #times
> 1e TO a 1e TO b testoverhead ." ( 1 / 1 ) "
> 0e TO a 1e TO b testoverhead ." ( 0 / 1 ) "
> 0e TO b testoverhead ." ( 0 / 0 ) " ;
>FORTH> #1000000000 BENCH
>1.697 seconds elapsed. ( 1 / 1 )
>1.698 seconds elapsed. ( 0 / 1 )
>1.697 seconds elapsed. ( 0 / 0 ) ok
>
>I'm not sure other languages allow such a low overhead.
>Calculations in SPICE / C can be awfully slow when
>NaNs are generated.

Gforth implements FP operations by just performing the appropriate C
code and also sees uniform results for this benchmark. I see two
possibilities:

* The operations you perform involving NaNs that are slow are
something other than 0/0.

* The actual latency is indeed slower for, e.g., 0/0, but since you
FDROP the result, you don't measure the latency, only the
throughput. In your SPICE work, you actually also measure the
latency.

>> I think the idea behind these default settings of the FPU is that if
>> you get one NaN result in, say a 1000x1000 matrix, you still want the
>> 999,999 other results rather than just an exception.
>
>You mean 999,000 results, of course :--)

No, 1 element out of 1,000,000 is a NaN, so there are 999,999 non-NaN
elements left.

- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: https://forth-standard.org/
EuroForth 2022: http://www.euroforth.org/ef22/cfp.html

Re: What do floating point words do with NAN?

<2022Jul19.101846@mips.complang.tuwien.ac.at>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19219&group=comp.lang.forth#19219

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: What do floating point words do with NAN?
Date: Tue, 19 Jul 2022 08:18:46 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 41
Message-ID: <2022Jul19.101846@mips.complang.tuwien.ac.at>
References: <1f9b7495-91de-4063-ad0e-480a5a438cd8n@googlegroups.com> <2d539c96-8864-45ef-943e-6ac058acd6f3n@googlegroups.com> <tap0g8$2n35d$1@dont-email.me> <3675fe47-7109-431c-a953-6e7b922d8817n@googlegroups.com> <tap7jo$2ns97$1@dont-email.me> <5067298c-db15-408e-8403-58dbae82f1f6n@googlegroups.com> <tapfik$2onhk$1@dont-email.me> <2022Jul18.174825@mips.complang.tuwien.ac.at> <tb5370$rrp$1@gioia.aioe.org>
Injection-Info: reader01.eternal-september.org; posting-host="48c24764d4b603c0bb43718cf5317673";
logging-data="1008275"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Z4CDN7usk+Vo0dUTwU1XO"
Cancel-Lock: sha1:N4c0ZCvUI4A5V3yUuiNGf5hZkEg=
X-newsreader: xrn 10.00-beta-3
 by: Anton Ertl - Tue, 19 Jul 2022 08:18 UTC

dxforth <dxforth@gmail.com> writes:
>On 19/07/2022 01:48, Anton Ertl wrote:
>>
>> |A.12.6.2.1640 F~
>> |
>> |This provides the three types of "floating point equality" in common
>> |use — "close" in absolute terms, exact equality as represented, and
>> |"relatively close".
>>
>> Except that 0e F~ is explicitly specified such that positive and
>> negative zero are unequal, which is not a common meaning of FP
>> equality these days (and probably not in 1994, either).
>
>But chose to provide it as hardware didn't?

Pardon?

>'Negative zero' is only
>meaningful if a system expressly supports it.

Obviously.

>E.g. there doesn't seem
>much point having F~ do:
>
>0e -0e 0e f~ . 0 ok

Period! But that's how it is specified.

>if one couldn't print it out:
>
>-0e f. 0. ok

How a negative zero should be printed is a different discussion.

- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: https://forth-standard.org/
EuroForth 2022: http://www.euroforth.org/ef22/cfp.html

Re: What do floating point words do with NAN?

<2022Jul19.102344@mips.complang.tuwien.ac.at>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19220&group=comp.lang.forth#19220

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: What do floating point words do with NAN?
Date: Tue, 19 Jul 2022 08:23:44 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 15
Message-ID: <2022Jul19.102344@mips.complang.tuwien.ac.at>
References: <1f9b7495-91de-4063-ad0e-480a5a438cd8n@googlegroups.com> <2d539c96-8864-45ef-943e-6ac058acd6f3n@googlegroups.com> <tap0g8$2n35d$1@dont-email.me> <3675fe47-7109-431c-a953-6e7b922d8817n@googlegroups.com> <tap7jo$2ns97$1@dont-email.me> <5067298c-db15-408e-8403-58dbae82f1f6n@googlegroups.com> <tapfik$2onhk$1@dont-email.me> <2022Jul18.174825@mips.complang.tuwien.ac.at> <tb5370$rrp$1@gioia.aioe.org> <875yjtptaq.fsf@nightsong.com>
Injection-Info: reader01.eternal-september.org; posting-host="48c24764d4b603c0bb43718cf5317673";
logging-data="1008275"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18yNk7umajiST/UnHsRLl/r"
Cancel-Lock: sha1:qEuZKaCZy2KwQhPZ485yQzEYCmw=
X-newsreader: xrn 10.00-beta-3
 by: Anton Ertl - Tue, 19 Jul 2022 08:23 UTC

Paul Rubin <no.email@nospam.invalid> writes:
>On an IEEE system (most systems now),
>-0e f. prints -0.

Gforth prints (on AMD64, i.e., an IEEE 754 system):

-0e f. 0. ok
0e fnegate f. 0. ok

- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: https://forth-standard.org/
EuroForth 2022: http://www.euroforth.org/ef22/cfp.html

Re: What do floating point words do with NAN?

<tb5v5f$hjn$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19221&group=comp.lang.forth#19221

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!aioe.org!7AktqsUqy5CCvnKa3S0Dkw.user.46.165.242.75.POSTED!not-for-mail
From: dxfo...@gmail.com (dxforth)
Newsgroups: comp.lang.forth
Subject: Re: What do floating point words do with NAN?
Date: Tue, 19 Jul 2022 19:57:03 +1000
Organization: Aioe.org NNTP Server
Message-ID: <tb5v5f$hjn$1@gioia.aioe.org>
References: <1f9b7495-91de-4063-ad0e-480a5a438cd8n@googlegroups.com>
<2d539c96-8864-45ef-943e-6ac058acd6f3n@googlegroups.com>
<tap0g8$2n35d$1@dont-email.me>
<3675fe47-7109-431c-a953-6e7b922d8817n@googlegroups.com>
<tap7jo$2ns97$1@dont-email.me>
<5067298c-db15-408e-8403-58dbae82f1f6n@googlegroups.com>
<tapfik$2onhk$1@dont-email.me> <2022Jul18.174825@mips.complang.tuwien.ac.at>
<tb5370$rrp$1@gioia.aioe.org> <2022Jul19.101846@mips.complang.tuwien.ac.at>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="18039"; posting-host="7AktqsUqy5CCvnKa3S0Dkw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.11.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: dxforth - Tue, 19 Jul 2022 09:57 UTC

On 19/07/2022 18:18, Anton Ertl wrote:
> dxforth <dxforth@gmail.com> writes:
>>On 19/07/2022 01:48, Anton Ertl wrote:
>>>
>>> |A.12.6.2.1640 F~
>>> |
>>> |This provides the three types of "floating point equality" in common
>>> |use — "close" in absolute terms, exact equality as represented, and
>>> |"relatively close".
>>>
>>> Except that 0e F~ is explicitly specified such that positive and
>>> negative zero are unequal, which is not a common meaning of FP
>>> equality these days (and probably not in 1994, either).
>>
>>But chose to provide it as hardware didn't?
>
> Pardon?

FCOMP sees no difference between 0e -0e. Most likely because
mathematics doesn't.

>
>>'Negative zero' is only
>>meaningful if a system expressly supports it.
>
> Obviously.
>
>>E.g. there doesn't seem
>>much point having F~ do:
>>
>>0e -0e 0e f~ . 0 ok
>
> Period! But that's how it is specified.

With no explanation as to why. If anything it makes F~ less useful.

>
>>if one couldn't print it out:
>>
>>-0e f. 0. ok
>
> How a negative zero should be printed is a different discussion.

There's precedence for printing it differently to other numbers?

Re: What do floating point words do with NAN?

<871quhpb34.fsf@nightsong.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19222&group=comp.lang.forth#19222

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: no.em...@nospam.invalid (Paul Rubin)
Newsgroups: comp.lang.forth
Subject: Re: What do floating point words do with NAN?
Date: Tue, 19 Jul 2022 04:59:27 -0700
Organization: A noiseless patient Spider
Lines: 7
Message-ID: <871quhpb34.fsf@nightsong.com>
References: <1f9b7495-91de-4063-ad0e-480a5a438cd8n@googlegroups.com>
<2d539c96-8864-45ef-943e-6ac058acd6f3n@googlegroups.com>
<tap0g8$2n35d$1@dont-email.me>
<3675fe47-7109-431c-a953-6e7b922d8817n@googlegroups.com>
<tap7jo$2ns97$1@dont-email.me>
<5067298c-db15-408e-8403-58dbae82f1f6n@googlegroups.com>
<tapfik$2onhk$1@dont-email.me>
<2022Jul18.174825@mips.complang.tuwien.ac.at>
<tb5370$rrp$1@gioia.aioe.org> <875yjtptaq.fsf@nightsong.com>
<2022Jul19.102344@mips.complang.tuwien.ac.at>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: reader01.eternal-september.org; posting-host="9ce75c65d21ec9a7cb1a941d4b07e954";
logging-data="1137364"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18TotPsmDubyr48yeTHoSv8"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:iNYLnbGPAWzVycWoiVfWuU/akDU=
sha1:PjSnwfuPTxT4tTT7lzj4dYcj4eQ=
 by: Paul Rubin - Tue, 19 Jul 2022 11:59 UTC

anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
> Gforth prints (on AMD64, i.e., an IEEE 754 system):
> -0e f. 0. ok
> 0e fnegate f. 0. ok

Both of those print -0. under gforth 0.73 in Debian 11 x64. It's
interesting if something changed.

Re: What do floating point words do with NAN?

<8d942eff-1175-4746-8ff8-2dcfc5efaae6n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19223&group=comp.lang.forth#19223

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:620a:f13:b0:6b5:b956:c1f1 with SMTP id v19-20020a05620a0f1300b006b5b956c1f1mr20282922qkl.691.1658231997294;
Tue, 19 Jul 2022 04:59:57 -0700 (PDT)
X-Received: by 2002:a37:bf81:0:b0:6b5:cdb6:d35c with SMTP id
p123-20020a37bf81000000b006b5cdb6d35cmr12928694qkf.185.1658231997177; Tue, 19
Jul 2022 04:59:57 -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.forth
Date: Tue, 19 Jul 2022 04:59:57 -0700 (PDT)
In-Reply-To: <tb5v5f$hjn$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:1c05:2f14:600:cc7a:a987:20c0:6edf;
posting-account=-JQ2RQoAAAB6B5tcBTSdvOqrD1HpT_Rk
NNTP-Posting-Host: 2001:1c05:2f14:600:cc7a:a987:20c0:6edf
References: <1f9b7495-91de-4063-ad0e-480a5a438cd8n@googlegroups.com>
<2d539c96-8864-45ef-943e-6ac058acd6f3n@googlegroups.com> <tap0g8$2n35d$1@dont-email.me>
<3675fe47-7109-431c-a953-6e7b922d8817n@googlegroups.com> <tap7jo$2ns97$1@dont-email.me>
<5067298c-db15-408e-8403-58dbae82f1f6n@googlegroups.com> <tapfik$2onhk$1@dont-email.me>
<2022Jul18.174825@mips.complang.tuwien.ac.at> <tb5370$rrp$1@gioia.aioe.org>
<2022Jul19.101846@mips.complang.tuwien.ac.at> <tb5v5f$hjn$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <8d942eff-1175-4746-8ff8-2dcfc5efaae6n@googlegroups.com>
Subject: Re: What do floating point words do with NAN?
From: mhx...@iae.nl (Marcel Hendrix)
Injection-Date: Tue, 19 Jul 2022 11:59:57 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1981
 by: Marcel Hendrix - Tue, 19 Jul 2022 11:59 UTC

On Tuesday, July 19, 2022 at 11:57:07 AM UTC+2, dxforth wrote:
> On 19/07/2022 18:18, Anton Ertl wrote:
> > dxforth <dxf...@gmail.com> writes:
[..]
> FCOMP sees no difference between 0e -0e. Most likely because
> mathematics doesn't.

It is useful in numerical procedures. It makes quite a bit of difference
when handling an hyperbolic branch, see D.N. Williams home pages.

-marcel

Re: What do floating point words do with NAN?

<8c892c56-1a45-410c-881f-84ddba824b8bn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19224&group=comp.lang.forth#19224

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:620a:44c3:b0:6b5:fb6b:d6c9 with SMTP id y3-20020a05620a44c300b006b5fb6bd6c9mr2409656qkp.537.1658232149611;
Tue, 19 Jul 2022 05:02:29 -0700 (PDT)
X-Received: by 2002:ad4:576b:0:b0:473:322c:4f6 with SMTP id
r11-20020ad4576b000000b00473322c04f6mr24481824qvx.70.1658232149395; Tue, 19
Jul 2022 05:02:29 -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.forth
Date: Tue, 19 Jul 2022 05:02:29 -0700 (PDT)
In-Reply-To: <tb5v5f$hjn$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:1c05:2f14:600:cc7a:a987:20c0:6edf;
posting-account=-JQ2RQoAAAB6B5tcBTSdvOqrD1HpT_Rk
NNTP-Posting-Host: 2001:1c05:2f14:600:cc7a:a987:20c0:6edf
References: <1f9b7495-91de-4063-ad0e-480a5a438cd8n@googlegroups.com>
<2d539c96-8864-45ef-943e-6ac058acd6f3n@googlegroups.com> <tap0g8$2n35d$1@dont-email.me>
<3675fe47-7109-431c-a953-6e7b922d8817n@googlegroups.com> <tap7jo$2ns97$1@dont-email.me>
<5067298c-db15-408e-8403-58dbae82f1f6n@googlegroups.com> <tapfik$2onhk$1@dont-email.me>
<2022Jul18.174825@mips.complang.tuwien.ac.at> <tb5370$rrp$1@gioia.aioe.org>
<2022Jul19.101846@mips.complang.tuwien.ac.at> <tb5v5f$hjn$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <8c892c56-1a45-410c-881f-84ddba824b8bn@googlegroups.com>
Subject: Re: What do floating point words do with NAN?
From: mhx...@iae.nl (Marcel Hendrix)
Injection-Date: Tue, 19 Jul 2022 12:02:29 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1974
 by: Marcel Hendrix - Tue, 19 Jul 2022 12:02 UTC

On Tuesday, July 19, 2022 at 11:57:07 AM UTC+2, dxforth wrote:
> On 19/07/2022 18:18, Anton Ertl wrote:
> > dxforth <dxf...@gmail.com> writes:
[..]
> FCOMP sees no difference between 0e -0e. Most likely because
> mathematics doesn't.

It is useful in numerical procedures. It makes quite a bit of difference
when handling an hyperbolic branch, see D.N. Williams home pages.

-marcel

Re: What do floating point words do with NAN?

<4e841f83-8b8f-47fc-bacb-069530d55b88n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19225&group=comp.lang.forth#19225

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:620a:240b:b0:6b5:f9af:2412 with SMTP id d11-20020a05620a240b00b006b5f9af2412mr3399553qkn.457.1658232234703;
Tue, 19 Jul 2022 05:03:54 -0700 (PDT)
X-Received: by 2002:a05:6214:212c:b0:473:e08b:9e06 with SMTP id
r12-20020a056214212c00b00473e08b9e06mr4928632qvc.48.1658232234522; Tue, 19
Jul 2022 05:03:54 -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.forth
Date: Tue, 19 Jul 2022 05:03:54 -0700 (PDT)
In-Reply-To: <tb5v5f$hjn$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:1c05:2f14:600:cc7a:a987:20c0:6edf;
posting-account=-JQ2RQoAAAB6B5tcBTSdvOqrD1HpT_Rk
NNTP-Posting-Host: 2001:1c05:2f14:600:cc7a:a987:20c0:6edf
References: <1f9b7495-91de-4063-ad0e-480a5a438cd8n@googlegroups.com>
<2d539c96-8864-45ef-943e-6ac058acd6f3n@googlegroups.com> <tap0g8$2n35d$1@dont-email.me>
<3675fe47-7109-431c-a953-6e7b922d8817n@googlegroups.com> <tap7jo$2ns97$1@dont-email.me>
<5067298c-db15-408e-8403-58dbae82f1f6n@googlegroups.com> <tapfik$2onhk$1@dont-email.me>
<2022Jul18.174825@mips.complang.tuwien.ac.at> <tb5370$rrp$1@gioia.aioe.org>
<2022Jul19.101846@mips.complang.tuwien.ac.at> <tb5v5f$hjn$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <4e841f83-8b8f-47fc-bacb-069530d55b88n@googlegroups.com>
Subject: Re: What do floating point words do with NAN?
From: mhx...@iae.nl (Marcel Hendrix)
Injection-Date: Tue, 19 Jul 2022 12:03:54 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1979
 by: Marcel Hendrix - Tue, 19 Jul 2022 12:03 UTC

On Tuesday, July 19, 2022 at 11:57:07 AM UTC+2, dxforth wrote:
> On 19/07/2022 18:18, Anton Ertl wrote:
> > dxforth <dxf...@gmail.com> writes:
[..]
> FCOMP sees no difference between 0e -0e. Most likely because
> mathematics doesn't.

It is useful in numerical procedures. It makes quite a bit of difference
when handling an hyperbolic branch, see D.N. Williams' home pages.

-marcel

Re: What do floating point words do with NAN?

<87wnc9nw9b.fsf@nightsong.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19226&group=comp.lang.forth#19226

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: no.em...@nospam.invalid (Paul Rubin)
Newsgroups: comp.lang.forth
Subject: Re: What do floating point words do with NAN?
Date: Tue, 19 Jul 2022 05:05:04 -0700
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <87wnc9nw9b.fsf@nightsong.com>
References: <1f9b7495-91de-4063-ad0e-480a5a438cd8n@googlegroups.com>
<2d539c96-8864-45ef-943e-6ac058acd6f3n@googlegroups.com>
<tap0g8$2n35d$1@dont-email.me>
<3675fe47-7109-431c-a953-6e7b922d8817n@googlegroups.com>
<tap7jo$2ns97$1@dont-email.me>
<5067298c-db15-408e-8403-58dbae82f1f6n@googlegroups.com>
<tapfik$2onhk$1@dont-email.me>
<2022Jul18.174825@mips.complang.tuwien.ac.at>
<tb5370$rrp$1@gioia.aioe.org>
<2022Jul19.101846@mips.complang.tuwien.ac.at>
<tb5v5f$hjn$1@gioia.aioe.org>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: reader01.eternal-september.org; posting-host="9ce75c65d21ec9a7cb1a941d4b07e954";
logging-data="1137364"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18z8qBOXGOjzSj05SHOsnXY"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:58Z8IjA/+kJuDQ36Ni56MIt1baU=
sha1:U/6Up7+0v5hXln7xsGov6LaNQNc=
 by: Paul Rubin - Tue, 19 Jul 2022 12:05 UTC

dxforth <dxforth@gmail.com> writes:
> FCOMP sees no difference between 0e -0e. Most likely because
> mathematics doesn't.

Gforth doesn't have FCOMP and I don't see it in forth-standard.org.
What is it supposed to do? Computer floating point arithmetic doesn't
work like the mathematical reals: for example, FP arithmetic doesn't
follow the associative law, there are rounding errors, etc. So there
are good reasons for having negative 0.

W. Kahan (main designer of IEEE 754) has many articles and diatribes
about FP arithmetic on his web site,
https://people.eecs.berkeley.edu/~wkahan/

Re: What do floating point words do with NAN?

<tb6d06$nnh$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19227&group=comp.lang.forth#19227

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!aioe.org!7AktqsUqy5CCvnKa3S0Dkw.user.46.165.242.75.POSTED!not-for-mail
From: dxfo...@gmail.com (dxforth)
Newsgroups: comp.lang.forth
Subject: Re: What do floating point words do with NAN?
Date: Tue, 19 Jul 2022 23:53:09 +1000
Organization: Aioe.org NNTP Server
Message-ID: <tb6d06$nnh$1@gioia.aioe.org>
References: <1f9b7495-91de-4063-ad0e-480a5a438cd8n@googlegroups.com>
<2d539c96-8864-45ef-943e-6ac058acd6f3n@googlegroups.com>
<tap0g8$2n35d$1@dont-email.me>
<3675fe47-7109-431c-a953-6e7b922d8817n@googlegroups.com>
<tap7jo$2ns97$1@dont-email.me>
<5067298c-db15-408e-8403-58dbae82f1f6n@googlegroups.com>
<tapfik$2onhk$1@dont-email.me> <2022Jul18.174825@mips.complang.tuwien.ac.at>
<tb5370$rrp$1@gioia.aioe.org> <2022Jul19.101846@mips.complang.tuwien.ac.at>
<tb5v5f$hjn$1@gioia.aioe.org> <87wnc9nw9b.fsf@nightsong.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="24305"; posting-host="7AktqsUqy5CCvnKa3S0Dkw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.11.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: dxforth - Tue, 19 Jul 2022 13:53 UTC

On 19/07/2022 22:05, Paul Rubin wrote:
> dxforth <dxforth@gmail.com> writes:
>> FCOMP sees no difference between 0e -0e. Most likely because
>> mathematics doesn't.
>
> Gforth doesn't have FCOMP and I don't see it in forth-standard.org.
> What is it supposed to do?

Intel FPU instructions FCOM/FCOMP/FCOMPP--Compare Real

Re: What do floating point words do with NAN?

<tb6fdl$1vqj$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19228&group=comp.lang.forth#19228

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!aioe.org!7AktqsUqy5CCvnKa3S0Dkw.user.46.165.242.75.POSTED!not-for-mail
From: dxfo...@gmail.com (dxforth)
Newsgroups: comp.lang.forth
Subject: Re: What do floating point words do with NAN?
Date: Wed, 20 Jul 2022 00:34:28 +1000
Organization: Aioe.org NNTP Server
Message-ID: <tb6fdl$1vqj$1@gioia.aioe.org>
References: <1f9b7495-91de-4063-ad0e-480a5a438cd8n@googlegroups.com>
<2d539c96-8864-45ef-943e-6ac058acd6f3n@googlegroups.com>
<tap0g8$2n35d$1@dont-email.me>
<3675fe47-7109-431c-a953-6e7b922d8817n@googlegroups.com>
<tap7jo$2ns97$1@dont-email.me>
<5067298c-db15-408e-8403-58dbae82f1f6n@googlegroups.com>
<tapfik$2onhk$1@dont-email.me> <2022Jul18.174825@mips.complang.tuwien.ac.at>
<tb5370$rrp$1@gioia.aioe.org> <2022Jul19.101846@mips.complang.tuwien.ac.at>
<tb5v5f$hjn$1@gioia.aioe.org>
<4e841f83-8b8f-47fc-bacb-069530d55b88n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="65363"; posting-host="7AktqsUqy5CCvnKa3S0Dkw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.11.0
Content-Language: en-GB
X-Notice: Filtered by postfilter v. 0.9.2
 by: dxforth - Tue, 19 Jul 2022 14:34 UTC

On 19/07/2022 22:03, Marcel Hendrix wrote:
> On Tuesday, July 19, 2022 at 11:57:07 AM UTC+2, dxforth wrote:
>> On 19/07/2022 18:18, Anton Ertl wrote:
>> > dxforth <dxf...@gmail.com> writes:
> [..]
>> FCOMP sees no difference between 0e -0e. Most likely because
>> mathematics doesn't.
>
> It is useful in numerical procedures. It makes quite a bit of difference
> when handling an hyperbolic branch, see D.N. Williams' home pages.

Do you mean F~ ? Given F= and FSIGN that can pick the sign of zero,
then F~ and its restrictive spec on zero becomes redundant.

Re: What do floating point words do with NAN?

<55ed0b31-9839-4980-9b79-43da0b4f8e96n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19229&group=comp.lang.forth#19229

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:622a:589:b0:319:ddca:37e4 with SMTP id c9-20020a05622a058900b00319ddca37e4mr24921302qtb.36.1658248363740;
Tue, 19 Jul 2022 09:32:43 -0700 (PDT)
X-Received: by 2002:a05:620a:1981:b0:6b5:cccf:62e1 with SMTP id
bm1-20020a05620a198100b006b5cccf62e1mr14461889qkb.376.1658248363547; Tue, 19
Jul 2022 09:32:43 -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.forth
Date: Tue, 19 Jul 2022 09:32:43 -0700 (PDT)
In-Reply-To: <tb6fdl$1vqj$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:1c05:2f14:600:85b7:7a91:a490:fc79;
posting-account=-JQ2RQoAAAB6B5tcBTSdvOqrD1HpT_Rk
NNTP-Posting-Host: 2001:1c05:2f14:600:85b7:7a91:a490:fc79
References: <1f9b7495-91de-4063-ad0e-480a5a438cd8n@googlegroups.com>
<2d539c96-8864-45ef-943e-6ac058acd6f3n@googlegroups.com> <tap0g8$2n35d$1@dont-email.me>
<3675fe47-7109-431c-a953-6e7b922d8817n@googlegroups.com> <tap7jo$2ns97$1@dont-email.me>
<5067298c-db15-408e-8403-58dbae82f1f6n@googlegroups.com> <tapfik$2onhk$1@dont-email.me>
<2022Jul18.174825@mips.complang.tuwien.ac.at> <tb5370$rrp$1@gioia.aioe.org>
<2022Jul19.101846@mips.complang.tuwien.ac.at> <tb5v5f$hjn$1@gioia.aioe.org>
<4e841f83-8b8f-47fc-bacb-069530d55b88n@googlegroups.com> <tb6fdl$1vqj$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <55ed0b31-9839-4980-9b79-43da0b4f8e96n@googlegroups.com>
Subject: Re: What do floating point words do with NAN?
From: mhx...@iae.nl (Marcel Hendrix)
Injection-Date: Tue, 19 Jul 2022 16:32:43 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3567
 by: Marcel Hendrix - Tue, 19 Jul 2022 16:32 UTC

On Tuesday, July 19, 2022 at 4:34:31 PM UTC+2, dxforth wrote:
[..]
> Do you mean F~ ? Given F= and FSIGN that can pick the sign of zero,
> then F~ and its restrictive spec on zero becomes redundant.

I did not comment on F~ but its use is indeed limited (see below).
F= is far more important.

Searching for: F~
D:\dfwforth\examples\dictaat\hbeb\lampmodels.frt(127): wanted 1e-3 F~ IF I (set-temperature) UNLOOP EXIT ENDIF
D:\dfwforth\examples\DOMI\domiapi.frt(441): S~ curl -o "json.txt" -D "response.txt" -F~
D:\dfwforth\examples\nrc\chapter2_Linear_Algebraic_Equations\apps\llc.frt(730): <VO> FSQR Rl F/ PWANTED -0.01e F~ ;
D:\dfwforth\examples\numeric\division.frt(34): 1e-17 F~ ?LEAVE
D:\dfwforth\examples\numeric\tpf.frt(206): wy wsize F~
D:\dfwforth\examples\numeric\tpf.frt(207): wx wsize F~ AND ; PRIVATE
D:\dfwforth\examples\numeric\tpfgr.frt(190): wy wsize F~
D:\dfwforth\examples\numeric\tpfgr.frt(191): wx wsize F~ AND ; PRIVATE
D:\dfwforth\examples\paranoia\paranoia.frt(326): 0E F~ ;
D:\dfwforth\examples\pl1\pl1b.frt(121): s" 0e F~ " evaluate ; immediate
D:\dfwforth\examples\pl1\pl1b.frt(124): s" 0e F~ INVERT " evaluate ; immediate
D:\dfwforth\examples\SPICE\Mag_Tool\readmag.frt(536): chk? IF varname EVALUATE ( F: rnew rold -- ) FOVER -0.01e F~
D:\dfwforth\examples\SPICE\old_ispice\ispice.frt(1251): STEPVAR3 STV3_end 1e-15 F~
D:\dfwforth\examples\SPICE\old_ispice\ispice.frt(1252): STEPVAR2 STV2_end 1e-15 F~ AND
D:\dfwforth\examples\SPICE\old_ispice\ispice.frt(1253): STEPVAR1 STV1_end 1e-15 F~ AND ; PRIVATE
D:\dfwforth\include\marquard.frt(266): -1e-3 F~ ;
D:\dfwforth\include\spifsim.frt(2943): F2DUP F= closeness F~ OR ; PRIVATE
Found 17 occurrence(s) in 22 file(s), 23706 ms

Searching for: F=
Found 468 occurrence(s) in 87 file(s), 1473 ms

Searching for: FSIGN
Found 32 occurrence(s) in 13 file(s), 1473 ms

-marcel

Re: What do floating point words do with NAN?

<nnd$36adca13$4d2cdb90@6869b29e1ae7f1ca>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19230&group=comp.lang.forth#19230

  copy link   Newsgroups: comp.lang.forth
Newsgroups: comp.lang.forth
Subject: Re: What do floating point words do with NAN?
References: <1f9b7495-91de-4063-ad0e-480a5a438cd8n@googlegroups.com> <2022Jul19.101846@mips.complang.tuwien.ac.at> <tb5v5f$hjn$1@gioia.aioe.org> <4e841f83-8b8f-47fc-bacb-069530d55b88n@googlegroups.com>
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
From: alb...@cherry (none)
Originator: albert@cherry.(none) (albert)
Message-ID: <nnd$36adca13$4d2cdb90@6869b29e1ae7f1ca>
Organization: KPN B.V.
Date: Tue, 19 Jul 2022 21:55:16 +0200
Path: i2pn2.org!i2pn.org!aioe.org!feeder1.feed.usenet.farm!feed.usenet.farm!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe006.abavia.com!abp003.abavia.com!news.kpn.nl!not-for-mail
Lines: 24
Injection-Date: Tue, 19 Jul 2022 21:55:16 +0200
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
X-Received-Bytes: 1680
 by: none - Tue, 19 Jul 2022 19:55 UTC

In article <4e841f83-8b8f-47fc-bacb-069530d55b88n@googlegroups.com>,
Marcel Hendrix <mhx@iae.nl> wrote:
>On Tuesday, July 19, 2022 at 11:57:07 AM UTC+2, dxforth wrote:
>> On 19/07/2022 18:18, Anton Ertl wrote:
>> > dxforth <dxf...@gmail.com> writes:
>[..]
>> FCOMP sees no difference between 0e -0e. Most likely because
>> mathematics doesn't.
>
>It is useful in numerical procedures. It makes quite a bit of difference
>when handling an hyperbolic branch, see D.N. Williams' home pages.

Unclear. "FCOMP seeing no difference between 0e and -0e".
Is that useful?
Or is FCOMP useful?

>
>-marcel
--
"in our communism country Viet Nam, people are forced to be
alive and in the western country like US, people are free to
die from Covid 19 lol" duc ha
albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

Re: What do floating point words do with NAN?

<tb7f05$1rkh$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19231&group=comp.lang.forth#19231

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!aioe.org!7AktqsUqy5CCvnKa3S0Dkw.user.46.165.242.75.POSTED!not-for-mail
From: dxfo...@gmail.com (dxforth)
Newsgroups: comp.lang.forth
Subject: Re: What do floating point words do with NAN?
Date: Wed, 20 Jul 2022 09:33:25 +1000
Organization: Aioe.org NNTP Server
Message-ID: <tb7f05$1rkh$1@gioia.aioe.org>
References: <1f9b7495-91de-4063-ad0e-480a5a438cd8n@googlegroups.com>
<2022Jul19.101846@mips.complang.tuwien.ac.at> <tb5v5f$hjn$1@gioia.aioe.org>
<4e841f83-8b8f-47fc-bacb-069530d55b88n@googlegroups.com>
<nnd$36adca13$4d2cdb90@6869b29e1ae7f1ca>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="61073"; posting-host="7AktqsUqy5CCvnKa3S0Dkw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.11.0
Content-Language: en-GB
X-Notice: Filtered by postfilter v. 0.9.2
 by: dxforth - Tue, 19 Jul 2022 23:33 UTC

On 20/07/2022 05:55, albert wrote:
> In article <4e841f83-8b8f-47fc-bacb-069530d55b88n@googlegroups.com>,
> Marcel Hendrix <mhx@iae.nl> wrote:
>>On Tuesday, July 19, 2022 at 11:57:07 AM UTC+2, dxforth wrote:
>>> On 19/07/2022 18:18, Anton Ertl wrote:
>>> > dxforth <dxf...@gmail.com> writes:
>>[..]
>>> FCOMP sees no difference between 0e -0e. Most likely because
>>> mathematics doesn't.
>>
>>It is useful in numerical procedures. It makes quite a bit of difference
>>when handling an hyperbolic branch, see D.N. Williams' home pages.
>
> Unclear. "FCOMP seeing no difference between 0e and -0e".
> Is that useful?
> Or is FCOMP useful?

FCOMP is the Intel FPU instruction that compares two f/p values.
It doesn't discriminate between positive and negative zero.
Given there is no instruction that compares them as different,
we can conclude Intel saw the former as more useful. Forth's
question to answer is how it came to conclude the opposite.

Re: What do floating point words do with NAN?

<tb7ull$cbc$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19232&group=comp.lang.forth#19232

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!aioe.org!7AktqsUqy5CCvnKa3S0Dkw.user.46.165.242.75.POSTED!not-for-mail
From: dxfo...@gmail.com (dxforth)
Newsgroups: comp.lang.forth
Subject: Re: What do floating point words do with NAN?
Date: Wed, 20 Jul 2022 14:00:53 +1000
Organization: Aioe.org NNTP Server
Message-ID: <tb7ull$cbc$1@gioia.aioe.org>
References: <1f9b7495-91de-4063-ad0e-480a5a438cd8n@googlegroups.com>
<2d539c96-8864-45ef-943e-6ac058acd6f3n@googlegroups.com>
<tap0g8$2n35d$1@dont-email.me>
<3675fe47-7109-431c-a953-6e7b922d8817n@googlegroups.com>
<tap7jo$2ns97$1@dont-email.me>
<5067298c-db15-408e-8403-58dbae82f1f6n@googlegroups.com>
<tapfik$2onhk$1@dont-email.me> <2022Jul18.174825@mips.complang.tuwien.ac.at>
<tb5370$rrp$1@gioia.aioe.org> <875yjtptaq.fsf@nightsong.com>
<2022Jul19.102344@mips.complang.tuwien.ac.at> <871quhpb34.fsf@nightsong.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="12652"; posting-host="7AktqsUqy5CCvnKa3S0Dkw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.11.0
Content-Language: en-GB
X-Notice: Filtered by postfilter v. 0.9.2
 by: dxforth - Wed, 20 Jul 2022 04:00 UTC

On 19/07/2022 21:59, Paul Rubin wrote:
> anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
>> Gforth prints (on AMD64, i.e., an IEEE 754 system):
>> -0e f. 0. ok
>> 0e fnegate f. 0. ok
>
> Both of those print -0. under gforth 0.73 in Debian 11 x64. It's
> interesting if something changed.

Gforth 0.7.9_20200709

\ test if sign passed on input
0e pad f! pad 1 floats dump
6FFFFF877278: 00 00 00 00 00 00 00 00

-0e pad f! pad 1 floats dump
6FFFFF877278: 00 00 00 00 00 00 00 80

\ test if sign passed on output
0e pad 10 represent drop nip . 0 ok
-0e pad 10 represent drop nip . 0 ok

Re: What do floating point words do with NAN?

<2022Jul20.134617@mips.complang.tuwien.ac.at>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19233&group=comp.lang.forth#19233

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: What do floating point words do with NAN?
Date: Wed, 20 Jul 2022 11:46:17 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 23
Message-ID: <2022Jul20.134617@mips.complang.tuwien.ac.at>
References: <1f9b7495-91de-4063-ad0e-480a5a438cd8n@googlegroups.com> <tap0g8$2n35d$1@dont-email.me> <3675fe47-7109-431c-a953-6e7b922d8817n@googlegroups.com> <tap7jo$2ns97$1@dont-email.me> <5067298c-db15-408e-8403-58dbae82f1f6n@googlegroups.com> <tapfik$2onhk$1@dont-email.me> <2022Jul18.174825@mips.complang.tuwien.ac.at> <tb5370$rrp$1@gioia.aioe.org> <875yjtptaq.fsf@nightsong.com> <2022Jul19.102344@mips.complang.tuwien.ac.at> <871quhpb34.fsf@nightsong.com>
Injection-Info: reader01.eternal-september.org; posting-host="6dc36bd2acc576e583b379121f55a4cc";
logging-data="1679702"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+KjjiykUl5UqNiDqdISINO"
Cancel-Lock: sha1:zv9+/jEeUlTXQLBnPqjuy+Ga/Po=
X-newsreader: xrn 10.00-beta-3
 by: Anton Ertl - Wed, 20 Jul 2022 11:46 UTC

Paul Rubin <no.email@nospam.invalid> writes:
>anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
>> Gforth prints (on AMD64, i.e., an IEEE 754 system):
>> -0e f. 0. ok
>> 0e fnegate f. 0. ok
>
>Both of those print -0. under gforth 0.73 in Debian 11 x64. It's
>interesting if something changed.

One other thing that changed:

-0e 0e f/ f. \ -na ok \ 0.7.3
-0e 0e f/ f. \ NaN ok \ 0.7.9_20220707

Maybe these changes are related. If you want to know for sure, you
can bisect it :-).

- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: https://forth-standard.org/
EuroForth 2022: http://www.euroforth.org/ef22/cfp.html

Re: What do floating point words do with NAN?

<2022Jul20.134852@mips.complang.tuwien.ac.at>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19234&group=comp.lang.forth#19234

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: What do floating point words do with NAN?
Date: Wed, 20 Jul 2022 11:48:52 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 16
Message-ID: <2022Jul20.134852@mips.complang.tuwien.ac.at>
References: <1f9b7495-91de-4063-ad0e-480a5a438cd8n@googlegroups.com> <2d539c96-8864-45ef-943e-6ac058acd6f3n@googlegroups.com> <tap0g8$2n35d$1@dont-email.me> <3675fe47-7109-431c-a953-6e7b922d8817n@googlegroups.com> <tap7jo$2ns97$1@dont-email.me> <5067298c-db15-408e-8403-58dbae82f1f6n@googlegroups.com> <tapfik$2onhk$1@dont-email.me> <2022Jul18.174825@mips.complang.tuwien.ac.at> <tb5370$rrp$1@gioia.aioe.org> <2022Jul19.101846@mips.complang.tuwien.ac.at> <tb5v5f$hjn$1@gioia.aioe.org>
Injection-Info: reader01.eternal-september.org; posting-host="6dc36bd2acc576e583b379121f55a4cc";
logging-data="1679702"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+YC96Twir9TzBU+YtpLdzX"
Cancel-Lock: sha1:iWtwZJmpfatxpzBVIuT7I3uZTHg=
X-newsreader: xrn 10.00-beta-3
 by: Anton Ertl - Wed, 20 Jul 2022 11:48 UTC

dxforth <dxforth@gmail.com> writes:
>On 19/07/2022 18:18, Anton Ertl wrote:
>> How a negative zero should be printed is a different discussion.
>
>There's precedence for printing it differently to other numbers?

Not sure what you mean with "precedence" here, but anyway, negative
zero should be printed differently from, e.g., 1. Whether it should
be printed differently from positive zero is the question.

- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: https://forth-standard.org/
EuroForth 2022: http://www.euroforth.org/ef22/cfp.html

Re: What do floating point words do with NAN?

<tb8uvv$1iel$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19235&group=comp.lang.forth#19235

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!aioe.org!7AktqsUqy5CCvnKa3S0Dkw.user.46.165.242.75.POSTED!not-for-mail
From: dxfo...@gmail.com (dxforth)
Newsgroups: comp.lang.forth
Subject: Re: What do floating point words do with NAN?
Date: Wed, 20 Jul 2022 23:12:33 +1000
Organization: Aioe.org NNTP Server
Message-ID: <tb8uvv$1iel$1@gioia.aioe.org>
References: <1f9b7495-91de-4063-ad0e-480a5a438cd8n@googlegroups.com>
<2d539c96-8864-45ef-943e-6ac058acd6f3n@googlegroups.com>
<tap0g8$2n35d$1@dont-email.me>
<3675fe47-7109-431c-a953-6e7b922d8817n@googlegroups.com>
<tap7jo$2ns97$1@dont-email.me>
<5067298c-db15-408e-8403-58dbae82f1f6n@googlegroups.com>
<tapfik$2onhk$1@dont-email.me> <2022Jul18.174825@mips.complang.tuwien.ac.at>
<tb5370$rrp$1@gioia.aioe.org> <2022Jul19.101846@mips.complang.tuwien.ac.at>
<tb5v5f$hjn$1@gioia.aioe.org> <2022Jul20.134852@mips.complang.tuwien.ac.at>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="51669"; posting-host="7AktqsUqy5CCvnKa3S0Dkw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.11.0
Content-Language: en-GB
X-Notice: Filtered by postfilter v. 0.9.2
 by: dxforth - Wed, 20 Jul 2022 13:12 UTC

On 20/07/2022 21:48, Anton Ertl wrote:
> dxforth <dxforth@gmail.com> writes:
>>On 19/07/2022 18:18, Anton Ertl wrote:
>>> How a negative zero should be printed is a different discussion.
>>
>>There's precedence for printing it differently to other numbers?
>
> Not sure what you mean with "precedence" here, but anyway, negative
> zero should be printed differently from, e.g., 1.
By precedence I mean convention. ANS has a convention for inputting
and outputting negative numbers.

> Whether it should
> be printed differently from positive zero is the question.

I see nothing in the definition of F. which permits a change of sign.

Re: What do floating point words do with NAN?

<4b7f9ec7-b762-4168-aa42-b93c910dc386n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19236&group=comp.lang.forth#19236

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:6214:c4c:b0:474:493:ca44 with SMTP id r12-20020a0562140c4c00b004740493ca44mr3290018qvj.36.1658334063340;
Wed, 20 Jul 2022 09:21:03 -0700 (PDT)
X-Received: by 2002:ac8:7dcf:0:b0:31f:9fc:fa93 with SMTP id
c15-20020ac87dcf000000b0031f09fcfa93mr2244938qte.185.1658334063175; Wed, 20
Jul 2022 09:21:03 -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.forth
Date: Wed, 20 Jul 2022 09:21:03 -0700 (PDT)
In-Reply-To: <2022Jul20.134852@mips.complang.tuwien.ac.at>
Injection-Info: google-groups.googlegroups.com; posting-host=185.124.144.166; posting-account=AqNUYgoAAADmkK2pN-RKms8sww57W0Iw
NNTP-Posting-Host: 185.124.144.166
References: <1f9b7495-91de-4063-ad0e-480a5a438cd8n@googlegroups.com>
<2d539c96-8864-45ef-943e-6ac058acd6f3n@googlegroups.com> <tap0g8$2n35d$1@dont-email.me>
<3675fe47-7109-431c-a953-6e7b922d8817n@googlegroups.com> <tap7jo$2ns97$1@dont-email.me>
<5067298c-db15-408e-8403-58dbae82f1f6n@googlegroups.com> <tapfik$2onhk$1@dont-email.me>
<2022Jul18.174825@mips.complang.tuwien.ac.at> <tb5370$rrp$1@gioia.aioe.org>
<2022Jul19.101846@mips.complang.tuwien.ac.at> <tb5v5f$hjn$1@gioia.aioe.org> <2022Jul20.134852@mips.complang.tuwien.ac.at>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <4b7f9ec7-b762-4168-aa42-b93c910dc386n@googlegroups.com>
Subject: Re: What do floating point words do with NAN?
From: minfo...@arcor.de (minf...@arcor.de)
Injection-Date: Wed, 20 Jul 2022 16:21:03 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2415
 by: minf...@arcor.de - Wed, 20 Jul 2022 16:21 UTC

Anton Ertl schrieb am Mittwoch, 20. Juli 2022 um 13:53:06 UTC+2:
> dxforth <dxf...@gmail.com> writes:
> >On 19/07/2022 18:18, Anton Ertl wrote:
> >> How a negative zero should be printed is a different discussion.
> >
> >There's precedence for printing it differently to other numbers?
> Not sure what you mean with "precedence" here, but anyway, negative
> zero should be printed differently from, e.g., 1. Whether it should
> be printed differently from positive zero is the question.

How can this be qustioned??
Branch cuts are an important thing eg in the field of trigonometric and
logarithmic functions, particularly in the complex plane.
+0e FDUP FLN f. f. -inf +0.
-0e FDUP FLN f. -nan -0.
The only thing that is undefined is the 'sign' of nan. The signs before 0.
are important.

Re: What do floating point words do with NAN?

<1c307235-ae20-4488-ae4e-861e5d836b2bn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19237&group=comp.lang.forth#19237

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:6214:2409:b0:432:bf34:362f with SMTP id fv9-20020a056214240900b00432bf34362fmr30986418qvb.66.1658344290876;
Wed, 20 Jul 2022 12:11:30 -0700 (PDT)
X-Received: by 2002:a05:620a:248c:b0:6a6:e50d:442a with SMTP id
i12-20020a05620a248c00b006a6e50d442amr26091326qkn.117.1658344290726; Wed, 20
Jul 2022 12:11:30 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.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.forth
Date: Wed, 20 Jul 2022 12:11:30 -0700 (PDT)
In-Reply-To: <4b7f9ec7-b762-4168-aa42-b93c910dc386n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=84.30.53.30; posting-account=-JQ2RQoAAAB6B5tcBTSdvOqrD1HpT_Rk
NNTP-Posting-Host: 84.30.53.30
References: <1f9b7495-91de-4063-ad0e-480a5a438cd8n@googlegroups.com>
<2d539c96-8864-45ef-943e-6ac058acd6f3n@googlegroups.com> <tap0g8$2n35d$1@dont-email.me>
<3675fe47-7109-431c-a953-6e7b922d8817n@googlegroups.com> <tap7jo$2ns97$1@dont-email.me>
<5067298c-db15-408e-8403-58dbae82f1f6n@googlegroups.com> <tapfik$2onhk$1@dont-email.me>
<2022Jul18.174825@mips.complang.tuwien.ac.at> <tb5370$rrp$1@gioia.aioe.org>
<2022Jul19.101846@mips.complang.tuwien.ac.at> <tb5v5f$hjn$1@gioia.aioe.org>
<2022Jul20.134852@mips.complang.tuwien.ac.at> <4b7f9ec7-b762-4168-aa42-b93c910dc386n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <1c307235-ae20-4488-ae4e-861e5d836b2bn@googlegroups.com>
Subject: Re: What do floating point words do with NAN?
From: mhx...@iae.nl (Marcel Hendrix)
Injection-Date: Wed, 20 Jul 2022 19:11:30 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2274
 by: Marcel Hendrix - Wed, 20 Jul 2022 19:11 UTC

On Wednesday, July 20, 2022 at 6:21:04 PM UTC+2, minf...@arcor.de wrote:
> Anton Ertl schrieb am Mittwoch, 20. Juli 2022 um 13:53:06 UTC+2:
[..]
> How can this be qustioned??
> Branch cuts are an important thing eg in the field of trigonometric and
> logarithmic functions, particularly in the complex plane.
> +0e FDUP FLN f. f. -inf +0.
> -0e FDUP FLN f. -nan -0.
> The only thing that is undefined is the 'sign' of nan. The signs before 0.
> are important.

You had me worried for a moment but it isn't as simple as that :--)

MATLAB:
>> log(-0)
ans = -Inf
>> log(+0)
ans = -Inf

-marcel

Re: What do floating point words do with NAN?

<87h73bnugt.fsf@nightsong.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19240&group=comp.lang.forth#19240

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: no.em...@nospam.invalid (Paul Rubin)
Newsgroups: comp.lang.forth
Subject: Re: What do floating point words do with NAN?
Date: Wed, 20 Jul 2022 18:08:18 -0700
Organization: A noiseless patient Spider
Lines: 6
Message-ID: <87h73bnugt.fsf@nightsong.com>
References: <1f9b7495-91de-4063-ad0e-480a5a438cd8n@googlegroups.com>
<2d539c96-8864-45ef-943e-6ac058acd6f3n@googlegroups.com>
<tap0g8$2n35d$1@dont-email.me>
<3675fe47-7109-431c-a953-6e7b922d8817n@googlegroups.com>
<tap7jo$2ns97$1@dont-email.me>
<5067298c-db15-408e-8403-58dbae82f1f6n@googlegroups.com>
<tapfik$2onhk$1@dont-email.me>
<2022Jul18.174825@mips.complang.tuwien.ac.at>
<tb5370$rrp$1@gioia.aioe.org>
<2022Jul19.101846@mips.complang.tuwien.ac.at>
<tb5v5f$hjn$1@gioia.aioe.org>
<2022Jul20.134852@mips.complang.tuwien.ac.at>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: reader01.eternal-september.org; posting-host="8cd9c48abda3f17e72b004d450547021";
logging-data="2074818"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18evt3faOzf8gZdJTml1sSD"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:2A3MQPJtE+ILzSIYWe6H1WLNag8=
sha1:U45wyWRgWggh7ZhaWEckeqbDvaI=
 by: Paul Rubin - Thu, 21 Jul 2022 01:08 UTC

anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
>>There's precedence for printing it differently to other numbers?
> Not sure what you mean with "precedence" here

I think he meant "precedent". It means it has been that way in the
past, though maybe not consistently.

Re: What do floating point words do with NAN?

<tbahej$mmr$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19242&group=comp.lang.forth#19242

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!aioe.org!7AktqsUqy5CCvnKa3S0Dkw.user.46.165.242.75.POSTED!not-for-mail
From: dxfo...@gmail.com (dxforth)
Newsgroups: comp.lang.forth
Subject: Re: What do floating point words do with NAN?
Date: Thu, 21 Jul 2022 13:33:40 +1000
Organization: Aioe.org NNTP Server
Message-ID: <tbahej$mmr$1@gioia.aioe.org>
References: <1f9b7495-91de-4063-ad0e-480a5a438cd8n@googlegroups.com>
<2d539c96-8864-45ef-943e-6ac058acd6f3n@googlegroups.com>
<tap0g8$2n35d$1@dont-email.me>
<3675fe47-7109-431c-a953-6e7b922d8817n@googlegroups.com>
<tap7jo$2ns97$1@dont-email.me>
<5067298c-db15-408e-8403-58dbae82f1f6n@googlegroups.com>
<tapfik$2onhk$1@dont-email.me> <2022Jul18.174825@mips.complang.tuwien.ac.at>
<tb5370$rrp$1@gioia.aioe.org> <2022Jul19.101846@mips.complang.tuwien.ac.at>
<tb5v5f$hjn$1@gioia.aioe.org> <2022Jul20.134852@mips.complang.tuwien.ac.at>
<4b7f9ec7-b762-4168-aa42-b93c910dc386n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="23259"; posting-host="7AktqsUqy5CCvnKa3S0Dkw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.11.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: dxforth - Thu, 21 Jul 2022 03:33 UTC

On 21/07/2022 02:21, minf...@arcor.de wrote:
> Anton Ertl schrieb am Mittwoch, 20. Juli 2022 um 13:53:06 UTC+2:
>> dxforth <dxf...@gmail.com> writes:
>> >On 19/07/2022 18:18, Anton Ertl wrote:
>> >> How a negative zero should be printed is a different discussion.
>> >
>> >There's precedence for printing it differently to other numbers?
>> Not sure what you mean with "precedence" here, but anyway, negative
>> zero should be printed differently from, e.g., 1. Whether it should
>> be printed differently from positive zero is the question.
>
> How can this be qustioned??
> Branch cuts are an important thing eg in the field of trigonometric and
> logarithmic functions, particularly in the complex plane.
> +0e FDUP FLN f. f. -inf +0.
> -0e FDUP FLN f. -nan -0.
> The only thing that is undefined is the 'sign' of nan. The signs before 0.
> are important.

A system isn't required to support signed-zero (e.g. stock SwiftForth) but
if it chooses to, it has no option but to convey the result to the user.

-1e 0e f* f.

Re: What do floating point words do with NAN?

<2022Jul21.155209@mips.complang.tuwien.ac.at>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19246&group=comp.lang.forth#19246

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: What do floating point words do with NAN?
Date: Thu, 21 Jul 2022 13:52:09 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 22
Message-ID: <2022Jul21.155209@mips.complang.tuwien.ac.at>
References: <1f9b7495-91de-4063-ad0e-480a5a438cd8n@googlegroups.com> <tap0g8$2n35d$1@dont-email.me> <3675fe47-7109-431c-a953-6e7b922d8817n@googlegroups.com> <tap7jo$2ns97$1@dont-email.me> <5067298c-db15-408e-8403-58dbae82f1f6n@googlegroups.com> <tapfik$2onhk$1@dont-email.me> <2022Jul18.174825@mips.complang.tuwien.ac.at> <tb5370$rrp$1@gioia.aioe.org> <2022Jul19.101846@mips.complang.tuwien.ac.at> <tb5v5f$hjn$1@gioia.aioe.org> <2022Jul20.134852@mips.complang.tuwien.ac.at> <tb8uvv$1iel$1@gioia.aioe.org>
Injection-Info: reader01.eternal-september.org; posting-host="a8e097f928ca2ba95987c9e8201200a0";
logging-data="2529557"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+ZKLypmlwe6Z8nc2+hMmJf"
Cancel-Lock: sha1:Uni2K8OU/+rIsGt/3OftHP/10QY=
X-newsreader: xrn 10.00-beta-3
 by: Anton Ertl - Thu, 21 Jul 2022 13:52 UTC

dxforth <dxforth@gmail.com> writes:
>I see nothing in the definition of F. which permits a change of sign.

The specification of F. does not specify much about it's output. In
particular, it does not specify anything about which number is
displayed how.

Anyway, I gather from the reactions here that people think that in a
high-quality implementation

0e fnegate f.

should output "-0.". So that's what Gforth now does; see

http://git.savannah.gnu.org/cgit/gforth.git/commit/?id=ffb2db329329c0ad67a5914be7f577b67726301e

- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: https://forth-standard.org/
EuroForth 2022: http://www.euroforth.org/ef22/cfp.html


devel / comp.lang.forth / Re: What do floating point words do with NAN?

Pages:123
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor