SineCosine ExampleΒΆ

group SinCosExample

Refer riscv_sin_cos_example_f32.c

Description:

Demonstrates the Pythagorean trignometric identity with the use of Cosine, Sine, Vector Multiplication, and Vector Addition functions.

Algorithm:

Mathematically, the Pythagorean trignometric identity is defined by the following equation: where x is the angle in radians.

Block Diagram:

../../../_images/sinCos.png

Variables Description:

  • testInput_f32 array of input angle in radians

  • testOutput stores sum of the squares of sine and cosine values of input angle

NMSIS DSP Software Library Functions Used:

  • riscv_cos_f32()

  • riscv_sin_f32()

  • riscv_mult_f32()

  • riscv_add_f32()