Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"A verbal contract isn't worth the paper it's printed on." -- Samuel Goldwyn


tech / alt.astronomy / Re: Win32: 0.0 / 0.0 = -NAN ? Win64: 0.0 / 0.0 = -1, #IND ?

SubjectAuthor
o Re: Win32: 0.0 / 0.0 = -NAN ? Win64: 0.0 / 0.0 = -1, #IND ?R Kym Horsell

1
Re: Win32: 0.0 / 0.0 = -NAN ? Win64: 0.0 / 0.0 = -1, #IND ?

<t4k6hn$1qig$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=3983&group=alt.astronomy#3983

  copy link   Newsgroups: alt.astronomy
Path: i2pn2.org!i2pn.org!aioe.org!uSXIh7Xs70RP5DAIz7h+mA.user.46.165.242.75.POSTED!not-for-mail
From: kym...@kymhorsell.com (R Kym Horsell)
Newsgroups: alt.astronomy
Subject: Re: Win32: 0.0 / 0.0 = -NAN ? Win64: 0.0 / 0.0 = -1, #IND ?
Date: Sat, 30 Apr 2022 20:35:04 -0000 (UTC)
Organization: kymhorsell.com
Message-ID: <t4k6hn$1qig$1@gioia.aioe.org>
References: <007154cd-3381-4215-b9f0-789c4028cc2cn@googlegroups.com>
Reply-To: kym@kymhorsell.com
Injection-Info: gioia.aioe.org; logging-data="59984"; posting-host="uSXIh7Xs70RP5DAIz7h+mA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (OpenBSD/4.7 (i386))
X-Notice: Filtered by postfilter v. 0.9.2
 by: R Kym Horsell - Sat, 30 Apr 2022 20:35 UTC

Skybuck Flying <skybuckflying@gmail.com> 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

The 754 standard says a floating divide by zero may see the hardware generate
a +ve or -ve infinity. Result is a special NaN.
If the exception is caught s/w may replace the result with something more
sensible like 0 but it might also terminate the process.

The old hack to handle things like this is add a MachEps (smallest number
that is not treated as 0 when added) i.e. do x/(y+MachEps) .
In s/w you can sometimes do if(nan(result)) ... yourself.

>...

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor