|
-
Nov 25th, 2003, 11:50 AM
#1
Powers and Squirts
How does a calculator. calculate roots and powers e.g:
2 ^ 1/2
2 ^ 4
3 ^ 1/3
??
-
Nov 25th, 2003, 12:36 PM
#2
Frenzied Member
I don't know, but I though sqrt was a standard function, along with +,-,*,/,Sin,Cos,Tan and modulus.
There is no way to calculate the sqrt of something without trail and improvement.
Have I helped you? Please Rate my posts. 
-
Nov 25th, 2003, 03:37 PM
#3
Lively Member
They most likely use the Newton-Rhapson approximation as the base for an iteration because it converges so quickly it leaves a trail of smoke behind it. Or maybe they don't because I can't think of a suitable way of applying it...
-
Nov 25th, 2003, 07:40 PM
#4
I believe they use logarithms, ie. 10^(Log(x)/[base, say 2 for square root])
Edit. On second thought, that's a bit exclusionary. Oh well, I'm sure Google knows
The time you enjoy wasting is not wasted time.
Bertrand Russell
<- Remember to rate posts you find helpful.
-
Nov 26th, 2003, 04:14 AM
#5
I found this formula which appears to work - only with powers. But as a root is 1 / power it works with roots too:
e (i . ln b)
where i is the index and b is the base;
therefore sqrt 4 is:
e (1/2 x ln 2) = 2
I touched on e and ln in my AS mathematics but don't remember how they work and how to calculate them. However could this be how a calculator does it?
The trial and error method seems interesting but I didn't think computers liked trial and error.
-
Nov 26th, 2003, 04:18 AM
#6
So Unbanned
e = 2.71828182846
And uhm... e (1/2*ln(2)) = sqrt(2)
That should be:
e^(1/2*ln(x)) = sqrt(x)
Last edited by DiGiTaIErRoR; Nov 26th, 2003 at 04:21 AM.
-
Nov 27th, 2003, 03:55 AM
#7
-
Nov 27th, 2003, 08:12 AM
#8
Yes x in the my last post was multiply. So what formula would a calculator use?
-
Nov 29th, 2003, 04:45 PM
#9
Hyperactive Member
-
Dec 2nd, 2003, 09:38 PM
#10
lol
Actually, you all just restated what I said originally, except using the natural log instead of common log and e instead of 10 
It probably does just use some type of converging series, although you could always email TI
The time you enjoy wasting is not wasted time.
Bertrand Russell
<- Remember to rate posts you find helpful.
-
Dec 3rd, 2003, 05:53 PM
#11
Originally posted by TheManWhoCan
They most likely use the Newton-Rhapson approximation as the base for an iteration because it converges so quickly it leaves a trail of smoke behind it. Or maybe they don't because I can't think of a suitable way of applying it...
Do you have any more information on Newton-Rhapson approximation? After doing a google search I found nothing but hugley complex formula's which i don't understand.
Does anyone have an idiots explanation??
-
Dec 11th, 2003, 12:59 AM
#12
You know, if anyone has the C/C++ header math.h, you could post the 'pow' function (I'd do it myself, by I only took a C/C++ class at school so I don't have a copy)
The time you enjoy wasting is not wasted time.
Bertrand Russell
<- Remember to rate posts you find helpful.
-
Dec 17th, 2003, 03:09 PM
#13
Addicted Member
hey guys,
check out the thread by me on Mandelbrot fractals. You'll find a post by Guv of a very interesting variation of the newton rhapson method that is the one most probably used by calculators.
give me a few minutes, i'll see if i can copy and paste it here~
edit: by Guv:
TheAlchemist: Complex arithmetic is required for convergence to complex as well as real roots. The following is the Newton method for various roots, starting with square root. The pattern is obvious if you want to work with higher roots.
NextZ = Z / 2 + Number / 2*Z (Number is the value you want the square root of).
NextZ = 2*Z / 3 + Number / 3*z2
NextZ = 3*Z / 4 + Number / 4*Z3
NextZ = 4*Z / 5 + Number / 5*Z4
Use NextZ as Z for the next iteration. It converges fairly fast.
Last edited by TheAlchemist; Dec 17th, 2003 at 03:15 PM.
One thing that sustains me through life is the conciousness of the immense inferiority of everyone else
--Oscar Wilde
-
Dec 17th, 2003, 09:35 PM
#14
Junior Member
Xelen
Ok I may have missed anyone who said this, but to put a number to a fraction is to put it to a radical.
4^1/2 = 2, because its like saying square root of 4.
9^1/3 = 3, because it is cube root,
16^1/4 = 2 and etc...
now the top number is the exponential power of the simplified number.
16^4/4 is the power of 1 and it would evaluate to itself.
Now say we have 8^2/3 it is 2^2 = 4. Hope this helps anyone who is curious as to what fractions mean in an exponential position.
edit
------------
gah, twice was it mentioned, I missunderstood the question to first post >.<
Last edited by Xelen; Dec 17th, 2003 at 09:49 PM.
-
Dec 17th, 2003, 09:57 PM
#15
Junior Member
Xelen
Ok I may have missed anyone who said this, but to put a number to a fraction is to put it to a radical.
4^1/2 = 2, because its like saying square root of 4.
9^1/3 = 3, because it is cube root,
16^1/4 = 2 and etc...
now the top number is the power of the simplified number. So 16^4/4 is the power of 1 and it would evaluate to itself. Now say we have 8^2/3 it is 2^2 making it 4. Hope this helps anyone who is curious
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|