Bug #15835 Updated: Problem on function gmp_invert ()

From: Date: Sun, 03 Mar 2002 11:42:29 +0000
Subject: Bug #15835 Updated: Problem on function gmp_invert ()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-1545@lists.php.net to get a copy of this message
ID: 15835 Updated by: sander@php.net Reported By: sama@inf.ufsc.br -Status: Open +Status: Feedback Bug Type: *Math Functions Operating System: Linux - Red Hat 7.2 PHP Version: 4.1.2 New Comment: I can't get gmp_invert() return anything other than false, but that might be because I have no idea what gmp_invert() does :) Can you supply some (human understandable) data that does work? Previous Comments: ------------------------------------------------------------------------ [2002-03-02 14:20:49] sama@inf.ufsc.br Example: $x = gmp_init("0x00d2d025ec7e1dbb6d778a52394c988594c57b47d7327a3e676d3a5ca7a5af87c4153c80994cf781f6a9d4a2f0e66d04baffb0059853a8937a895f6d17e76950e1"); // mod $y = gmp_init("6211846575289879599"); // value $w = gmp_invert($y,$x); The $w value should be : 6673516182899846998314488146047624198500176381239637064622226136275029334435034698239463153441869117173460635003602664197747901516108936488872273669129832 ------------------------------------------------------------------------ [2002-03-02 13:29:43] elixer@php.net Please provide a short reproducing script with values that you are using and expected output. Sean ------------------------------------------------------------------------ [2002-03-02 11:44:47] sama@inf.ufsc.br The function resource gmp_invert() doesn't work right. It always return zero. I implemented the extended Euclides algoritm that do exactly the same that this function and, it returned me the right value. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=15835&edit=1

« previous php.bugs (#1545) next »