The bug is in your mpir_bincoef subroutine where you use a routine that 
returns a double as follows:

ret = mpz_get_d(result);

 to set a 64-bit value in ret:  

Since a double on Windows has a 53 bit mantissa, this will give wrong 
values for 64-bit values with longer bit lengths than this.

If you add:

#include <stdint.h>

to the file and then replace the above line with 

ret = mpz_get_ux(result);

it will, I think, work as expected.

     Brian

-- 
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/mpir-devel/-/r_ge6UJ-G30J.
To post to this group, send email to mpir-devel@googlegroups.com.
To unsubscribe from this group, send email to 
mpir-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/mpir-devel?hl=en.

Reply via email to