Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.arch > #32364 > unrolled thread

UNUM study and research

Started by"Rick C. Hodgin" <rick.c.hodgin@gmail.com>
First post2015-12-31 17:32 -0800
Last post2016-01-03 09:24 +0000
Articles 9 on this page of 49 — 10 participants

Back to article view | Back to comp.arch


Contents

  UNUM study and research "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-12-31 17:32 -0800
    Re: UNUM study and research Jan Coombs <jenfhaomndgfwutc@murmic.plus.com> - 2016-01-01 03:07 +0000
      Re: UNUM study and research "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-12-31 19:34 -0800
        Re: UNUM study and research Jan Coombs <jenfhaomndgfwutc@murmic.plus.com> - 2016-01-01 14:26 +0000
          Re: UNUM study and research "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2016-01-01 07:40 -0800
            Re: UNUM study and research Jan Coombs <jenfhaomndgfwutc@murmic.plus.com> - 2016-01-01 17:35 +0000
              Re: UNUM study and research "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2016-01-01 13:02 -0800
    Re: UNUM study and research MitchAlsup <MitchAlsup@aol.com> - 2016-01-01 09:37 -0800
      Re: UNUM study and research "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2016-01-01 12:45 -0800
    Re: UNUM study and research Quadibloc <jsavard@ecn.ab.ca> - 2016-01-01 10:04 -0800
      Re: UNUM study and research Quadibloc <jsavard@ecn.ab.ca> - 2016-01-01 10:12 -0800
        Re: UNUM study and research nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-02 14:34 +0000
          Re: UNUM study and research "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2016-01-02 07:29 -0800
            Re: UNUM study and research nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-02 16:36 +0000
              Re: UNUM study and research "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2016-01-02 10:01 -0800
                Re: UNUM study and research nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-02 18:50 +0000
                  Re: UNUM study and research "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2016-01-02 11:18 -0800
                    Re: UNUM study and research nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-02 20:09 +0000
                      Re: UNUM study and research "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2016-01-02 12:29 -0800
                        Re: UNUM study and research nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-02 20:44 +0000
                          Re: UNUM study and research "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2016-01-02 12:55 -0800
                        Re: UNUM study and research George Neuner <gneuner2@comcast.net> - 2016-01-03 04:42 -0500
                          Re: UNUM study and research already5chosen@yahoo.com - 2016-01-03 03:01 -0800
                          Re: UNUM study and research Jan Coombs <jenfhaomndgfwutc@murmic.plus.com> - 2016-01-03 12:46 +0000
                          Re: UNUM study and research "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2016-01-03 09:47 -0800
                      Re: UNUM study and research Quadibloc <jsavard@ecn.ab.ca> - 2016-01-02 14:46 -0800
            Re: UNUM study and research Quadibloc <jsavard@ecn.ab.ca> - 2016-01-02 15:26 -0800
              Re: UNUM study and research Ivan Godard <ivan@millcomputing.com> - 2016-01-02 17:03 -0800
                Re: UNUM study and research Quadibloc <jsavard@ecn.ab.ca> - 2016-01-02 17:58 -0800
                  Re: UNUM study and research Ivan Godard <ivan@millcomputing.com> - 2016-01-02 18:13 -0800
                    Re: UNUM study and research Quadibloc <jsavard@ecn.ab.ca> - 2016-01-02 20:25 -0800
                      Re: UNUM study and research Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-03 19:26 +0100
                    Re: UNUM study and research already5chosen@yahoo.com - 2016-01-03 02:55 -0800
              Re: UNUM study and research Quadibloc <jsavard@ecn.ab.ca> - 2016-01-02 18:01 -0800
                Re: UNUM study and research "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2016-01-02 18:06 -0800
                  Re: UNUM study and research Quadibloc <jsavard@ecn.ab.ca> - 2016-01-02 20:30 -0800
            Re: UNUM study and research Erik Trulsson <erikt@Update.UU.SE> - 2016-01-08 08:35 +0000
              Re: UNUM study and research "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2016-01-08 05:34 -0800
                Re: UNUM study and research Quadibloc <jsavard@ecn.ab.ca> - 2016-01-08 07:57 -0800
                  Re: UNUM study and research "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2016-01-08 08:01 -0800
                    Re: UNUM study and research "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2016-01-08 08:07 -0800
          Re: UNUM study and research Jan Coombs <jenfhaomndgfwutc@murmic.plus.com> - 2016-01-02 22:15 +0000
          Re: UNUM study and research Quadibloc <jsavard@ecn.ab.ca> - 2016-01-02 14:59 -0800
            Re: UNUM study and research nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-03 10:39 +0000
              Re: UNUM study and research Quadibloc <jsavard@ecn.ab.ca> - 2016-01-03 05:17 -0800
              Re: UNUM study and research Quadibloc <jsavard@ecn.ab.ca> - 2016-01-03 05:19 -0800
                Re: UNUM study and research nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-03 14:56 +0000
                  Re: UNUM study and research Quadibloc <jsavard@ecn.ab.ca> - 2016-01-03 08:21 -0800
          Re: UNUM study and research Jan Coombs <jenfhaomndgfwutc@murmic.plus.com> - 2016-01-03 09:24 +0000

Page 3 of 3 — ← Prev page 1 2 [3]


#32604

From"Rick C. Hodgin" <rick.c.hodgin@gmail.com>
Date2016-01-08 08:07 -0800
Message-ID<c29d8d19-31d7-4817-a6ef-5534e8b9cc62@googlegroups.com>
In reply to#32603
On Friday, January 8, 2016 at 11:01:35 AM UTC-5, Rick C. Hodgin wrote:
> I believe these are requirements of a unum implementation, and something
> the very concept itself screams for.

I have also contacted John Gustafson today regarding a proposal for an
extension to unum, which would make it something like unumx.

It is the idea that the desired precision of the machine will be set by
a user, such that work is carried out to some specified value.  Beyond
that, however, there is additional precision that was computed and does
contain time and work as input, and it's a shame to lose it due to the
needs of outputting the value and truncating the results to the desired
precision ... IF that value is then going to be used as input into a
later calculation.

I proposed adding two, possibly three additional fields to the unum
format, with [xu] being optional as it could also be assumed that
the last bit always contains rounding at that level:

    [xfs-1][xf][xu]

Which would result in the new unumx format:

    [s][...e...][............f............][u][es-1][fs-1][xfs-1][xf][xu]

    xfs-1 --- The size of the extended fraction bits
    xf    --- Extended fraction bits, including left-most which supplants
              right-most bit in f, which may have been rounded.
    xu    --- Extended ubit

In this way, the unumx computation from a prior workload within the unumx
compute engine would not be lost, but would be carried along for use in
future computations, allowing a potentially rounded value to be re-loaded
and re-used at the higher precision.

I believe this is a desirable enough feature that it should be part of the
unum standard, or unumx.

Best regards,
Rick C. Hodgin

[toc] | [prev] | [next] | [standalone]


#32446

FromJan Coombs <jenfhaomndgfwutc@murmic.plus.com>
Date2016-01-02 22:15 +0000
Message-ID<20160102221506.723e32d9@t500>
In reply to#32421
On Sat, 2 Jan 2016 14:34:27 -0000 (UTC)
nmm@wheeler.UUCP (Nick Maclaren) wrote:
 
> The REAL problem with UNUMs is that they don't do anything
> useful.

Agreed, well, for all practical trials anyway. 


The reason Gustafson's work caught my eye is that I had been
speculating on the advantages of variable length float formats.

A major problem emerged: during multiplication fractional part
increases in length, how would I decide which bits to keep?
IEE-754 formats keep about half of them, but there is probably
no deep reason for this choice. 

Using Gustafson's unum format I can multiply floats and preserve
just the significant bits. Occasionally my result will be marked
as exact, generally the result will be inexact, but known to lie
within a bounded range. 

This is just theoretical, because I have not have access to a
unum computer processor.  Why not?


1) The unum is a superset of integer, bignum and float types.
All numeric data on this machine would be of just one type: 
unum.  This implies a significant hardware change.

2) Although handling variable length data is common at higher
levels in computing, it is not common at the processor register
level.  This requires a significant hardware change. 


AFAIK this hardware has not been built, so I have to agree with
you that unums don't do anything useful today. 

Jan Coombs
-- 
Main points & illustrations from Gustafson's book:
> http://sites.ieee.org/scv-cs/files/2013/03/Right-SizingPrecision1.pdf

[toc] | [prev] | [next] | [standalone]


#32448

FromQuadibloc <jsavard@ecn.ab.ca>
Date2016-01-02 14:59 -0800
Message-ID<a8729f26-0456-4754-a1e8-ec64b1f105e5@googlegroups.com>
In reply to#32421
On Saturday, January 2, 2016 at 7:37:07 AM UTC-7, Nick Maclaren wrote:
> In article <c95c434f-4f1d-479f-a02d-b62e2060abbb@googlegroups.com>,
> Quadibloc  <jsavard@ecn.ab.ca> wrote:
> >
> >So the *problem* _really_ is not so much that UNUM is so slow and inefficient, 
> >except in so far as it is too slow and inefficient to make it the universal 
> >standard, the only way to do floating-point arithmetic permitted, provided, and 
> >available on the processors we all use in our smartphones and laptops and 
> >desktops.

> The REAL problem with UNUMs is that they don't do anything useful.

> All that they do is to cover up a subset of the numerical errors
> that sloppy programmers make, so that they don't appear as errors.
> And, as with all such techniques, the application-level effect is
> more likely to be plausible-looking wrong answers than anything
> else.

Although I suspect you're mostly right... a numeric format that behaves more 
like idealized real numbers won't just cover up errors, it will change the 
situation so that certain practices no longer result in error.

Thus, a sequence like:

a = b + c
p = a + x
q = (p - c) - b

would now yield q equal to x even if b and c were both much bigger than x.

It wouldn't give a wrong answer, it would just be slow and inefficient.

So, unlike IEEE 478, it would actually fix things, it would actually lead to 
right answers in a significant number of cases where wrong numbers result with 
conventional float formats.

But surely programmers with some competence in numerical analysis can already 
get right answers if they don't do stupid things?

Well, yes, most of the time. So that leads to the conclusion that maybe UNUM is not needed.

But sometimes one doesn't know in advance which numbers will be the big ones, 
which numbers will be the little ones, or what ordering of calculations will 
lead to the proper cancellations.

On the other hand, in real-world scientific calculation, it's not as if the 
inputs are exact quantities. The actual values are less precise than a double-
precision float. Thus, unless something is done badly, the unavoidable errors 
due to a conventional floating-point format plus decent numerical analysis... 
will be no worse than the error of applying the same algorithm, using ideal 
real numbers, to the imperfect input data one started with.

Given that, you will be right almost all of the time - and when UNUM would 
help, people _should_ be using Mathematica (or similar software) anyways. Or so 
it would seem.

John Savard

[toc] | [prev] | [next] | [standalone]


#32462

Fromnmm@wheeler.UUCP (Nick Maclaren)
Date2016-01-03 10:39 +0000
Message-ID<n6ato5$22r$1@dont-email.me>
In reply to#32448
In article <a8729f26-0456-4754-a1e8-ec64b1f105e5@googlegroups.com>,
Quadibloc  <jsavard@ecn.ab.ca> wrote:
>
>Although I suspect you're mostly right... a numeric format that behaves more 
>like idealized real numbers won't just cover up errors, it will change the 
>situation so that certain practices no longer result in error.
>
>Thus, a sequence like:
>
>a = b + c
>p = a + x
>q = (p - c) - b
>
>would now yield q equal to x even if b and c were both much bigger than x.

That is also true of IEEE 754, incidentally.  In many floating-point
formats, x+x+x is not the same as 3*x, but IEEE 754 ensures that until
x+x+x+x+x+x+x and 7*x.  The precision extension techniques are ancient,
but help only when (a) the loss occurs in a few individual operations
and (b) those are identifiable.  They have been proposed, and tried,
many times, and have never worked well enough to be worth bothering
with except in a few computational kernels.

You can see that easily enough if you take a realistically complex
calculation and try to work out what precision you need, where.
People designing special functions (including me) have done that
for half a century and more - which is another reason I am not
impressed by the UNUM claims.  And then move on to a Newton-Raphson
solver ....

The simple fact is that either you allow the storage precision to
grow super-exponentially or you will get rounding errors.  And, as
every competent numerical analyst knows, these problems are
inherent in the basic mathematics and therefore cannot be removed
by ANY bounded representation or arithmetic variation.  Even if UNUMs
are numerically better than conventional floating-point, they simply
can't overcome the basic mathematical limitations.

That also applies to 'tracking precision' and interval arithmetic,
which is why both have been proposed, and tried, many times and
have never never worked well enough to be worth bothering with
except in a few special cases.  On that matter, all of the methods
of flagging the last 'correct' bit or digit do lead to much faster
range expansion than interval arithmetic, as Jan Coombs says but,
in practice, even interval arithmetic fails horribly when applied
to most applications.

The history of computer arithmetic is solid with people proposing
gimmicks as solutions to known problems, making ridiculous claims,
and being shown up for the snake oil they are - in almost every
case because they didn't understand where the real problems lie.
A few, like IEEE signed zeroes and division by zero, solve the
problems for one isolated domain and make them much worse for most
others.

All of IEEE decimal, interval arithmetic, significance tracking,
and UNUMs are like that.  None are without any merit, for a few,
specialised requirements, but none are of any real help in the vast
majority of programs.  If and when a precise specification of the
UNUM format and arithmetic rules is published, we shall be able to
judge whether it is PURE snake oil, or has a kernel of merit; but
there is simply no way that it can deliver on the claims people
are making for it.


Regards,
Nick Maclaren.

[toc] | [prev] | [next] | [standalone]


#32466

FromQuadibloc <jsavard@ecn.ab.ca>
Date2016-01-03 05:17 -0800
Message-ID<5aa14e86-f4de-45e2-9f03-1e1843179f03@googlegroups.com>
In reply to#32462
On Sunday, January 3, 2016 at 3:41:42 AM UTC-7, Nick Maclaren wrote:
> In article <a8729f26-0456-4754-a1e8-ec64b1f105e5@googlegroups.com>,
> Quadibloc  <jsavard@ecn.ab.ca> wrote:
> >
> >Although I suspect you're mostly right... a numeric format that behaves more 
> >like idealized real numbers won't just cover up errors, it will change the 
> >situation so that certain practices no longer result in error.
> >
> >Thus, a sequence like:
> >
> >a = b + c
> >p = a + x
> >q = (p - c) - b
> >
> >would now yield q equal to x even if b and c were both much bigger than x.
> 
> That is also true of IEEE 754, incidentally.

b = 7.53E26
c = 2.61E26
x = 1.93E-11

a = b+c
p = a+x
q = (p - c) - b

PRINT x, q

1.93E-11 0

I would expect in IEEE 754. In UNUM, though, you would get

1.93E-11 1.93E-11

because UNUM would just expand to the equivalent of 41 digits of precision as required.

So I think you did not read my example correctly.

John Savard

[toc] | [prev] | [next] | [standalone]


#32467

FromQuadibloc <jsavard@ecn.ab.ca>
Date2016-01-03 05:19 -0800
Message-ID<c56353c6-2435-4ece-9d4d-8fafd7656ac3@googlegroups.com>
In reply to#32462
On Sunday, January 3, 2016 at 3:41:42 AM UTC-7, Nick Maclaren wrote:

> The simple fact is that either you allow the storage precision to
> grow super-exponentially or you will get rounding errors.

But that's exactly the point. UNUM *does* allow the storage precision to grow 
super-exponentially.

And, therefore, someone will have to actually implement it before many people can 
be convinced that instead of a panacea it's actually something quite atrocious.

John Savard

[toc] | [prev] | [next] | [standalone]


#32468

Fromnmm@wheeler.UUCP (Nick Maclaren)
Date2016-01-03 14:56 +0000
Message-ID<n6bcqm$g8a$1@dont-email.me>
In reply to#32467
In article <c56353c6-2435-4ece-9d4d-8fafd7656ac3@googlegroups.com>,
Quadibloc  <jsavard@ecn.ab.ca> wrote:
>> >Although I suspect you're mostly right... a numeric format that behaves more 
>> >like idealized real numbers won't just cover up errors, it will change the 
>> >situation so that certain practices no longer result in error.
>> >
>> That is also true of IEEE 754, incidentally.
>
>So I think you did not read my example correctly.

No, you snipped too aggressively and so misunderstood what I said.
I was responding to the paragraph I quoted above, and gave an example
of where IEEE 754 removes a comparable error.

>> The simple fact is that either you allow the storage precision to
>> grow super-exponentially or you will get rounding errors.
>
>But that's exactly the point. UNUM *does* allow the storage precision to grow 
>super-exponentially.

Which is just SO obviously feasible on practical computers!  You may
not know that has been possible, and done, for 50 years at least.
And the universal conclusion is that it isn't useful except for a
few special, carefully controlled, cases.  Dammit, I was doing it
40 years ago!


Regards,
Nick Maclaren.

[toc] | [prev] | [next] | [standalone]


#32472

FromQuadibloc <jsavard@ecn.ab.ca>
Date2016-01-03 08:21 -0800
Message-ID<3fedcd2d-0140-4ebf-a397-7762f54f1bb1@googlegroups.com>
In reply to#32468
On Sunday, January 3, 2016 at 7:59:06 AM UTC-7, Nick Maclaren wrote:

> No, you snipped too aggressively and so misunderstood what I said.
> I was responding to the paragraph I quoted above, and gave an example
> of where IEEE 754 removes a comparable error.

Yes, IEEE 754 does remove some errors.

Naturally, I thought that "that" referred to the statement which immediately 
preceded it - that q would equal x.

Of course, q would not _necessarily_ equal x even with UNUM... if b and c were 
inexact, quantities which were insignificant would still be discarded, because 
they were insignificant, not because they didn't fit in the fixed length of the 
number.

Which means that one of the most common numerical analysis errors is *not* 
cured by UNUM.

John Savard

[toc] | [prev] | [next] | [standalone]


#32459

FromJan Coombs <jenfhaomndgfwutc@murmic.plus.com>
Date2016-01-03 09:24 +0000
Message-ID<20160103092434.713a0ef5@t500>
In reply to#32421
On Sat, 2 Jan 2016 14:34:27 -0000 (UTC)
nmm@wheeler.UUCP (Nick Maclaren) wrote:

> The REAL problem with UNUMs is that they don't do anything
> useful.

Is it because unums incorporate a horribly crude version of
bounded results that you would not advise their use?

I can see that with the bound limits being tied to the LSB of
the significand, that the declared error range will open up much
faster than when the bounds are maintained as two floats. 

Jan Coombs

[toc] | [prev] | [standalone]


Page 3 of 3 — ← Prev page 1 2 [3]

Back to top | Article view | comp.arch


csiph-web