downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

gmp_div_r> <gmp_div_q
[edit] Last updated: Fri, 17 May 2013

view this page in

gmp_div_qr

(PHP 4 >= 4.0.4, PHP 5)

gmp_div_qrDivide due numeri e restituisce quoziente e resto

Descrizione

array gmp_div_qr ( resource $n , resource $d [, int $round ] )

Questa funzione, esegue la divisione tra n e d , restituendo un array, il primo elemento è, [n/d] (il risultato intero della divisione) il secondo è (n - [n/d] * d) (cioè il resto della divisone).

Vedere la funzione gmp_div_q() per la descrizione dell'argomento round.

Example #1 Divisione di numeri GMP

<?php
    $a 
gmp_init ("0x41682179fbf5");
    
$res gmp_div_qr ($a"0xDEFE75");
    
printf("Result is: q - %s, r - %s"
            
gmp_strval ($res[0]), gmp_strval ($res[1]));
?>

Vedere anche gmp_div_q(), gmp_div_r().



add a note add a note User Contributed Notes gmp_div_qr - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites