1

I am trying to execute below expression in php

pow(26, 36357)

It is showing incorrect output due to very long integer value.
How to deal with it and get the correct output?

asked Aug 18, 2016 at 5:14
0

1 Answer 1

1

you can use gmp_pow() functions if you have gmp extension enabled or bcpow() if you have bc_math extension enabled.

$a = gmp_pow(26, 36357);

or,

$a = bcpow(26, 36357);

gmp_pow(), bcpow()

answered Aug 18, 2016 at 5:33
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.