2
0
Эх сурвалжийг харах

* improve math.power as suggested by Paolo Valle, resolves #40461

florian 1 жил өмнө
parent
commit
4794e5ffcf

+ 1 - 1
rtl/objpas/math.pp

@@ -1714,7 +1714,7 @@ function power(base,exponent : float) : float;
       result:=1.0
       result:=1.0
     else if (base=0.0) and (exponent>0.0) then
     else if (base=0.0) and (exponent>0.0) then
       result:=0.0
       result:=0.0
-    else if (abs(exponent)<=maxint) and (frac(exponent)=0.0) then
+    else if (frac(exponent)=0.0) and (abs(exponent)<=maxint) then
       result:=intpower(base,trunc(exponent))
       result:=intpower(base,trunc(exponent))
     else
     else
       result:=exp(exponent * ln (base));
       result:=exp(exponent * ln (base));