>1); $sum = 0; foreach ( $exp_member_array as &$exp ) { $i = $exp_sum_value_max_index; $gmp_sum_temp = gmp_init(1); while ( $exp > 0 ) { while ( $exp >= $i ) { $exp -= $i; $gmp_sum_temp = gmp_mul($gmp_sum_temp, $exp_sum_value[$i]); } $i >>= 1; } $sum += gmp_intval(gmp_div_r($gmp_sum_temp, gmp_init(RESULT_DIV_VALUE))); $sum %= RESULT_DIV_VALUE; } echo $sum.PHP_EOL;