🌐
W3Schools
w3schools.com › jsref › jsref_pow.asp
W3Schools.com
The Math.pow() method returns the value of x to the power of y (xy).
Discussions

Math.pow() Method Not Operating Correctly? - Programming & Development - Spiceworks Community
I am working with the Math.pow(); method, and I am not sure exactly what it is doing. For example, if I declare an integer called power that is equal to 2, then I use Math.pow(); to raise it by 2, to the power of 2. When I then print it, I still get 2. That definitely does not seem correct to me. More on community.spiceworks.com
🌐 community.spiceworks.com
0
July 15, 2015
Math.pow
The math.pow() function can be used to raise a number to a power and takes in two parameters - the base and the power that you'd like to raise the base to. Here's a link to some documentation on the math.pow() function in C# from the GeeksforGeeks.org website that explains how the function works and provides some examples of how it can be used. A quick example would be using the math.pow() function to square a number. If we wanted to find out what 52 is, we could do something like this: double result = math.pow(5, 2);. This would store the result (25) in the result variable. You could then print the value of result to the screen or use it elsewhere in your program. More on reddit.com
🌐 r/learnprogramming
6
4
September 16, 2019
Can someone help me with (long)Math.Pow(number, power)?
long is a value type . putting (long) before is called casting edit: I was tired when I put that. But now to explain a little more. int and long are similar value types, just long can hold bigger numbers. the (long) before Math.Pow explicitly casts the double that would be normally produced to a long integer. If you didn't put (long) in front of it you would have to use double for the variable type or you would get a compiler error cannot implicitly convert type double to long(or int for that matter). Also, explicitly casting a double to a long will lose some precision. Basically anything after the decimal point would be lost. Not a problem if all you want is whole numbers, but can cause some math errors if you are not careful. More on reddit.com
🌐 r/learncsharp
1
3
September 30, 2017
Can somebody please help me with Math.pow and specifically raising to the power of.
This is what I have at the minute but it doesn't work. In what way doesn't it work? Please let us know the actual error you're getting. For your pasted code, Java syntax is much more rigid than math syntax. See here for a reference on Java operators. In particular, in math notation, multiplication is implied when you put two things next to each other. That's not true of Java. You need to explicitly use the multiplication operator. EDIT: It also seems you need to define k and ans unless they're instance variables with definitions you haven't included with your code snippet. If you haven't programmed in Java I'd strongly recommend reading some reference material. There are docs on the official Oracle site here More on reddit.com
🌐 r/java
6
0
June 26, 2013
🌐
Interactive Chaos
interactivechaos.com › en › python › function › mathpow
math.pow | Interactive Chaos
February 1, 2021 - The math.pow function returns the result of raising x to y.
🌐
Oracle
docs.oracle.com › cd › B40099_02 › books › eScript › eScript_JSReference232.html
Bookshelf v8.0: Math.pow() Method
Siebel eScript Language Reference > Siebel eScript Commands > Math Objects > · This function returns the value of its first parameter raised to the power of its second parameter
🌐
Spiceworks
community.spiceworks.com › programming & development
Math.pow() Method Not Operating Correctly? - Programming & Development - Spiceworks Community
July 15, 2015 - I’m new to Java. I am working with the Math.pow(); method, and I am not sure exactly what it is doing. For example, if I declare an integer called power that is equal to 2, then I use Math.pow(); to raise it by 2, to the…
Find elsewhere
🌐
Tibco
docs.tibco.com › pub › bstudio-decisions-addin › 1.3.0 › doc › Functions › Math › pow.html
Math.pow()
If the first argument is finite and less than zero if the second argument is a finite even integer, the result is equal to the result of raising the absolute value of the first argument to the power of the second argument if the second argument is a finite odd integer, the result is equal to ...
🌐
GeeksforGeeks
geeksforgeeks.org › python › math-pow-in-python
math.pow() in Python - GeeksforGeeks
July 23, 2025 - In Python, math.pow() is a function that helps you calculate the power of a number. It takes two numbers as input: the base and the exponent.
🌐
Math.js
mathjs.org › docs › reference › functions › pow.html
math.js
Calculates the power of x to y, x ^ y. Matrix exponentiation is supported for square matrices x and integers y: when y is nonnegative, x may be any square matrix; and when y is negative, x must be invertible, and then this function returns inv(x)^(-y). For cubic roots of negative numbers, the ...
🌐
Oracle
docs.oracle.com › javase › 8 › docs › api › java › lang › Math.html
Math (Java Platform SE 8 )
October 20, 2025 - Returns the value of the first argument raised to the power of the second argument.
🌐
Google Groups
groups.google.com › g › golang-nuts › c › GOviOxfkt2E
math.Pow(N, 2) slowness
As has been stated by others, Pow(x,y) is capable of Pow(Pi,E) and all you want is X*X, so just compute X*X. (Depending on the larger algorithm, you might get away without the sqrt too --- if all you need is to order based on sqrt then ordering on the square of that will give you the same order.) On Wed, Feb 26, 2014 at 12:08 AM, S.Çağlar Onur <cag...@10ur.org> wrote: ... So are you saying the ~10x difference is caused by calling the math.Pow 4 times and hence function call overhead?
🌐
W3Schools
w3schools.com › java › ref_math_pow.asp
Java Math pow() Method
The pow() method raises a number to the power of another number.
🌐
Programiz
programiz.com › c-programming › library-function › math.h › pow
C pow() - C Standard Library
The pow() function takes two arguments (base value and power value) and, returns the power raised to the base number.
🌐
Arduino
docs.arduino.cc › language-reference › en › functions › math › pow
pow()
April 25, 2025 - Arduino programming language can be divided in three main parts: functions, values (variables and constants), and structure · For controlling the Arduino board and performing computations
🌐
GeeksforGeeks
geeksforgeeks.org › java › math-pow-method-in-java-with-example
Math pow() Method in Java with Example - GeeksforGeeks
March 28, 2025 - Example 1: This example demonstrates how to use the Math.pow() method in Java to calculate the power of a number (base raised to the exponent).
🌐
Maxtoroq
maxtoroq.github.io › xpath-ref › math › pow.html
math:pow
Otherwise $y is converted to an xs:double by numeric promotion, and the result is the value of $x raised to the power of $y as defined in the [IEEE 754-2008] specification of the pow function applied to two 64-bit binary floating point values. The treatment of the divideByZero and invalidOperation exceptions is defined in Arithmetic operators on numeric values. Some of the consequences are illustrated in the examples below. The expression math:pow((), 93.7) returns ().
🌐
W3Schools
w3schools.com › python › ref_math_pow.asp
Python math.pow() Method
The math.pow() method returns the value of x raised to power y.
🌐
LeetCode
leetcode.com › problems › powx-n
Pow(x, n) - LeetCode
Can you solve this real interview question? Pow(x, n) - Implement pow(x, n) [http://www.cplusplus.com/reference/valarray/pow/], which calculates x raised to the power n (i.e., xn).
🌐
Reddit
reddit.com › r/learncsharp › can someone help me with (long)math.pow(number, power)?
r/learncsharp on Reddit: Can someone help me with (long)Math.Pow(number, power)?
September 30, 2017 -

For a homework assignment, we had to show multiples of 2 showing 21, 22, etc. Our book didn't even touch on this (of course), but after some research I found (long)Math.Pow(number, power). After some more research I got it to work. We had to have it loop 40 times and everything is correct, but I don't really know what the (long) is. It's with int and it looks like Math.Pow usually works with double but I didn't use double. Is this converting my int to something called long? I've been googling, but I'm not really coming up with any concrete answers.