This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-01-05 20:30:28

MaxFlyboy
Scratcher
Registered: 2011-11-07
Posts: 100+

Help me!

I need to know how to do cube roots on scratch. If someone can tell me me how it would help me a lot. Just in case you want to know what variables there are and what you might need to know... you have the number that needs to get the cube root in a variable, you can add any amount of variables as you like, and you need to set up a formula so that it can take any number. Thanks!


http://cdn.voodoofilm.org/images/upload/thumb/viral-video-2011.jpg click the picture for an AMV

Offline

 

#2 2012-01-05 20:37:30

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Help me!

You can get the cube root of a variable (let's call it x) using the Scratch operators by doing this:

10^((log x)/3)

You're taking the base 10 logarithm (log), dividing it by 3, and then taking the inverse log by raising 10 to the power of it.  The result is the cube root.  Of course, if you want the fourth or fifth root, you could replace the 3 with 4 or 5  smile


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#3 2012-01-05 21:39:38

MaxFlyboy
Scratcher
Registered: 2011-11-07
Posts: 100+

Re: Help me!

Thank you so much. I needed to change it to have it do 1 step at a time but when it did that it worked perfectly. Thank you.


http://cdn.voodoofilm.org/images/upload/thumb/viral-video-2011.jpg click the picture for an AMV

Offline

 

Board footer