Disable softfloat FPU exceptions lazarus / 43-Android ---------------------------------------------------------------------- meanderix · 2012-06-25 16:44 I was getting FPU underflow exceptions when using the software emulated floats (I did not get this with an ordinary FPU.) However, I figured out that everything worked fine if I added the following line when starting my app: Code: [Select]  softfloat_exception_mask := $ff;        // from Math unit Reposting here in case anyone else should come across this problem. ---------------------------------------------------------------------- meanderix · 2012-07-26 10:48 Ok, I found the source of my floating point errors: Code: [Select]  function power(base,exponent : float) : float;   begin     if Exponent=0.0 then       result:=1.0     else if (base=0.0) and (exponent>0.0) then       result:=0.0     else if (abs(exponent)<=maxint) and (frac(exponent)=0.0) then       result:=intpower(base,trunc(exponent))     else if base>0.0 then       result:=exp(exponent * ln (base))     else       InvalidArgument;   end; This function is not working correctly, but it works fine if I change it like this: Code: [Select]  function power(base,exponent : float) : float;   begin     if Exponent=0.0 then       result:=1.0     else if (base=0.0) and (exponent>0.0) then       result:=0.0     else if base>0.0 then       result:=exp(exponent * ln (base))     else       InvalidArgument;   end; Should this be reported?