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
Anshu Mishra
3711 gold badge7 silver badges18 bronze badges
1 Answer 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);
answered Aug 18, 2016 at 5:33
Asif Rahaman
7756 silver badges10 bronze badges
Sign up to request clarification or add additional context in comments.
Comments
lang-php