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

This commit is contained in:
florian 2023-10-15 23:14:08 +02:00
parent 2854f08daa
commit 4794e5ffcf

View File

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