Discuss Scratch

unnor
Scratcher
1000+ posts

Could we please have an exponents block? ( ) ^ ( )

nothingco wrote:

thebriculator wrote:

There is a workaround.
I'll try to express it without scratchblocks.

(10 ^ ) of (log(2) * (10))
where you're finding 2^10


Square roots: (and any roots)

(10 ^) of (log(8) / (3))
where you're finding the cube root of 8


obviously these do not work with exponents or roots of zero.

anyway I still +1 this block
an easier workaround is
when green flag clicked
repeat (y)
set (x) to ((x) * (x))
end
That does x^(2^y), not x^y, as well as only working with natural exponents.

Last edited by unnor (Sept. 30, 2026 19:58:15)

HAL95131
Scratcher
500+ posts

Could we please have an exponents block? ( ) ^ ( )

nothingco wrote:

thebriculator wrote:

There is a workaround.
I'll try to express it without scratchblocks.

(10 ^ ) of (log(2) * (10))
where you're finding 2^10


Square roots: (and any roots)

(10 ^) of (log(8) / (3))
where you're finding the cube root of 8


obviously these do not work with exponents or roots of zero.

anyway I still +1 this block
an easier workaround is
when green flag clicked
repeat (insert number)
set (n) to ((n) * (n))
end

thats really restrictive, the purpose of the exponent block is to provide accurate exponentiation with minimal precision errors
MrPrady2015
Scratcher
2 posts

Could we please have an exponents block? ( ) ^ ( )

How to find Exponents, Roots, and Square roots:

These expressions are roughly ‘x^y’ or ‘y root of x’
Hope this helps!

Last edited by MrPrady2015 (Today 03:37:00)

Mimi-EEEEE
Scratcher
500+ posts

Could we please have an exponents block? ( ) ^ ( )

nothingco wrote:

thebriculator wrote:

There is a workaround.
I'll try to express it without scratchblocks.

(10 ^ ) of (log(2) * (10))
where you're finding 2^10


Square roots: (and any roots)

(10 ^) of (log(8) / (3))
where you're finding the cube root of 8


obviously these do not work with exponents or roots of zero.

anyway I still +1 this block
an easier workaround is
when green flag clicked
repeat (insert number)
set (n) to ((n) * (n))
end
What about negative numbers and decimals?
TimothyLawyer
Scratcher
1000+ posts

Could we please have an exponents block? ( ) ^ ( )

Mimi-EEEEE wrote:

What about negative numbers and decimals?
the logarithm method works for decimals and this
define (base) ^ (power) 
set [output v] to [1]
repeat (power)
set [output v] to ((output) * (base))
end
can be adapted for negative numbers

define (base) ^ (power) 
set [output v] to [1]
repeat ([abs v] of (power))
set [output v] to ((output) * (base))
end
if <(power) < [0]> then
set [output v] to ([1] / (output))
end
Greenie_WasTaken
Scratcher
42 posts

Could we please have an exponents block? ( ) ^ ( )

MrPrady2015 wrote:

How to find Exponents, Roots, and Square roots:

Hope this helps!
For roots, that already exists.oops i didn't read it all lol
([sqrt v] of ()::operators)

Last edited by Greenie_WasTaken (Yesterday 17:41:41)

hotcrystal
Scratcher
1000+ posts

Could we please have an exponents block? ( ) ^ ( )

What I’m the most surprised at is the fact that this suggestion is older than some people who have posted here, would be extremely useful, and yet it still hasn’t been added.
Assycot243
Scratcher
62 posts

Could we please have an exponents block? ( ) ^ ( )

I think we should keep it open
Assycot243
Scratcher
62 posts

Could we please have an exponents block? ( ) ^ ( )

Also at this point your workaround or a variant/equivalent form of it has probably already been posted in this topic and probably either doesn't work for non-integers or has floating-point errors even for numbers you can count on your hand.

P.S. ‘your’ is directed at the reader, especially if the reader is about to post a workaround before checking at least some previously posted workarounds.

Last edited by Assycot243 (Today 16:11:42)

knowitall1237
Scratcher
100+ posts

Could we please have an exponents block? ( ) ^ ( )

Ngl I think this should be closed
After 1,500 replies I'm sure that everything that can be said, has been said, and there's no way ST hasn't seen it already.
Assycot243
Scratcher
62 posts

Could we please have an exponents block? ( ) ^ ( )

How about keeping it open until the Scratch Team actually posts here?

P.S.: PALINDROMIC POST NUMBER YAAAAAAAAAAAAAAAAAAAAY

Last edited by Assycot243 (Today 16:22:02)

CuddlyGrouse
Scratcher
45 posts

Could we please have an exponents block? ( ) ^ ( )

aw composite number
ChristianScratcher1
Scratcher
1000+ posts

Could we please have an exponents block? ( ) ^ ( )

Assycot243 wrote:

How about keeping it open until the Scratch Team actually posts here?

P.S.: PALINDROMIC POST NUMBER YAAAAAAAAAAAAAAAAAAAAY
An ST member (AKA Paddle2See) actually has posted here and said smth abt exponents being in every basic calculator.

idr where though since I don't feel like searching through 78 pages of discussion rn
PaperMarioFan2024
Scratcher
500+ posts

Could we please have an exponents block? ( ) ^ ( )

ChristianScratcher1 wrote:

Assycot243 wrote:

How about keeping it open until the Scratch Team actually posts here?

P.S.: PALINDROMIC POST NUMBER YAAAAAAAAAAAAAAAAAAAAY
An ST member (AKA Paddle2See) actually has posted here and said smth abt exponents being in every basic calculator.

idr where though since I don't feel like searching through 78 pages of discussion rn
You could always find it on ForumFind or through Ocular, though I’m unsure of Ocular’s post finding feature at the moment. I mean, it did break after a while ago.
ilIusionator
Scratcher
500+ posts

Could we please have an exponents block? ( ) ^ ( )

PaperMarioFan2024 wrote:

ChristianScratcher1 wrote:

Assycot243 wrote:

How about keeping it open until the Scratch Team actually posts here?

P.S.: PALINDROMIC POST NUMBER YAAAAAAAAAAAAAAAAAAAAY
An ST member (AKA Paddle2See) actually has posted here and said smth abt exponents being in every basic calculator.

idr where though since I don't feel like searching through 78 pages of discussion rn
You could always find it on ForumFind or through Ocular, though I’m unsure of Ocular’s post finding feature at the moment. I mean, it did break after a while ago.
ocular is still broken

PaperMarioFan2024
Scratcher
500+ posts

Could we please have an exponents block? ( ) ^ ( )

ilIusionator wrote:

ocular is still broken
Well that’s a shame…

Last edited by PaperMarioFan2024 (Today 20:53:50)

ilIusionator
Scratcher
500+ posts

Could we please have an exponents block? ( ) ^ ( )

PaperMarioFan2024 wrote:

ilIusionator wrote:

ocular is still broken
Well that’s a shame…
I'm pretty sure jeffalo said it was going to be fixed

it's been a while since it broke though so idk
ilIusionator
Scratcher
500+ posts

Could we please have an exponents block? ( ) ^ ( )

oh and here is that paddle2see post

Ctrl+f is the best keyboard shortcut ever
Mimi-EEEEE
Scratcher
500+ posts

Could we please have an exponents block? ( ) ^ ( )

Paddle2See wrote:

medians wrote:

54387a wrote:

ImmortalJelly13 wrote:

If this were to be added would it have any downsides though?
The only possible downside is that it would be too confusing, but we already have even more confusing blocks.
Yea, I honestly expect more Scratchers that know what exponents are than a lot of functions in this block:
([ln v] of (9))
Exactly. Every cheap calculator has this function while Scratch does not. We have hyperbolic logarithms but we don't have a simple raise-to-the-power function. It's a stunning oversight that I have been bemoaning since the dawn of the Scratch age.
The fact that this flawless block hasn't been added, but we have days since 2000 is ridiculous.

Powered by DjangoBB