Monday, December 21, 2009

How exactly do calculators do rooting for real, non-negative numbers?

Different calculators use different methods. One way is like this:


a %26lt;-- 1


b %26lt;-- x


Loop:


a %26lt;-- (a+b)/2


b %26lt;-- x / a


if (b %26lt; a ) then swap a and b


if (a = b within 14 decimal places) then stop


else, goto Loop:How exactly do calculators do rooting for real, non-negative numbers?
i believe they use somethign very similiar to newtons method with for the machine woudl look like this:


x[n+1] = 1/2 (x[n] - a/x[n]).How exactly do calculators do rooting for real, non-negative numbers?
Square root for any number, x + 1:





Σ (−x)ⁿ(2n)!/((1 − 2n)n!²4ⁿ) = √(x + 1), −1 %26lt; x %26lt; 1


n = 0





I don't know how to get it for (1 ≤ x) v (x ≤ −1) though.





This probably isn't how calculators do it though.





They probably use, for any number, x:


√x = e^(0.5 ln x) = 10^(0.5 log x)
  • nba players
  • No comments:

    Post a Comment