Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Understanding powers and indices (simply)
#1
Firstly, I'm not dumb, I'm old and easily confused, so please try to keep any response simple and unencumbered. Big Grin
I understand that 2^2 means 2*2, and 2^3 means 2*2*2. But I just can't get my head around 2^2.5 and similar. It's obviously not 2*2*half of 2, which is  2*2*1. Can someone explain (clearly) what the term means? My calculator tell me it's about 5.6568 but I can't see where this comes from.
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, W.A.) Big Grin
Please visit my Website at: http://oldendayskids.blogspot.com/
Reply
#2
Raising a number to the ^ 2.5 is the same as raising a number to the ^5 and then taking the square root of that result. It's just a decimal representation of a rational number 5/2

Code: (Select All)
a = 2 ^ 5
PRINT a
a = SQR(a)
PRINT a
b = 2 ^ 2.5
PRINT b
c = 2 ^ (5 / 2)
PRINT c



I've never done it, but I suppose there are uses.



That said, the fractional form is probably better for something like a cube root, which would be  # ^ (1/3) which has an endlessly repeating decimal. It's best left to the machine to do it to its best ability rather than type .3333333333......
DO: LOOP: DO: LOOP
sha_na_na_na_na_na_na_na_na_na:
Reply
#3
It's the decimal expression of a fractional exponent.

2^2.5 is 2^(5/2) which = (sqr(2))^5

(oh darn, someone else beat me to the enter key. and did it better too)
Reply
#4
2 ^ 2.5 = sqr(2) ^ 5 that help?

Code: (Select All)
Print Sqr(2) * Sqr(2) * Sqr(2) * Sqr(2) * Sqr(2)

hint 2.5 = 5/2 and 2 ^ .5 = 2 ^ (1/2) = sqr(2)
b = b + ...
Reply
#5
Ah, yes, thanks to all three of you. There's light at the end of the tunnel. A bit of my school-days math is coming back now, and I think I can go on from here.
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, W.A.) Big Grin
Please visit my Website at: http://oldendayskids.blogspot.com/
Reply
#6
Well late to the party. I had to deal with just this sort of thing using string math on decimal powers and nth roots. It works well in theory with long division methods, but unlike string math regular division, which I made a very fast routine, the may iterations of decimal powers and nth roots with Pascal's Triangle and binomial expansion is a real speed killer. At some point, I need to take a good look at Jack's dec_float routines. He found some rounding method that seems like it might be reliable.

Pete
Reply
#7
It's funny the 3 of us had answered all within a minute of each other, none of us knew the other was replying at same time.

We use to get an alert when someone has posted when we go to post our reply.
b = b + ...
Reply
#8
Actually, don't laugh, but I'm trying to re-invent (for my own use only) string math! I've got the easy ones (add, subtract, multiply, still sorting out division), then looked at powers, and came unstuck. I guess I'll get there, given time.
It started out when I read the story to my Grandkids about the king who offered a prize for slaying a dragon, and the winner asked for one grain of rice, doubled, for each square on a chess board. I wanted to find how many grains that would really be, but my computer exploded (not literally).
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, W.A.) Big Grin
Please visit my Website at: http://oldendayskids.blogspot.com/
Reply
#9
Funny, everyone at this forum has a degree in String Theory... except Bill!

Pete
Reply
#10
Code: (Select All)
_Title "Grains of Rice" ' b+ 2022-10-28
Dim x As _Unsigned _Integer64
$Console:Only
'_Font 8
x = 1
Print 1, x
For i = 2 To 64
    x = x * 2
    s$ = Str$(x)
    Print i,
    For j = 1 To Len(s$)
        c$ = Mid$(s$, j, 1)
        If c$ = "0" Then
            Color 10
        ElseIf s$ <> " " Then
            Color Val(c$)
        End If
        Print c$;
    Next
    Print
Next
b = b + ...
Reply




Users browsing this thread: 14 Guest(s)