Discuss Scratch
- Discussion Forums
- » Suggestions
- » Could we please have an exponents block? ( ) ^ ( )
- lm1996
- Scratcher
1000+ posts
Could we please have an exponents block? ( ) ^ ( )
Support, I could see the use for this.
Lm / She/her / D&D DM / April 3rd /
- portalpower
- Scratcher
1000+ posts
Could we please have an exponents block? ( ) ^ ( )
I could figure out how to make an operator that supports negatives but it would be so long it wouldn't even be worth it
unless this got implemented
unless this got implemented
([e^ v] of (([ln v] of ()) * ())::operators)//this is the current workaround
Last edited by portalpower (Jan. 7, 2021 21:59:49)
thank you for reading my post and have a nice day!
shift+down to view my signature
idk what to put here.
- portalpower
- Scratcher
1000+ posts
Could we please have an exponents block? ( ) ^ ( )
support because the short workaround doesn't support negative or bases less than 1 and the long one is way too long
thank you for reading my post and have a nice day!
shift+down to view my signature
idk what to put here.
- scienceexplorer1
- Scratcher
100+ posts
Could we please have an exponents block? ( ) ^ ( )
How is that simple??? 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
Be cool
- Chilout -
https://www.youtube.com/watch?v=4uoXbsmEBf4
The future lies ahead of us.
Did you know the universe is immensely filled with vacuum rather then any form of matter inside of it?. Well probably you do …
But here is the thing when andromeda galaxy collides with milky way it is expected that not a single star will collide. Space is space. Matter is in a very very small space.
- IndianRuby718
- Scratcher
100+ posts
Could we please have an exponents block? ( ) ^ ( )
sarcasm :PHow is that simple??? 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
Last edited by IndianRuby718 (Jan. 31, 2021 23:06:35)
So… I didn't update my signature for over a year XP But… I left the forums, and I'm not coming back anytime soon
(and I'm not updating my signature)
Both stickied Suggestions Directories currently have 138 replies.
Only fdreerf can break the equilibrium.
________________
Only fdreerf can break the equilibrium.
________________
I get more frustrated with people telling me about “mass reporting” than I do about “mass reporting” itself.source
good luck digging up the original reply in the comments
ctrl+f exists
https://scratch.mit.edu/discuss/post/6961734/
Bug with the color effect I would really like to see fixed
EEEEEEE DDDDDD IIIIIIII TTTTTTTT NNN NN OOOOO
EE DD DD II TT :: NNNN NN OO OO
EEEEEEE DD DD II TT NN NN NN OO OO
EE DD DD II TT :: NN NN NN OO OO
EE DD DD II TT NN NNNN OO OO
EEEEEEE DDDDDD IIIIIIII TT NN NNN OOOOO
Hand-done.
< :: extension>
< :: custom-arg>
< :: motion>
Don't click this link…
- ssvbxx2
- Scratcher
100+ posts
Could we please have an exponents block? ( ) ^ ( )
You could do: Some people say that([e ^ v] of (([ln v] of (base))*(exponent))is a workaround but it really isn't because:
1. It often fails to return an integer result when it should: e.g. “3^2” will return “8.99999999998”
2. It is unable to take a negative base to a positive integer exponent because ln(x) is only defined for x > 0
Fully capturing the proper behavior of an exponent block requires the user to make a large block, such as:([e ^ v] of (([ln v] of ([abs v] of (base)))*(exponent))*(magicexpr))This becomes extremely clumsy, especially if you need several exponents in one expression (for example to calculate a polynomial)
//magicexpr returns NaN if base is negative and exponent is not whole,
// -1 if base is negative and exponent is odd, and 1 otherwise. You should be able to make this expression from blocks but it will be large
// and I am too lazy to make it right now
round ([e ^ v] of (([ln v] of (base))*(exponent))Here is a project I made to demonstrate: https://scratch.mit.edu/projects/481520931/
Last edited by ssvbxx2 (Feb. 1, 2021 00:06:25)
I'm ssvbxx2. I make a variety of original projects: games, animations, etc.
(Tile Scrolling Project | Square Root Calculator | The Sound of Sorting)
Last edited by kaj (Next year 00:00:00)
- dimayajonelcid
- Scratcher
100+ posts
Could we please have an exponents block? ( ) ^ ( )
I don't think that would work with non-whole (negative/non-integer) powers. Sure, there could be floating point errors, but what if you wanted to calculate something around the lines of an irrational number? Such as square-root 2? You could doround ([e ^ v] of (([ln v] of (base))*(exponent))
BCMGF1137/19
Team: H: The Series
I'm going to avoid using Support/No Support in my forum posts from now on, since they are generally pointless
44 Phonemes. Very few usage rules. Self-explanatory. Join Alphabest. Simplify your life.
My browser / operating system: ChromeOS 14541.0.0, Chrome 111.0.0.0, No Flash version detected
Your everyday, generic internet user.
penguinie1567, in reaction to the above sentence fragment, said: “I would do it without the comma.”
if <(inSchool?) = [true]> then
if <(pick random (1) to (1000)) = [1]> then
set [online v] to [true]
else
set [online v] to [false]
end
end
- ssvbxx2
- Scratcher
100+ posts
Could we please have an exponents block? ( ) ^ ( )
Then you would remove the round block. Here is what I did in my exponent project:I don't think that would work with non-whole (negative/non-integer) powers. Sure, there could be floating point errors, but what if you wanted to calculate something around the lines of an irrational number? Such as square-root 2? You could doround ([e ^ v] of (([ln v] of (base))*(exponent))
if <not <((base) mod (1)) = [0]>> thenThis works because
set [exponent v] to ([e ^ v] of (([ln v] of (base))*(exponent)
else
set [exponent v] to (round ([e ^ v] of (([ln v] of (base))*(exponent))
end
((base) mod (1))returns a non-zero value for non-integer values of the base.
Last edited by ssvbxx2 (Feb. 1, 2021 00:15:33)
I'm ssvbxx2. I make a variety of original projects: games, animations, etc.
(Tile Scrolling Project | Square Root Calculator | The Sound of Sorting)
Last edited by kaj (Next year 00:00:00)
- ssvbxx2
- Scratcher
100+ posts
Could we please have an exponents block? ( ) ^ ( )
bump
I'm ssvbxx2. I make a variety of original projects: games, animations, etc.
(Tile Scrolling Project | Square Root Calculator | The Sound of Sorting)
Last edited by kaj (Next year 00:00:00)
- dimayajonelcid
- Scratcher
100+ posts
Could we please have an exponents block? ( ) ^ ( )
Yes, but the exponent could be like 0.5, 2.3, 11.111, or 3.14159. It doesn't really work when the exponent is non-integer but the base is an integer Then you would remove the round block. Here is what I did in my exponent project:if <not <((base) mod (1)) = [0]>> thenThis works because
set [exponent v] to ([e ^ v] of (([ln v] of (base))*(exponent)
else
set [exponent v] to (round ([e ^ v] of (([ln v] of (base))*(exponent))
end((base) mod (1))returns a non-zero value for non-integer values of the base.
BCMGF1137/19
Team: H: The Series
I'm going to avoid using Support/No Support in my forum posts from now on, since they are generally pointless
44 Phonemes. Very few usage rules. Self-explanatory. Join Alphabest. Simplify your life.
My browser / operating system: ChromeOS 14541.0.0, Chrome 111.0.0.0, No Flash version detected
Your everyday, generic internet user.
penguinie1567, in reaction to the above sentence fragment, said: “I would do it without the comma.”
if <(inSchool?) = [true]> then
if <(pick random (1) to (1000)) = [1]> then
set [online v] to [true]
else
set [online v] to [false]
end
end
- dimayajonelcid
- Scratcher
100+ posts
Could we please have an exponents block? ( ) ^ ( )
Bump after 1 month and 2 weeks of silence. Oof
BCMGF1137/19
Team: H: The Series
I'm going to avoid using Support/No Support in my forum posts from now on, since they are generally pointless
44 Phonemes. Very few usage rules. Self-explanatory. Join Alphabest. Simplify your life.
My browser / operating system: ChromeOS 14541.0.0, Chrome 111.0.0.0, No Flash version detected
Your everyday, generic internet user.
penguinie1567, in reaction to the above sentence fragment, said: “I would do it without the comma.”
if <(inSchool?) = [true]> then
if <(pick random (1) to (1000)) = [1]> then
set [online v] to [true]
else
set [online v] to [false]
end
end
- saphiralover
- Scratcher
87 posts
Could we please have an exponents block? ( ) ^ ( )
I support this, though there are workarounds like others said, this will be easier to younger or newer members.
- reallysoftuser
- Scratcher
1000+ posts
Could we please have an exponents block? ( ) ^ ( )
This post nearly died. You are it's savior! Bump after 1 month and 2 weeks of silence. Oof
New Itch Cat game! It's a good one.
Oh snap!
New updates for Windows 11 coming soon, including tabs for File Explorer, contextual suggestions across Microsoft 365 apps, Cloud PC integration, a redesigned Quick Assist, App folders for the Start Menu, oh my!
Microsoft is preparing a new email client for Windows 11!
In the latest Windows 11 update, Microsoft is going to give a new look to its classic Outlook email app and make it more user friendly and feature rich like Google Gmail email app.
- Bacteria999
- Scratcher
1000+ posts
Could we please have an exponents block? ( ) ^ ( )
Support. It has always bothered me that we have such complex math blocks and we don't have an exponent block.
- sathvikrias
- Scratcher
500+ posts
Could we please have an exponents block? ( ) ^ ( )
bump
Moving from Scratch? Don't learn C or Java, try Snap!
- Futurebot5
- Scratcher
1000+ posts
Could we please have an exponents block? ( ) ^ ( )
Bump
So…hello, ou bonjour, o hola, o ciao, oder hallo.
- Prime689
- Scratcher
1000+ posts
Could we please have an exponents block? ( ) ^ ( )
Duplicate except. Bump
6'2 - they/them - canadian - teen
- dimayajonelcid
- Scratcher
100+ posts
Could we please have an exponents block? ( ) ^ ( )
Ok, why is this topic dying
Bump because this is far from the first page
Bump because this is far from the first page
BCMGF1137/19
Team: H: The Series
I'm going to avoid using Support/No Support in my forum posts from now on, since they are generally pointless
44 Phonemes. Very few usage rules. Self-explanatory. Join Alphabest. Simplify your life.
My browser / operating system: ChromeOS 14541.0.0, Chrome 111.0.0.0, No Flash version detected
Your everyday, generic internet user.
penguinie1567, in reaction to the above sentence fragment, said: “I would do it without the comma.”
if <(inSchool?) = [true]> then
if <(pick random (1) to (1000)) = [1]> then
set [online v] to [true]
else
set [online v] to [false]
end
end