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 20 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 2 of 3 — ← Prev page 1 [2] 3  Next page →


#32445

From"Rick C. Hodgin" <rick.c.hodgin@gmail.com>
Date2016-01-02 12:55 -0800
Message-ID<52018a65-0afc-401d-99a6-4724448b7eeb@googlegroups.com>
In reply to#32444
On Saturday, January 2, 2016 at 3:47:03 PM UTC-5, Nick Maclaren wrote:
> In article <e7995d7b-555d-432e-9018-2fcc39d465ec@googlegroups.com>,
> Rick C. Hodgin <rick.c.hodgin@gmail.com> wrote:
> >
> >In those cases, the ability to compute variably would allow every sub-
> >computation within the larger formula to be conducted to a point
> >beyond the required precision, resulting in a computed value that is
> >not in error due to rounding, even though it still may be limited in
> >proper expression as by the algorithm, or conversion from the pure
> >fundamental formula into the series of fp ops.
> 
> As I said, you need to get hold of a decent book on numerical analysis.
> That is true only for the most trivial of calculations, and is totally
> wrong for any of the complexity encountered in practice.

The issue that's addressed with unums is the end of errors in the actual
fp computation.  Unums address that issue as there are no errors due to
rounding at any (reasonable) precision.

What you're talking about is a totally separate issue that is not
related to the mechanics of fp computation, but to a larger fundamental
problem of translation from something real, into something computable.

Best regards,
Rick C. Hodgin

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


#32460

FromGeorge Neuner <gneuner2@comcast.net>
Date2016-01-03 04:42 -0500
Message-ID<v1rh8btoposr0mc87losiverk1hp6ublob@4ax.com>
In reply to#32443
On Sat, 2 Jan 2016 12:29:30 -0800 (PST), "Rick C. Hodgin"
<rick.c.hodgin@gmail.com> wrote:

> ... I'm talking about computations which can be translated into fp ops
>that are to be conducted to some precision in the result.
>
>In those cases, the ability to compute variably would allow every sub-
>computation within the larger formula to be conducted to a point
>beyond the required precision, resulting in a computed value that is
>not in error due to rounding, even though it still may be limited in
>proper expression as by the algorithm, or conversion from the pure
>fundamental formula into the series of fp ops.
>
>Rounding errors resulting from fp computation at a given precision
>would be done away with by using a variable-length computation on
>the fp ops.  The ability to remove fundamental errors in the translation
>from formula to fp ops would never be removed, except possibly if it
>would be manipulated symbolically, and then computed after reduction.

No.  This is trivially seen with trigonometric functions which are
calculated by inifinite series expansion.  No amount of precision will
preclude rounding.

George

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


#32464

Fromalready5chosen@yahoo.com
Date2016-01-03 03:01 -0800
Message-ID<bd2ac29b-098a-48da-a421-d5f3c0547ef8@googlegroups.com>
In reply to#32460
On Sunday, January 3, 2016 at 11:42:20 AM UTC+2, George Neuner wrote:
> On Sat, 2 Jan 2016 12:29:30 -0800 (PST), "Rick C. Hodgin"
> <rick.c.hodgin@gmail.com> wrote:
> 
> > ... I'm talking about computations which can be translated into fp ops
> >that are to be conducted to some precision in the result.
> >
> >In those cases, the ability to compute variably would allow every sub-
> >computation within the larger formula to be conducted to a point
> >beyond the required precision, resulting in a computed value that is
> >not in error due to rounding, even though it still may be limited in
> >proper expression as by the algorithm, or conversion from the pure
> >fundamental formula into the series of fp ops.
> >
> >Rounding errors resulting from fp computation at a given precision
> >would be done away with by using a variable-length computation on
> >the fp ops.  The ability to remove fundamental errors in the translation
> >from formula to fp ops would never be removed, except possibly if it
> >would be manipulated symbolically, and then computed after reduction.
> 
> No.  This is trivially seen with trigonometric functions which are
> calculated by inifinite series expansion.  No amount of precision will
> preclude rounding.
> 
> George

I'd think about something simpler than trigonometric : division, square root.

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


#32465

FromJan Coombs <jenfhaomndgfwutc@murmic.plus.com>
Date2016-01-03 12:46 +0000
Message-ID<20160103124607.33b1d35c@t500>
In reply to#32460
On Sun, 03 Jan 2016 04:42:15 -0500
George Neuner <gneuner2@comcast.net> wrote:

> On Sat, 2 Jan 2016 12:29:30 -0800 (PST), "Rick C. Hodgin"
> <rick.c.hodgin@gmail.com> wrote:

> >Rounding errors resulting from fp computation at a given
> >precision would be done away with by using a variable-length
> >computation on the fp ops.  [snip]
> 
> No.  This is trivially seen with trigonometric functions which
> are calculated by inifinite series expansion.  No amount of
> precision will preclude rounding.

I've had a quick refresh, and think I can see what would happen
using unums in sine series evaluation:

First point, what resolution will I start with?

Entering  sin(radians(30)  should get me a unum with about
five bits of significand, whereas entering sin(radians(30.000)
should get me about fifteen.  User/programmer choice. 

To simplify evaluation each term is derived from it's
predecessor, and this is further simplified by pre-calculating
the angle squared. 

As each successive term is calculated the negation and
factorial parts retain unum exact status. The precision of the
power of x part (I think) remains approximately constant. 

The value of each term reduces. At some point adding in the
new term has no effect on the partial result. The partial result
will likely become inexact early in the evaluation. Once inexact
it cannot be changed by adding values that lie within it's
declared range of inexactness. 

Computation stops, result returned. (If not satisfied, then try
sin(radians(30.000000)!)

Similar to being specific about precision on data entry, results
displayed could also indicate precision:

1/3     0(+99%/-0%)  # sorry, joking, 1 is an integer
1.0/3   0.31(+6%/-2%))       
1.00/3  0.33(+1%/-?%) 

The unum has only a positive error range, but the decimal
display will likely also contain a negative one.  

The choice of input resolution also determines the speed and
power consumed. Clearly more terms have to be evaluated for
greater precision, but also, if any data exceeds the alu width,
then bignum techniques are also needed, further increasing time
and power budget for the operation.  


I can't see how these results would be considered 'rounded'?

Jan Coombs. 

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


#32473

From"Rick C. Hodgin" <rick.c.hodgin@gmail.com>
Date2016-01-03 09:47 -0800
Message-ID<8f0206cc-92e8-447f-81d6-81984df086b0@googlegroups.com>
In reply to#32460
George Neuner wrote:
> No. This is trivially seen with trigonometric
> functions which are calculated by inifinite
> series expansion. No amount of precision
> will preclude rounding.

With unums, the point at which rounding occurs
can and will be beyond the number of significant
digits that are the targeted precision; hence, no
rounding on the individual calculation.

I envision a close relationship between hints injected
by the compiler or assembly language programmer,
conatantly adjusting the required precision on
intermediate calculations to ensure the cumulative
effects of processing multiply (multiplee) through
a large formula does not diminsh the targeted
precision and its results.

Typically I would envision this being a workload
carried out to something like k*N*log(2) extra bits
of precision, where N is the number of calculations
in the formula., and k is 1<=k<=2, and probably
close to sqrt(2).

But, that's just an off-the-top-of-my-head guess.

    uprecx 5    ; Increase computed precision by 5 bits temporarily
    uprecx 0    ; Reset to machine precision
    uprec bits  ; Explicitly set machine precision

Best regards,
Rick C. Hodgin

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


#32447

FromQuadibloc <jsavard@ecn.ab.ca>
Date2016-01-02 14:46 -0800
Message-ID<e3608a82-e38a-4c79-8e36-4e0be4a79783@googlegroups.com>
In reply to#32441
On Saturday, January 2, 2016 at 1:11:44 PM UTC-7, Nick Maclaren wrote:
> The point
> is that most of the problems are inherent in the mathematics, and
> thus not removed by ANY bounded representation.

While in general, I acknowledge that you are correct here, UNUM is _not_ a 
bounded representation except in the sense that the computers on which it will be 
used will still only have finite storage available.

John Savard

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


#32449

FromQuadibloc <jsavard@ecn.ab.ca>
Date2016-01-02 15:26 -0800
Message-ID<b1f15e03-ed9d-4c3e-be3d-6d85cac7c6d8@googlegroups.com>
In reply to#32425
On Saturday, January 2, 2016 at 8:29:39 AM UTC-7, Rick C. Hodgin wrote:
> But using comments like, "If you believe X,
> then you'll believe [some ridiculous thing]," likening the two together,
> simply do not cut it.

Obviously, such comments don't prove anything. They only say what his opinion is. 
And it's certainly true that there are lots of stupid people around with crazy 
opinions.

However, I believe Nick Maclaren about his credentials; his posts in general 
are indicative that he has the kind of experience he says he has.

Of course, we _know_ John Gustafson has impressive credentials too.

Well, at this point, nothing is really proven.

Even people with impressive credentials sometimes get wild ideas that they 
can't criticize objectively, and view as being more of a solution than they 
really are.

And even someone with the appropriate training in a field and lots of practical 
experience can be a stick-in-the-mud, and reject out of hand a new idea despite 
its merits.

My knowledge is much more limited, but I do have a little knowledge and 
experience in this area. A numeric format that doesn't produce errors due to 
its own limitations would be more forgiving, and so I would tend to think it 
could hardly help but be helpful some of the time. But I also know that input 
data tends to have limited precision, and so improving floating-point would, at 
least in many cases, address only the least of our problems; the answers we get 
will still be wrong, even if calculated perfectly, because we don't know the 
numbers we plug into our formulas well enough to get answers as accurate as we 
would like.

Keeping track of significance, of course, is something else that has been tried 
before, and IIRC it's also something that's included in UNUM. Nick is right, 
though, that there are pitfalls in trying to keep track of significance.

Thus, the percentage error in cos(x), when x is close to zero, is not the same 
as the percentage error in x - because cos(x) is approximately 1 - x^2, so for 
small x, the error in x shrinks, and the constant term 1, much bigger than x, 
overwhelms that error. Interval arithmetic does a little better than significance arithmetic, but now if you have an x that is between -.01 and +.01, the possibility that cos(x) can be as high as 1, instead of being guaranteed to be around 0.9999, falls through the cracks.

Now, one could devise a system where routines for all the major functions were 
designed with knowledge of their properties in mind so that interval arithmetic 
quantities were *properly* transformed by the function routine.

That would be very slow and complicated, and it wouldn't help if someone needs 
a brand-new function (of course, functions are calculated using arithmetic 
operations, and if all the arithmetic operations are done right, the result 
should be right... but I don't think it's as simple as that).

So when Nick Maclaren tells us to be very wary of any proposed panacea, I am in 
agreement.

But the situation is a serious one, and getting everyone who should be trained 
in numerical analysis properly so trained is a difficult problem - and so if 
something _could_ help in some cases (i.e. saving that Ariane rocket) I'm also 
inclined to hope it might be useful. Thus, testing programs with UNUM turned on 
versus using a conventional format would help to detect cases where numerical 
analysis issues are present even when the overhead of UNUM is not acceptable in 
production.

*Of course* if UNUM "works" and eliminates a lot of errors, it still won't get 
them all, and it will be treated by some as a panacea - thus leading to new 
problems of its own. But that's not an argument for not using a format that 
leads to errors less often. That will be progress, provided regression due to 
firing all the numerical analysts and shutting down the teaching of the subject 
does not happen because people think the problem is gone. The best UNUM can do 
is move the need for care and attention in calculations to a new level, where 
more subtle and profound errors become what we must worry about. So such 
techniques do have positive possibilities - and negative ones, like so many 
other technological advances.

John Savard

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


#32451

FromIvan Godard <ivan@millcomputing.com>
Date2016-01-02 17:03 -0800
Message-ID<n69rr4$fg0$1@dont-email.me>
In reply to#32449
On 1/2/2016 3:26 PM, Quadibloc wrote:
<snip>


> Keeping track of significance, of course, is something else that has been tried
> before, and IIRC it's also something that's included in UNUM. Nick is right,
> though, that there are pitfalls in trying to keep track of significance.

There already is an international standard format that keeps track of 
significance: IEEE decimal FP. 
https://en.wikipedia.org/wiki/Decimal_floating_point#IEEE_754-2008_encoding

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


#32452

FromQuadibloc <jsavard@ecn.ab.ca>
Date2016-01-02 17:58 -0800
Message-ID<c9020a91-e79e-46b7-b8f0-0a65f5a46903@googlegroups.com>
In reply to#32451
On Saturday, January 2, 2016 at 6:03:01 PM UTC-7, Ivan Godard wrote:

> There already is an international standard format that keeps track of 
> significance: IEEE decimal FP. 

True.

But it's decimal, so that means that it's slower than it needs to be for an 
unnecessary reason -

not that there isn't a use for a decimal format like this, but because it's 
decimal, it doesn't meet the needs of everyone who might want a decimal format.

But you are correct that it is definitely an option, and the fact that it runs 
on a different number base further helps in making it useful to test programs 
to see if they're numerically sound.

John Savard

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


#32455

FromIvan Godard <ivan@millcomputing.com>
Date2016-01-02 18:13 -0800
Message-ID<n69vvd$ra1$1@dont-email.me>
In reply to#32452
On 1/2/2016 5:58 PM, Quadibloc wrote:
> On Saturday, January 2, 2016 at 6:03:01 PM UTC-7, Ivan Godard wrote:
>
>> There already is an international standard format that keeps track of
>> significance: IEEE decimal FP.
>
> True.
>
> But it's decimal, so that means that it's slower than it needs to be for an
> unnecessary reason -

Why do you say so? For equivalent range there seems to be no reason for 
it to be slower than a binary format, and (as far as I know) the IBM 
implementation is no slower.

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


#32456

FromQuadibloc <jsavard@ecn.ab.ca>
Date2016-01-02 20:25 -0800
Message-ID<224f302d-f3cd-4f4a-95de-99defc4d5821@googlegroups.com>
In reply to#32455
On Saturday, January 2, 2016 at 7:13:33 PM UTC-7, Ivan Godard wrote:

> Why do you say so? For equivalent range there seems to be no reason for 
> it to be slower than a binary format, and (as far as I know) the IBM 
> implementation is no slower.

Decimal addition and multiplication are much more complicated than binary 
addition and multiplication, so there will be more gate delays in calculating 
them. It's true that modern techniques will keep the additional time to a 
minimum, say 25% to 50% extra, which may well be buried in the quantization due 
to the number of gate delays in a cycle.

John Savard

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


#32474

FromTerje Mathisen <terje.mathisen@tmsw.no>
Date2016-01-03 19:26 +0100
Message-ID<n6bp0m$acf$1@gioia.aioe.org>
In reply to#32456
Quadibloc wrote:
> On Saturday, January 2, 2016 at 7:13:33 PM UTC-7, Ivan Godard wrote:
>
>> Why do you say so? For equivalent range there seems to be no reason for
>> it to be slower than a binary format, and (as far as I know) the IBM
>> implementation is no slower.
>
> Decimal addition and multiplication are much more complicated than binary
> addition and multiplication, so there will be more gate delays in calculating
> them. It's true that modern techniques will keep the additional time to a
> minimum, say 25% to 50% extra, which may well be buried in the quantization due
> to the number of gate delays in a cycle.

If you implement DFP with a decimal exponent and a binary mantissa, 
which is explicitly legal, then a decimal multiplication is trivally 
identical to binary FMUL, while decimal add/sub might require a scaling 
MUL on one of the operands.

I.e. your 25-50% overhead is probably very doable.

Terje

-- 
- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"

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


#32463

Fromalready5chosen@yahoo.com
Date2016-01-03 02:55 -0800
Message-ID<714f4065-f75a-4320-a24c-7b7445065c6b@googlegroups.com>
In reply to#32455
On Sunday, January 3, 2016 at 4:13:33 AM UTC+2, Ivan Godard wrote:
> On 1/2/2016 5:58 PM, Quadibloc wrote:
> > On Saturday, January 2, 2016 at 6:03:01 PM UTC-7, Ivan Godard wrote:
> >
> >> There already is an international standard format that keeps track of
> >> significance: IEEE decimal FP.
> >
> > True.
> >
> > But it's decimal, so that means that it's slower than it needs to be for an
> > unnecessary reason -
> 
> Why do you say so? For equivalent range there seems to be no reason for 
> it to be slower than a binary format, and (as far as I know) the IBM 
> implementation is no slower.

As far as I know, IBM DFP is slower than BFP on the same machine. The difference is bigger on Power than on Z and difference in throughput is bigger than difference in latency, but even in best case (latency on Z) the difference exists.

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


#32453

FromQuadibloc <jsavard@ecn.ab.ca>
Date2016-01-02 18:01 -0800
Message-ID<8e1c46a7-e4aa-4e8c-960a-858cf21338d3@googlegroups.com>
In reply to#32449
Still, the bottom line to me is:

- Most programs get along just fine with floating-point as it is.

- When there are problems, they are usually caused by programmers who don't 
know what they're doing, as they could be avoided by people who are 
knowledgeable in the field of numerical analysis.

- UNUM would make floating-point arithmetic anywhere from 5 to 100 times slower.

So even if there are cases where it would help, because, after all, finding 
properly trained numerical analysts can sometimes be difficult... I am not at 
all surprised the world is not beating a path to his door, _even if UNUM is 
everything he says it is_.

However, unlike Nick Maclaren, I would like to be wrong about this.

John Savard

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


#32454

From"Rick C. Hodgin" <rick.c.hodgin@gmail.com>
Date2016-01-02 18:06 -0800
Message-ID<c32e112c-4b32-450c-a95c-7b255dbf6d81@googlegroups.com>
In reply to#32453
On Saturday, January 2, 2016 at 9:01:54 PM UTC-5, Quadibloc wrote:
> - UNUM would make floating-point arithmetic anywhere from 5 to 100
> times slower.

5x to 100x slower?  What is your basis for this statement, John?

Best regards,
Rick C. Hodgin

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


#32457

FromQuadibloc <jsavard@ecn.ab.ca>
Date2016-01-02 20:30 -0800
Message-ID<98518c6f-00d4-4a82-883b-b7ac8a3df12e@googlegroups.com>
In reply to#32454
On Saturday, January 2, 2016 at 7:06:55 PM UTC-7, Rick C. Hodgin wrote:
> On Saturday, January 2, 2016 at 9:01:54 PM UTC-5, Quadibloc wrote:
> > - UNUM would make floating-point arithmetic anywhere from 5 to 100
> > times slower.
> 
> 5x to 100x slower?  What is your basis for this statement, John?

Well, it's true that _most_ of the features of UNUM would not impact the time 
required to perform floating-point operations at all. Keeping an inexact bit in 
the number is a great idea, and IEEE 478 already does determine if an operation 
creates inexactitude - it just puts it in a condition code bit instead of the 
number.

But dealing with variable-length numbers that can be arbitrarily long... that 
takes the numbers out of registers and puts them in memory. With indirection 
and garbage collection.

Thus, think of double-precision floating point versus packed decimal on the 
System/360.

However, on further reflection, UNUM might demand only a modest premium of 
speed (I think 2x, though, will still be left) if effort and some original 
ideas lead to a well-designed and efficient implementation.

John Savard

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


#32596

FromErik Trulsson <erikt@Update.UU.SE>
Date2016-01-08 08:35 +0000
Message-ID<n6nsbv$72p$1@Iltempo.Update.UU.SE>
In reply to#32425
Rick C. Hodgin <rick.c.hodgin@gmail.com> wrote:
> Nick Maclaren wrote:
>> 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.
> 
> Your statements contradict many points enumerated and explained
> point-by-point as to why unums were created.  IEEE-754 has errors that
> are unrelated to application-level coding methods.  For example,
> there is no requirement that two fully IEEE-754 compliant implementations
> on two separate machines do not have to yield the same results.  There
> is also no way to know if the IEEE-754 value is exact or not,

While it certainly is true that IEEE-754 has the limitations you name, I
do not think they are any real problem in practice.

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


#32601

From"Rick C. Hodgin" <rick.c.hodgin@gmail.com>
Date2016-01-08 05:34 -0800
Message-ID<8b723fa1-6383-442a-b6d9-91baddb1cb77@googlegroups.com>
In reply to#32596
On Friday, January 8, 2016 at 3:35:16 AM UTC-5, Erik Trulsson wrote:
> Rick C. Hodgin <rick.c.hodgin@gmail.com> wrote:
> > Nick Maclaren wrote:
> >> 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.
> > 
> > Your statements contradict many points enumerated and explained
> > point-by-point as to why unums were created.  IEEE-754 has errors that
> > are unrelated to application-level coding methods.  For example,
> > there is no requirement that two fully IEEE-754 compliant implementations
> > on two separate machines do not have to yield the same results.  There
> > is also no way to know if the IEEE-754 value is exact or not,
> 
> While it certainly is true that IEEE-754 has the limitations you name, I
> do not think they are any real problem in practice.

In my personal experience, and in many testimonies I've read, getting
accurate results from an IEEE-754 implementation is akin to guesswork
and assumption.  The only way I've found to be sure my answer is correct
even to the level of precision I'm computing at is to compute it at a
higher precision and perform the final round.

It is often times that I don't care about rounding issues as I'm really
only interested in the first few significant digits as these are
sufficient to get me to screen coordinates, or some logical X,Y,Z point
in something rendered frame-by-frame for animation.  But, when it comes
to proofing something, the final form, with the best graphics, and what
not, it requires that one compute at the higher value, and then round in
the end, otherwise odd artifacts arise which do appear odd (single pixels
off in 3D, for example, making what should be a crisp right angle have a
jagged appearance in it somewhere from the offset).

If it were guaranteed that a computation at a given precision could be
carried out to that precision without rounding, except at that precision,
the world of floating point would be a better place.  And in that same
breath, I would add that it would not have to be that way because often
times it's not needed beyond 4 or 5 significant digits, in which case a
tool like unum would be able to decrease its calculation width to such a
level, resulting in faster computation to meet the needs.

I view unum in all ways as a win-win-win-win:  unified number format,
flexibility, speed, and in meeting a developer at the point of their
needs, rather than forcing a hardware requirement upon their shoulders
which may not be desirable (64-bit encoding is not enough precision,
but 128-bit is way overkill, for example, so why not allow 96-bits?
Or 72-bits?  Et cetera).

The more I read the more impressed I am.  However, I am still not
completed with the book. :-)

Best regards,
Rick C. Hodgin

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


#32602

FromQuadibloc <jsavard@ecn.ab.ca>
Date2016-01-08 07:57 -0800
Message-ID<56dbb9b7-136e-4194-9b26-523822d2b0f8@googlegroups.com>
In reply to#32601
On Friday, January 8, 2016 at 6:34:22 AM UTC-7, Rick C. Hodgin wrote:

> I view unum in all ways as a win-win-win-win:  unified number format,
> flexibility, speed, and in meeting a developer at the point of their
> needs, rather than forcing a hardware requirement upon their shoulders
> which may not be desirable (64-bit encoding is not enough precision,
> but 128-bit is way overkill, for example, so why not allow 96-bits?
> Or 72-bits?  Et cetera).

And to many others, it is less promising:

- IEEE 754 is a unified number format, in the sense of being a standard that is widely accepted.

- UNUM is definitely more flexible, although you can't really choose what it does.

- With variable length words, and precision that can grow over requirements (simply because inputs are marked as exact doesn't mean you're looking for an exact result), UNUM is slower than any conventional format.

And as to your last point - that depends on what the developer does need. It's 
not as if one can _set_ the precision of UNUM; one can set the precision of 
input constants, but not control the precision later calculations will produce.

Something that provides improved accuracy, even at a high cost in speed, 
though, is going to be valuable in some cases. So it may be worth making 
something like UNUM available as an option - although the variable length is 
the one feature, having the highest cost, that I'd be most inclined to leave 
out.

John Savard

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


#32603

From"Rick C. Hodgin" <rick.c.hodgin@gmail.com>
Date2016-01-08 08:01 -0800
Message-ID<bc32d6eb-e976-4577-85d3-4c78f2365aef@googlegroups.com>
In reply to#32602
On Friday, January 8, 2016 at 10:57:19 AM UTC-5, Quadibloc wrote:
> On Friday, January 8, 2016 at 6:34:22 AM UTC-7, Rick C. Hodgin wrote:
> 
> > I view unum in all ways as a win-win-win-win:  unified number format,
> > flexibility, speed, and in meeting a developer at the point of their
> > needs, rather than forcing a hardware requirement upon their shoulders
> > which may not be desirable (64-bit encoding is not enough precision,
> > but 128-bit is way overkill, for example, so why not allow 96-bits?
> > Or 72-bits?  Et cetera).
> 
> And to many others, it is less promising:
> 
> - IEEE 754 is a unified number format, in the sense of being a standard that is widely accepted.

Nothing to prevent an interface mechanism that loads and stores from/to
IEEE-754 formats.

> - UNUM is definitely more flexible, although you can't really choose what it does.

It doesn't exist yet, so that's a false statement.  In the implementation
I would create, you would be able to have total control over the computation
engine, as it would be flexible enough to work with fixed precision, as well
as variable precision, and in the case of fixed precision it would include
special optimizations allowing for computation along standard IEEE-754 forms
with commensurate throughput.

> - With variable length words, and precision that can grow over requirements (simply because inputs are marked as exact doesn't mean you're looking for an exact result), UNUM is slower than any conventional format.
> 
> And as to your last point - that depends on what the developer does need. It's 
> not as if one can _set_ the precision of UNUM; one can set the precision of 
> input constants, but not control the precision later calculations will produce.
> 
> Something that provides improved accuracy, even at a high cost in speed, 
> though, is going to be valuable in some cases. So it may be worth making 
> something like UNUM available as an option - although the variable length is 
> the one feature, having the highest cost, that I'd be most inclined to leave 
> out.

You make a lot of what I believe are incorrect assumptions here, John.
You do not have a unum implementation to look at and say, "See, right
there, it doesn't do what you propose."

What I am proposing is what I would introduce in a piece of hardware which
supported unum.

I have already indicated the ability to set the computation precision to
N bits, as well as temporarily bumping it up or down to aid in preventing
rounding on a given part of a larger calculation.

I believe these are requirements of a unum implementation, and something
the very concept itself screams for.

Best regards,
Rick C. Hodgin

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


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

Back to top | Article view | comp.arch


csiph-web