Discuss Scratch

DangerPuppy10
Scratcher
500+ posts

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

iiucandyfloss wrote:

Hi! This has been suggested before, and someone has found a workaround, though it has some disadvantages, as listed in this post.

ItchyCatIII wrote:

great24 wrote:

Exponent blocks
(() ^ ())
I'm going to support this.

There is an easy workaround, which would be:

set [answer] to [0]set
repeat (power)

change [answer] by ((base) * (base))
And then the variable “answer” would be your answer. However, subtraction can also be worked around. As can division. But that would get quite complicated. Exponents are a real mathematical function, and therefore, I see no reason why we have to workaround them, but we don't have to add a negative instead of subtract, or multiply be a reciprocal instead of divide (although technically, you'd have to convert the reciprocal into a decimal, otherwise it will be a division problem in another form… and to do that, you need to divide, so that workaround would definitely complicate Scratch, and possibly add limitations ).

Credit to @ItchyCatIII for their post

NOTE: I am not following this post, so you will likely not see me on this post after this.

Thank you. Have a good day.
Where's the original post then? Or is this the original and you're stating that somebody else also suggested this idea after, as a dupe?
king o' page :D

Last edited by DangerPuppy10 (March 16, 2024 12:41:11)


I shall




















Workaround chart:

210311m
Scratcher
16 posts

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

mumu245 wrote:

yadayadayadagoodbye wrote:

(#738)

undeterminstic wrote:

yadayadayadagoodbye wrote:

undeterminstic wrote:

why i see squared being a block but never in my 4 years of scratch have i ever needed ()^() i understand the workaround is hard but why use exponents?
math

any sort of project which requires the calculation of distance would severely benefit from this block, and also any project which requires exponential growth of some value.
i mean a use case broader then its intended case. it's like i requested a inverse hyperbolic cotangent block and people wondered what it was for and i said you can use it for inverse hyperbolic cotangent. i know it can be used for distance but can cube a number be used for anything. also often exponetiation is slow so we do other algorithms then the block. for example instead of doing exponetiation for Fast Modular Exponetiation we use a different algorithm that is faster.
who says the block has to be implemented in a slow way?

Say I want the cost of a item in my clicker game to grow at a rate of x^x, how should else should I implement this?

What if I wanted to cheat in math class and make a cubic calculator?

Oh hey I want to measure and calculate stuff in the pH or any other logrithmic scales
It's a basic math function. In Romania 11-year old kids learn it in school.
If it makes you feel any better, I learnt it in year 4. Btw, I have been reading of this discussion for a while now and I have seen numerous workarounds. The easiest is just a repeat function but you could use this project which I created a while back.
https://scratch.mit.edu/projects/908361185/
tph, it would be useful if they added a ()^() block. I just wonder why they haven't done it yet.
Until then you could always use the solution of this approach which I saw a while ago (I think it still works and I put it in the project that I mentioned before):
(([10^ v] of (([log v] of ([abs v] of (num1))) * (num2))) * (([abs v] of (num1)) / (num2)))

Last edited by 210311m (March 17, 2024 11:06:46)

HelloJelloPeople
Scratcher
51 posts

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

Guys, I have discovered a workaround.
([10^ v] of (((numerator) / (denominator)) * ([log v] of (base))))
or
([e^ v] of (((numerator) / (denominator)) * ([ln v] of (base))))

(I do still support an exponent block)

Last edited by HelloJelloPeople (March 29, 2024 11:21:57)



Support the suggestion HERE by adding this button to your signature
IndexErrorException
Scratcher
500+ posts

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

HelloJelloPeople wrote:

Guys, I have discovered a workaround.
([10^ v] of (((numerator) / (denominator)) * ([log v] of (base))))
or
([e^ v] of (((numerator) / (denominator)) * ([ln v] of (base))))

(I do still support an exponent block)

There are countless workarounds but not only are they extremely bulk and way over the heads of 95% of Scratchers, it's also slow. All those operations happening in Scratch and not in JS or C makes it slow. Faster exponents would be helpful for a lot of projects.
tetraquark
Scratcher
12 posts

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

HelloJelloPeople wrote:

Guys, I have discovered a workaround.
([10^ v] of (((numerator) / (denominator)) * ([log v] of (base))))
or
([e^ v] of (((numerator) / (denominator)) * ([ln v] of (base))))

(I do still support an exponent block)

Yeah but it only works for positive numbers because of log and has a rounding error.

IndexErrorException wrote:

There are countless workarounds but not only are they extremely bulk and way over the heads of 95% of Scratchers, it's also slow. All those operations happening in Scratch and not in JS or C makes it slow. Faster exponents would be helpful for a lot of projects.

Yes, but they are still functional and easy to use by backpacking. A very good one was shown earlier in the post. https://scratch.mit.edu/projects/16871883/

hi i am a tetraquark
this is a signature this not part of any comments and you can make ur own by scrolling down on forums mainpage and doing a detective hunt for the button
highlight any piece of text and put your cursor at bottom of my signature to scroll down
when i detect [kumquats v] :: video hat
if <[kumquat v] is [evil v]? :: sensing> {
kill kumquats :: #503ec0
} else {
befriend kumquat :: #503ec0
} :: control
tetraquarks are 4 quarks in a bond to make a particle. quarks are the smallest objects ever and make up the protons and neutrons that make up atoms which make up everything.
jmdzti_0-0
Scratcher
100+ posts

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

+1, but maybe just add this?
((3) [^ v] (3)::operators)
with all the operator menus?

─ BREAKING NEWS
The evil kumquats have rebelled and now they don't just eat signatures.
NOW THEY EAT YOUR «MY STUFF» AND OTHER 2.0 UI PAGES! triple click for more info. /j I just wanted to make fun of the bug. ngl would be funny to see people put this on their signatures. please fix this
Creator of The music finders shop, where you can get your favorite songs, without having to download from pesky websites! Highlight+shift+down to see more of my signature



My posts
My forum identifier:
uNnqYgxb7K


Keep on being creative :)

Extra emojis

AHypnoman
Scratcher
1000+ posts

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

jmdzti_0-0 wrote:

+1, but maybe just add this?
((3) [^ v] (3)::operators)
with all the operator menus?
That wouldn't fit any existing block shape. An entirely new block would be necessary for this.

~ AHypnoman (Use Shift+Down Arrow to see the rest of my signature)







I am an evil kumquat, and your siggy looks tasty…
Hello there, I'm AHypnoman, If you write my name remember to capitalize the “H”. “When you don't create things, you become defined by your tastes rather than ability. your tastes only narrow & exclude people. so create.” I write though as tho.
According to the Chrome Console, my viewbox attribute is “Garbage”. Very nice, Chrome.
#TrendyHashtag
Gib internneeet

Play Retorquebit!


jmdzti_0-0
Scratcher
100+ posts

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

+1. would be easior so we hadn't use the
[10 ^ v] of ([log v] of ((2) * (10)) 
Block I't so messy ;-;

─ BREAKING NEWS
The evil kumquats have rebelled and now they don't just eat signatures.
NOW THEY EAT YOUR «MY STUFF» AND OTHER 2.0 UI PAGES! triple click for more info. /j I just wanted to make fun of the bug. ngl would be funny to see people put this on their signatures. please fix this
Creator of The music finders shop, where you can get your favorite songs, without having to download from pesky websites! Highlight+shift+down to see more of my signature



My posts
My forum identifier:
uNnqYgxb7K


Keep on being creative :)

Extra emojis

qloakonscratch
Scratcher
1000+ posts

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

Everybody is saying the same reason. I would like to put a new one to the table; it helps with transition to other coding languages, such as Python. Not the symbol perse, but the operations. If people get into the habit of using operations when learning using Scratch, it will stick with them during the rest of their coding experience.




Now Showing: CCRP V
https://scratch.mit.edu/studios/33864948/


Coding on Scratch since 2013

Foruming since 2016

In the Forum Helpers since 2022
medians
Scratcher
1000+ posts

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

Bringing this topic up.

qloakonscratch wrote:

Everybody is saying the same reason. I would like to put a new one to the table; it helps with transition to other coding languages, such as Python. Not the symbol perse, but the operations. If people get into the habit of using operations when learning using Scratch, it will stick with them during the rest of their coding experience.
I feel like there's no way that this hasn't been mentioned though, and there's not much to say honestly.

Medians bamboozled by 3.0 (version 3.0): https://scratch.mit.edu/projects/979822351/
hi875230163394: You're similar to valve in that you both hate a certain number…
Scratch 0.x, 1.x, 2.x, 3.x and LogoBlocks Archives
Bamboozlement: https://scratch.mit.edu/studios/33739789
Years on internet: 15 (soon 16)
medians: Oh god not this utc - 12 thing again..
Fun_Cupcake_i81: What, were you expecting not to see the utc - 12 thing again? THE UTC - 12 THIGN ALWAYS RETURNS. ALWAYS.
medians: I knew it would happen. I was the one who started it last year.
Fun_Cupcake_i81: Well then if you didn't want it back maybe you need to time travel to last year and fix that

Oh wait if you could time travel I think we all know exactly when you would go-
user1: That picture is from 2.0. Now he’s at my house and is my pet.
user2: But this is medians we're talking about, so “from 2.0” can mean the same thing as “from five seconds ago”.

Detect Scratch version here
My other accounts: @selfexplanatory @modesties @chaircard @fireflyhero @dividendyield @colloids @radians @skeuamorphism @dihectogon @anglebisector @aau- @EditBlockColors @AdamantOrb @MoongeistBeam @festively @Ampharos_ @straightforwardness
i trolled redcat LOL





if you see this
{what method did you use::control hat
answer on profile ::motion
} ::operators
;
tyjinw1
Scratcher
100+ posts

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

just use this
([10 ^ v] of ((exponent) * ([log v] of (base)))
example
([10 ^ v] of ((4) * ([log v] of (2))
is 16

check out my fun games
just idle fun (my idle virus + my idle balls)
idle virus (VERY IMPROVED) <—- a remix
idle cells
generators
!!! <– cloud clicking game
live chat <– i want the length to go crazy
and also check out my profile
and put your url milestones here
RobotChickens
Scratcher
500+ posts

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

100% Support. It's insane to me how this hasn't been a block since the start of scratch. Is it any more difficult to implement than any of the other operations? And have we had a statement form the ST on why this hasn't been added yet? (Fear of extremely large numbers crashing projects?)


Replying to SPAM is only adding more off-topic SPAM. Just report it.


Support the suggestion HERE by adding this button to your signature
Get cool forum emojis HERE

Google Noto Emoji is superior as you can see






;
-Clickertale_2-
Scratcher
100+ posts

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

The fact that ST won't add this block because of “Fear of extremely large number crashing projects” is stupid since we could also do:
((-1) / (0)) // Negative Infinity
((1) / (0)) // Positive Infinity
((-1) * ([10 ^ v] of (309))) // Negative Infinity
([10 ^ v] of (309)) // Positive Infinity
and even more ways to make big numbers in regular Scratch without this block!

Blue_Hat_Wiz
Scratcher
5 posts

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

+1 I didn't even know that It wasn't in here until I tried to use it, seems like such a no-brainer

define Scratch
set [ Coding] to [the max]
RobotChickens
Scratcher
500+ posts

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

-Clickertale_2- wrote:

(#753)
The fact that ST won't add this block because of “Fear of extremely large number crashing projects” is stupid since we could also do:
((-1) / (0)) // Negative Infinity
((1) / (0)) // Positive Infinity
((-1) * ([10 ^ v] of (309))) // Negative Infinity
([10 ^ v] of (309)) // Positive Infinity
and even more ways to make big numbers in regular Scratch without this block!
I'm not an expert on the Scratch code backend, but I'm pretty sure extremely large numbers are harder to handle than infinity…


Replying to SPAM is only adding more off-topic SPAM. Just report it.


Support the suggestion HERE by adding this button to your signature
Get cool forum emojis HERE

Google Noto Emoji is superior as you can see






;
medians
Scratcher
1000+ posts

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

Bringing this topic up.

Medians bamboozled by 3.0 (version 3.0): https://scratch.mit.edu/projects/979822351/
hi875230163394: You're similar to valve in that you both hate a certain number…
Scratch 0.x, 1.x, 2.x, 3.x and LogoBlocks Archives
Bamboozlement: https://scratch.mit.edu/studios/33739789
Years on internet: 15 (soon 16)
medians: Oh god not this utc - 12 thing again..
Fun_Cupcake_i81: What, were you expecting not to see the utc - 12 thing again? THE UTC - 12 THIGN ALWAYS RETURNS. ALWAYS.
medians: I knew it would happen. I was the one who started it last year.
Fun_Cupcake_i81: Well then if you didn't want it back maybe you need to time travel to last year and fix that

Oh wait if you could time travel I think we all know exactly when you would go-
user1: That picture is from 2.0. Now he’s at my house and is my pet.
user2: But this is medians we're talking about, so “from 2.0” can mean the same thing as “from five seconds ago”.

Detect Scratch version here
My other accounts: @selfexplanatory @modesties @chaircard @fireflyhero @dividendyield @colloids @radians @skeuamorphism @dihectogon @anglebisector @aau- @EditBlockColors @AdamantOrb @MoongeistBeam @festively @Ampharos_ @straightforwardness
i trolled redcat LOL





if you see this
{what method did you use::control hat
answer on profile ::motion
} ::operators
;

Powered by DjangoBB