|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-03-02 11:44 UTC] sama at inf dot ufsc dot 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. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 00:00:02 2025 UTC |
Example: $x = gmp_init("0x00d2d025ec7e1dbb6d778a52394c988594c57b47d7327a3e676d3a5ca7a5af87c4153c80994cf781f6a9d4a2f0e66d04baffb0059853a8937a895f6d17e76950e1"); // mod $y = gmp_init("6211846575289879599"); // value $w = gmp_invert($y,$x); The $w value should be : 6673516182899846998314488146047624198500176381239637064622226136275029334435034698239463153441869117173460635003602664197747901516108936488872273669129832