Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

HOST SYSTEM NOT RESPONDING, PROBABLY DOWN. DO YOU WANT TO WAIT? (Y/N)


devel / comp.arch / Re: The value of floating-point exceptions?

SubjectAuthor
* The value of floating-point exceptions?Marcus
+* Re: The value of floating-point exceptions?Marcus
|`* Re: The value of floating-point exceptions?Stephen Fuld
| +- Re: The value of floating-point exceptions?Marcus
| `* Re: The value of floating-point exceptions?luke.l...@gmail.com
|  `- Re: The value of floating-point exceptions?BGB
+* Re: The value of floating-point exceptions?John Dallman
|+* Re: The value of floating-point exceptions?Marcus
||`* Re: The value of floating-point exceptions?John Dallman
|| +- Re: The value of floating-point exceptions?MitchAlsup
|| `* Re: The value of floating-point exceptions?Quadibloc
||  `* Re: The value of floating-point exceptions?MitchAlsup
||   +* Re: The value of floating-point exceptions?Marcus
||   |+* Re: The value of floating-point exceptions?Ivan Godard
||   ||`* Re: The value of floating-point exceptions?Quadibloc
||   || +* Re: The value of floating-point exceptions?Ivan Godard
||   || |+* Re: The value of floating-point exceptions?Anton Ertl
||   || ||`* Re: The value of floating-point exceptions?MitchAlsup
||   || || `- Re: The value of floating-point exceptions?Quadibloc
||   || |`- Re: The value of floating-point exceptions?Terje Mathisen
||   || `* Re: The value of floating-point exceptions?MitchAlsup
||   ||  +* Re: The value of floating-point exceptions?Quadibloc
||   ||  |+* Re: The value of floating-point exceptions?MitchAlsup
||   ||  ||+- Re: The value of floating-point exceptions?BGB
||   ||  ||`* Re: The value of floating-point exceptions?Terje Mathisen
||   ||  || `* Re: The value of floating-point exceptions?BGB
||   ||  ||  `* Re: The value of floating-point exceptions?MitchAlsup
||   ||  ||   +* Re: The value of floating-point exceptions?Ivan Godard
||   ||  ||   |+* Re: The value of floating-point exceptions?BGB
||   ||  ||   ||`* Re: The value of floating-point exceptions?Terje Mathisen
||   ||  ||   || `- Re: The value of floating-point exceptions?BGB
||   ||  ||   |+* Re: The value of floating-point exceptions?MitchAlsup
||   ||  ||   ||`* Re: The value of floating-point exceptions?Marcus
||   ||  ||   || `- Re: The value of floating-point exceptions?BGB
||   ||  ||   |`* Re: The value of floating-point exceptions?EricP
||   ||  ||   | `* Re: The value of floating-point exceptions?Ivan Godard
||   ||  ||   |  `* Re: The value of floating-point exceptions?MitchAlsup
||   ||  ||   |   +* Re: Configurable rounding modes (was The value of floating-pointMarcus
||   ||  ||   |   |+- Re: Configurable rounding modes (was The value of floating-pointTerje Mathisen
||   ||  ||   |   |`* Re: Configurable rounding modes (was The value of floating-point exceptions?)MitchAlsup
||   ||  ||   |   | +- Re: Configurable rounding modes (was The value of floating-pointStephen Fuld
||   ||  ||   |   | `- Re: Configurable rounding modes (was The value of floating-pointMarcus
||   ||  ||   |   `* Re: The value of floating-point exceptions?EricP
||   ||  ||   |    `* Re: The value of floating-point exceptions?MitchAlsup
||   ||  ||   |     `- Re: The value of floating-point exceptions?Quadibloc
||   ||  ||   +* Re: The value of floating-point exceptions?Quadibloc
||   ||  ||   |`* Re: The value of floating-point exceptions?MitchAlsup
||   ||  ||   | `- Re: The value of floating-point exceptions?Quadibloc
||   ||  ||   `* Re: The value of floating-point exceptions?Marcus
||   ||  ||    +* Re: The value of floating-point exceptions?Thomas Koenig
||   ||  ||    |`* Re: The value of floating-point exceptions?MitchAlsup
||   ||  ||    | `- Re: The value of floating-point exceptions?Thomas Koenig
||   ||  ||    +* Re: The value of floating-point exceptions?MitchAlsup
||   ||  ||    |+* Re: The value of floating-point exceptions?Ivan Godard
||   ||  ||    ||`- Re: The value of floating-point exceptions?BGB
||   ||  ||    |+* Re: The value of floating-point exceptions?Quadibloc
||   ||  ||    ||`* Re: The value of floating-point exceptions?MitchAlsup
||   ||  ||    || +* Re: The value of floating-point exceptions?Ivan Godard
||   ||  ||    || |`* Re: The value of floating-point exceptions?MitchAlsup
||   ||  ||    || | `* Re: The value of floating-point exceptions?Ivan Godard
||   ||  ||    || |  +* Re: The value of floating-point exceptions?MitchAlsup
||   ||  ||    || |  |`- Re: The value of floating-point exceptions?Ivan Godard
||   ||  ||    || |  `* Re: The value of floating-point exceptions?Marcus
||   ||  ||    || |   +- Re: The value of floating-point exceptions?Quadibloc
||   ||  ||    || |   +* Re: The value of floating-point exceptions?Anton Ertl
||   ||  ||    || |   |`* Re: The value of floating-point exceptions?Michael S
||   ||  ||    || |   | `* Re: The value of floating-point exceptions?MitchAlsup
||   ||  ||    || |   |  `- Re: The value of floating-point exceptions?Terje Mathisen
||   ||  ||    || |   `* Re: The value of floating-point exceptions?Quadibloc
||   ||  ||    || |    +- Re: The value of floating-point exceptions?Quadibloc
||   ||  ||    || |    `* Re: The value of floating-point exceptions?Marcus
||   ||  ||    || |     `* Re: The value of floating-point exceptions?MitchAlsup
||   ||  ||    || |      `* Re: The value of floating-point exceptions?Marcus
||   ||  ||    || |       `- Re: The value of floating-point exceptions?MitchAlsup
||   ||  ||    || `- Re: Configurable rounding modes (was The value of floating-pointMarcus
||   ||  ||    |`* Re: Configurable rounding modes (was The value of floating-pointMarcus
||   ||  ||    | +* Re: Configurable rounding modes (was The value of floating-point exceptions?)MitchAlsup
||   ||  ||    | |`* Re: Configurable rounding modes (was The value of floating-pointIvan Godard
||   ||  ||    | | +* Re: Configurable rounding modes (was The value of floating-pointBGB
||   ||  ||    | | |`* Re: Configurable rounding modes (was The value of floating-pointMarcus
||   ||  ||    | | | `- Re: Configurable rounding modes (was The value of floating-pointBGB
||   ||  ||    | | +* Re: Configurable rounding modes (was The value of floating-point exceptions?)Quadibloc
||   ||  ||    | | |+- Re: Configurable rounding modes (was The value of floating-point exceptions?)Quadibloc
||   ||  ||    | | |`* Re: Configurable rounding modes (was The value of floating-pointIvan Godard
||   ||  ||    | | | `- Re: Configurable rounding modes (was The value of floating-point exceptions?)Quadibloc
||   ||  ||    | | `* Re: Configurable rounding modes (was The value of floating-point exceptions?)MitchAlsup
||   ||  ||    | |  `* Re: Configurable rounding modes (was The value of floating-pointIvan Godard
||   ||  ||    | |   `* Re: Configurable rounding modes (was The value of floating-point exceptions?)Quadibloc
||   ||  ||    | |    `* Re: Configurable rounding modes (was The value of floating-point exceptions?)Quadibloc
||   ||  ||    | |     +- Re: Configurable rounding modes (was The value of floating-point exceptions?)Quadibloc
||   ||  ||    | |     `- Re: Configurable rounding modes (was The value of floating-point exceptions?)Quadibloc
||   ||  ||    | `* Re: Configurable rounding modes (was The value of floating-pointBGB
||   ||  ||    |  `* Re: Configurable rounding modes (was The value of floating-point exceptions?)MitchAlsup
||   ||  ||    |   `- Re: Configurable rounding modes (was The value of floating-pointBGB
||   ||  ||    `* Re: The value of floating-point exceptions?antispam
||   ||  ||     +- Re: The value of floating-point exceptions?BGB
||   ||  ||     +* Re: The value of floating-point exceptions?Terje Mathisen
||   ||  ||     |+- Re: The value of floating-point exceptions?BGB
||   ||  ||     |`* Re: The value of floating-point exceptions?antispam
||   ||  ||     | `* Re: The value of floating-point exceptions?Quadibloc
||   ||  ||     |  +* Re: The value of floating-point exceptions?antispam
||   ||  ||     |  `* Re: The value of floating-point exceptions?MitchAlsup
||   ||  ||     `- Re: The value of floating-point exceptions?John Dallman
||   ||  |`* Re: The value of floating-point exceptions?John Dallman
||   ||  +* Re: The value of floating-point exceptions?Quadibloc
||   ||  `* Re: The value of floating-point exceptions?Thomas Koenig
||   |`* Re: The value of floating-point exceptions?Quadibloc
||   `- Re: The value of floating-point exceptions?Quadibloc
|`* Re: The value of floating-point exceptions?Marcus
+- Re: The value of floating-point exceptions?Terje Mathisen
+* Re: The value of floating-point exceptions?Ivan Godard
+- Re: The value of floating-point exceptions?BGB
+* Re: The value of floating-point exceptions?EricP
+* Re: The value of floating-point exceptions?Anton Ertl
+* Re: The value of floating-point exceptions?MitchAlsup
`- Re: The value of floating-point exceptions?antispam

Pages:12345678910
Re: The value of floating-point exceptions?

<0c62671a-5c9a-4542-ad87-8703d6a21e11n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19086&group=comp.arch#19086

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:620a:b4a:: with SMTP id x10mr6111063qkg.496.1627067627774;
Fri, 23 Jul 2021 12:13:47 -0700 (PDT)
X-Received: by 2002:a05:6830:3109:: with SMTP id b9mr4176576ots.276.1627067627537;
Fri, 23 Jul 2021 12:13:47 -0700 (PDT)
Path: i2pn2.org!i2pn.org!paganini.bofh.team!news.dns-netz.com!news.freedyn.net!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!news-out.netnews.com!news.alt.net!fdc3.netnews.com!peer02.ams1!peer.ams1.xlned.com!news.xlned.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.arch
Date: Fri, 23 Jul 2021 12:13:47 -0700 (PDT)
In-Reply-To: <2021Jul23.204058@mips.complang.tuwien.ac.at>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:b4bb:2cda:188c:261;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:b4bb:2cda:188c:261
References: <sd9a9h$ro6$1@dont-email.me> <memo.20210721153537.10680P@jgd.cix.co.uk>
<e9c738bd-7c0e-4b3b-9385-3a0d0658b059n@googlegroups.com> <a74c6bf2-9ad1-4969-b3cb-b650ae8ebdadn@googlegroups.com>
<sde6m7$kr1$1@dont-email.me> <sde74m$nio$1@dont-email.me> <7cf5713e-f138-488b-9ccf-d85df84c50can@googlegroups.com>
<sdeill$7ct$1@dont-email.me> <2021Jul23.204058@mips.complang.tuwien.ac.at>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0c62671a-5c9a-4542-ad87-8703d6a21e11n@googlegroups.com>
Subject: Re: The value of floating-point exceptions?
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Fri, 23 Jul 2021 19:13:47 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2103
 by: MitchAlsup - Fri, 23 Jul 2021 19:13 UTC

On Friday, July 23, 2021 at 1:42:56 PM UTC-5, Anton Ertl wrote:
> Ivan Godard <iv...@millcomputing.com> writes:
> >Back when I was active on the IEEE committee, I once asked Kahan
> >whether, if quad (128-bit) were as fast as double, would he still have
> >denorms. He answered an unequivocal "No!".
> That is hard to believe, given that a major argument for denormal
> numbers is that
>
> a-b=0
>
> should give the same result as
>
> a=b
<
a==b
>
> - anton
> --
> 'Anton should try for "industrial quality" comp.arch responses.'
> Mitch Alsup, <c17fcd89-f024-40e7...@googlegroups.com>

Re: The value of floating-point exceptions?

<sdf4nt$cej$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19088&group=comp.arch#19088

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: cr88...@gmail.com (BGB)
Newsgroups: comp.arch
Subject: Re: The value of floating-point exceptions?
Date: Fri, 23 Jul 2021 14:19:22 -0500
Organization: A noiseless patient Spider
Lines: 167
Message-ID: <sdf4nt$cej$1@dont-email.me>
References: <sd9a9h$ro6$1@dont-email.me>
<memo.20210721153537.10680P@jgd.cix.co.uk>
<e9c738bd-7c0e-4b3b-9385-3a0d0658b059n@googlegroups.com>
<a74c6bf2-9ad1-4969-b3cb-b650ae8ebdadn@googlegroups.com>
<sde6m7$kr1$1@dont-email.me>
<0ab0a7a5-95e0-4ee4-8129-3ec7f1e876a6n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 23 Jul 2021 19:19:25 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="f2d0ea6b3e8abb37b40547670b01634c";
logging-data="12755"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+oJ7LKuk2TeoDWWDwrCIkO"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.12.0
Cancel-Lock: sha1:2hUJ5qMMbJS1CrMo1Q1lPhIVgd8=
In-Reply-To: <0ab0a7a5-95e0-4ee4-8129-3ec7f1e876a6n@googlegroups.com>
Content-Language: en-US
 by: BGB - Fri, 23 Jul 2021 19:19 UTC

On 7/23/2021 7:15 AM, Quadibloc wrote:
> On Friday, July 23, 2021 at 4:46:33 AM UTC-6, Marcus wrote:
>
>> I agree. I tried approaching the IEEE 754 working group [1] with a
>> suggestion to standardize a leaner subset of the current standard that
>> would better acknowledge the current reality (i.e. that many floating-
>> point implementations lack some of the mandatory IEEE 754 features),
>> and to analyze the effects of such implementations w.r.t. the numerical
>> and operational guarantees that the standard aims to provide. At least
>> to preempt an explosion of fragmented, non-conforming implementations.
>
>> To no avail...
>
> I can see why there would be issues.
>
> The characteristics of the "leaner subset" would depend *strongly* on
> the level of the implementation.
>
> Thus, for the kind of floating-point arithmetic unit I might prefer, the
> leaner subset would have these characteristics:
>
> - Denormals would work. What would not guarantee is that they
> would *fail* when they were supposed to.
>
> - Accurate rounding would be guaranteed for addition, subtraction,
> and multiplication, but *not* division, which would instead be accurate
> to something like 0.6 or 0.51 units in the last place.
>
> That's because I would want to implement division using one of the
> fast algorithms which require significant additional overhead to get
> accurate rounding...
>
> and I intend to support denormals with no loss in speed by converting
> floats to a format with no hidden bit inside registers, so it would be
> extra work to reproduce the exact numerical range and precision of
> the IEEE 754 floating-point format. Instead, the denormals - and some
> numeric range beyond them - would still have full precision, and only
> get rounded down when it came time to store values in memory.
>
> People implementing floating-point in a *different* manner would have
> entirely different choices for what parts of the IEEE 754 standard they
> would want omitted from a 'leaner subset'. An implementation with
> significantly less hardware would omit the entire denormal range, but
> support exact rounding for division, for example.
>
> So there's a 'lightweight' leaner subset, and there's a 'high-performance'
> leaner subset, at the very least. Which are disjoint rather than one being
> a subset of the other.
>

As mentioned various times, for example, my subset looks like:
No denormals, they are treated as zeroes and flushed to zero (1);
Hardware only does FADD/FSUB/FMUL, and optionally FMAC;
Rounding is only "probably" correct (2);
FDIV and FSQRT are done in software (cost reasons, mostly, 3);
No FP status flags or similar;
Rounding behavior is hard-wired
(typically either round-to-nearest or truncate);
...

I have basically tried to achieve an FPU that is "acceptably cheap" for
my uses.

1: Besides just their impact on FADD/FMUL, they have a fairly obvious
impact on the relative cost of format-conversion operators.

The dedicated FP conversion ops perform rounding at least, though the
converters used in SIMD ops may truncate instead (in which case, the
logic is mostly bit-repacking with a few special cases to deal with
out-of-range exponents, which causes the results to become either Inf or
Zero).

Denormals mostly make sense for getting more accuracy out of smaller
formats, but then again, if a person is using a smaller format, then
typically precision isn't that important in the first place.

It would almost make more sense IMO to standardize of denormal-as-zero
semantics.

2: There are only a small number of bits below the ULP in my case, and
the final rounding step has "limited carry propagation".

Note that the FADD/FSUB unit does implement twos complement operations
internally such that the limited carry propagation does not normally
effect the visible result of operations (unlike what would happen with
ones' complement).

Internally, the FADD/FSUB unit is using a mantissa big enough to manage
conversion to/from 64 bit integers, and which generally gives ~ 10 bits
below the ULP.

So, probably, FADD/FSUB falls within a 0.51 ULP window.

FMUL shaves it a little closer, but still falls within "most of the
time" territory.

If the program depends on bit-exact results, well, one is probably still
going to have problems. Hardly anything depends on this though.

In general, the implementation is correct enough that doing integer math
via the FPU works as expected (and there is some software that depends
on the assumption that doing integer math via FPU ops works correctly).

....

3: My initial attempts at hardware FDIV and FSQRT were "not free" and
were actually slower than what I could be managed in software. This is
due mostly to software being able to use a "more proper" Newton-Raphson,
which converges more quickly. This operation is still essentially serial
whether or not it was done in hardware or software, essentially limited
by the internal latency of the FADD and FMUL units.

The "starting guess" for these operations is easy enough to generate
using basic integer arithmetic.

I had partly experimented with a 96-bit format (binary128 with the low
32-bits ignored/set-to-zero), but this caused the FPU to be too
expensive to afford in a dual-core configuration with the FPGA I am using.

This FPU would also have given slightly higher precision (probability of
a correctly-rounded result) with double operations.

( Decided to leave out a big thing related to how the 96-bit FPU could
potentially also be used for 64-bit integer multiply and divide, then
going into more about integer operations and large-integer formats in
general. )

Though, FWIW, even without a large-format FPU, one can still implement
float128 semi-acceptably with partial hardware-support for 128-bit
integer operations (which in-turn are also semi-useful in implementing
operations on larger integer types, ...).

Note that even with hardware support for the 96-bit format, the idea was
that "__float128" would still use runtime calls for the full 128-bit
format, whereas "long double" would use the same representation but may
use the hardware-supported operations for a little extra speed.

If I can afford the bigger FPU with SMT (with the FPU as probably a
shared resource between the two threads), it might be worthwhile, but I
have my own concerns for the viability of SMT (some of the code I had
written for a 12R6W register file is, concerning...).

I have a few possible trick that could reduce SMT cost some, at the cost
of adding extra cycles (using interlocks pulling the results from a
snapshot of the pipeline outputs from the previous cycle, rather than
using forwarding of the current results, along most of the "lower
priority" paths). Where in this case, the main register-file module also
partly assumes control over the management of pipeline interlocks.

A more traditional VLIW might have avoided this issue by not using
register forwarding, which combined with no interlocks, would mean not
being able to use ALU results or similar until 2 cycles later (or 4
cycles if one needs to wait for writeback).

A few other parts of the core would likely require a fair bit of
restructuring (still deciding what I would do with "ExUnit", ...).

....

Re: The value of floating-point exceptions?

<sdf4t3$6cl$2@newsreader4.netcologne.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19089&group=comp.arch#19089

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2a0a-a540-a40-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoe...@netcologne.de (Thomas Koenig)
Newsgroups: comp.arch
Subject: Re: The value of floating-point exceptions?
Date: Fri, 23 Jul 2021 19:22:11 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <sdf4t3$6cl$2@newsreader4.netcologne.de>
References: <sd9a9h$ro6$1@dont-email.me>
<memo.20210721153537.10680P@jgd.cix.co.uk>
<e9c738bd-7c0e-4b3b-9385-3a0d0658b059n@googlegroups.com>
<a74c6bf2-9ad1-4969-b3cb-b650ae8ebdadn@googlegroups.com>
<sde6m7$kr1$1@dont-email.me> <sde74m$nio$1@dont-email.me>
<7cf5713e-f138-488b-9ccf-d85df84c50can@googlegroups.com>
<e7e0b9a2-7990-4ec8-9c40-a6e9a07bd306n@googlegroups.com>
Injection-Date: Fri, 23 Jul 2021 19:22:11 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2a0a-a540-a40-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2a0a:a540:a40:0:7285:c2ff:fe6c:992d";
logging-data="6549"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Fri, 23 Jul 2021 19:22 UTC

MitchAlsup <MitchAlsup@aol.com> schrieb:

> IEEE 754 was put together by people who really understood FP arithmetic
> but HW not so much.

Who was on that committee?

I have read that Intel and Motorola were there, but what about
Cray, CDC or IBM? They should have had some understanding of the
difficulties involved (but then again at least Cray was famous
for not caring about such niceties, and IBM was still caught in
their horrible radix-16 system at that time and probably could
not even dream that they would one day implement another floating
point format).

Re: The value of floating-point exceptions?

<c0917435-65c8-45f1-b745-5fd7ff4f58c0n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19095&group=comp.arch#19095

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:620a:62d:: with SMTP id 13mr6215125qkv.18.1627071181207;
Fri, 23 Jul 2021 13:13:01 -0700 (PDT)
X-Received: by 2002:a9d:6d83:: with SMTP id x3mr4073990otp.110.1627071180963;
Fri, 23 Jul 2021 13:13:00 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Fri, 23 Jul 2021 13:13:00 -0700 (PDT)
In-Reply-To: <sdf4t3$6cl$2@newsreader4.netcologne.de>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:b4bb:2cda:188c:261;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:b4bb:2cda:188c:261
References: <sd9a9h$ro6$1@dont-email.me> <memo.20210721153537.10680P@jgd.cix.co.uk>
<e9c738bd-7c0e-4b3b-9385-3a0d0658b059n@googlegroups.com> <a74c6bf2-9ad1-4969-b3cb-b650ae8ebdadn@googlegroups.com>
<sde6m7$kr1$1@dont-email.me> <sde74m$nio$1@dont-email.me> <7cf5713e-f138-488b-9ccf-d85df84c50can@googlegroups.com>
<e7e0b9a2-7990-4ec8-9c40-a6e9a07bd306n@googlegroups.com> <sdf4t3$6cl$2@newsreader4.netcologne.de>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c0917435-65c8-45f1-b745-5fd7ff4f58c0n@googlegroups.com>
Subject: Re: The value of floating-point exceptions?
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Fri, 23 Jul 2021 20:13:01 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 21
 by: MitchAlsup - Fri, 23 Jul 2021 20:13 UTC

On Friday, July 23, 2021 at 2:22:13 PM UTC-5, Thomas Koenig wrote:
> MitchAlsup <Mitch...@aol.com> schrieb:
> > IEEE 754 was put together by people who really understood FP arithmetic
> > but HW not so much.
<
> Who was on that committee?
<
Ivan will be here shortly to list the perpetrators.
>
> I have read that Intel and Motorola were there, but what about
> Cray, CDC or IBM? They should have had some understanding of the
> difficulties involved (but then again at least Cray was famous
> for not caring about such niceties, and IBM was still caught in
> their horrible radix-16 system at that time and probably could
> not even dream that they would one day implement another floating
> point format).
<
IBM's was worse the simply radix 16, it was also a truncation system
with a guard digit (½ a byte) in calculations. To make maters worse, its
competitors were 36-bit, 48-bit, and 60-bit (single precision).

Re: The value of floating-point exceptions?

<sdfbis$qit$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19097&group=comp.arch#19097

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: cr88...@gmail.com (BGB)
Newsgroups: comp.arch
Subject: Re: The value of floating-point exceptions?
Date: Fri, 23 Jul 2021 16:16:10 -0500
Organization: A noiseless patient Spider
Lines: 92
Message-ID: <sdfbis$qit$1@dont-email.me>
References: <sd9a9h$ro6$1@dont-email.me>
<memo.20210721153537.10680P@jgd.cix.co.uk>
<e9c738bd-7c0e-4b3b-9385-3a0d0658b059n@googlegroups.com>
<a74c6bf2-9ad1-4969-b3cb-b650ae8ebdadn@googlegroups.com>
<sde6m7$kr1$1@dont-email.me> <sde74m$nio$1@dont-email.me>
<7cf5713e-f138-488b-9ccf-d85df84c50can@googlegroups.com>
<e7e0b9a2-7990-4ec8-9c40-a6e9a07bd306n@googlegroups.com>
<fc5a33d0-7c17-4855-8ab3-162884bd6b7bn@googlegroups.com>
<713a35af-9cce-4954-b968-1b4b754e7b1en@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 23 Jul 2021 21:16:12 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="f2d0ea6b3e8abb37b40547670b01634c";
logging-data="27229"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+5fljiZLLPzIDizaB+gpLp"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.12.0
Cancel-Lock: sha1:q6G+RX7Y1tNWjiQKo+MWXIYiSn0=
In-Reply-To: <713a35af-9cce-4954-b968-1b4b754e7b1en@googlegroups.com>
Content-Language: en-US
 by: BGB - Fri, 23 Jul 2021 21:16 UTC

On 7/23/2021 12:59 PM, MitchAlsup wrote:
> On Friday, July 23, 2021 at 12:43:25 PM UTC-5, Quadibloc wrote:
>> On Friday, July 23, 2021 at 9:30:20 AM UTC-6, MitchAlsup wrote:
>>
>>> IEEE 754 was put together by people who really understood FP arithmetic
>>> but HW not so much.
> <
>> My own very limited understanding of hardware was put to use
>> in my reply to Marcus' comment about the need for a "leaner
>> subset" of IEEE 754; I noted that if one were designing a large
>> system aiming at the fastest possible speed, one would want
>> to leave _certain_ features of IEEE 754 out, whereas if one were
>> designing a really tiny system, one would want to leave *different*
>> features out... which was probably too much to ask, thus
>> skewering any hopes of adding such a subset to the standard.
>>
>> Since IEEE 754, in its original form, simply ratified what Intel
>> had planned to include in its forthcoming (but then secret)
>> 8087, though, a knowledge of hardware certainly was...
>> applied... to its contents, even if the committee that signed
>> off on it did not include hardware experts.
> <
> IEEE 754 had to compromise between x87 and 881 the intel
> and Moto chips both nearing tapeout, one maybe as far along
> as having seen silicon. This is the part about when rounding versus
> normalization transpires.
>>
>> And what I see, then, as the issue would be...
>>
>> The fact that IEEE 754 derived from Intel's 8087 work meant that
>> the standard was capable of being implemented in hardware once.
> <
> Remember that an FADD was 84-240 cycles..........but I digress......

Bleh...

Granted, I don't expect doing it in software on an 8086 would have been
exactly all that much faster.

I guess a baseline requirement for "semi-fast" software floating point
is having hardware-supported integer operations which are comparable in
size to the floating-point type in question (if not greater).

Also having enough register space that the values can be held in
registers, which the 8086 didn't exactly have going for it either.

....

Though, kind of funny that Binary16 was a recent development; presumably
it would have been fairly useful in that era.

>>
>> Of course, that meant that it was implementable many times in
>> other systems *of comparable size*.
>>
>> But denormals were a pain in very small systems... and the
>> requirement for perfect rounding was a pain in larger systems
>> that aimed at the highest possible speed using either Goldschmidt
>> or Newton-Raphson for division.
> <
> Having watched this from inside:
> a) HW designers know a lot more about this today than in 1980
> b) even systems that started out as IEEE-format gradually went
> closer and closer to full IEEE-compliant (GPUs) until there is no
> useful difference in the quality of the arithmetic.
> c) once 754-2009 came out the overhead to do denorms went to
> zero, and there is no reason to avoid full speed denorms in practice.
> (BGB's small FPGA prototyping environment aside.)
> d) HW designers have learned how to perform all of the rounding
> modes at no overhead compared to RNE.

Probably.

I suspect the boards and FPGAs I am using are fairly common in the
hobbyist space.

But, yeah, I had started working on a dedicated FMAC unit at one point,
but partly shelved this effort for now, as my initial "viability tests"
didn't look promising (it would have been fairly expensive), and the
design would have had a higher latency for FADD and FMUL than my current
FPU.

>>
>> So that's where I see that having HW knowleldge on the IEEE
>> 754 committee would have helped. With your much greater
>> knowledge of hardware, you may see other things which are
>> more important than what I thought of.
>>
>> John Savard

Re: The value of floating-point exceptions?

<memo.20210723223630.14132H@jgd.cix.co.uk>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19098&group=comp.arch#19098

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: jgd...@cix.co.uk (John Dallman)
Newsgroups: comp.arch
Subject: Re: The value of floating-point exceptions?
Date: Fri, 23 Jul 2021 22:36 +0100 (BST)
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <memo.20210723223630.14132H@jgd.cix.co.uk>
References: <fc5a33d0-7c17-4855-8ab3-162884bd6b7bn@googlegroups.com>
Reply-To: jgd@cix.co.uk
Injection-Info: reader02.eternal-september.org; posting-host="2591ffe9728f9cee61c86873f38afeab";
logging-data="2440"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19a+GBw+xs3LFUk3ptbqDwDXJAyu9AZH+I="
Cancel-Lock: sha1:HvXbR5U/sNHaM+AY7sQIYU0e+to=
 by: John Dallman - Fri, 23 Jul 2021 21:36 UTC

In article <fc5a33d0-7c17-4855-8ab3-162884bd6b7bn@googlegroups.com>,
jsavard@ecn.ab.ca (Quadibloc) wrote:

> Since IEEE 754, in its original form, simply ratified what Intel
> had planned to include in its forthcoming (but then secret)
> 8087, though, a knowledge of hardware certainly was...
> applied... to its contents, even if the committee that signed
> off on it did not include hardware experts.

At that stage, Intel do not seem to have understood very well how to make
/fast/ hardware. Remember the iAPX 432?

The obvious design goal of the 8087 was very compact code, leading to the
floating-point register stack, and its bad effects on IPC. Its arithmetic
works fine, but it seems to have been intended for assembly language
programming, rather than compiled languages.

John

Re: The value of floating-point exceptions?

<sdfcrn$2s3$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19100&group=comp.arch#19100

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: cr88...@gmail.com (BGB)
Newsgroups: comp.arch
Subject: Re: The value of floating-point exceptions?
Date: Fri, 23 Jul 2021 16:37:57 -0500
Organization: A noiseless patient Spider
Lines: 31
Message-ID: <sdfcrn$2s3$1@dont-email.me>
References: <sd9a9h$ro6$1@dont-email.me>
<memo.20210721153537.10680P@jgd.cix.co.uk>
<e9c738bd-7c0e-4b3b-9385-3a0d0658b059n@googlegroups.com>
<a74c6bf2-9ad1-4969-b3cb-b650ae8ebdadn@googlegroups.com>
<sde6m7$kr1$1@dont-email.me> <sde74m$nio$1@dont-email.me>
<7cf5713e-f138-488b-9ccf-d85df84c50can@googlegroups.com>
<e7e0b9a2-7990-4ec8-9c40-a6e9a07bd306n@googlegroups.com>
<905454f4-6aa8-4a4e-b0ef-6b55340c61d7n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 23 Jul 2021 21:37:59 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="f2d0ea6b3e8abb37b40547670b01634c";
logging-data="2947"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+dcIjBQSki7+Y14PElY+3R"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.12.0
Cancel-Lock: sha1:XaF83zIONbulLfsltd8SEAr1xaQ=
In-Reply-To: <905454f4-6aa8-4a4e-b0ef-6b55340c61d7n@googlegroups.com>
Content-Language: en-US
 by: BGB - Fri, 23 Jul 2021 21:37 UTC

On 7/23/2021 12:45 PM, Quadibloc wrote:
> On Friday, July 23, 2021 at 9:30:20 AM UTC-6, MitchAlsup wrote:
>
>> No, doubling the widths just hides the problem and makes the actual
>> problem harder to find. You can take the point of view that that is
>> enough, but it is not in reality.
>
> It's enough to get one Moon lander on the surface. But solving the
> real problem is still better - but it's nice if there's a way to meet
> deadlines and the like.
>

I would expect for a physical system, the inherent "noisiness" of
physical reality would matter a lot more for the outcome a lot more than
any bit-exact arithmetic would help make the landing.

Some expertly crafted and computed flight plan could be thrown off by
much larger factors like which direction the wind was blowing during
liftoff, solar wind or flars blowing the spacecraft slightly off course,
collisions with space dust, ...

Presumably these missions have some sort of closed-loop control, such as
course-correction, ability to detect the distance from the target, ...

Granted, this is assuming it is using sufficient numerical precision.
Trying to do long range navigation using binary32 or similar is probably
just asking for it to crash into the surface (or miss the moon entirely,
say because jitter in the math miscalculated the location of the moon by
like 150km or something, ...).

Re: The value of floating-point exceptions?

<2ec34aff-417e-4e2c-ad88-c500e17b1e78n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19101&group=comp.arch#19101

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a37:9ec1:: with SMTP id h184mr6907017qke.0.1627079038983;
Fri, 23 Jul 2021 15:23:58 -0700 (PDT)
X-Received: by 2002:aca:dac5:: with SMTP id r188mr4483824oig.78.1627079038760;
Fri, 23 Jul 2021 15:23:58 -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.arch
Date: Fri, 23 Jul 2021 15:23:58 -0700 (PDT)
In-Reply-To: <sdfcrn$2s3$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:b4bb:2cda:188c:261;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:b4bb:2cda:188c:261
References: <sd9a9h$ro6$1@dont-email.me> <memo.20210721153537.10680P@jgd.cix.co.uk>
<e9c738bd-7c0e-4b3b-9385-3a0d0658b059n@googlegroups.com> <a74c6bf2-9ad1-4969-b3cb-b650ae8ebdadn@googlegroups.com>
<sde6m7$kr1$1@dont-email.me> <sde74m$nio$1@dont-email.me> <7cf5713e-f138-488b-9ccf-d85df84c50can@googlegroups.com>
<e7e0b9a2-7990-4ec8-9c40-a6e9a07bd306n@googlegroups.com> <905454f4-6aa8-4a4e-b0ef-6b55340c61d7n@googlegroups.com>
<sdfcrn$2s3$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2ec34aff-417e-4e2c-ad88-c500e17b1e78n@googlegroups.com>
Subject: Re: The value of floating-point exceptions?
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Fri, 23 Jul 2021 22:23:58 +0000
Content-Type: text/plain; charset="UTF-8"
 by: MitchAlsup - Fri, 23 Jul 2021 22:23 UTC

On Friday, July 23, 2021 at 4:38:02 PM UTC-5, BGB wrote:
> On 7/23/2021 12:45 PM, Quadibloc wrote:
> > On Friday, July 23, 2021 at 9:30:20 AM UTC-6, MitchAlsup wrote:
> >
> >> No, doubling the widths just hides the problem and makes the actual
> >> problem harder to find. You can take the point of view that that is
> >> enough, but it is not in reality.
> >
> > It's enough to get one Moon lander on the surface. But solving the
> > real problem is still better - but it's nice if there's a way to meet
> > deadlines and the like.
> >
> I would expect for a physical system, the inherent "noisiness" of
> physical reality would matter a lot more for the outcome a lot more than
> any bit-exact arithmetic would help make the landing.
>
> Some expertly crafted and computed flight plan could be thrown off by
> much larger factors like which direction the wind was blowing during
> liftoff, solar wind or flars blowing the spacecraft slightly off course,
> collisions with space dust, ...
>
> Presumably these missions have some sort of closed-loop control, such as
> course-correction, ability to detect the distance from the target, ...
<
Only if you intend "closed loop" to incorporate ground based radars and
using a on spacecraft sextant to measure some star "angles", and having
ground based computers figure out the adjustments and radio them up
to the spacecraft, punching them into the computer and causing a correction
burn; as "closed loop".
<
But this is an important point:: many feed back systems have enough
time between corrections that the accuracy of the FP numbers did not
have to be "all that great".
>
>
> Granted, this is assuming it is using sufficient numerical precision.
> Trying to do long range navigation using binary32 or similar is probably
> just asking for it to crash into the surface (or miss the moon entirely,
> say because jitter in the math miscalculated the location of the moon by
> like 150km or something, ...).
<
Remember we are still flying fighter jets with computer controls where the
jet will invert itself when crossing the equator--all because it too too many
instructions to get either SIN() or COS() right.

Re: The value of floating-point exceptions?

<bd1e72c0-b8b6-4fab-a5a2-77fff6dcf3b0n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19102&group=comp.arch#19102

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ac8:5645:: with SMTP id 5mr6009212qtt.200.1627082563273; Fri, 23 Jul 2021 16:22:43 -0700 (PDT)
X-Received: by 2002:a05:6808:6cc:: with SMTP id m12mr10278889oih.51.1627082563093; Fri, 23 Jul 2021 16:22:43 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!feeder5.feed.usenet.farm!feeder1.feed.usenet.farm!feed.usenet.farm!tr1.eu1.usenetexpress.com!feeder.usenetexpress.com!tr3.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Fri, 23 Jul 2021 16:22:42 -0700 (PDT)
In-Reply-To: <0c62671a-5c9a-4542-ad87-8703d6a21e11n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:56a:f39a:d100:4173:8be8:d3ad:176c; posting-account=1nOeKQkAAABD2jxp4Pzmx9Hx5g9miO8y
NNTP-Posting-Host: 2001:56a:f39a:d100:4173:8be8:d3ad:176c
References: <sd9a9h$ro6$1@dont-email.me> <memo.20210721153537.10680P@jgd.cix.co.uk> <e9c738bd-7c0e-4b3b-9385-3a0d0658b059n@googlegroups.com> <a74c6bf2-9ad1-4969-b3cb-b650ae8ebdadn@googlegroups.com> <sde6m7$kr1$1@dont-email.me> <sde74m$nio$1@dont-email.me> <7cf5713e-f138-488b-9ccf-d85df84c50can@googlegroups.com> <sdeill$7ct$1@dont-email.me> <2021Jul23.204058@mips.complang.tuwien.ac.at> <0c62671a-5c9a-4542-ad87-8703d6a21e11n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <bd1e72c0-b8b6-4fab-a5a2-77fff6dcf3b0n@googlegroups.com>
Subject: Re: The value of floating-point exceptions?
From: jsav...@ecn.ab.ca (Quadibloc)
Injection-Date: Fri, 23 Jul 2021 23:22:43 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 59
 by: Quadibloc - Fri, 23 Jul 2021 23:22 UTC

On Friday, July 23, 2021 at 1:13:48 PM UTC-6, MitchAlsup wrote:
> On Friday, July 23, 2021 at 1:42:56 PM UTC-5, Anton Ertl wrote:

> > should give the same result as
> >
> > a=b
> <
> a==b

That's only a correction if you assume all pseudocode must be in C.

On my web page, I have defined a higher-level language where a
multiple assignment statement doesn't look like

a,b,c=5

or

a=b=c=5

but instead

. a/b/c=5

and there is a reason for that. Or maybe more than one reason:

1) The "." is a short form of the keyword "LET". By beginning all statements
with a keyword, the need for reserved words in the language can be completely
avoided, without complicated gyrations as done in FORTRAN.

2) A READ statement may look like this:

READ [5,10,END=99,ERR=999] X,Y,Z

therefore the syntax of the language must allow assignments, not just expressions,
to be passed as arguments to subroutines.

3) The following statement assigns _T (true) to L1 and L2 if I and J are equal,
and _F to L1 and L2 otherwise.

. L1/L2=I=J

Only the first equals sign in an assignment statement indicates an assignment.
Within the expression following that equals sign, any other equals signs are
equality operators.
Therefore, the equals sign can't be used as a separator for multiple assignments.
Neither can the comma, because then you're breaking the assignment into two
pieces; a READ statement may _also_ look like this:

READ [5,10,END/ERR=99] X,Y,Z

Essentially, the language is intended to look a lot like FORTRAN, but it
also borrows from AWK the idea of having a comma at the end of the text
on a line indicate a continuation (no semicolons after each statement).
Parentheses are used within expressions to control the order of evaluation,
for function argument lists, _and_ array subscripts; it's in the case of the
device, format clause in I/O statements that square brackets were needed
to avoid an ambiguity.

John Savard

Re: The value of floating-point exceptions?

<sdfo4g$utt$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19107&group=comp.arch#19107

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: cr88...@gmail.com (BGB)
Newsgroups: comp.arch
Subject: Re: The value of floating-point exceptions?
Date: Fri, 23 Jul 2021 19:50:21 -0500
Organization: A noiseless patient Spider
Lines: 67
Message-ID: <sdfo4g$utt$1@dont-email.me>
References: <sd9a9h$ro6$1@dont-email.me>
<memo.20210721153537.10680P@jgd.cix.co.uk>
<e9c738bd-7c0e-4b3b-9385-3a0d0658b059n@googlegroups.com>
<a74c6bf2-9ad1-4969-b3cb-b650ae8ebdadn@googlegroups.com>
<sde6m7$kr1$1@dont-email.me> <sde74m$nio$1@dont-email.me>
<7cf5713e-f138-488b-9ccf-d85df84c50can@googlegroups.com>
<e7e0b9a2-7990-4ec8-9c40-a6e9a07bd306n@googlegroups.com>
<905454f4-6aa8-4a4e-b0ef-6b55340c61d7n@googlegroups.com>
<sdfcrn$2s3$1@dont-email.me>
<2ec34aff-417e-4e2c-ad88-c500e17b1e78n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 24 Jul 2021 00:50:24 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="744bdb8b0fd5aa69537be1cde3aba9ee";
logging-data="31677"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18u45HNydMCV9QN3FoeHofU"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.12.0
Cancel-Lock: sha1:gk1W9+KLts8oYnQ49rYdsBBHU7A=
In-Reply-To: <2ec34aff-417e-4e2c-ad88-c500e17b1e78n@googlegroups.com>
Content-Language: en-US
 by: BGB - Sat, 24 Jul 2021 00:50 UTC

On 7/23/2021 5:23 PM, MitchAlsup wrote:
> On Friday, July 23, 2021 at 4:38:02 PM UTC-5, BGB wrote:
>> On 7/23/2021 12:45 PM, Quadibloc wrote:
>>> On Friday, July 23, 2021 at 9:30:20 AM UTC-6, MitchAlsup wrote:
>>>
>>>> No, doubling the widths just hides the problem and makes the actual
>>>> problem harder to find. You can take the point of view that that is
>>>> enough, but it is not in reality.
>>>
>>> It's enough to get one Moon lander on the surface. But solving the
>>> real problem is still better - but it's nice if there's a way to meet
>>> deadlines and the like.
>>>
>> I would expect for a physical system, the inherent "noisiness" of
>> physical reality would matter a lot more for the outcome a lot more than
>> any bit-exact arithmetic would help make the landing.
>>
>> Some expertly crafted and computed flight plan could be thrown off by
>> much larger factors like which direction the wind was blowing during
>> liftoff, solar wind or flars blowing the spacecraft slightly off course,
>> collisions with space dust, ...
>>
>> Presumably these missions have some sort of closed-loop control, such as
>> course-correction, ability to detect the distance from the target, ...
> <
> Only if you intend "closed loop" to incorporate ground based radars and
> using a on spacecraft sextant to measure some star "angles", and having
> ground based computers figure out the adjustments and radio them up
> to the spacecraft, punching them into the computer and causing a correction
> burn; as "closed loop".
> <
> But this is an important point:: many feed back systems have enough
> time between corrections that the accuracy of the FP numbers did not
> have to be "all that great".

More or less, they would presumably have some way to determine if they
are on-course to the target, and some hydrazine rockets or similar to
allow for fine adjustment.

But, yeah, I meant as opposed to doing the space launch and then trying
to fly an entirely precomputed path and then assume that the spacecraft
gets to its destination if one did all the math correctly (and then have
it "all go south" because the wind changed direction on launch day
relative to what was calculated in the simulations; or because the
spacecraft was getting pushed by solar winds, ...).

>>
>>
>> Granted, this is assuming it is using sufficient numerical precision.
>> Trying to do long range navigation using binary32 or similar is probably
>> just asking for it to crash into the surface (or miss the moon entirely,
>> say because jitter in the math miscalculated the location of the moon by
>> like 150km or something, ...).
> <
> Remember we are still flying fighter jets with computer controls where the
> jet will invert itself when crossing the equator--all because it too too many
> instructions to get either SIN() or COS() right.
>

Hmm...

I think I had also remembered something like fighter jet computers
crashing when flying over parts of Jordan or similar, because they were
not meant to deal with the altitude going negative...

Re: The value of floating-point exceptions?

<sdfobd$14q7$3@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19108&group=comp.arch#19108

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!aioe.org!ux6ld97kLXxG8kVFFLnoWg.user.46.165.242.75.POSTED!not-for-mail
From: chris.m....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.arch
Subject: Re: The value of floating-point exceptions?
Date: Fri, 23 Jul 2021 17:54:05 -0700
Organization: Aioe.org NNTP Server
Message-ID: <sdfobd$14q7$3@gioia.aioe.org>
References: <sd9a9h$ro6$1@dont-email.me>
<memo.20210721153537.10680P@jgd.cix.co.uk>
<e9c738bd-7c0e-4b3b-9385-3a0d0658b059n@googlegroups.com>
<a74c6bf2-9ad1-4969-b3cb-b650ae8ebdadn@googlegroups.com>
<sde6m7$kr1$1@dont-email.me> <sde74m$nio$1@dont-email.me>
<7cf5713e-f138-488b-9ccf-d85df84c50can@googlegroups.com>
<e7e0b9a2-7990-4ec8-9c40-a6e9a07bd306n@googlegroups.com>
<905454f4-6aa8-4a4e-b0ef-6b55340c61d7n@googlegroups.com>
<sdfcrn$2s3$1@dont-email.me>
<2ec34aff-417e-4e2c-ad88-c500e17b1e78n@googlegroups.com>
<sdfo4g$utt$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="37703"; posting-host="ux6ld97kLXxG8kVFFLnoWg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.12.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-US
 by: Chris M. Thomasson - Sat, 24 Jul 2021 00:54 UTC

On 7/23/2021 5:50 PM, BGB wrote:
> On 7/23/2021 5:23 PM, MitchAlsup wrote:
>> On Friday, July 23, 2021 at 4:38:02 PM UTC-5, BGB wrote:
>>> On 7/23/2021 12:45 PM, Quadibloc wrote:
>>>> On Friday, July 23, 2021 at 9:30:20 AM UTC-6, MitchAlsup wrote:
>>>>
>>>>> No, doubling the widths just hides the problem and makes the actual
>>>>> problem harder to find. You can take the point of view that that is
>>>>> enough, but it is not in reality.
>>>>
>>>> It's enough to get one Moon lander on the surface. But solving the
>>>> real problem is still better - but it's nice if there's a way to meet
>>>> deadlines and the like.
>>>>
>>> I would expect for a physical system, the inherent "noisiness" of
>>> physical reality would matter a lot more for the outcome a lot more than
>>> any bit-exact arithmetic would help make the landing.
>>>
>>> Some expertly crafted and computed flight plan could be thrown off by
>>> much larger factors like which direction the wind was blowing during
>>> liftoff, solar wind or flars blowing the spacecraft slightly off course,
>>> collisions with space dust, ...
>>>
>>> Presumably these missions have some sort of closed-loop control, such as
>>> course-correction, ability to detect the distance from the target, ...
>> <
>> Only if you intend "closed loop" to incorporate ground based radars and
>> using a on spacecraft sextant to measure some star "angles", and having
>> ground based computers figure out the adjustments and radio them up
>> to the spacecraft, punching them into the computer and causing a
>> correction
>> burn; as "closed loop".
>> <
>> But this is an important point:: many feed back systems have enough
>> time between corrections that the accuracy of the FP numbers did not
>> have to be "all that great".
>
> More or less, they would presumably have some way to determine if they
> are on-course to the target, and some hydrazine rockets or similar to
> allow for fine adjustment.
>
>
> But, yeah, I meant as opposed to doing the space launch and then trying
> to fly an entirely precomputed path and then assume that the spacecraft
> gets to its destination if one did all the math correctly (and then have
> it "all go south" because the wind changed direction on launch day
> relative to what was calculated in the simulations; or because the
> spacecraft was getting pushed by solar winds, ...).
>
>
>>>
>>>
>>> Granted, this is assuming it is using sufficient numerical precision.
>>> Trying to do long range navigation using binary32 or similar is probably
>>> just asking for it to crash into the surface (or miss the moon entirely,
>>> say because jitter in the math miscalculated the location of the moon by
>>> like 150km or something, ...).
>> <
>> Remember we are still flying fighter jets with computer controls where
>> the
>> jet will invert itself when crossing the equator--all because it too
>> too many
>> instructions to get either SIN() or COS() right.
>>
>
> Hmm...
>
> I think I had also remembered something like fighter jet computers
> crashing when flying over parts of Jordan or similar, because they were
> not meant to deal with the altitude going negative...
>

Skinwalker ranch made a radar altimeter made my Garmin report around 40
feet to ground when they were several thousand of feet off the ground.
5000 feet would be 10000 feet from sea level.

Re: The value of floating-point exceptions?

<d3b65e22-c7de-4bf3-a650-63ca49ca623cn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19111&group=comp.arch#19111

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:620a:13fc:: with SMTP id h28mr8292512qkl.370.1627106495011;
Fri, 23 Jul 2021 23:01:35 -0700 (PDT)
X-Received: by 2002:a9d:5603:: with SMTP id e3mr5256726oti.178.1627106494812;
Fri, 23 Jul 2021 23:01:34 -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.arch
Date: Fri, 23 Jul 2021 23:01:34 -0700 (PDT)
In-Reply-To: <2ec34aff-417e-4e2c-ad88-c500e17b1e78n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:56a:f39a:d100:20ce:a771:e90b:a3aa;
posting-account=1nOeKQkAAABD2jxp4Pzmx9Hx5g9miO8y
NNTP-Posting-Host: 2001:56a:f39a:d100:20ce:a771:e90b:a3aa
References: <sd9a9h$ro6$1@dont-email.me> <memo.20210721153537.10680P@jgd.cix.co.uk>
<e9c738bd-7c0e-4b3b-9385-3a0d0658b059n@googlegroups.com> <a74c6bf2-9ad1-4969-b3cb-b650ae8ebdadn@googlegroups.com>
<sde6m7$kr1$1@dont-email.me> <sde74m$nio$1@dont-email.me> <7cf5713e-f138-488b-9ccf-d85df84c50can@googlegroups.com>
<e7e0b9a2-7990-4ec8-9c40-a6e9a07bd306n@googlegroups.com> <905454f4-6aa8-4a4e-b0ef-6b55340c61d7n@googlegroups.com>
<sdfcrn$2s3$1@dont-email.me> <2ec34aff-417e-4e2c-ad88-c500e17b1e78n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d3b65e22-c7de-4bf3-a650-63ca49ca623cn@googlegroups.com>
Subject: Re: The value of floating-point exceptions?
From: jsav...@ecn.ab.ca (Quadibloc)
Injection-Date: Sat, 24 Jul 2021 06:01:35 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Quadibloc - Sat, 24 Jul 2021 06:01 UTC

On Friday, July 23, 2021 at 4:23:59 PM UTC-6, MitchAlsup wrote:

> But this is an important point:: many feed back systems have enough
> time between corrections that the accuracy of the FP numbers did not
> have to be "all that great".

I remember specifically that one particular failed Ariane launch was
held up as what bad floating-point can cause... so, of course, while there
are cases where feedback makes things less of an issue, there are other
cases where numerical accuracy is critical.

John Savard

Re: The value of floating-point exceptions?

<b195fbdb-0cab-44a9-bb9d-5fd0c469fc10n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19112&group=comp.arch#19112

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ac8:5546:: with SMTP id o6mr6941127qtr.69.1627106712728;
Fri, 23 Jul 2021 23:05:12 -0700 (PDT)
X-Received: by 2002:aca:c7cb:: with SMTP id x194mr5258536oif.119.1627106712516;
Fri, 23 Jul 2021 23:05:12 -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.arch
Date: Fri, 23 Jul 2021 23:05:12 -0700 (PDT)
In-Reply-To: <d3b65e22-c7de-4bf3-a650-63ca49ca623cn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:56a:f39a:d100:20ce:a771:e90b:a3aa;
posting-account=1nOeKQkAAABD2jxp4Pzmx9Hx5g9miO8y
NNTP-Posting-Host: 2001:56a:f39a:d100:20ce:a771:e90b:a3aa
References: <sd9a9h$ro6$1@dont-email.me> <memo.20210721153537.10680P@jgd.cix.co.uk>
<e9c738bd-7c0e-4b3b-9385-3a0d0658b059n@googlegroups.com> <a74c6bf2-9ad1-4969-b3cb-b650ae8ebdadn@googlegroups.com>
<sde6m7$kr1$1@dont-email.me> <sde74m$nio$1@dont-email.me> <7cf5713e-f138-488b-9ccf-d85df84c50can@googlegroups.com>
<e7e0b9a2-7990-4ec8-9c40-a6e9a07bd306n@googlegroups.com> <905454f4-6aa8-4a4e-b0ef-6b55340c61d7n@googlegroups.com>
<sdfcrn$2s3$1@dont-email.me> <2ec34aff-417e-4e2c-ad88-c500e17b1e78n@googlegroups.com>
<d3b65e22-c7de-4bf3-a650-63ca49ca623cn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b195fbdb-0cab-44a9-bb9d-5fd0c469fc10n@googlegroups.com>
Subject: Re: The value of floating-point exceptions?
From: jsav...@ecn.ab.ca (Quadibloc)
Injection-Date: Sat, 24 Jul 2021 06:05:12 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Quadibloc - Sat, 24 Jul 2021 06:05 UTC

On Saturday, July 24, 2021 at 12:01:35 AM UTC-6, Quadibloc wrote:

> I remember specifically that one particular failed Ariane launch was
> held up as what bad floating-point can cause...

Ah. A Google search led me to what really happened.

The maiden flight of Ariane 5 failed because conversion from
floating-point to 16-bit integer caused an exception, as the
floating-point valule was not within the range of such integers.

No doubt bad software design, but not really necessarily
about the kind of numerical analysis concern that IEEE 754
addresses.

John Savard

Re: The value of floating-point exceptions?

<sdgek0$70h$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19113&group=comp.arch#19113

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: cr88...@gmail.com (BGB)
Newsgroups: comp.arch
Subject: Re: The value of floating-point exceptions?
Date: Sat, 24 Jul 2021 02:14:05 -0500
Organization: A noiseless patient Spider
Lines: 42
Message-ID: <sdgek0$70h$1@dont-email.me>
References: <sd9a9h$ro6$1@dont-email.me>
<memo.20210721153537.10680P@jgd.cix.co.uk>
<e9c738bd-7c0e-4b3b-9385-3a0d0658b059n@googlegroups.com>
<a74c6bf2-9ad1-4969-b3cb-b650ae8ebdadn@googlegroups.com>
<sde6m7$kr1$1@dont-email.me> <sde74m$nio$1@dont-email.me>
<7cf5713e-f138-488b-9ccf-d85df84c50can@googlegroups.com>
<e7e0b9a2-7990-4ec8-9c40-a6e9a07bd306n@googlegroups.com>
<905454f4-6aa8-4a4e-b0ef-6b55340c61d7n@googlegroups.com>
<sdfcrn$2s3$1@dont-email.me>
<2ec34aff-417e-4e2c-ad88-c500e17b1e78n@googlegroups.com>
<d3b65e22-c7de-4bf3-a650-63ca49ca623cn@googlegroups.com>
<b195fbdb-0cab-44a9-bb9d-5fd0c469fc10n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 24 Jul 2021 07:14:08 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="744bdb8b0fd5aa69537be1cde3aba9ee";
logging-data="7185"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/e4w9huZjt8I/pTjO92LfR"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.12.0
Cancel-Lock: sha1:WDRGvmk5UqFhZOZyA+NId5yOBF4=
In-Reply-To: <b195fbdb-0cab-44a9-bb9d-5fd0c469fc10n@googlegroups.com>
Content-Language: en-US
 by: BGB - Sat, 24 Jul 2021 07:14 UTC

On 7/24/2021 1:05 AM, Quadibloc wrote:
> On Saturday, July 24, 2021 at 12:01:35 AM UTC-6, Quadibloc wrote:
>
>> I remember specifically that one particular failed Ariane launch was
>> held up as what bad floating-point can cause...
>
> Ah. A Google search led me to what really happened.
>
> The maiden flight of Ariane 5 failed because conversion from
> floating-point to 16-bit integer caused an exception, as the
> floating-point valule was not within the range of such integers.
>
> No doubt bad software design, but not really necessarily
> about the kind of numerical analysis concern that IEEE 754
> addresses.
>

IME:
Inexact rounding is hardly ever the source of problems (excluding
integer-exact math in codecs, but this sort of stuff is typically
fixed-point).

However, more serious bugs, like unexpected overflow, saturation, or
traps, these sorts of things can ruin ones' day.

Likewise for algorithms whose domain is "all real numbers except zero",
which just so happens to fail catastrophically and nuke the program if
the input just so happens to be zero.

Insufficient precision can also be a source of problems.

Issues with the use of single precision coordinates in games trying to
deal with large worlds is a fairly common example (typically a lot of
workarounds are needed to make all the math work for worlds much larger
than a few km or so).

> John Savard
>

Re: The value of floating-point exceptions?

<sdgjdr$4qv$1@newsreader4.netcologne.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19116&group=comp.arch#19116

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2a0a-a540-a40-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoe...@netcologne.de (Thomas Koenig)
Newsgroups: comp.arch
Subject: Re: The value of floating-point exceptions?
Date: Sat, 24 Jul 2021 08:36:11 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <sdgjdr$4qv$1@newsreader4.netcologne.de>
References: <sd9a9h$ro6$1@dont-email.me>
<memo.20210721153537.10680P@jgd.cix.co.uk>
<e9c738bd-7c0e-4b3b-9385-3a0d0658b059n@googlegroups.com>
<a74c6bf2-9ad1-4969-b3cb-b650ae8ebdadn@googlegroups.com>
<sde6m7$kr1$1@dont-email.me> <sde74m$nio$1@dont-email.me>
<7cf5713e-f138-488b-9ccf-d85df84c50can@googlegroups.com>
<e7e0b9a2-7990-4ec8-9c40-a6e9a07bd306n@googlegroups.com>
<905454f4-6aa8-4a4e-b0ef-6b55340c61d7n@googlegroups.com>
<sdfcrn$2s3$1@dont-email.me>
Injection-Date: Sat, 24 Jul 2021 08:36:11 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2a0a-a540-a40-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2a0a:a540:a40:0:7285:c2ff:fe6c:992d";
logging-data="4959"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Sat, 24 Jul 2021 08:36 UTC

BGB <cr88192@gmail.com> schrieb:
> On 7/23/2021 12:45 PM, Quadibloc wrote:
>> On Friday, July 23, 2021 at 9:30:20 AM UTC-6, MitchAlsup wrote:
>>
>>> No, doubling the widths just hides the problem and makes the actual
>>> problem harder to find. You can take the point of view that that is
>>> enough, but it is not in reality.
>>
>> It's enough to get one Moon lander on the surface. But solving the
>> real problem is still better - but it's nice if there's a way to meet
>> deadlines and the like.
>>
>
> I would expect for a physical system, the inherent "noisiness" of
> physical reality would matter a lot more for the outcome a lot more than
> any bit-exact arithmetic would help make the landing.
>
> Some expertly crafted and computed flight plan could be thrown off by
> much larger factors like which direction the wind was blowing during
> liftoff, solar wind or flars blowing the spacecraft slightly off course,
> collisions with space dust, ...

One major issue was gravitational anomalies of the Moon, which are
big enough to have a significant impact on the orbit of spacecraft.

> Presumably these missions have some sort of closed-loop control, such as
> course-correction, ability to detect the distance from the target, ...

Having a spacecraft travel around in space is an engieering problem.
You always have error bars on every measurement and assumption -
mass of your spacecraft, duration and efficiency of a burn, actual
mass expended on a burn, orientation, ...

Any of the above uncertainties is _much_ higher than the floating
point precision of a 32-bit real, let alone of a 64-bit real.

Of course, if you subtract two numbers of almost equal magnigude,
that could be much different...

This is why space missions have course corrections somehwere in
the middle of their trajectory. After sufficient time has elapsed
to gather data on the velocity and position of the spacecraft, but
not yet enough that a course correction would be too expensive,
you alter the spacecraft's velocity by a relatively small amount
of delta v.

> Granted, this is assuming it is using sufficient numerical precision.
> Trying to do long range navigation using binary32 or similar is probably
> just asking for it to crash into the surface (or miss the moon entirely,
> say because jitter in the math miscalculated the location of the moon by
> like 150km or something, ...).

A few years ago (pre-Corona) I visited the Space Center in Houston.
A tour guide for the Saturn-V on exhibition there told the group
that he had worked on the courses for Apollo, and that they had
actually mostly used analytical methods. I was a bit surprised
at that, I would have thought numerical solution of ODEs would
have been employed more.

Re: The value of floating-point exceptions?

<sdgji1$4qv$2@newsreader4.netcologne.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19117&group=comp.arch#19117

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2a0a-a540-a40-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoe...@netcologne.de (Thomas Koenig)
Newsgroups: comp.arch
Subject: Re: The value of floating-point exceptions?
Date: Sat, 24 Jul 2021 08:38:25 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <sdgji1$4qv$2@newsreader4.netcologne.de>
References: <sd9a9h$ro6$1@dont-email.me>
<memo.20210721153537.10680P@jgd.cix.co.uk>
<e9c738bd-7c0e-4b3b-9385-3a0d0658b059n@googlegroups.com>
<a74c6bf2-9ad1-4969-b3cb-b650ae8ebdadn@googlegroups.com>
<sde6m7$kr1$1@dont-email.me> <sde74m$nio$1@dont-email.me>
<7cf5713e-f138-488b-9ccf-d85df84c50can@googlegroups.com>
<e7e0b9a2-7990-4ec8-9c40-a6e9a07bd306n@googlegroups.com>
<905454f4-6aa8-4a4e-b0ef-6b55340c61d7n@googlegroups.com>
<sdfcrn$2s3$1@dont-email.me>
<2ec34aff-417e-4e2c-ad88-c500e17b1e78n@googlegroups.com>
Injection-Date: Sat, 24 Jul 2021 08:38:25 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2a0a-a540-a40-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2a0a:a540:a40:0:7285:c2ff:fe6c:992d";
logging-data="4959"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Sat, 24 Jul 2021 08:38 UTC

MitchAlsup <MitchAlsup@aol.com> schrieb:

> Remember we are still flying fighter jets with computer controls where the
> jet will invert itself when crossing the equator--all because it too too many
> instructions to get either SIN() or COS() right.

From what I read, that bug was found and fixed in 1986.

Re: The value of floating-point exceptions?

<sdgkmo$5kb$1@newsreader4.netcologne.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19118&group=comp.arch#19118

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2a0a-a540-a40-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoe...@netcologne.de (Thomas Koenig)
Newsgroups: comp.arch
Subject: Re: The value of floating-point exceptions?
Date: Sat, 24 Jul 2021 08:58:00 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <sdgkmo$5kb$1@newsreader4.netcologne.de>
References: <sd9a9h$ro6$1@dont-email.me>
<memo.20210721153537.10680P@jgd.cix.co.uk>
<e9c738bd-7c0e-4b3b-9385-3a0d0658b059n@googlegroups.com>
<a74c6bf2-9ad1-4969-b3cb-b650ae8ebdadn@googlegroups.com>
<sde6m7$kr1$1@dont-email.me> <sde74m$nio$1@dont-email.me>
<7cf5713e-f138-488b-9ccf-d85df84c50can@googlegroups.com>
<e7e0b9a2-7990-4ec8-9c40-a6e9a07bd306n@googlegroups.com>
<sdf4t3$6cl$2@newsreader4.netcologne.de>
<c0917435-65c8-45f1-b745-5fd7ff4f58c0n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 24 Jul 2021 08:58:00 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2a0a-a540-a40-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2a0a:a540:a40:0:7285:c2ff:fe6c:992d";
logging-data="5771"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Sat, 24 Jul 2021 08:58 UTC

MitchAlsup <MitchAlsup@aol.com> schrieb:
> On Friday, July 23, 2021 at 2:22:13 PM UTC-5, Thomas Koenig wrote:
>> MitchAlsup <Mitch...@aol.com> schrieb:
>> > IEEE 754 was put together by people who really understood FP arithmetic
>> > but HW not so much.
><
>> Who was on that committee?
><
> Ivan will be here shortly to list the perpetrators.
>>
>> I have read that Intel and Motorola were there, but what about
>> Cray, CDC or IBM? They should have had some understanding of the
>> difficulties involved (but then again at least Cray was famous
>> for not caring about such niceties, and IBM was still caught in
>> their horrible radix-16 system at that time and probably could
>> not even dream that they would one day implement another floating
>> point format).
><
> IBM's was worse the simply radix 16, it was also a truncation system
> with a guard digit (½ a byte) in calculations. To make maters worse, its
> competitors were 36-bit, 48-bit, and 60-bit (single precision).

At the time it was designed, yes. Even Henry S. Warren, who worked
for IBM, has a scathing page dedicated to that particular decision.

At the time IEEE was formulated, the 32-bit systems had pretty
much taken over, I think (of course Cray used 64 bit for single
precision, they had no 32-bit format).

Re: The value of floating-point exceptions?

<2021Jul24.103757@mips.complang.tuwien.ac.at>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19119&group=comp.arch#19119

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.arch
Subject: Re: The value of floating-point exceptions?
Date: Sat, 24 Jul 2021 08:37:57 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 42
Distribution: world
Message-ID: <2021Jul24.103757@mips.complang.tuwien.ac.at>
References: <sd9a9h$ro6$1@dont-email.me> <memo.20210721153537.10680P@jgd.cix.co.uk> <e9c738bd-7c0e-4b3b-9385-3a0d0658b059n@googlegroups.com> <a74c6bf2-9ad1-4969-b3cb-b650ae8ebdadn@googlegroups.com> <sde6m7$kr1$1@dont-email.me> <sde74m$nio$1@dont-email.me> <7cf5713e-f138-488b-9ccf-d85df84c50can@googlegroups.com> <e7e0b9a2-7990-4ec8-9c40-a6e9a07bd306n@googlegroups.com> <sdf4t3$6cl$2@newsreader4.netcologne.de>
Injection-Info: reader02.eternal-september.org; posting-host="33a9a59b4e6b0975f5bffca868e1fab6";
logging-data="18171"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+NlN6ZZAsKa8ZGNRaACRMc"
Cancel-Lock: sha1:JBJ4E+4VH+GZ4mYlEIDr35qTEog=
X-newsreader: xrn 10.00-beta-3
 by: Anton Ertl - Sat, 24 Jul 2021 08:37 UTC

Thomas Koenig <tkoenig@netcologne.de> writes:
>MitchAlsup <MitchAlsup@aol.com> schrieb:
>
>> IEEE 754 was put together by people who really understood FP arithmetic
>> but HW not so much.
>
>Who was on that committee?

Obviously enough hardware manufacturers that IEEE 754 was very quickly
implemented in most new hardware (often with microcode or software
assist for denormal numbers).

>I have read that Intel and Motorola were there, but what about
>Cray, CDC or IBM?

IBM certainly adopted IEEE 754. CDC was on the way out by that time.

Concerning Cray: the followons (Cray Y-MP) to the old Cray designs
were of course compatible with the old designs, but Cray (the company)
also did the T3D and T3E, which used Alpha CPUs and thus IEEE 754.
But I think the question was more what Crays customers wanted. They
had earlier bought machines that put speed above correctness (IIRC for
division), so Cray had a reason to believe that their customers would
also choose speed over IEEE 754. However, Cray suffered difficult
times in the 1980s, so maybe there were too few customers who agreed
with that choice.

Anyway, given that we have fast IEEE 754 hardware, the IEEE 754 people
either understood hardware enough or were lucky (I think it was the
former). Admittedly the dynamic rounding mode stuff is slow or
expensive to implement on OoO CPUs, and to a lesser degree on
pipelined CPUs, and who knows how well the people on the IEEE 754
committee understood that (pipelining was not widely used at the time,
and OoO even less), but I think that those who want dynamic rounding
mode changes prefer slowness to not having it at all, and those who
claim it is unnecessary't should not care if it is slow; and the
hardware cost of slow dynamic rounding modes is small.

- anton
--
'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>

Re: The value of floating-point exceptions?

<2021Jul24.112832@mips.complang.tuwien.ac.at>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19120&group=comp.arch#19120

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.arch
Subject: Re: The value of floating-point exceptions?
Date: Sat, 24 Jul 2021 09:28:32 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 78
Message-ID: <2021Jul24.112832@mips.complang.tuwien.ac.at>
References: <fc5a33d0-7c17-4855-8ab3-162884bd6b7bn@googlegroups.com> <memo.20210723223630.14132H@jgd.cix.co.uk>
Injection-Info: reader02.eternal-september.org; posting-host="33a9a59b4e6b0975f5bffca868e1fab6";
logging-data="3677"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Mo6QzD1VcZcPscEKzc8pF"
Cancel-Lock: sha1:DTyAAqxy/gflF2xJx+1qaRoNVmk=
X-newsreader: xrn 10.00-beta-3
 by: Anton Ertl - Sat, 24 Jul 2021 09:28 UTC

jgd@cix.co.uk (John Dallman) writes:
>At that stage, Intel do not seem to have understood very well how to make
>/fast/ hardware. Remember the iAPX 432?

The iAPX 432 seems to be the overambitious project that growing
companies tend to engage in, many of which fail. IBM Stretch did not
achieve its performance goals, either, and was also considered a
failure.

By contrast, the 8087 seems to be very successful, and its
architecture even more so, surviving until this day (although with
competition from SSE2 since its introduction in 2000 and especially
since AMD64 in 2003, where SSE2 became the standard FP instruction set).

>The obvious design goal of the 8087 was very compact code, leading to the
>floating-point register stack, and its bad effects on IPC.

What bad effects on IPC do you mean? Earlier this year
<2021Jan8.194939@mips.complang.tuwien.ac.at>
<2021Jan9.075657@mips.complang.tuwien.ac.at> I measured daxpy
implemented in C:

void daxpy(double ra, double *f_x, double *f_y, long stride, unsigned long ucount)
{ for (; ucount>0; ucount--) {
*f_y += ra * *f_x;
f_x = (double *)(((char *)f_x)+stride);
f_y = (double *)(((char *)f_y)+stride);
}
}

and compiled with

gcc -O -mfpmath=387

and with

gcc -O -mfpmath=sse

The resulting code was:

387 SSE2
start: start:
fld %st(0) movapd %xmm0,%xmm1
fmull (%rdi) mulsd (%rdi),%xmm1
faddl (%rsi) addsd (%rsi),%xmm1
fstpl (%rsi) movsd %xmm1,(%rsi)
add %rdx,%rdi add %rdx,%rdi
add %rdx,%rsi add %rdx,%rsi
sub $0x1,%rcx sub $0x1,%rcx
jne start jne start

Both loops execute at 2 cycles/iteration (IPC=4) on a Skylake. I
don't see a bad effect in IPC from the stack architecture of the 387,
despite the 387 having taken a back seat since AMD64 became the
dominant instruction set on Intel CPUs.

>Its arithmetic
>works fine, but it seems to have been intended for assembly language
>programming, rather than compiled languages.

Compilers can generate code for stack machines just fine, actually it
is very easy to generate code for stack machines. Therefore, the
Burroughs B5500 architecture was designed as a stack architecture to
go with the Burroughs Algol compiler. The transputer (another stack
machine) was designed in tandem with the Occam language and compiler.
Both machines were not intended to be programmed much in assembly
language.

One case where register machines have an advantage is for partial
redundancy elimination (a generalization of common subexpression
elimination and loop-invariant code motion). I am positively
surprised by gcc keeping ra on the stack in the 387 example above.

- anton
--
'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>

Re: The value of floating-point exceptions?

<TZRKI.24285$Nq7.6581@fx33.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19121&group=comp.arch#19121

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!ecngs!feeder2.ecngs.de!178.20.174.213.MISMATCH!feeder1.feed.usenet.farm!feed.usenet.farm!peer02.ams4!peer.am4.highwinds-media.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx33.iad.POSTED!not-for-mail
Newsgroups: comp.arch
From: branimir...@gmail.com (Branimir Maksimovic)
Subject: Re: The value of floating-point exceptions?
References: <fc5a33d0-7c17-4855-8ab3-162884bd6b7bn@googlegroups.com>
<memo.20210723223630.14132H@jgd.cix.co.uk>
<2021Jul24.112832@mips.complang.tuwien.ac.at>
User-Agent: slrn/1.0.3 (Darwin)
Lines: 133
Message-ID: <TZRKI.24285$Nq7.6581@fx33.iad>
X-Complaints-To: abuse@usenet-news.net
NNTP-Posting-Date: Sat, 24 Jul 2021 10:31:15 UTC
Organization: usenet-news.net
Date: Sat, 24 Jul 2021 10:31:15 GMT
X-Received-Bytes: 6600
 by: Branimir Maksimovic - Sat, 24 Jul 2021 10:31 UTC

On 2021-07-24, Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
> jgd@cix.co.uk (John Dallman) writes:
>>At that stage, Intel do not seem to have understood very well how to make
>>/fast/ hardware. Remember the iAPX 432?
>
> The iAPX 432 seems to be the overambitious project that growing
> companies tend to engage in, many of which fail. IBM Stretch did not
> achieve its performance goals, either, and was also considered a
> failure.
>
> By contrast, the 8087 seems to be very successful, and its
> architecture even more so, surviving until this day (although with
> competition from SSE2 since its introduction in 2000 and especially
> since AMD64 in 2003, where SSE2 became the standard FP instruction set).
>
>>The obvious design goal of the 8087 was very compact code, leading to the
>>floating-point register stack, and its bad effects on IPC.
>
> What bad effects on IPC do you mean? Earlier this year
><2021Jan8.194939@mips.complang.tuwien.ac.at>
><2021Jan9.075657@mips.complang.tuwien.ac.at> I measured daxpy
> implemented in C:
>
> void daxpy(double ra, double *f_x, double *f_y, long stride, unsigned long ucount)
> {
> for (; ucount>0; ucount--) {
> *f_y += ra * *f_x;
> f_x = (double *)(((char *)f_x)+stride);
> f_y = (double *)(((char *)f_y)+stride);
> }
> }
>
> and compiled with
>
> gcc -O -mfpmath=387
>
> and with
>
> gcc -O -mfpmath=sse
>
> The resulting code was:
>
> 387 SSE2
> start: start:
> fld %st(0) movapd %xmm0,%xmm1
> fmull (%rdi) mulsd (%rdi),%xmm1
> faddl (%rsi) addsd (%rsi),%xmm1
> fstpl (%rsi) movsd %xmm1,(%rsi)
> add %rdx,%rdi add %rdx,%rdi
> add %rdx,%rsi add %rdx,%rsi
> sub $0x1,%rcx sub $0x1,%rcx
> jne start jne start
>
> Both loops execute at 2 cycles/iteration (IPC=4) on a Skylake. I
> don't see a bad effect in IPC from the stack architecture of the 387,
> despite the 387 having taken a back seat since AMD64 became the
> dominant instruction set on Intel CPUs.
>
>>Its arithmetic
>>works fine, but it seems to have been intended for assembly language
>>programming, rather than compiled languages.
>
> Compilers can generate code for stack machines just fine, actually it
> is very easy to generate code for stack machines. Therefore, the
> Burroughs B5500 architecture was designed as a stack architecture to
> go with the Burroughs Algol compiler. The transputer (another stack
> machine) was designed in tandem with the Occam language and compiler.
> Both machines were not intended to be programmed much in assembly
> language.
>
> One case where register machines have an advantage is for partial
> redundancy elimination (a generalization of common subexpression
> elimination and loop-invariant code motion). I am positively
> surprised by gcc keeping ra on the stack in the 387 example above.
>
> - anton
Could you provide test program?
I have tested : https://github.com/siposcsaba89/eigen_fast_math_test
on M1
-rw-r--r-- 1 bmaxa staff 9 Jul 24 12:25 .gitignore
-rw-r--r-- 1 bmaxa staff 14120 Jul 24 12:26 CMakeCache.txt
drwxr-xr-x 13 bmaxa staff 416 Jul 24 12:26 CMakeFiles
-rw-r--r-- 1 bmaxa staff 453 Jul 24 12:25 CMakeLists.txt
-rw-r--r-- 1 bmaxa staff 1069 Jul 24 12:25 LICENSE
-rw-r--r-- 1 bmaxa staff 5418 Jul 24 12:26 Makefile
-rw-r--r-- 1 bmaxa staff 56 Jul 24 12:25 README.md
-rw-r--r-- 1 bmaxa staff 1550 Jul 24 12:26 cmake_install.cmake
-rw-r--r-- 1 bmaxa staff 476 Jul 24 12:25 main.cpp
-rwxr-xr-x 1 bmaxa staff 238077 Jul 24 12:26 test_mat_inverse
bmaxa@Branimirs-Air eigen_fast_math_test % ./test_mat_inverse
0.999303 0.0145721 -0.0343709 -0.00753874
-0.0145243 0.999893 0.00164037 0.52384
0.0343912 -0.00114001 0.999408 -5.68314
0 0 0 1
0.999303 -0.0145243 0.0343911 0.210591
0.0145721 0.999893 -0.00114001 -0.530153
-0.034371 0.00164037 0.999408 5.67865
-0 0 -0 1
1 4.93871e-19 1.89553e-18 -1.47451e-17
2.99736e-19 1 -3.26763e-19 -1.11022e-16
-5.65987e-18 1.09284e-19 1 1.77636e-15
0 0 0 1
and
bmaxa@Branimirs-Air eigen_perf_test % ls -la
total 2496
drwxr-xr-x 11 bmaxa staff 352 Jul 24 12:30 .
drwxr-xr-x 55 bmaxa staff 1760 Jul 24 12:29 ..
drwxr-xr-x 12 bmaxa staff 384 Jul 24 12:29 .git
-rw-r--r-- 1 bmaxa staff 12 Jul 24 12:29 .gitignore
-rw-r--r-- 1 bmaxa staff 14045 Jul 24 12:30 CMakeCache.txt
drwxr-xr-x 13 bmaxa staff 416 Jul 24 12:30 CMakeFiles
-rw-r--r-- 1 bmaxa staff 511 Jul 24 12:29 CMakeLists.txt
-rw-r--r-- 1 bmaxa staff 5609 Jul 24 12:30 Makefile
-rw-r--r-- 1 bmaxa staff 1540 Jul 24 12:30 cmake_install.cmake
-rwxr-xr-x 1 bmaxa staff 1235420 Jul 24 12:30 eigen_perf_test
-rw-r--r-- 1 bmaxa staff 1279 Jul 24 12:29 eigen_perf_test.cpp
bmaxa@Branimirs-Air eigen_perf_test % ./eigen_perf_test
Result: -0.000151013 -0.000110068 7.73141e-05 -1.32445e-05 1.02876e-05 -8.45934e-05
compiler is Clang, version 12.0.5
10000 iteration took 0.153339 seconds

Result: -6.36653e-08 -1.11854e-05 -1.19188e-05 -1.15604e-05 9.72996e-07 -1.43802e-05
compiler is Clang, version 12.0.5
100000 iteration took 1.28075 seconds

Result: -1.06923e-07 6.38881e-07 -3.13472e-07 6.69333e-07 -1.99308e-07 -7.20017e-07
compiler is Clang, version 12.0.5
1000000 iteration took 12.8297 seconds
https://github.com/siposcsaba89/eigen_perf_test

--
bmaxa now listens Smile (explicit version) by Lily Allen from Triple J: Hottest 100, Volume 14

Re: The value of floating-point exceptions?

<sdgv3m$232$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19123&group=comp.arch#19123

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: iva...@millcomputing.com (Ivan Godard)
Newsgroups: comp.arch
Subject: Re: The value of floating-point exceptions?
Date: Sat, 24 Jul 2021 04:55:35 -0700
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <sdgv3m$232$1@dont-email.me>
References: <sd9a9h$ro6$1@dont-email.me>
<memo.20210721153537.10680P@jgd.cix.co.uk>
<e9c738bd-7c0e-4b3b-9385-3a0d0658b059n@googlegroups.com>
<a74c6bf2-9ad1-4969-b3cb-b650ae8ebdadn@googlegroups.com>
<sde6m7$kr1$1@dont-email.me> <sde74m$nio$1@dont-email.me>
<7cf5713e-f138-488b-9ccf-d85df84c50can@googlegroups.com>
<e7e0b9a2-7990-4ec8-9c40-a6e9a07bd306n@googlegroups.com>
<sdf4t3$6cl$2@newsreader4.netcologne.de>
<c0917435-65c8-45f1-b745-5fd7ff4f58c0n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 24 Jul 2021 11:55:34 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="d170eeff21d61c4d8cced743806c8794";
logging-data="2146"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19QenS9DIeGS6OgfGxSO0z9"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:7cihdgWZpUu+uuVObnCGbO30Rig=
In-Reply-To: <c0917435-65c8-45f1-b745-5fd7ff4f58c0n@googlegroups.com>
Content-Language: en-US
 by: Ivan Godard - Sat, 24 Jul 2021 11:55 UTC

On 7/23/2021 1:13 PM, MitchAlsup wrote:
> On Friday, July 23, 2021 at 2:22:13 PM UTC-5, Thomas Koenig wrote:
>> MitchAlsup <Mitch...@aol.com> schrieb:
>>> IEEE 754 was put together by people who really understood FP arithmetic
>>> but HW not so much.
> <
>> Who was on that committee?
> <
> Ivan will be here shortly to list the perpetrators.

Can't say for the original 754 - I wasn't involved until the '00s

>>
>> I have read that Intel and Motorola were there, but what about
>> Cray, CDC or IBM? They should have had some understanding of the
>> difficulties involved (but then again at least Cray was famous
>> for not caring about such niceties, and IBM was still caught in
>> their horrible radix-16 system at that time and probably could
>> not even dream that they would one day implement another floating
>> point format).
> <
> IBM's was worse the simply radix 16, it was also a truncation system
> with a guard digit (½ a byte) in calculations. To make maters worse, its
> competitors were 36-bit, 48-bit, and 60-bit (single precision).
>

Re: The value of floating-point exceptions?

<2021Jul24.184642@mips.complang.tuwien.ac.at>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19127&group=comp.arch#19127

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.arch
Subject: Re: The value of floating-point exceptions?
Date: Sat, 24 Jul 2021 16:46:42 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 14
Message-ID: <2021Jul24.184642@mips.complang.tuwien.ac.at>
References: <fc5a33d0-7c17-4855-8ab3-162884bd6b7bn@googlegroups.com> <memo.20210723223630.14132H@jgd.cix.co.uk> <2021Jul24.112832@mips.complang.tuwien.ac.at> <TZRKI.24285$Nq7.6581@fx33.iad>
Injection-Info: reader02.eternal-september.org; posting-host="33a9a59b4e6b0975f5bffca868e1fab6";
logging-data="3992"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/ICebt9xcH/+RSGcvS1T8o"
Cancel-Lock: sha1:mqe5byHrQU5nvDEdHwXs3RTcy7U=
X-newsreader: xrn 10.00-beta-3
 by: Anton Ertl - Sat, 24 Jul 2021 16:46 UTC

Branimir Maksimovic <branimir.maksimovic@gmail.com> writes:
>> Both loops execute at 2 cycles/iteration (IPC=4) on a Skylake. I
....
>Could you provide test program?

http://www.complang.tuwien.ac.at/anton/tmp/axpy.zip

Today I measure 1.8 cycles per iteration (IPC=4.44) from this program
(both compiled for 387 and SSE2) on a Skylake. Strange.

- anton
--
'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>

Re: The value of floating-point exceptions?

<sdhkll$o5g$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19130&group=comp.arch#19130

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: cr88...@gmail.com (BGB)
Newsgroups: comp.arch
Subject: Re: The value of floating-point exceptions?
Date: Sat, 24 Jul 2021 13:03:31 -0500
Organization: A noiseless patient Spider
Lines: 160
Message-ID: <sdhkll$o5g$1@dont-email.me>
References: <sd9a9h$ro6$1@dont-email.me>
<memo.20210721153537.10680P@jgd.cix.co.uk>
<e9c738bd-7c0e-4b3b-9385-3a0d0658b059n@googlegroups.com>
<a74c6bf2-9ad1-4969-b3cb-b650ae8ebdadn@googlegroups.com>
<sde6m7$kr1$1@dont-email.me> <sde74m$nio$1@dont-email.me>
<7cf5713e-f138-488b-9ccf-d85df84c50can@googlegroups.com>
<e7e0b9a2-7990-4ec8-9c40-a6e9a07bd306n@googlegroups.com>
<905454f4-6aa8-4a4e-b0ef-6b55340c61d7n@googlegroups.com>
<sdfcrn$2s3$1@dont-email.me> <sdgjdr$4qv$1@newsreader4.netcologne.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 24 Jul 2021 18:03:33 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="744bdb8b0fd5aa69537be1cde3aba9ee";
logging-data="24752"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/lFI+TWL5MG+tZaW6rU950"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.12.0
Cancel-Lock: sha1:FDaPqrjV6JaAZVJgYwUT9GTIfrw=
In-Reply-To: <sdgjdr$4qv$1@newsreader4.netcologne.de>
Content-Language: en-US
 by: BGB - Sat, 24 Jul 2021 18:03 UTC

On 7/24/2021 3:36 AM, Thomas Koenig wrote:
> BGB <cr88192@gmail.com> schrieb:
>> On 7/23/2021 12:45 PM, Quadibloc wrote:
>>> On Friday, July 23, 2021 at 9:30:20 AM UTC-6, MitchAlsup wrote:
>>>
>>>> No, doubling the widths just hides the problem and makes the actual
>>>> problem harder to find. You can take the point of view that that is
>>>> enough, but it is not in reality.
>>>
>>> It's enough to get one Moon lander on the surface. But solving the
>>> real problem is still better - but it's nice if there's a way to meet
>>> deadlines and the like.
>>>
>>
>> I would expect for a physical system, the inherent "noisiness" of
>> physical reality would matter a lot more for the outcome a lot more than
>> any bit-exact arithmetic would help make the landing.
>>
>> Some expertly crafted and computed flight plan could be thrown off by
>> much larger factors like which direction the wind was blowing during
>> liftoff, solar wind or flars blowing the spacecraft slightly off course,
>> collisions with space dust, ...
>
> One major issue was gravitational anomalies of the Moon, which are
> big enough to have a significant impact on the orbit of spacecraft.
>

Makes sense, but yeah, more factors into the point that unpredictable
physical variables are a lot more likely to factor in to mission success
or failure than whether or not floating-point operations have exact
rounding.

In cases where it matters, it is usually more a case of wanting multiple
implementations to give results which are consistent, rather than
necessarily maximizing accuracy.

One could have a floating point definition which specifies the use of
truncation, and potentially how the results are truncated internally
during operations, rather than one which assumes an infinitely precise
result.

For example, what if we defined double-precision FADD/FSUB relative to
the behavior of a 64-bit twos complement integer mantissa?...

Or, FMUL relative to a triangular multiplier which multiplies two 56-bit
inputs and produces a 56-bit (truncated) output?...

Not necessarily as a "universal standard", but rather as a target which
can be:
Relatively cost-effectively be implemented bit-exact in hardware;
Can be mostly emulated in software mostly using 64-bit integer
operations (*1).

*1: Well, sorta; FMUL would need special treatment to be bit-exact. One
would need to make some extra effort to approximate the behavior of a
truncated multiplier (naively using a 64*64->128 bit widening multiplier
and discarding the low bits would not produce bit-exact results).

Bit-exact would require getting the same results for the bits "hanging
off the bottom", with such a multiplier probably being defined relative
to the behavior of a collection of 16*16->32 sub-multipliers or similar.

There are other options, such as approximating a "smooth bottom"
truncated result, but this is not likely to be cost-effective relative
to the more "jagged" version.

....

Worthwhile is also debatable, as an FPU built to be able to support,
say, an FP96 format, would not produce bit-identical results with one
built to only support Binary64/Double, without special case logic to
artificially truncate or discard bits in the intermediate results, ...

Granted, an "FP standard" whose definitions depend on the size of the
largest output format supported by the FPU in question seems "kinda
useless" on this front.

The "cheaper" alternative is to not make any requirements here, and give
rounding behavior in terms of a probability.

As can be noted though, integer multiply via FP generally survives such
a multiplier because inputs which produce an in-range result will have
zeroes in the low-order parts of the mantissa, and thus all the
sub-multiplies which would have "fallen off the bottom" would have
contained multiplies against zero (and thus not had a visible effect on
the result).

>> Presumably these missions have some sort of closed-loop control, such as
>> course-correction, ability to detect the distance from the target, ...
>
> Having a spacecraft travel around in space is an engieering problem.
> You always have error bars on every measurement and assumption -
> mass of your spacecraft, duration and efficiency of a burn, actual
> mass expended on a burn, orientation, ...
>
> Any of the above uncertainties is _much_ higher than the floating
> point precision of a 32-bit real, let alone of a 64-bit real.
>
> Of course, if you subtract two numbers of almost equal magnigude,
> that could be much different...
>
> This is why space missions have course corrections somehwere in
> the middle of their trajectory. After sufficient time has elapsed
> to gather data on the velocity and position of the spacecraft, but
> not yet enough that a course correction would be too expensive,
> you alter the spacecraft's velocity by a relatively small amount
> of delta v.
>

Makes sense.

>> Granted, this is assuming it is using sufficient numerical precision.
>> Trying to do long range navigation using binary32 or similar is probably
>> just asking for it to crash into the surface (or miss the moon entirely,
>> say because jitter in the math miscalculated the location of the moon by
>> like 150km or something, ...).
>
> A few years ago (pre-Corona) I visited the Space Center in Houston.
> A tour guide for the Saturn-V on exhibition there told the group
> that he had worked on the courses for Apollo, and that they had
> actually mostly used analytical methods. I was a bit surprised
> at that, I would have thought numerical solution of ODEs would
> have been employed more.
>

IME:

Most of what one might want to calculate in practice, can be done using
algebra.

If it can't be done directly, one can subdivide it into smaller
timesteps and do it incrementally. At small enough timesteps, pretty
much everything becomes linear.

Similarly, a lot of stuff one could do with ODE's could instead be done
using B-splines or similar, ...

Also, divide is one of those operations one generally wants to avoid
when possible, not just for speed reasons, but because it is more prone
to adding instability: if you divide by a number which happens to
approach 0, then the numbers involved can get huge. Calculations which
give wonky results, or spit out Inf, NaN, or raises a fault when given
certain inputs, are not desirable.

Usually better when possible to find an alternative which avoids the use
of division, or at least eliminate cases where divide-by-zero exists as
a possibility.

Though, this does seem to be one of those points of division between
doing math on a computer relative to traditional mathematics, which
likes to throw in divide operators all over the place.

Re: The value of floating-point exceptions?

<f75bea84-9a88-4da4-82e1-2ad89541f413n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19135&group=comp.arch#19135

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a0c:c245:: with SMTP id w5mr7741401qvh.21.1627151165274;
Sat, 24 Jul 2021 11:26:05 -0700 (PDT)
X-Received: by 2002:a4a:d6c2:: with SMTP id j2mr6209139oot.66.1627151165162;
Sat, 24 Jul 2021 11:26:05 -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.arch
Date: Sat, 24 Jul 2021 11:26:04 -0700 (PDT)
In-Reply-To: <sdhkll$o5g$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:2478:2de3:e5d1:75a1;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:2478:2de3:e5d1:75a1
References: <sd9a9h$ro6$1@dont-email.me> <memo.20210721153537.10680P@jgd.cix.co.uk>
<e9c738bd-7c0e-4b3b-9385-3a0d0658b059n@googlegroups.com> <a74c6bf2-9ad1-4969-b3cb-b650ae8ebdadn@googlegroups.com>
<sde6m7$kr1$1@dont-email.me> <sde74m$nio$1@dont-email.me> <7cf5713e-f138-488b-9ccf-d85df84c50can@googlegroups.com>
<e7e0b9a2-7990-4ec8-9c40-a6e9a07bd306n@googlegroups.com> <905454f4-6aa8-4a4e-b0ef-6b55340c61d7n@googlegroups.com>
<sdfcrn$2s3$1@dont-email.me> <sdgjdr$4qv$1@newsreader4.netcologne.de> <sdhkll$o5g$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f75bea84-9a88-4da4-82e1-2ad89541f413n@googlegroups.com>
Subject: Re: The value of floating-point exceptions?
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Sat, 24 Jul 2021 18:26:05 +0000
Content-Type: text/plain; charset="UTF-8"
 by: MitchAlsup - Sat, 24 Jul 2021 18:26 UTC

On Saturday, July 24, 2021 at 1:03:35 PM UTC-5, BGB wrote:
> On 7/24/2021 3:36 AM, Thomas Koenig wrote:
> > BGB <cr8...@gmail.com> schrieb:
<snip>
>
> Also, divide is one of those operations one generally wants to avoid
> when possible, not just for speed reasons, but because it is more prone
> to adding instability: if you divide by a number which happens to
> approach 0, then the numbers involved can get huge. Calculations which
> give wonky results, or spit out Inf, NaN, or raises a fault when given
> certain inputs, are not desirable.
<
There were several cases in my transcendental studies where one could
write a Newton-Raphson iteration using SQRT(x) or 1/SQRT(x); and in every
case I looked at, the one using 1/SQRT(x) converged faster.
>
> Usually better when possible to find an alternative which avoids the use
> of division, or at least eliminate cases where divide-by-zero exists as
> a possibility.
>
> Though, this does seem to be one of those points of division between
> doing math on a computer relative to traditional mathematics, which
> likes to throw in divide operators all over the place.
<
In traditional math, DIV is "just another operator" with exactly the same
domain and range as any other operator (just like differentiate and
integrate are other operators along with DIV and CURL.) all being of
infinite precision and perfect arithmetic.
<
Computer arithmetics don't have those properties

Re: The value of floating-point exceptions?

<sdhovm$nj$1@newsreader4.netcologne.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19137&group=comp.arch#19137

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2a0a-a540-a40-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoe...@netcologne.de (Thomas Koenig)
Newsgroups: comp.arch
Subject: Re: The value of floating-point exceptions?
Date: Sat, 24 Jul 2021 19:17:10 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <sdhovm$nj$1@newsreader4.netcologne.de>
References: <sd9a9h$ro6$1@dont-email.me>
<memo.20210721153537.10680P@jgd.cix.co.uk>
<e9c738bd-7c0e-4b3b-9385-3a0d0658b059n@googlegroups.com>
<a74c6bf2-9ad1-4969-b3cb-b650ae8ebdadn@googlegroups.com>
<sde6m7$kr1$1@dont-email.me> <sde74m$nio$1@dont-email.me>
<7cf5713e-f138-488b-9ccf-d85df84c50can@googlegroups.com>
<e7e0b9a2-7990-4ec8-9c40-a6e9a07bd306n@googlegroups.com>
<905454f4-6aa8-4a4e-b0ef-6b55340c61d7n@googlegroups.com>
<sdfcrn$2s3$1@dont-email.me> <sdgjdr$4qv$1@newsreader4.netcologne.de>
<sdhkll$o5g$1@dont-email.me>
Injection-Date: Sat, 24 Jul 2021 19:17:10 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2a0a-a540-a40-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2a0a:a540:a40:0:7285:c2ff:fe6c:992d";
logging-data="755"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Sat, 24 Jul 2021 19:17 UTC

BGB <cr88192@gmail.com> schrieb:

> IME:
>
> Most of what one might want to calculate in practice, can be done using
> algebra.
>
> If it can't be done directly, one can subdivide it into smaller
> timesteps and do it incrementally. At small enough timesteps, pretty
> much everything becomes linear.

You just described the first-order Euler method of solving ODEs :-)
>
> Similarly, a lot of stuff one could do with ODE's could instead be done
> using B-splines or similar, ...

An ordinary differential equation is a relation between different
quantities that you can solve given starting (and/or boundary)
conditions. There are many methods - Euler, higher-order
Runge-Kutta, Runge-Kutta, hopefully with adaptive stepsize control,
by a predictor-corrector method, Richardson extrapolation, Adams,
expict vs. explicit, ...

Soving an ODE via B-splines could be done via error minimization,
which would lead you towards the field of finite elements.

> Also, divide is one of those operations one generally wants to avoid
> when possible, not just for speed reasons, but because it is more prone
> to adding instability: if you divide by a number which happens to
> approach 0, then the numbers involved can get huge.

You can not reasonably avoid division, nor should you - the problem
is usually not the division itself, but the subtraction beforehand.

However, if you have something like

f(xn) = f(x) + dfdx(x) / (xn-x)

you can play some games of adjusting your stepsize so xn-n
can be represented exactly in floating point number, but
frankly, it usually isn't worth the other.

>Calculations which
> give wonky results, or spit out Inf, NaN, or raises a fault when given
> certain inputs, are not desirable.
>
> Usually better when possible to find an alternative which avoids the use
> of division, or at least eliminate cases where divide-by-zero exists as
> a possibility.

If your stepsize becomes zero, you're in a heap of trouble
already and probably should have errored out long before.

> Though, this does seem to be one of those points of division between
> doing math on a computer relative to traditional mathematics, which
> likes to throw in divide operators all over the place.

Pages:12345678910
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor