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


Groups > comp.arch > #33269

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-29 07:38 +0100
Organization Aioe.org NNTP Server
Message-ID <n8f1dl$1e7v$1@gioia.aioe.org> (permalink)
References (1 earlier) <n831ib$505$1@dont-email.me> <0a991790-09f0-490f-897a-d138176da966@googlegroups.com> <960d8ecf-d251-40fc-993a-78fb8b3d25ba@googlegroups.com> <n8ds2n$1iq$1@gioia.aioe.org> <39db337e-e09f-4d69-a860-53a26788788f@googlegroups.com>

Show all headers | View raw


already5chosen@yahoo.com wrote:
> On Thursday, January 28, 2016 at 10:01:33 PM UTC+2, Terje Mathisen
>> 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?
>
> I think, the best practical solution would be to generate an exact
> result for this bit pattern as an initial approximation. With
> table-driven initial approximation it will be really easy. For
> example, 16-entry table addressed by 4 MS bit of mantissa: 0 =>
> 32/sqrt(16*17), // [16/32..17/32) 1 => 32/sqrt(17*18), //
> [17/32..18/32) 2 => 32/sqrt(18*19), // [18/32..19/32) ... 14
> =>32/sqrt(30*31), // [30/32..31/32) 15 =>1-2^-53,        //
> [31/32..1)
>
> Pay attention that the worst case relative error in "asymmetric" last
> range is approximately the same as in symmetric first range, so # of
> required NR steps is not impacted by the trick.

Yeah, that would work. The only real drawback is the fact that you have 
to work with full double precision all the way, instead of starting with 
4-5 bits and doubling it in each stage.

The latter approach is more interesting for a sw emulation using 
unsigned integer operations!

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 | 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