mpf_div changes value on a variable which doesn't participate in the division.
magnusdicander at gmail.com
Sun Jan 8 10:50:44 CET 2012
I have written a big program which uses groups of 3 mpf_t number which i
call three-d-bignums. I have written a function to print
three-d-bignums. I have 2 division-functions for three_d_bignums, but
they only call mpf_div three times each. When i run my big program,
mpf_div changes the value on a variable which doesn't participate in the
division. How to replicate this bug:
1: Compile and run my program.
2: Say n to the question.
3: Search the program and the output for the text-string
"afterdiv" (without the brackets).
4: You will see that the variable
"electronepointers->velocity_pointer" has different value after the
division compared with before the division, despite the fact that it
does not participate in the division.
The program sets precision to 1000 bits.
I use gmp 5.02.
I have tried this program on 2 Linux PC:s. One 64-bit-PC and one
32-bit-PC. Both changes the value of the variable which does not
participate in the division.
Please tell me if you need more information about this bug.
Sernanders väg 2/714
Epost: magnus at dicander.com
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 37308 bytes
Desc: not available
More information about the gmp-bugs