Discuss Scratch
- IMPULSS
-
100+ posts
Nth Root Block
Many people have been suggesting a block like this:
()^() :: reporter operatorsTo be added in. Conversely, I think we should also have an Nth root block like this:
()√() :: reporter operatorsTo be added in. It's purpose would be self explanatory: calculate the Nth root of X.
Support
Semi-Support
No support
Last edited by IMPULSS (Jan. 2, 2017 06:20:34)
- rgl0000
-
91 posts
Nth Root Block
um, alright, I'm going to ask a stupid question now… what does calculate the Nth root of X mean?
- theonlygusti
-
1000+ posts
Nth Root Block
Which would also give us an nth root: Many people have been suggesting a block like this:()^() :: reporter operators
(()^((1)/(n)) :: reporter operators)
Last edited by theonlygusti (Jan. 2, 2017 06:33:50)
- sakafitrady
-
100+ posts
Nth Root Block
Cube roots and Hypercube roots (I made that one up um, alright, I'm going to ask a stupid question now… what does calculate the Nth root of X mean?

- IMPULSS
-
100+ posts
Nth Root Block
The value N is equal to what's inputted into the first box um, alright, I'm going to ask a stupid question now… what does calculate the Nth root of X mean?
The value X is equal to what's inputted into the second box
So what number do we need to multiply itself N amount of times to get X
For example, if I wanted to know what 3√5 is, I would use
(3)√(5) :: reporter operatorsto figure out the 3rd root of 5, where N is equal to 3 and X is equal to 5.
- IMPULSS
-
100+ posts
Nth Root Block
That's a workaround, but it's also assuming that the first suggestion will get accepted (Although it probably will if this one is implemented), and further to the point, the workaround isn't as accurate as the block. According to the workaround, the cube root of 8 is 2.82842712474619, while the block should report 2.Which would also give us an nth root: Many people have been suggesting a block like this:()^() :: reporter operators(()^((1)/(n)) :: reporter operators)
- theonlygusti
-
1000+ posts
Nth Root Block
Then you did something wrong the workaround isn't as accurate as the block. According to the workaround, the cube root of 8 is 2.82842712474619, while the block should report 2.



And btw, the rounding error in the final image is caused by Scratch's inaccurate exponentiation workaround, not the method used for obtaining the nth root.
- IMPULSS
-
100+ posts
Nth Root Block
-snip-The workaround is accurate (I messed up my math), but there's still the issue of the majority of Scratchers knowing it.
- theonlygusti
-
1000+ posts
Nth Root Block
I just think that the style of block you suggested is ambiguous, maybe there could be a better naming scheme.-snip-The workaround is accurate (I messed up my math), but there's still the issue of the majority of Scratchers knowing it.
- IMPULSS
-
100+ posts
Nth Root Block
Maybe aI just think that the style of block you suggested is ambiguous, maybe there could be a better naming scheme.-snip-The workaround is accurate (I messed up my math), but there's still the issue of the majority of Scratchers knowing it.
() root of () :: reporter operatorsblock?
- SquirreIstar
-
1000+ posts
Nth Root Block
Support based on the reasons in this duplicate of mine
- ACE2_0
-
11 posts
Nth Root Block
Any of these options would be much easier and more compact than the workaround. Personally, I would like both options for the same reason that we have both addition and subtraction. Not necessary to have both, but much easier.
- accountcraft123
-
100+ posts
Nth Root Block
okay.
Lets sort through this one at a time.
Next,
to answer to your question
is in order to calculate the nth root of something you need logarithms which ARE in the scratch editor. THe (nth root) of 2 = 3, for instance, = 2^(1/n) = 3. Next, you convert this to a logarithm, log<base 2> of 3 = 1/n. Although logarithms in the editor are only base 10, so you use the change of base formula. log<base b> of x = (log<base d> of x)/(log<base d> of b), so log<base 2> of 3 = 1/n is log(3)/log(2)= 1/n. Now simple algebra can tell you the answer.
In this example log(2)/log(3) = n. While nth root of x = y is log(x)/log(y) = n.
Please tell me if I made a mistake or if you are confused.
ALGEBRA II BABY!!!!!!
Lets sort through this one at a time.
Okay so, A 4th root is actually called a quartic root and when you say hypercube I believe you are referring to a tesseract.Cube roots and Hypercube roots (I made that one up um, alright, I'm going to ask a stupid question now… what does calculate the Nth root of X mean?) Cube root = 3rd Root and Hypercube root = 4th Root. It means the number if cubed (or hypercubed) it will be that number. For example: 3rd Root of 8 = 2 because 2*2*2 = 8
Next,
to answer to your question
Many people have been suggesting a block like this:()^() :: reporter operatorsTo be added in. Conversely, I think we should also have an Nth root block like this:()√() :: reporter operatorsTo be added in. Its purpose would be self-explanatory: calculate the Nth root of X.
is in order to calculate the nth root of something you need logarithms which ARE in the scratch editor. THe (nth root) of 2 = 3, for instance, = 2^(1/n) = 3. Next, you convert this to a logarithm, log<base 2> of 3 = 1/n. Although logarithms in the editor are only base 10, so you use the change of base formula. log<base b> of x = (log<base d> of x)/(log<base d> of b), so log<base 2> of 3 = 1/n is log(3)/log(2)= 1/n. Now simple algebra can tell you the answer.
In this example log(2)/log(3) = n. While nth root of x = y is log(x)/log(y) = n.
Please tell me if I made a mistake or if you are confused.
ALGEBRA II BABY!!!!!!
Last edited by accountcraft123 (March 25, 2020 23:57:22)
- Cash737
-
62 posts
Nth Root Block
Like @theonlygusti said, you can make this by using the equation shown, and then use the
In conclusion, we don't need this block.
(round ())block to round it to the nearest 1, 10 or whatever.
In conclusion, we don't need this block.
- SquirreIstar
-
1000+ posts
Nth Root Block
Right? So we don't need the minus block, because it has an easy workaround! We don't need the change var block, because it has an easy workaround too! Like @theonlygusti said, you can make this by using the equation shown, and then use the heavy sarcasm intended(round ())block to round it to the nearest 1, 10 or whatever.
In conclusion, we don't need this block.
The point is, the presence of a workaround doesn't make a block not needed.
Last edited by SquirreIstar (March 26, 2020 12:09:13)
- accountcraft123
-
100+ posts
Nth Root Block
If this post has been answered, could the author report it as resolved.
- Za-Chary
-
1000+ posts
Nth Root Block
This is a suggestion, not a question. So, it is not resolved since it is not implemented or rejected yet. If this post has been answered, could the author report it as resolved.

- sathvikrias
-
500+ posts
Nth Root Block
<(this makes no sense... v )>
Last edited by sathvikrias (Oct. 16, 2020 13:59:34)