[libre-riscv-dev] [isa-dev] Re: FP transcendentals (trigonometry, root/exp/log) proposal

lkcl luke.leighton at gmail.com
Tue Sep 10 19:23:50 BST 2019



On Tuesday, September 10, 2019 at 5:43:52 PM UTC+1, Allen Baum wrote:
>
> I think identifying which subsets are important for which platform is a 
> first step. From there, you get to identify the cost for that platform 
> (e.g. for low performance requirement platforms, implementations that can 
> use cordic, and the added cost of additional ops after the may be fairly 
> insignificant. That might also be true of Mitch's implementations as well, 
> I don't know.
> Those costs may vary significantly by platform, i.e. even if the 
> additional cost is just more ROM, that could be significant in a smaller 
> implementation.
>


yehyeh, got it, agreed.  thanks for the suggestion, will see what i can do.

some of the areas have been discussed already: yes, atanh (etc.) can be 
synthesised - again, annoyingly, they don't produce correctly-rounded 
results that way [ASINH( x ) = ln( x + SQRT(x**2+1))] so in full-accuracy 
or high-performance circumstances, Zfhyp is needed.

some implementations (mitch's), they're definitely custom-optimised for 3D: 
0.65-0.5 ULP or so, and targetted at FP32 only.  it'd need an entire 
redesign to target FP64 or even IEEE754.

whereas CORDIC, although only doing one bit at a time (yes i saw RADIX-4 
CORDIC implementations out there), can be adapted to run a few more 
iterations (perhaps even use microcode to feed back twice), to get better 
accuracy or even handle both FP32 and FP64 with 2x the completion time on 
FP64.

i'll create sections for each.

l.


More information about the libre-riscv-dev mailing list