You are here: Symbol Reference > Dew Namespace > Dew.Math Namespace > Classes > TOpenCLValue Class > TOpenCLValue Methods > Power Method > TOpenCLValue.Power Method (TOpenCLValue, TOpenCLValue)
Dew Math for .NET
ContentsIndexHome
PreviousUpNext
TOpenCLValue.Power Method (TOpenCLValue, TOpenCLValue)

Raises base to any power.

Syntax
C#
Visual Basic
public TOpenCLValue Power(TOpenCLValue Base, TOpenCLValue Exponent);

Computes Base^(Exponent). The IntPower is faster, if Exponent is an integer. Real valued power can handle only positive Exponent. 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.

using Dew.Math; using Dew.Math.Units; namespace Dew.Examples() { void Example() { TOpenCLValue a,b,c; clMtxVec.CreateIt(out a, out b, out c); try { b.Copy(2.3); c.Copy(4); a.Power(b, c); // a = b^c } finally { clMtxVec.FreeIt(ref a, ref b, ref c); } } }
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!