pow() in the cmath library. More info here.
Don’t forget to put #include<cmath>
at the top of the file.
More Related Contents:
- How to find out the date of the first day of week from the week number in C++
- How approximation search works
- Is there a standard sign function (signum, sgn) in C/C++?
- C/C++: Pointer Arithmetic
- How can I write a power function myself?
- Fastest way to determine if an integer is between two integers (inclusive) with known sets of values
- Creating all possible k combinations of n items in C++
- Finding all the subsets of a set
- Representing 128-bit numbers in C++
- Increasing accuracy of solution of transcendental equation
- How to convert Euler angles to directional vector?
- Why isn’t `int pow(int base, int exponent)` in the standard C++ libraries?
- how do I make a portable isnan/isinf function
- Rotate and translate object in local and global orientation using glm
- Compute objects moving with arrows and mouse
- Fastest implementation of sine, cosine and square root in C++ (doesn’t need to be much accurate)
- Fastest algorithm for primality test [closed]
- Special simple random number generator
- How computer does floating point arithmetic?
- What are the most widely used C++ vector/matrix math/linear algebra libraries, and their cost and benefit tradeoffs? [closed]
- Confusion between C++ and OpenGL matrix order (row-major vs column-major)
- Efficiently getting all divisors of a given number
- What is half open range and off the end value
- Best library for statistics in C++? [closed]
- Optimizations for pow() with const non-integer exponent?
- OpenSouce C/C++ Math expression parser Library [closed]
- self made pow() c++
- Area of rectangle-rectangle intersection
- Finding square root without using sqrt function?
- Is there any advantage to using pow(x,2) instead of x*x, with x double?