| Deutsch English Français Italiano |
|
<df16adb129e9f28d04c51c0f48276c50@www.novabbs.org> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder9.news.weretis.net!i2pn.org!i2pn2.org!.POSTED!not-for-mail
From: mitchalsup@aol.com (MitchAlsup1)
Newsgroups: comp.arch
Subject: Re: Continuations
Date: Mon, 22 Jul 2024 15:01:10 +0000
Organization: Rocksolid Light
Message-ID: <df16adb129e9f28d04c51c0f48276c50@www.novabbs.org>
References: <v6tbki$3g9rg$1@dont-email.me> <47689j5gbdg2runh3t7oq2thodmfkalno6@4ax.com> <v71vqu$gomv$9@dont-email.me> <116d9j5651mtjmq4bkjaheuf0pgpu6p0m8@4ax.com> <f8c6c5b5863ecfc1ad45bb415f0d2b49@www.novabbs.org> <7u7e9j5dthm94vb2vdsugngjf1cafhu2i4@4ax.com> <0f7b4deb1761f4c485d1dc3b21eb7cb3@www.novabbs.org> <v78soj$1tn73$1@dont-email.me> <v7dsf2$3139m$1@dont-email.me> <277c774f1eb48be79cd148dfc25c4367@www.novabbs.org> <v7ecrj$33vqv$1@dont-email.me> <20240722140115.000058cf@yahoo.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org;
logging-data="4174955"; mail-complaints-to="usenet@i2pn2.org";
posting-account="65wTazMNTleAJDh/pRqmKE7ADni/0wesT78+pyiDW8A";
User-Agent: Rocksolid Light
X-Rslight-Posting-User: ac58ceb75ea22753186dae54d967fed894c3dce8
X-Spam-Checker-Version: SpamAssassin 4.0.0
X-Rslight-Site: $2y$10$dlVluX2bnnW36Yg.vJZUduCQDSflCf6ri29w8LjO5BQZDovHx9D.2
Bytes: 2908
Lines: 38
On Mon, 22 Jul 2024 11:01:15 +0000, Michael S wrote:
> On Fri, 19 Jul 2024 20:55:47 +0200
> Terje Mathisen <terje.mathisen@tmsw.no> wrote:
>
>> MitchAlsup1 wrote:
>>> On Fri, 19 Jul 2024 14:16:01 +0000, Terje Mathisen wrote:
>>>> Back when I first looked at Invsqrt(), I did so because an
>>>> Computation Fluid Chemistry researcher from Sweden asked for help
>>>> speeding up his reciprocal calculations
>>>> (sqrt(1/(dx^2+dy^2+dz^2))), I found that by combining the 1/x and
>>>> the sqrt and doing three of them pipelind together (all the water
>>>> molecules having three atoms), his weeklong simulation runs ran in
>>>> half the time, on both PentiumPro and Alpha hardware.
>>>
>>> I, personally, have found many Newton-Raphson iterators that
>>> converge faster using 1/SQRT(x) than using the SQRT(x) equivalent.
>>
>> Yeah, that was eye-opening to me as well, to the level where I
>> consider the invsqrt() NR iteration as a mainstay, it can be useful
>> for both sqrt and 1/x as well. :-)
>>
>> Terje
>>
>
> What is this "SQRT(x) equivalent" all of you are talking about?
> I am not aware of any "direct" (i.e. not via RSQRT) NR-like method for
> SQRT that consists only of multiplicationa and additions.
> If it exists, I will be very interested to know.
There are certain N-R iterations that can be expressed with both::
NR+1 = F( NR, SQRT() )
and
NR+1 = F'(NR, RSQRT() )
Typically the one with RSQRT() converges slightly faster than the
one using SQRT(). How much is slightly::maybe ½-1 more bit per
iteration.