## Discuss Scratch

- scratchisthebest
- Scratcher

1000+ posts

### Power block

Even better than that huge script: this block!

(() ^ ())

I am a Lava Expert

- 1234abcdcba4321
- Scratcher

1000+ posts

### Power block

The ^: To the power of.

I need this in my current project, and so far, the only way I can do it is by making a different variable just so my value can go up just the right amount.

Also, rename and delete functions for variables? I know delete was in 1.4, why was it deleted?

I need this in my current project, and so far, the only way I can do it is by making a different variable just so my value can go up just the right amount.

Also, rename and delete functions for variables? I know delete was in 1.4, why was it deleted?

I'd highly appreciate it if you were to follow me. Don't forget to go to my profile.

All of my programming suggestions <— You should really get the suggestions move back to the suggestions forum!

Five hundred posts! I never expected to get up there… In only 2-3 months.

Does anyone know what a signature is? I mean, I've already seen 6-7 people get confused.

- AonymousGuy
- Scratcher

1000+ posts

### Power block

I support, because sometimes I have to use it.

Or, if we could get custom reporter blocks, we could just make one of those.

Or, if we could get custom reporter blocks, we could just make one of those.

- ProdigyZeta7
- Scratcher

1000+ posts

### Power block

And to prove this works:([10 ^ v] of ((power) * ([log v] of (base))))

10 ^ (b log a) = x >Setting up the equation

log 10 ^ (b log a) = log x >Property of logarithms

(b log a) log 10 = log x >Bringing the exponent down

b log a = log x >log 10 = 1

log (a ^ b) = log x >Bringing the exponent back to the base

a ^ b = x >Getting rid of log

- Firedrake969
- Scratcher

1000+ posts

### Power block

-5^2.

I support… the workaround doesn't perfectly work.

log base X of a negative number is undefined. (unless in some rare cases the base is negative, but that doesn't happen in Scratch)

I support… the workaround doesn't perfectly work.

log base X of a negative number is undefined. (unless in some rare cases the base is negative, but that doesn't happen in Scratch)

*Last edited by Firedrake969 (Nov. 17, 2013 20:53:34)*

'17 rickoid

bf97b44a7fbd33db070f6ade2b7dc549

- 1234abcdcba4321
- Scratcher

1000+ posts

### Power block

Well, you could always do

if <(base) > [0]> then

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

else

((0) - ([10^ v] of ((power) * ([log v] of ([abs v] of (base))))))

end

I'd highly appreciate it if you were to follow me. Don't forget to go to my profile.

All of my programming suggestions <— You should really get the suggestions move back to the suggestions forum!

Five hundred posts! I never expected to get up there… In only 2-3 months.

Does anyone know what a signature is? I mean, I've already seen 6-7 people get confused.

- Firedrake969
- Scratcher

1000+ posts

### Power block

Bumping because of a duplicate I found.

The workaround doesn't allow for negative numbers. ^ does.

The workaround doesn't allow for negative numbers. ^ does.

'17 rickoid

bf97b44a7fbd33db070f6ade2b7dc549

- seanbobe
- Scratcher

500+ posts

### Power block

correct I understand all these work, but wouldn't a block be way easier for new Scratchers? I have no idea what logarithms are.

you dont teach logarithms in 5th grade!

- Firedrake969
- Scratcher

1000+ posts

### Power block

Some of us did

But yeah, for some odd reason, kids are taught exponents way before logs, but logs and exponents are analogous to multiplication and division.

But yeah, for some odd reason, kids are taught exponents way before logs, but logs and exponents are analogous to multiplication and division.

'17 rickoid

bf97b44a7fbd33db070f6ade2b7dc549

- mitchboy
- Scratcher

1000+ posts

### Power block

you call that huge? that's a rather simple script. Even better than that huge script: this block!

yes it does. all you have to do is add this: Bumping because of a duplicate I found.

The workaround doesn't allow for negative numbers. ^ does.

if <(x) < [0]> then

set [result v] to ((1) / (result))

end

and tell me one other reason to add this other than for making a calculator. sorry, but i think this is very low on the st's priorities.

*Last edited by mitchboy (Nov. 20, 2013 00:12:56)*

Capsicum annuum.

- mathfreak231
- Scratcher

1000+ posts

### Power block

Last time I checked, 0^0 was undefined.define result = (x) ^ (y)

if <(y) = [0]> then

set [result v] to [1] // yes, we also include 0^0=1 :O

3DS FC: 3239-6065-2543 (Ask me before adding) | AS: Alex~ | X: Alex (DWS)

Ask me on my profile about XYORAS breeding requests!

My browser / operating system: MacOS Macintosh X 10.11.3, Safari 9.0.3, Flash 20.0 (release 0)

- DadOfMrLog
- Scratcher

1000+ posts

### Power block

Technically, it's an " Last time I checked, 0^0 was undefined. indeterminate form", yes.

However, for practical computation it's typically given the value one - and doing that also helps along several useful mathematical theorems…

(EDIT: actually, wikipedia gives a really decent overview of the 0^0 question, including treatment on computers.)

The workaround doesn't allow for negative numbers. ^ does.See my (supposedly really long) script for a slightly more thorough treatment of negative numbers.

However, note that a^b with both a & b negative (and b not an integer) is certainly not for the faint-hearted - I'd be really interested to know how the proponents of the a^b block would see it behaving under such situations…

*Last edited by DadOfMrLog (Nov. 20, 2013 02:26:36)*

Alternate account: TheLogFather –– HowTos and useful custom blocks (see studio). Examples below…

- String manipulation - - - X to power of Y - - - Clone point to clone - Detect New Scratcher - Speed tests studio -

- jh1234l
- Scratcher

100+ posts

### Power block

like 5^2 = 25, or 2^3 = 8. power what do you mean power?

(^ is power)

Basically, if you have 5^5, it is 5x5x5x5x5. If you have 5^4, it is 5x5x5x5, and so on.

Basically, is the number multiplying by itself that many times.

Two Advertising and sharing groups:

Scratch Cat's Hideout: Home Page / Advertise! / Members / Write A Review / Read A Review / FAQs

Scratching fame:

- jh1234l
- Scratcher

100+ posts

### Power block

A () ^ () block is not necessary right now, as you could just use the workaround and add a script to check if it is zero.

However, it is certainly nice to have.

However, it is certainly nice to have.

Two Advertising and sharing groups:

Scratch Cat's Hideout: Home Page / Advertise! / Members / Write A Review / Read A Review / FAQs

Scratching fame:

- 1234abcdcba4321
- Scratcher

1000+ posts

### Power block

And, wouldn't the workaround work, if you just put an abs() around the base value?

I'd highly appreciate it if you were to follow me. Don't forget to go to my profile.

All of my programming suggestions <— You should really get the suggestions move back to the suggestions forum!

Five hundred posts! I never expected to get up there… In only 2-3 months.

Does anyone know what a signature is? I mean, I've already seen 6-7 people get confused.

- goldfish678
- Scratcher

1000+ posts

### Power block

I think the scratch team might have said they're not going to add it and there's a workaround.

when she said

foreveri really felt that

play sound [aaaaaaaaaaaaa v] until done

end

- savaka
- Scratcher

1000+ posts

### Power block

Scratch is made to be for kids to learn how to program. It's not for professionals. I don't know how to use trigonometry to move a sprite. by this logic, we can remove “move (10) steps”

why not just usego to x: ((x position) + ([cos v] of ((direction)*(amt)))) y ((x position) + ([sin v] of ((direction)*(amt))))i mean jeez so simple

- supero
- Scratcher

11 posts

### Power block

Or this too!

Just keep repeating it as many powers as you need it to.

((x) * ((x) * ((x) * (.....))))

Just keep repeating it as many powers as you need it to.

*Last edited by supero (Dec. 23, 2013 00:58:44)*

"I always finish projects last in school; not because I had no ideas, but because I had too many." -Me.