function Power(Base: TOpenCLValue; Exponent: TOpenCLValue): TOpenCLValue;
Raises base to any power.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Base | TOpenCLValue | source TOpenCLValue |
| 2 | Exponent | TOpenCLValue | source TOpenCLValue |
Returns: TOpenCLValue
Remarks:
Computes Base^(Exponent). The TOpenCLValue.IntPower is faster, if Exponent is an integer. Real valued power can handle only positive Exponent. TOpenCLValue.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: TOpenCLValue.IntPower