comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: Quick inverse square root
Date: Mon, 4 Jan 2021 00:47:13 +0100	[thread overview]
Message-ID: <rstl21$kg7$1@dont-email.me> (raw)
In-Reply-To: <7fe2291a-bc12-4708-85aa-0ffbdc25b2bfn@googlegroups.com>

On 1/3/21 11:31 PM, Matt Borchers wrote:
> 
> Thank you Jeff and Dmitry.  I have a generic functioning now.

Glad to have been of help.

Regarding the unsigned type, it seems this only works if F'Size = 32 or 64, so 
you could write versions that use Unsigned_32 and Unsigned_64, and then make 
your generic function do

if F'Size = 32 then
    return QISR32 (A);
elsif F'Size = 64 then
    return QISR64 (A);
else
    raise Program_Error with "F'Size must be 32 or 64";
end if;

But I don't understand why this exists. In what way is it better than the 
(inverse) Sqrt operation of the FPU?

-- 
Jeff Carter
"I'm a kike, a yid, a heebie, a hook nose! I'm Kosher,
Mum! I'm a Red Sea pedestrian, and proud of it!"
Monty Python's Life of Brian
77

  reply	other threads:[~2021-01-03 23:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-02 22:26 Quick inverse square root Matt Borchers
2021-01-02 23:18 ` Jeffrey R. Carter
2021-01-03 10:58 ` Dmitry A. Kazakov
2021-01-03 22:31   ` Matt Borchers
2021-01-03 23:47     ` Jeffrey R. Carter [this message]
2021-01-04  3:50       ` Matt Borchers
2021-01-04  4:28         ` Matt Borchers
2021-01-04 11:04         ` Jeffrey R. Carter
2021-01-04 11:13     ` AdaMagica
2021-01-04 11:28       ` AdaMagica
2021-01-04 12:13         ` Dmitry A. Kazakov
2021-01-04 13:39 ` Egil H H
2021-01-04 20:55   ` Matt Borchers
2021-01-04 21:06     ` Paul Rubin
2021-01-05  2:22       ` Matt Borchers
2021-01-07 17:49     ` Brian Drummond
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox