function Power(const Base: TOpenCLValue; const Exponent: TOpenCLValue): TOpenCLValue;
Raises base object elements to any power.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Base | TOpenCLValue | |
| 2 | Exponent | TOpenCLValue |
Returns: TOpenCLValue
Remarks:
Raises Base calling object elements to any power. The clValue.IntPower is faster, if Exponent is an integer. Real valued power can handle only positive Exponent. clValue.IntPower can handle negative exponent also. To compute a power to the negative exponent in general case or when the base is negative, use the complex version of the function.
Examples
var a,b: clValue;
begin
b.Copy(2.3);
c.Copy(4);
a.Power(b, c); // // a = b^c
end;
See Also: clValue.IntPower