Hi Team,
Here are some issues about sinf and cosf function need your help:
1. Some results are correct, and some of it are incorrect. What is the reason?
#define CONST_PI_32 3.14159265358979323846f float32_t tmp; tmp = (float32_t)sinf(CONST_PI_32/4); // 0.707106769,correct tmp = (float32_t)sinf(CONST_PI_32/4 + CONST_PI_32/5); // 0.987298429 tmp = (float32_t)sinf(CONST_PI_32/4 + CONST_PI_32/4); // 1.0, correct tmp = (float32_t)sinf(CONST_PI_32/4 + CONST_PI_32/3); // 0.0, incorrect tmp = (float32_t)cosf(CONST_PI_32/4); // 0.0, incorrect tmp = (float32_t)cosf(CONST_PI_32/4 + CONST_PI_32/5); // -0.00242325524, correct or not? tmp = (float32_t)cosf(CONST_PI_32/4 + CONST_PI_32/4); // 0.0, correct tmp = (float32_t)cosf(CONST_PI_32/4 + CONST_PI_32/3); // 0.0, incorrect
2. Are the parameter range of sinf and cosf from (-Pi) to (Pi)?
--
Thanks & Regards