-
Notifications
You must be signed in to change notification settings - Fork 13.3k
math log() function crashes with reboot. #354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Not sure if it helps, below is the data from crash: ets Jan 8 2013,rst cause:4, boot mode:(3,0) wdt reset |
Crashes here, too. Try to live with that: float log(float dings) { if (ln10<0) { float ln(float x) { int c=1; return res+res; Oh. And "somethingfloat==somethingother" is always wrong. |
Same as #233. |
Thank you. The above functions works as a fix for me. Hope they will be able to fix in the toolchain also. It seems that many functions related to math have issues... |
Fixed in esp8266 branch. |
Hi,
I have a dew point calculation function which use log() and when used the ESP crashes and reboots.
Here is the code for it.
float dewPointFast(float celsius=0, float humidity=0)
{
if(celsius==0 && humidity ==0) return (float) 0.00;
const float a = 17.271;
const float b = 237.7;
float temp = (float)((a * celsius) / (b + celsius));
temp+= log(humidity/100); //this crashes and reboots
float Td = (float)((b * temp) / (a - temp));
return Td;
}
It seems that log10() does the same so it might worth having a look at that too.
Thanks!
The text was updated successfully, but these errors were encountered: