I have two numbers, $A$ and $B$, that are sums of integer multiples of a set of square roots of small primes (and 1) and their products:
$A = a_0 + a_1\sqrt 2 + a_2\sqrt 3 + a_3\sqrt 5 + a_4\sqrt 6 + a_5\sqrt{10} + a_6\sqrt{15} + a_7\sqrt{30}$
$B = b_0 + b_1\sqrt 2 + b_2\sqrt 3 + b_3\sqrt 5 + b_4\sqrt 6 + b_5\sqrt{10} + b_6\sqrt{15} + b_7\sqrt{30} $
I would like to be able to compare A and B by approximating the square roots with rational approximations based on an $n$th convergent from a continued fraction representation of each square root. I need to keep the accumulated error from these approximations less than $2^{-32}$, with each term contributing approximately the same amount of error. The results of the comparison need to be exact (the same as if the square roots were not approximated). Each coefficient $a_k$ and $b_k$ are between $-2^{31}$ and $2^{31} - 1$ (signed 32-bit integers). How do I go about finding convergents of sufficiently small error? I am inexperienced with both numerical analysis and Diophantine approximation I'm afraid.
*Update*
I want to clarify that I'm not insisting on a continued fraction or rational number representation for the square roots. A binary fixed-point representation of sufficient accuracy is fine. I just want to be confident in the results of these comparisons by understanding how to evaluate and control the error.
I also want to clarify that it is alright for results that are very close to be counted as equal, but it is not alright for results that are very close to be counted as "less than" when they should be "greater than or equal" or vice versa.