php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15837 gpm_powm()
Submitted: 2002-03-02 14:14 UTC Modified: 2002-03-02 17:48 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: sama at inf dot ufsc dot br Assigned:
Status: Not a bug Package: *Math Functions
PHP Version: 4.1.2 OS: Linux - Red Hat 7.2
Private report: No CVE-ID: None
 [2002-03-02 14:14 UTC] sama at inf dot ufsc dot br
The gpm function gpm_powm() doesn't work right. If you try to use it, it doesn't return the value.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-02 14:39 UTC] sander@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

 [2002-03-02 14:57 UTC] sama at inf dot ufsc dot br
The gpm function gpm_powm() doesn't work !! 

For example:

$x = gmp_init(10);
$y = gmp_init(15);
$m = gmp_init(20);

$assoc = gmp_powm($x,$y,$m);

gmp_powm($x,$y,$m)) doesn't return anything.
 [2002-03-02 15:15 UTC] sander@php.net
What do you mean with 'doesn't return anything'? Does it not return a 'Resource id'?
Anyway, your calculation returns 0 (10^15=1000000000000000, 1000000000000000%20=0). Is that what you mean?

What does the following sample script print for you:
<?php
echo ($x = gmp_init(3))."\n";
echo ($y = gmp_init(3))."\n";
echo ($m = gmp_init(20))."\n";

echo ($assoc = gmp_powm($x,$y,$m))."\n";
echo gmp_strval($assoc)."\n";
?>

Also, what's your configure line and your version of gmp?
 [2002-03-02 15:43 UTC] sama at inf dot ufsc dot br
I'm using PHP 4.1.2.

No, it doesn't return a 'Resource id'. The script doesn't work. It's sounds like an erro on this function because, if I comment it, the script work friendly. 

On my configure line I added --with-gmp.
 [2002-03-02 15:56 UTC] mfischer@php.net
You still failed to mention which version of gmp you are using.
 [2002-03-02 15:57 UTC] elixer@php.net
Lets try this again:

What is your ENTIRE configure line.  What version of GMP are you using?  What does that script print for you?  Does it print an error message?
 [2002-03-02 16:02 UTC] sama at inf dot ufsc dot br
I don't know ... Is gmp comming with php ?
 [2002-03-02 17:48 UTC] mfischer@php.net
No.

I'm bogusifying until you can answer the questions we asked you. Without those answers we cannot help you any further. Feel free to re-open if you have the necessary information.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 22:01:27 2024 UTC