Accuracy in rounding

82 Views Asked by At

I want to see if the following two rounding statements are true or false. If it is true, I want to prove it, and if it is false, I want to give a counterexample. I assume no overflow occurs in the calculations and the rounding mode used is any one of round down, round up, round towards zero, or round to nearest.

$1)$ If $x$ is a nonzero finite floating point number, then $\text{round}(x+x)$ = $2x$.

$2)$ If x and y are two finite floating point numbers, then $\text{round}(x-y)$ = $−\text{round}(y-x)$.

I am struggling to come up with a proper method to solve this. My instinct suggests to me that neither of these statements are true but I am struggling to find a counterexample. And also, if it is true, I am not entirely sure how to proceed with a proof.

I would greatly appreciate any assistance!