[libre-riscv-dev] fp special functions
Luke Kenneth Casson Leighton
lkcl at lkcl.net
Tue Aug 6 06:37:42 BST 2019
http://www.myhdl.org/docs/examples/sinecomp/
i think... ok, i think i'm right in saying that if using the CORDIC
algorithm, doing a version that takes its angle input ranging from 0
to 1 instead of 0 to 2pi is a simple matter of selecting an
alternative table for the angles:
angles = tuple([int(round(M*atan(2**(-i)))) for i in range(N)])
or
2pi = math.pi * 2
angles = tuple([int(round(M*atan(2pi * 2**(-i)))) for i in range(N)])
does that look about right?
l.
More information about the libre-riscv-dev
mailing list