Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Prototype designs always work. -- Don Vonada


tech / sci.electronics.design / Re: 0.0 / 0.0 = -NAN ?

SubjectAuthor
* Re: 0.0 / 0.0 = -NAN ?Tabby
+- Re: 0.0 / 0.0 = -NAN ?Joe Gwinn
`* Re: 0.0 / 0.0 = -NAN ?jlarkin
 `- Re: 0.0 / 0.0 = -NAN ?Tabby

1
Re: 0.0 / 0.0 = -NAN ?

<7b730649-d7fa-4ea3-bbe0-b48fc98abbfdn@googlegroups.com>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=96562&group=sci.electronics.design#96562

  copy link   Newsgroups: sci.electronics.design
X-Received: by 2002:a05:6214:1cc4:b0:435:b8a0:1fe9 with SMTP id g4-20020a0562141cc400b00435b8a01fe9mr11419491qvd.54.1652042685780;
Sun, 08 May 2022 13:44:45 -0700 (PDT)
X-Received: by 2002:a81:1193:0:b0:2f7:f680:497f with SMTP id
141-20020a811193000000b002f7f680497fmr11684187ywr.38.1652042685635; Sun, 08
May 2022 13:44:45 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!feeder1.cambriumusenet.nl!feed.tweak.nl!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: sci.electronics.design
Date: Sun, 8 May 2022 13:44:45 -0700 (PDT)
In-Reply-To: <85f22bc1-17c7-46d9-b933-4c6238863740n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2a02:c7f:3a9d:3100:e84d:dbc3:7a5:b6bf;
posting-account=yNCpxwoAAABC9KQIUAp3qXtTMbfh6G1r
NNTP-Posting-Host: 2a02:c7f:3a9d:3100:e84d:dbc3:7a5:b6bf
References: <85f22bc1-17c7-46d9-b933-4c6238863740n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <7b730649-d7fa-4ea3-bbe0-b48fc98abbfdn@googlegroups.com>
Subject: Re: 0.0 / 0.0 = -NAN ?
From: tabbyp...@gmail.com (Tabby)
Injection-Date: Sun, 08 May 2022 20:44:45 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Tabby - Sun, 8 May 2022 20:44 UTC

On Saturday, 30 April 2022 at 16:31:51 UTC+1, Skybuck Flying wrote:
> When exception masks are all enabled to stop the processor from throwing floating point exceptions the following calculation produces a somewhat strange result:
>
> 0.0 / 0.0 = -nan
>
> (At least in Delphi).
>
> For now I will assume this is the case in C/C++ as well and with that I mean on x86/x64 which should and seems to be following IEEE 754 floating-point format.
>
> I am a little bit surprised by this and I want/need to know more. Where is this defined that 0.0 / 0.0 should be -NAN ?!?
>
> Problem is with the code, example:
>
> T := 0;
> D := 0.0 / 0.0;
> P := T * D;
>
> This screws up P. instead of P being zero, P is now also -NAN ?!?
>
> I find this very strange but ok.
>
> I guess a simple solution could be to set D to 0 explicitly for this case, is there perhaps another solution ? Maybe some kind of mask or rounding mode so that additional branch is not necessary ???
>
> Bye for now,
> Skybuck.

I can't remember where NAN is from, but it means the answer can not be computed.

Re: 0.0 / 0.0 = -NAN ?

<t4eg7h1m99qtcge8q2k8an7va225e7a2un@4ax.com>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=96573&group=sci.electronics.design#96573

  copy link   Newsgroups: sci.electronics.design
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!buffer2.nntp.dca1.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Sun, 08 May 2022 16:47:49 -0500
From: joegw...@comcast.net (Joe Gwinn)
Newsgroups: sci.electronics.design
Subject: Re: 0.0 / 0.0 = -NAN ?
Date: Sun, 08 May 2022 17:47:48 -0400
Message-ID: <t4eg7h1m99qtcge8q2k8an7va225e7a2un@4ax.com>
References: <85f22bc1-17c7-46d9-b933-4c6238863740n@googlegroups.com> <7b730649-d7fa-4ea3-bbe0-b48fc98abbfdn@googlegroups.com>
User-Agent: ForteAgent/8.00.32.1272
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 38
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-mF0R0PaJAOdZImVo/TLU2vSFoGZisII5Tu6+zX020wZtQ+wz9SiMFZ/+O+ehHNeYYQtA43GLzE0qbql!3O+2NqhHtS31Ut009xDrmF8MUGxf5J/SypGLLaTG3xcL0+EnVDItVMb6t2k7a9GsFceg2Kk=
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Original-Bytes: 2557
 by: Joe Gwinn - Sun, 8 May 2022 21:47 UTC

On Sun, 8 May 2022 13:44:45 -0700 (PDT), Tabby <tabbypurr@gmail.com>
wrote:

>On Saturday, 30 April 2022 at 16:31:51 UTC+1, Skybuck Flying wrote:
>> When exception masks are all enabled to stop the processor from throwing floating point exceptions the following calculation produces a somewhat strange result:
>>
>> 0.0 / 0.0 = -nan
>>
>> (At least in Delphi).
>>
>> For now I will assume this is the case in C/C++ as well and with that I mean on x86/x64 which should and seems to be following IEEE 754 floating-point format.
>>
>> I am a little bit surprised by this and I want/need to know more. Where is this defined that 0.0 / 0.0 should be -NAN ?!?
>>
>> Problem is with the code, example:
>>
>> T := 0;
>> D := 0.0 / 0.0;
>> P := T * D;
>>
>> This screws up P. instead of P being zero, P is now also -NAN ?!?
>>
>> I find this very strange but ok.
>>
>> I guess a simple solution could be to set D to 0 explicitly for this case, is there perhaps another solution ? Maybe some kind of mask or rounding mode so that additional branch is not necessary ???
>>
>> Bye for now,
>> Skybuck.
>
>I can't remember where NAN is from, but it means the answer can not be computed.

It comes from IEEE Std 754, and NaN means only that the answer cannot
be expressed as a real number (versus a poem or a picture), not that
the answer cannot be computed.

..<https://en.wikipedia.org/wiki/IEEE_754>

Joe Gwinn

Re: 0.0 / 0.0 = -NAN ?

<sqeg7hhhlnmhl5nr8c51ifstlciusi3pjk@4ax.com>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=96574&group=sci.electronics.design#96574

  copy link   Newsgroups: sci.electronics.design
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!buffer2.nntp.dca1.giganews.com!buffer1.nntp.dca1.giganews.com!nntp.supernews.com!news.supernews.com.POSTED!not-for-mail
NNTP-Posting-Date: Sun, 08 May 2022 16:51:52 -0500
From: jlar...@highlandsniptechnology.com
Newsgroups: sci.electronics.design
Subject: Re: 0.0 / 0.0 = -NAN ?
Date: Sun, 08 May 2022 14:51:52 -0700
Message-ID: <sqeg7hhhlnmhl5nr8c51ifstlciusi3pjk@4ax.com>
References: <85f22bc1-17c7-46d9-b933-4c6238863740n@googlegroups.com> <7b730649-d7fa-4ea3-bbe0-b48fc98abbfdn@googlegroups.com>
X-Newsreader: Forte Agent 3.1/32.783
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 41
X-Trace: sv3-rcV3XlYXrJ/Mw/0UA6JZHfE5uSM7czV/akMqKhAZPogRsGOhLI7nWVuznZKnwzZr8GDJ6QQB64lAWJU!mixToODU85fuMgwur1bKiYcLo4Kh8jFB+bvHAk5kHrFN/juj6V9RQjZsDNVbFs+RO89yvXXi02lp!WTkRAg==
X-Complaints-To: www.supernews.com/docs/abuse.html
X-DMCA-Complaints-To: www.supernews.com/docs/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Original-Bytes: 2402
 by: jlar...@highlandsniptechnology.com - Sun, 8 May 2022 21:51 UTC

On Sun, 8 May 2022 13:44:45 -0700 (PDT), Tabby <tabbypurr@gmail.com>
wrote:

>On Saturday, 30 April 2022 at 16:31:51 UTC+1, Skybuck Flying wrote:
>> When exception masks are all enabled to stop the processor from throwing floating point exceptions the following calculation produces a somewhat strange result:
>>
>> 0.0 / 0.0 = -nan
>>
>> (At least in Delphi).
>>
>> For now I will assume this is the case in C/C++ as well and with that I mean on x86/x64 which should and seems to be following IEEE 754 floating-point format.
>>
>> I am a little bit surprised by this and I want/need to know more. Where is this defined that 0.0 / 0.0 should be -NAN ?!?
>>
>> Problem is with the code, example:
>>
>> T := 0;
>> D := 0.0 / 0.0;
>> P := T * D;
>>
>> This screws up P. instead of P being zero, P is now also -NAN ?!?
>>
>> I find this very strange but ok.
>>
>> I guess a simple solution could be to set D to 0 explicitly for this case, is there perhaps another solution ? Maybe some kind of mask or rounding mode so that additional branch is not necessary ???
>>
>> Bye for now,
>> Skybuck.
>
>I can't remember where NAN is from, but it means the answer can not be computed.

Not A Number.

--

Anybody can count to one.

- Robert Widlar

Re: 0.0 / 0.0 = -NAN ?

<b75069cb-50a1-400c-a246-cf2a1ba0db90n@googlegroups.com>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=96713&group=sci.electronics.design#96713

  copy link   Newsgroups: sci.electronics.design
X-Received: by 2002:ac8:5b50:0:b0:2f3:ae99:8e0 with SMTP id n16-20020ac85b50000000b002f3ae9908e0mr25661488qtw.669.1652307787845;
Wed, 11 May 2022 15:23:07 -0700 (PDT)
X-Received: by 2002:a25:25cd:0:b0:648:5bce:5a45 with SMTP id
l196-20020a2525cd000000b006485bce5a45mr27031769ybl.349.1652307787540; Wed, 11
May 2022 15:23:07 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.mixmin.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: sci.electronics.design
Date: Wed, 11 May 2022 15:23:07 -0700 (PDT)
In-Reply-To: <sqeg7hhhlnmhl5nr8c51ifstlciusi3pjk@4ax.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2a02:c7f:3a9d:3100:51a6:d2bd:1f96:760e;
posting-account=yNCpxwoAAABC9KQIUAp3qXtTMbfh6G1r
NNTP-Posting-Host: 2a02:c7f:3a9d:3100:51a6:d2bd:1f96:760e
References: <85f22bc1-17c7-46d9-b933-4c6238863740n@googlegroups.com>
<7b730649-d7fa-4ea3-bbe0-b48fc98abbfdn@googlegroups.com> <sqeg7hhhlnmhl5nr8c51ifstlciusi3pjk@4ax.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b75069cb-50a1-400c-a246-cf2a1ba0db90n@googlegroups.com>
Subject: Re: 0.0 / 0.0 = -NAN ?
From: tabbyp...@gmail.com (Tabby)
Injection-Date: Wed, 11 May 2022 22:23:07 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Tabby - Wed, 11 May 2022 22:23 UTC

On Sunday, 8 May 2022 at 22:52:03 UTC+1, jla...@highlandsniptechnology.com wrote:
> On Sun, 8 May 2022 13:44:45 -0700 (PDT), Tabby <tabb...@gmail.com>
> wrote:
> >On Saturday, 30 April 2022 at 16:31:51 UTC+1, Skybuck Flying wrote:
> >> When exception masks are all enabled to stop the processor from throwing floating point exceptions the following calculation produces a somewhat strange result:
> >>
> >> 0.0 / 0.0 = -nan
> >>
> >> (At least in Delphi).
> >>
> >> For now I will assume this is the case in C/C++ as well and with that I mean on x86/x64 which should and seems to be following IEEE 754 floating-point format.
> >>
> >> I am a little bit surprised by this and I want/need to know more. Where is this defined that 0.0 / 0.0 should be -NAN ?!?
> >>
> >> Problem is with the code, example:
> >>
> >> T := 0;
> >> D := 0.0 / 0.0;
> >> P := T * D;
> >>
> >> This screws up P. instead of P being zero, P is now also -NAN ?!?
> >>
> >> I find this very strange but ok.
> >>
> >> I guess a simple solution could be to set D to 0 explicitly for this case, is there perhaps another solution ? Maybe some kind of mask or rounding mode so that additional branch is not necessary ???
> >>
> >> Bye for now,
> >> Skybuck.
> >
> >I can't remember where NAN is from, but it means the answer can not be computed.
> Not A Number.

Yup. Though if we are to be pedantic, the correct answers generally are a number, but the CPU is unable to calculate or report them.

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor