---------- Forwarded Message ---------- Subject: binomial calculation wrong? Date: Thursday 29 December 2011, 15:39:03 From: "Michael Dambmann" <mich...@dambmann.de> To: thempirt...@gmail.com
<html><head></head><body bgcolor='#FFFFFF' style='font-size:10pt;background-color:#FFFFFF;font-family:Verdana, Arial, sans-serif;'>Dear mpir team,<br/> <br/> I have played around with the binomial calculation.<br/> The attached .cpp file is created with vs2010 and win7 64 bit.<br/> <br/> The resulting calculation seams to be not correct.<br/> e.g.:<br/> <br/> Normal Calculation : n=57 k=25 results in 9929472283517787 <== correct value<br/> MPIR calculation : n=57 k=25 results in 9929472283517786 <== wrong value<br/> <br/> I could track it down to the function:<br/> <p> <font face="Consolas" size="2"><font face="Consolas" size="2">mpz_get_d(result);</font></font></p> <br/> which will modify the outgoing value.<br/> Any idea why this happens?<br/> <br/> <br/> Best regards,<br/> Michael Dambmann<br/> <br/> <br/> <br/></body></html> ----------------------------------------- -- You received this message because you are subscribed to the Google Groups "mpir-devel" group. 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.
binomial_test.cpp
Description: Binary data