In C#, Math.Pow() is a Math class method. This method is used to calculate a number raise to the power of some other number.
public static double Pow(double base, double power)
double base: It is a double-precision floating-point number which is to be raised to a power and type of this parameter is System.Double.
double power: It is a double-precision floating-point number which specifies a power or exponent and type of this parameter is System.Double.
Return Type: The function returns the number base raised to the power. The type of this method is System.Double
Input : base = 8, power =2 Output : 64 Input : base = 2.5, power =3 Output : 15.625
Program: To demonstrate the Math.Pow()
36 42.875 1664966416
- Difference between Method Overriding and Method Hiding in C#
- C# | Uri.MakeRelativeUri(Uri) Method
- Array.GetValue() Method in C# with Examples | Set - 1
- C# | CharEnumerator.MoveNext() Method
- C# | Math.IEEERemainder() Method
- C# | Substring() Method
- C# | IndexOfAny() Method
- C# | CharEnumerator.GetType() Method
- File.GetLastWriteTimeUtc() Method in C# with Examples
- MathF.Sin() Method in C# with Examples
- Double.CompareTo Method in C# with Examples
- C# | Graphics.DrawLine() Method | Set - 1
- UInt16.GetHashCode Method in C# with Examples
- Stack.Peek Method in C#
- C# | IsNullOrEmpty() Method
- C# | Math.Sign() Method
- Int64.CompareTo Method in C# with Examples
- C# | PadRight() Method
- How to use Array.BinarySearch() Method in C# | Set -1
- C# | EndsWith() Method
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.