We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0833f23 commit 424ba0fCopy full SHA for 424ba0f
ext/gmp/gmp.c
@@ -1140,14 +1140,7 @@ ZEND_FUNCTION(gmp_pow)
1140
RETURN_THROWS();
1141
}
1142
1143
- double powmax = log((double)ZEND_LONG_MAX);
1144
-
1145
INIT_GMP_RETVAL(gmpnum_result);
1146
- zend_ulong gmpnum = mpz_get_ui(gmpnum_base);
1147
- if ((log(gmpnum) * exp) > powmax) {
1148
- zend_value_error("base and exponent overflow");
1149
- RETURN_THROWS();
1150
- }
1151
mpz_pow_ui(gmpnum_result, gmpnum_base, exp);
1152
1153
/* }}} */
0 commit comments