Discuss Scratch
- Discussion Forums
- » Suggestions
- » Could we please have an exponents block? ( ) ^ ( )
- IndexErrorException
-
Scratcher
500+ 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)
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? ( ) ^ ( )
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.
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/
- jmdzti_0-0
-
Scratcher
1000+ posts
Could we please have an exponents block? ( ) ^ ( )
+1, but maybe just add this?
((3) [^ v] (3)::operators)with all the operator menus?
- AHypnoman
-
Scratcher
1000+ posts
Could we please have an exponents block? ( ) ^ ( )
+1, but maybe just add this?That wouldn't fit any existing block shape. An entirely new block would be necessary for this.((3) [^ v] (3)::operators)with all the operator menus?
- jmdzti_0-0
-
Scratcher
1000+ 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 ;-;
- 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.
- medians
-
Scratcher
1000+ posts
Could we please have an exponents block? ( ) ^ ( )
Bringing this topic up.
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.
- 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
- 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?)
- -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:
Edited: I am only using Infinity as an example. I know that Infinity is a special case but I didn't want to make a weird equation multiple times to make an actual large number. Even tho this block would also produce Infinity if the numbers inputted are large enough. (I knew that Infinity is a special case while making this post but I didn't feel the need to specify the fact that Infinity is a special case since Infinity is also seen as a big number that is easier to deal with).
((-1) / (0)) // Negative Infinityand even more ways to make big numbers in regular Scratch without this block!
((1) / (0)) // Positive Infinity
((-1) * ([10 ^ v] of (309))) // Negative Infinity
([10 ^ v] of (309)) // Positive Infinity
Edited: I am only using Infinity as an example. I know that Infinity is a special case but I didn't want to make a weird equation multiple times to make an actual large number. Even tho this block would also produce Infinity if the numbers inputted are large enough. (I knew that Infinity is a special case while making this post but I didn't feel the need to specify the fact that Infinity is a special case since Infinity is also seen as a big number that is easier to deal with).
Last edited by -Clickertale_2- (Aug. 1, 2024 09:31:25)
- 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
- RobotChickens
-
Scratcher
500+ posts
Could we please have an exponents block? ( ) ^ ( )
(#753)I'm not an expert on the Scratch code backend, but I'm pretty sure extremely large numbers are harder to handle than infinity…
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 Infinityand even more ways to make big numbers in regular Scratch without this block!
((1) / (0)) // Positive Infinity
((-1) * ([10 ^ v] of (309))) // Negative Infinity
([10 ^ v] of (309)) // Positive Infinity
- medians
-
Scratcher
1000+ posts
Could we please have an exponents block? ( ) ^ ( )
Bringing this topic up.
- julmik6478
-
Scratcher
500+ posts
Could we please have an exponents block? ( ) ^ ( )
() ^ ()::operators reporterYou can find it in scratch++. Scratch++ is a Scratch mod that is compatible with normal Scratch.
- Foldy_TPOT
-
Scratcher
100+ posts
Could we please have an exponents block? ( ) ^ ( )
If you want this block
((a) ^ (v)::operators)just do this:
[10 ^ v]of ((v) / (([log v]of (10))/([log v] of (a))))//It will not work properly for negative bases, such as trying to compute (-2)5.Or just go here for more.
- HelloJelloPeople
-
Scratcher
92 posts
Could we please have an exponents block? ( ) ^ ( )
(#747)This would fit with the+1, but maybe just add this?That wouldn't fit any existing block shape. An entirely new block would be necessary for this.((3) [^ v] (3)::operators)with all the operator menus?
((x) mod (y))block shape, turning it into a dropdown, seen above.
- BigNate469
-
Scratcher
1000+ 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:Scratch turns equations that evaluate to infinity into the string “infinity”- meaning that it's actually far easier for JavaScript to handle it on the backend than something like 9999999999999999999999999999999999999999999999999999, even if it's converted to a bigint.((-1) / (0)) // Negative Infinityand even more ways to make big numbers in regular Scratch without this block!
((1) / (0)) // Positive Infinity
((-1) * ([10 ^ v] of (309))) // Negative Infinity
([10 ^ v] of (309)) // Positive Infinity
- medians
-
Scratcher
1000+ posts
Could we please have an exponents block? ( ) ^ ( )
What are you talking about??+1, but maybe just add this?That wouldn't fit any existing block shape. An entirely new block would be necessary for this.((3) [^ v] (3)::operators)with all the operator menus?
Anyways (to the person that you quoted), that would make scripts longer. I think block switching should just be reimplemented, and () ^ () could be one of the options
- RobotChickens
-
Scratcher
500+ posts
Could we please have an exponents block? ( ) ^ ( )
(#761)Again, I'm talking about extremely large numbers that aren't large enough to be recognized as infinity!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:Scratch turns equations that evaluate to infinity into the string “infinity”- meaning that it's actually far easier for JavaScript to handle it on the backend than something like 9999999999999999999999999999999999999999999999999999, even if it's converted to a bigint.((-1) / (0)) // Negative Infinityand even more ways to make big numbers in regular Scratch without this block!
((1) / (0)) // Positive Infinity
((-1) * ([10 ^ v] of (309))) // Negative Infinity
([10 ^ v] of (309)) // Positive Infinity