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

bugzilla-daemon at libre-riscv.org bugzilla-daemon at libre-riscv.org
Mon Apr 29 08:55:02 BST 2019


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

Jacob Lifshay <programmerjake at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |programmerjake at gmail.com

--- Comment #1 from Jacob Lifshay <programmerjake at gmail.com> ---
(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.

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

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


More information about the libre-riscv-dev mailing list