Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

When I add 1/3 and 2/3 in double precision, I ended up with $1.\boxed{111\ldots1}1\times2^{-1}$, where the boxed part is the 52-bit mantissa. By the rounding to even rule, I should round it up, right? So is it true if I get $10.\boxed{000\ldots0}\times2^{-1}=1.\boxed{000\ldots0}$ as the final answer?

share|improve this question
    
I'm just anxious because there seems to be too many carrying. –  adnadjnj Feb 16 '12 at 9:24
    
In general, if you cannot be sure of the correctness of your own calculation, one of the good ways to check the correctness is by writing down steps more carefully. In your case, the first step is to represent 1/3 and 2/3 as double-precision floating-point numbers. –  Tsuyoshi Ito Feb 16 '12 at 14:33
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.