mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-07 20:26:29 +02:00
- Removed redundant functions "power", they were neither used nor accessible through interface. The actual function "power" is located in Math unit.
git-svn-id: trunk@27499 -
This commit is contained in:
parent
4a969eef33
commit
2981f73aaa
@ -246,30 +246,4 @@
|
||||
end;
|
||||
|
||||
|
||||
{$define FPC_SYSTEM_HAS_POWER}
|
||||
function power(bas,expo : ValReal) : ValReal;
|
||||
begin
|
||||
if bas=0 then
|
||||
begin
|
||||
if expo<>0 then
|
||||
power:=0.0
|
||||
else
|
||||
HandleError(207);
|
||||
end
|
||||
else if expo=0 then
|
||||
power:=1
|
||||
else
|
||||
{ bas < 0 is not allowed when doing roots }
|
||||
if (bas<0) and (frac(expo) <> 0) then
|
||||
handleerror(207)
|
||||
else
|
||||
begin
|
||||
power:=exp(ln(abs(bas))*expo);
|
||||
if (bas < 0) and
|
||||
odd(trunc(expo)) then
|
||||
begin
|
||||
power := -power;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@ -252,29 +252,6 @@ const
|
||||
end;
|
||||
{$endif FPC_SYSTEM_HAS_ROUND}
|
||||
|
||||
|
||||
{$ifndef FPC_SYSTEM_HAS_POWER}
|
||||
{$define FPC_SYSTEM_HAS_POWER}
|
||||
function power(bas,expo : extended) : extended;
|
||||
begin
|
||||
if bas=0 then
|
||||
begin
|
||||
if expo<>0 then
|
||||
power:=0.0
|
||||
else
|
||||
HandleError(207);
|
||||
end
|
||||
else if expo=0 then
|
||||
power:=1
|
||||
else
|
||||
{ bas < 0 is not allowed }
|
||||
if bas<0 then
|
||||
handleerror(207)
|
||||
else
|
||||
power:=exp(ln(bas)*expo);
|
||||
end;
|
||||
{$endif FPC_SYSTEM_HAS_POWER}
|
||||
|
||||
{$else FPC_HAS_TYPE_EXTENDED}
|
||||
|
||||
{$define FPC_SYSTEM_HAS_TRUNC}
|
||||
|
Loading…
Reference in New Issue
Block a user