gmp_gcdext() results are different for 32 bit & 64 bit machines

From: Date: Thu, 14 Apr 2011 21:47:54 +0000
Subject: gmp_gcdext() results are different for 32 bit & 64 bit machines
Groups: php.general 
Request: Send a blank email to php-general+get-312402@lists.php.net to get a copy of this message
Hi, I ran a few different numbers using gmp_gcdext on both 32 & 64 bit machines and most of the results are the same except the following example: <?php
        $r = gmp_gcdext("34293864345", "23434293864345");
        var_dump(gmp_strval($r['g']));
        var_dump(gmp_strval($r['s']));
        var_dump(gmp_strval($r['t']));
echo "Done\n"; ?> On a 32 bit machine, the results are: string(3) "195" string(14) "-4760039754357" string(10) "6965866288" Done On a 64 bit machine, the results are: string(3) "195" string(15) "-20983781660442" string(11) "30707772373" Done Does anyone know why I have different results for "s" and "t" on 32 bit and 64 bit machines? Thanks! Waiki Wright

« previous php.general (#312402) next »