CMSIS_5 icon indicating copy to clipboard operation
CMSIS_5 copied to clipboard

arm_sin_cos_f32 Theta Value BUG

Open schuppenkarp opened this issue 6 years ago • 1 comments

For the function arm_sin_cos_f32 in documentation is writen that theta should be in range of -180 to 180 degree.

But the function is dividing theta first by 360 That means that theta must be multiplied by 360 befor calling the function to get right cos and sin values.

Remove dividing by 360 Or change the range for theta in documentation to [-180*360, 180*360]

schuppenkarp avatar Dec 16 '19 17:12 schuppenkarp

I have computed arm_sin_cos_f32 for several values between -180.0 and 180.0 and the results are correct. So there are no issues.

The comment is just saying that theta is multiplied by 1.0 / 360.0

It does not imply that theta must be between 0 and 360 degree in input. And, as checked it can be between -180.0 and 180.0.

sincos

christophe0606 avatar Dec 17 '19 12:12 christophe0606