[libre-riscv-dev] [Bug 44] IEEE754 FPU inverse-sqrt

bugzilla-daemon at libre-riscv.org bugzilla-daemon at libre-riscv.org
Mon Apr 29 10:46:01 BST 2019


http://bugs.libre-riscv.org/show_bug.cgi?id=44

--- Comment #3 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Jacob Lifshay from comment #1)
> (In reply to Luke Kenneth Casson Leighton from comment #0)
> > for 32-bit, to use "wtf" algorithm:
> > https://en.wikipedia.org/wiki/Fast_inverse_square_root#Overview_of_the_code
> > 
> > 16-bit and 64-bit, requires thought.
> 
> The "wtf" algorithm is not well suited for our needs, since Vulkan requires
> a much more accurate inv-sqrt operation than that algorithm provides, it
> requires several floating-point mul-adds, and adding more iterations of
> newton's method to fix the accuracy problems will increase the latency well
> beyond what a radix-4 digit-recurrence algorithm needs due to needing
> several passes through a multiplier.

 drat.

> One paper I found that may be useful:
> A Hardware Algorithm for Computing Reciprocal Square Root:
> https://scholar.google.com/
> scholar?cluster=4957662328282312533&hl=en&as_sdt=0,48
> http://www.acsel-lab.com/arithmetic/arith15/papers/ARITH15_Takagi.pdf

 ok good find.  it's a little hard to interpret, i do like how it has
 radix-2 and radix-4 implementations, radix-2 multiply basically being
 "multiply by -1, 0 or 1", radix-4 multiply including only "-2 and +2"
 in that, which is a bit-shift.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the libre-riscv-dev mailing list