I was fooling around with spreadsheet formulas, and created a series of rational approximations for the square root of 3: 7/4, 26/15, 97/56 etc. This is based on the continued fraction expansion for square roots. Each ratio N/D has the property that N^2 is one more than 3*(D^2)=K. I was curious to see how the error values behave. The straightforward formula ((N/D)/sqrt(3))-1 works fine for the first few entries, but eventually turns into zero, as the string of zeroes between the 1. and the epsilon exceeds the storage capacity for floating point numbers. Alternately, the simpler formula 1/(2K) becomes more and more accurate, but is inaccurate for the first few entries. So, my workaround is to use a conditional formula which uses one expression or the other, based on the magnitude of K. But I'm not sure how much accuracy I really get this way for a range of "middle" values. I'm not sure where the cutoff point should be for a given floating point standard.(adsbygoogle = window.adsbygoogle || []).push({});

I tried to express epsilon in a way that could be calculated more accurately, so far without success. Could someone point me to a (hopefully free) resource that addresses these basic numerical analysis issues? General or specific help would be welcome. Thanks for your time.

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Formulas of the form (1+epsilon)-1

**Physics Forums | Science Articles, Homework Help, Discussion**