SineCosine Example

group SinCosExample

Refer riscv_sin_cos_example_f32.c


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


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

Block Diagram:


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()