# Weird square root.

1. Jun 3, 2007

### AznBoi

Isn't $$\sqrt{2}^{4}$$ equal to 4?? How come when I plug this into my calculator it gives me the number:3.999999999996 , which is very close to 4 but isn't?? Is there something wrong with the settings of my calculator?

2. Jun 3, 2007

### prasannapakkiam

It is 4. This is just the all to do with the way the calculator works it out... If you can try
Pi/6=ans=x
x-x^3/3!+x^5/5!-x^7/7!+x^9/9!...
It would say: .4999999999999999999999999

3. Jun 3, 2007

### ice109

it is because the calculator evaluates the root function using a taylor series expansion which looks like what above poster wrote out. the calculator approximates the answer

4. Jun 4, 2007

### lalbatros

Well, the Taylor series are not used by pocket calculators or microprocessors for calculating trigonometric function or other elementary functions. But, indeed, any numerical calclation has a finite precision.

For trigonometric functions, the CORDIC algorithm is mostly used: http://en.wikipedia.org/wiki/CORDIC .
For the square root, a generalisation of the same algorithm can also be used.
But the most used algorithm for the square root seems to be the "pseudo-division": http://www.jacques-laporte.org/Meggitt_62.pdf .

Of course, the Taylor series has numerous applications, including for numerical computation of some functions. But very often for numerical application the convergence can be improved by using other more specific methods. A famous book by Abramowitz and Stegun: Handbook of Mathematical Functions give many of these methods.

Last edited: Jun 4, 2007
5. Jun 4, 2007

### AlephZero

It doesn't matter what method the calculator uses to evaluate square roots.

The reason is that the calculator only works out sqrt(2) to a finite number of decimal places. When you raise that approximate value to the fourth power, it does not equal 4 exactly.

Sqrt(2) = 1.41421...

If you calculator only stored numbers to 3 decimal places, 1.414^4 = 3.9976...
To 4 decimal places, 1.4142^4 = 3.9998.....
etc.