I'm using formulas to gernerate a response curve and when I use the following function it gives the wrong answer when I use the compiled keyword. It works fine without being compiled, i was wondering if there was a known issue with the Math library or if there is a simple fix
function F(x){
"compiled";
return 1/(1.13+Math.exp(-8.0*(x-0.54)))+0.14;
}
i'm running the code on the original espruino with the latest firmware.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I'm using formulas to gernerate a response curve and when I use the following function it gives the wrong answer when I use the compiled keyword. It works fine without being compiled, i was wondering if there was a known issue with the Math library or if there is a simple fix
function F(x){
"compiled";
return 1/(1.13+Math.exp(-8.0*(x-0.54)))+0.14;
}
i'm running the code on the original espruino with the latest firmware.