请问CH32V208在使用log时候报错如何处理,已经调用math.h
const float K=273.15;
const float T2=K+25;
const float B=3950.0;
const float R25=100.0; //100k热敏电阻
////https://blog.csdn.net/freemote/article/details/120350187
float Get_Temp(float Rntc)
{
float T1,Temp;
T1=1/((log(Rntc/R25))/B+1/T2);
// printf("T1=%f\r\n",T1);
Temp=T1-K;
// printf("Temp=%f\r\n",Temp);
return Temp;
}
热门产品 :
CH641: PD及无线充电专用MCU