This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

关于F28335运行时,反三角函数计算出错问题咨询

Other Parts Discussed in Thread: MATHLIB

1、程序代码烧写后,上电运行计算出错概述:

问题定位:反三角函数计算出错:

问题描述:

如定义double x=0.500472,计算y=asin(x)  得到 :y = -1.0467;

而正解为:y=0.5241

进一步确认: 当x>0.5或x<-0.5时,上述计算就会出错;当-0.5<x<0.5时,y=asin(x)计算正确。

2、带上仿真器,在线运行,未出现出错问题;

3、y=asin(x)函数,x的取值范围为[-1,1],而目前只能是[-0.5,0.5],很是费解,特向专家学者们寻求解决措施,望不吝赐教为谢!!