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


Groups > comp.arch > #33243

Re: NR reciprocal/division without extended precision

From Terje Mathisen <terje.mathisen@tmsw.no>
Newsgroups comp.arch
Subject Re: NR reciprocal/division without extended precision
Date 2016-01-28 21:01 +0100
Organization Aioe.org NNTP Server
Message-ID <n8ds2n$1iq$1@gioia.aioe.org> (permalink)
References <0eb97c14-d5ac-4e93-b063-1d1eba7831e1@googlegroups.com> <n831ib$505$1@dont-email.me> <0a991790-09f0-490f-897a-d138176da966@googlegroups.com> <960d8ecf-d251-40fc-993a-78fb8b3d25ba@googlegroups.com>

Show all headers | View raw


already5chosen@yahoo.com wrote:
> On Sunday, January 24, 2016 at 7:46:12 PM UTC+2, MitchAlsup wrote:
>> On Sunday, January 24, 2016 at 11:30:29 AM UTC-6, James Van Buskirk
>> wrote:
>>
>>> There seems to be some sort of theorem that you need 2*n+1 bits
>>> of accuracy to get to n bit rounded perfectly.
>>
>> Its either 2n+2 or 2n+3 depending upon certain setups of the
>> iteration algorithm. And indeed Peter Markstein is the right
>> literature reference.
>
> First, let's agree on terminology: n bits of matissa + 1 hidden bit
> are considered n+1 bits. IEEE-754 binary64 = 53 bit.

The IEEE double has a n==52-bit mantissa. :-)

Otherwise there wouldn't be room for an 11-bit exponent and a sign bit.
>
> According to my math, y = 1-2^(-n-1) is the only argument in range
> [0.5..1) that requires 2n+3 bits for convergence. y = 1-3*2^(-n-1) is
> another argument that can ask for 2n+2 bits, but only in unusual
> rounding modes. In the default 'round to nearest even' mode it will
> converge to correct value with 2n+1 bits. It looks like 2n+1 bits are
> sufficient for the rest of the arguments in all rounding modes.

So what you are saying is that it might be worth it to recognize an 
all-1 mantissa and specialcase it in order to avoid the need for two 
extra bits of intermediate precision?

Terje

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

Back to comp.arch | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

NR reciprocal/division without extended precision already5chosen@yahoo.com - 2016-01-24 08:36 -0800
  Re: NR reciprocal/division without extended precision "James Van Buskirk" <not_valid@comcast.net> - 2016-01-24 10:29 -0700
    Re: NR reciprocal/division without extended precision MitchAlsup <MitchAlsup@aol.com> - 2016-01-24 09:46 -0800
      Re: NR reciprocal/division without extended precision already5chosen@yahoo.com - 2016-01-28 01:16 -0800
        Re: NR reciprocal/division without extended precision Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-28 21:01 +0100
          Re: NR reciprocal/division without extended precision already5chosen@yahoo.com - 2016-01-28 14:49 -0800
            Re: NR reciprocal/division without extended precision Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-29 07:38 +0100

csiph-web