[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
possible bug in mpz_remove
From: |
Peter Keller |
Subject: |
possible bug in mpz_remove |
Date: |
Tue, 9 Jul 2002 19:09:09 -0500 |
User-agent: |
Mutt/1.2i |
Hello,
My name is Peter Keller, and I'd like to report a possible bug in mpz_remove.
Here is the relevant data as requested from the manual:
Version:
--------
GMP 4.1
Test Program:
-------------
#include <stdio.h>
#include <stdlib.h>
#include "gmp.h"
int main(void)
{
mpz_t v0, v1, v2;
mpz_init(v0);
mpz_init(v1);
mpz_init(v2);
mpz_set_ui(v1, 28); /* 7 * 2 * 2 */
mpz_set_ui(v2, 2);
mpz_remove(v0, v1, v2); /* v1 is supposed to get multiplicity of v2 */
gmp_printf("v0 = %Zd\n", v0);
gmp_printf("v1 = %Zd\n", v1); /* should be 2, but it isn't */
gmp_printf("v2 = %Zd\n", v2);
mpz_clear(v0);
mpz_clear(v1);
mpz_clear(v2);
return(0);
}
What is wrong:
--------------
After the mpz_remove, I think I'm supposed to get a '2' in v1 as the
multiplicity of that factor in 28. I'm just learning GNU MP, so if I've used
this function wrong, please let me know how it is supposed to be used.
Do I get a crash:
-----------------
No crash happened.
Configuration options for GNU MP:
---------------------------------
./configure
make
make install
Name of Compiler and Revision:
------------------------------
Linux black > gcc -v
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/specs
gcc version 2.95.3 20010315 (release)
uname -a:
---------
Linux black > uname -a
Linux black 2.4.2 #6 Fri Apr 6 07:01:54 CDT 2001 i686 unknown
running ./config.guess:
-----------------------
Linux black > ./config.guess
athlon-pc-linux-gnu
If you have questions, I'd be happy to answer them as best as I can.
Thank you.
-pete
- possible bug in mpz_remove,
Peter Keller <=