Calculate (base
raised into power exp
) modulo mod
. If exp
is negative, result is undefined.
The base number.
Either a GMP number resource in PHP 5.5 and earlier, a GMP object in PHP 5.6 and later, or a numeric string provided that it is possible to convert the latter to a number.
The positive power to raise the base
.
Either a GMP number resource in PHP 5.5 and earlier, a GMP object in PHP 5.6 and later, or a numeric string provided that it is possible to convert the latter to a number.
The modulo.
Either a GMP number resource in PHP 5.5 and earlier, a GMP object in PHP 5.6 and later, or a numeric string provided that it is possible to convert the latter to a number.
The new (raised) number, as a GMP number.
1 2 3 4 | <?php $pow1 = gmp_powm( "2" , "31" , "2147483649" ); echo gmp_strval( $pow1 ) . "\n" ; ?> |
The above example will output:
2147483648
Please login to continue.