PHP 8.3.4 Released!

gmp_mul

(PHP 4 >= 4.0.4, PHP 5, PHP 7, PHP 8)

gmp_mulProdotto di numeri

Descrizione

gmp_mul(resource $a, resource $b): resource

Moltiplica a per b e restituisce il risultato.

add a note

User Contributed Notes 1 note

up
-12
Anonymous
17 years ago
<?php
function fact($x)
{
$factorial = 1;
for (
$i=2; $i < $x; $i++) {
$factorial = gmp_mul($factorial, $i);
}
return
$factorial;
}

echo
gmp_strval(fact(1000)) . "\n";
?>
To Top