[Shootout-list] k-nucleotide golden answers

Daniel South WildCard_25@HotMail.Com
Wed, 30 Mar 2005 00:35:42 +1000


Daniel South wrote:
| James McIlree wrote:
|| Somehow, I'm getting a different answer for 30305/100000
|| than you are. I think the answer should indeed be 30.30, but
|| I am not a fp whiz.
|
| Rounding error. 30.305 rounds to 30.31. 0.005 rounds up, 0.004 rounds
| down.
| I'm guessing you might just be dropping everything after the second
| decimal place instead of rounding.

In light of the additional discussion of rounding, I should mention that 
your program isn't rounding using the significant digit method either, 
that is rounding to nearest even. The conclusion I came to was also 
based on the result for G = 19.63. If the program was using that method 
then this result would have been 19.64.

Daniel South