[Overview][Constants][Types][Classes][Procedures and functions][Index] |
Return real power.
Source position: math.pp line 314
function power( |
base: float; |
exponent: float |
):float; |
power raises base to the power power. This is equivalent to exp(power*ln(base)). Therefore base should be non-negative.
None.
|
Return integer power. |
Program Example34; { Program to demonstrate the power function. } Uses Math; procedure dopower(x,y : float); begin writeln(x:8:6,'^',y:8:6,' = ',power(x,y):8:6) end; begin dopower(2,2); dopower(2,-2); dopower(2,0.0); end.
lazarus-ccr.sourceforge.net |