Top "Exponentiation" questions

Anything related to the exponentiation operation, i.e. the process of computing the power of a number, and the corresponding syntax, semantics, constraints and implementation in programming languages.

What does the ^ operator do in Java?

What function does the ^ (caret) operator serve in Java? When I try this: int a = 5^n; ...it gives me: for …

java operators exponentiation
The most efficient way to implement an integer based power function pow(int, int)

What is the most efficient way given to raise an integer to the power of another integer in C? // 2^3 pow(2,3) == 8 // 5^5 …

c algorithm math exponentiation
Exponentiation in Python - should I prefer ** operator instead of math.pow and math.sqrt?

In my field it's very common to square some numbers, operate them together, and take the square root of the …

python math exponentiation
How to cube a number

I just started using Python today for my class and one of my problems is cubing a number in Python. …

python syntax syntax-error exponentiation
Exponentiation operator in Swift

I don't see an exponentiation operator defined in the base arithmetic operators in the Swift language reference. Is there really …

swift exponentiation
How to do exponentiation in clojure?

How can I do exponentiation in clojure? For now I'm only needing integer exponentiation, but the question goes for fractions …

clojure exponentiation
Exponentiation in Haskell

Can someone tell me why the Haskell Prelude defines two separate functions for exponentiation (i.e. ^ and **)? I thought the …

haskell exponent exponentiation
Does pow() work for int data type in C?

I was simply writing a program to calculate the power of an integer. But the output was not as expected. …

c pow exponentiation
Integer exponentiation in OCaml

Is there a function for integer exponentiation in OCaml? ** is only for floats. Although it seems to be mostly accurate, …

integer ocaml floating-accuracy exponentiation
Store and work with Big numbers in C

I need help working with very big numbers. According to Windows calc, the exponent 174^55 = 1.6990597648061509725749329578093e+123 How would I store this …

c exponentiation