Discuss Scratch

Think_Quest
New Scratcher
14 posts

Powers

Hey guys. I was thinking we could have a power operator that looks something like this:
((4) ** (5))
For example:
((3) ** (4))
Would evaluate to 81 (3x3x3x3).
Or
((7) ** (2))
Would evaluate to 49 (7x7).
It can also look like this:
((5) ^ (3))
stickfiregames
Scratcher
1000+ posts

Powers

Support, although it has been suggested before.
I think it should look like
(() ^ () :: operators)
it is probably more recognised than **

Last edited by stickfiregames (Nov. 11, 2014 08:05:15)

20btheilmanngohr
Scratcher
100+ posts

Powers

stickfiregames wrote:

Support, although it has been suggested before.
I think it should look like
(() ^ () :: operators)
it is probably more recognised than **
(+1)
ShamelessSnores
Scratcher
100+ posts

Powers

20btheilmanngohr wrote:

stickfiregames wrote:

Support, although it has been suggested before.
I think it should look like
(() ^ () :: operators)
it is probably more recognised than **
(+1)
Support
TheHockeyist
Scratcher
1000+ posts

Powers

ShamelessSnores wrote:

20btheilmanngohr wrote:

stickfiregames wrote:

Support, although it has been suggested before.
I think it should look like
(() ^ () :: operators)
it is probably more recognised than **
(+1)
Support
Support, even though it has been suggested innumerable times before.

Last edited by TheHockeyist (Nov. 11, 2014 16:05:14)

OmnipotentPotato
Scratcher
1000+ posts

Powers

TheHockeyist wrote:

ShamelessSnores wrote:

20btheilmanngohr wrote:

stickfiregames wrote:

Support, although it has been suggested before.
I think it should look like
(() ^ () :: operators)
it is probably more recognised than **
(+1)
Support
Support, even though it has been suggested innumerable times before.
Support.
Sonickyle
Scratcher
1000+ posts

Powers

OmnipotentPotato wrote:

TheHockeyist wrote:

ShamelessSnores wrote:

20btheilmanngohr wrote:

stickfiregames wrote:

Support, although it has been suggested before.
I think it should look like
(() ^ () :: operators)
it is probably more recognised than **
(+1)
Support
Support, even though it has been suggested innumerable times before.
Support.
Support. Why doesn't this exist yet?
20btheilmanngohr
Scratcher
100+ posts

Powers

I think there is a workaround
define (Num1) ^ (Num2)
repeat (Num2)
set [output v] to ((output) * (Num1))
end
Please, correct me if I am wrong.
Still support

Last edited by 20btheilmanngohr (Nov. 11, 2014 18:04:20)

KingOfAwesome58219
Scratcher
1000+ posts

Powers

Sonickyle wrote:

OmnipotentPotato wrote:

TheHockeyist wrote:

ShamelessSnores wrote:

20btheilmanngohr wrote:

stickfiregames wrote:

Support, although it has been suggested before.
I think it should look like
(() ^ () :: operators)
it is probably more recognised than **
(+1)
Support
Support, even though it has been suggested innumerable times before.
Support.
Support. Why doesn't this exist yet?
Support
stickfiregames
Scratcher
1000+ posts

Powers

20btheilmanngohr wrote:

I think there is a workaround
define (Num1) ^ (Num2)
repeat (Num2)
set [output v] to ((output) * (Num1))
end
Please, correct me if I am wrong.
Still support
That only works for positive integer powers.

A complete workaround can be found here. As you can see it is quite long, although you can make it shorter if you don't need exact powers of 10.
TheHockeyist
Scratcher
1000+ posts

Powers

stickfiregames wrote:

20btheilmanngohr wrote:

I think there is a workaround
define (Num1) ^ (Num2)
repeat (Num2)
set [output v] to ((output) * (Num1))
end
Please, correct me if I am wrong.
Still support
That only works for positive integer powers.

A complete workaround can be found here. As you can see it is quite long, although you can make it shorter if you don't need exact powers of 10.

And I hate the fact that Scratch only uses 14 sig figs. MOAR PLZ!
Blueinkproductions
Scratcher
1000+ posts

Powers

Support.
Zambonifofex
Scratcher
100+ posts

Powers

([e ^ v] of ((base) * ([ln v] of (power))))
or
([10 ^ v] of ((base) * ([log v] of (power))))

Last edited by Zambonifofex (Nov. 11, 2014 23:35:39)

XGamer01
Scratcher
500+ posts

Powers

KingOfAwesome58219 wrote:

Sonickyle wrote:

OmnipotentPotato wrote:

TheHockeyist wrote:

ShamelessSnores wrote:

20btheilmanngohr wrote:

stickfiregames wrote:

Support, although it has been suggested before.
I think it should look like
(() ^ () :: operators)
it is probably more recognised than **
(+1)
Support
Support, even though it has been suggested innumerable times before.
Support.
Support. Why doesn't this exist yet?
Support

Support!
lalala3
Scratcher
100+ posts

Powers

Zambonifofex wrote:

([e ^ v] of ((base) * ([ln v] of (power))))
or
([10 ^ v] of ((base) * ([log v] of (power))))
Nope. First of all, base and power should be switched. Second of all, that doesn't work with negative bases.
LoudHeadphones
Scratcher
100+ posts

Powers

I GIVE SUPPORT I GIVE SUPPORT!
RPFluffy
Scratcher
1000+ posts

Powers

Zambonifofex wrote:

([e ^ v] of ((base) * ([ln v] of (power))))
or
([10 ^ v] of ((base) * ([log v] of (power))))

Doesn't work, been tested.

Support, I bet you mean this:

(() ^ () :: operators)

Last edited by RPFluffy (Nov. 12, 2014 01:23:52)

MegaApuTurkUltra
Scratcher
1000+ posts

Powers

XGamer01 wrote:

KingOfAwesome58219 wrote:

Sonickyle wrote:

OmnipotentPotato wrote:

TheHockeyist wrote:

ShamelessSnores wrote:

20btheilmanngohr wrote:

stickfiregames wrote:

Support, although it has been suggested before.
I think it should look like
(() ^ () :: operators)
it is probably more recognised than **
(+1)
Support
Support, even though it has been suggested innumerable times before.
Support.
Support. Why doesn't this exist yet?
Support

Support!
Support!
Firedrake969
Scratcher
1000+ posts

Powers

MegaApuTurkUltra wrote:

XGamer01 wrote:

KingOfAwesome58219 wrote:

Sonickyle wrote:

OmnipotentPotato wrote:

TheHockeyist wrote:

ShamelessSnores wrote:

20btheilmanngohr wrote:

stickfiregames wrote:

Support, although it has been suggested before.
I think it should look like
(() ^ () :: operators)
it is probably more recognised than **
(+1)
Support
Support, even though it has been suggested innumerable times before.
Support.
Support. Why doesn't this exist yet?
Support

Support!
Support!
!troppuS
20btheilmanngohr
Scratcher
100+ posts

Powers

define (Num1) ^ (Num2)
if <(Num2) > (0)> then
repeat (Num2)
set [output v] to ((output) * (Num1))
end
else
repeat ((0) - (Num2))
set [output v] to ((output) * (Num1))
end
end

Last edited by 20btheilmanngohr (Nov. 12, 2014 04:02:47)

Powered by DjangoBB