[libre-riscv-dev] fp special functions

Jacob Lifshay programmerjake at gmail.com
Tue Aug 6 06:45:57 BST 2019


that appears correct, do note that you need to use something more accurate
than f64 to implement sin for f64 and the same for f32 and f16.

On Mon, Aug 5, 2019, 22:38 Luke Kenneth Casson Leighton <lkcl at lkcl.net>
wrote:

> 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.
>
> _______________________________________________
> libre-riscv-dev mailing list
> libre-riscv-dev at lists.libre-riscv.org
> http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
>


More information about the libre-riscv-dev mailing list