Latest posts on Exponent blockhttps://scratch.mit.edu/discuss/topic/9907/2019-10-26T15:15:15+00:00About Scratch :: Suggestions :: Exponent block
2019-10-26T15:15:15+00:00DarthVader4Life3740668<blockquote><p class="bb-quote-author">noogai34 wrote:</p>No support. In Snap! the workaround is…<pre class="blocks">Script bars (result)<br/>Set result to base<br/>Repeat ((exponent)-(1))<br/>Set result to result * result<br/>End<br/>Report result</pre>result<br/>Yes I was l a a y</blockquote>this is scratch
About Scratch :: Suggestions :: Exponent block
2019-06-28T16:14:25+00:00noogai343606774No support. In Snap! the workaround is…<pre class="blocks">Script bars (result)<br/>Set result to base<br/>Repeat ((exponent)-(1))<br/>Set result to result * result<br/>End<br/>Report result</pre>result<br/>Yes I was l a a y
About Scratch :: Suggestions :: Exponent block
2019-06-02T15:50:37+00:00space_elephant3572145<blockquote><p class="bb-quote-author">15-MinuteGaming wrote:</p>Support. They have logarithms but no exponents.</blockquote>They don't (but should) have logarithms (except for base e and 10 where they also have exponents)
About Scratch :: Suggestions :: Exponent block
2019-06-02T02:49:09+00:0015-MinuteGaming3571525Support. They have logarithms but no exponents.
About Scratch :: Suggestions :: Exponent block
2019-06-01T21:48:59+00:00LEGAMER46653571132<pre class="blocks">set [a v] to (answer)<br/>repeat (a)<br/>set [b v] to ((b) * (a))<br/>end</pre>
About Scratch :: Suggestions :: Exponent block
2019-04-29T21:58:26+00:00VFDan3527143I support per the reasons in @imfh's post.
About Scratch :: Suggestions :: Exponent block
2019-04-29T19:31:09+00:00imfh3526934Support, workarounds are less precise and more costly than this could be. It shouldn't be difficult to implement either. The only downside that I could think of is that it might be confusing to some Scratchers or seem too advanced.<br/><br/><blockquote><p class="bb-quote-author">noogai34 wrote:</p><pre class="blocks">define (base) ^ (exponent):: reporter<br/>set [variable v] to (base:: custom - arg)<br/>repeat (exponent:: custom - arg)<br/>change [variable v] by ((base) * (base))<br/>end</pre>No support, the above code is a workaround<br/>But it would still be handy in the education industry!</blockquote>That solution works if you only need to work with small powers, but not if you want to do many large ones and quickly. The point of adding it is so there is no need to use a workaround.
About Scratch :: Suggestions :: Exponent block
2019-04-28T21:29:58+00:00noogai343525931<pre class="blocks">define (base) ^ (exponent):: reporter<br/>set [variable v] to (base:: custom - arg)<br/>repeat (exponent:: custom - arg)<br/>change [variable v] by ((base) * (base))<br/>end</pre>No support, the above code is a workaround<br/>But it would still be handy in the education industry!
About Scratch :: Suggestions :: Exponent block
2019-04-28T18:53:05+00:00noogai343525775<pre class="blocks">Turn Left (0 ^ 0) radians:: motion</pre>Still thinking about it
About Scratch :: Suggestions :: Exponent block
2019-01-29T01:43:11+00:00TheGreenFlash3418403I believe this block would be helpful because it could be used in many projects that use physics simulators, 3D, and other things with a lot of math, there is no easy or efficient workaround, especially when using decimals, and Scratchers who don't know about exponents might play around with and learn about them.<br/>For these reasons, I <span class="bb-big"><span class="bb-bold">support</span></span> and hope that the Scratch Team decides to add the Exponential Operator Block to Scratch.
About Scratch :: Suggestions :: Exponent block
2019-01-26T07:38:49+00:00space_elephant3415351<blockquote><p class="bb-quote-author">mitchboy wrote:</p><blockquote><p class="bb-quote-author">kayybee wrote:</p>The short version works for all real numbers, the long one doesn't.</blockquote>Actually, 3.14 ^ 3.14 results in 30.959 on my custom block (about seven posts above). Try it. It just doesn't work with negative numbers or fractions. And my project barely involves any heavy scripting or math at all. All you need is:<br/>- three variables<br/>- a repeat block<br/>- a subtraction and a multiplication block<br/>- a set variable block<br/><br/>That's it. It took me like two minutes.</blockquote><br/>3.14 ^ 3.14 = 36.33783888017471<br/><br/>you got 3.14 ^ 3 = 30.959144000000002<blockquote><p class="bb-quote-author">Cyoce wrote:</p>Support<br/><pre class="blocks">((0) ^ (0) :: operators)[/quote]<br/><br/>Not a good example. Most languages answer one.<br/><br/>Support suggestion.</pre></blockquote>
About Scratch :: Suggestions :: Exponent block
2018-12-23T17:44:14+00:00space_elephant3359260support, though there is a workaround.<pre class="blocks">define (base)^(exponent)::reporter<br/>if<(base)<[0]>::control<br/>if<((exponent)mod(1))=[0]>::control<br/>if<((exponent)mod(2))=[0]>::control<br/>return([e ^ v]of((exponent)*([ln v]of(()-(base)))))::#000 cap<br/>else<br/>return(()-([e ^ v]of((exponent)*([ln v]of(()-(base))))))::#000 cap<br/>end<br/>else<br/>return[NaN]::#000 cap//it is complex<br/>end<br/>else<br/>return([e ^ v]of((exponent)*([ln v]of(base))))::#000 cap<br/>end</pre>
About Scratch :: Suggestions :: Exponent block
2018-09-30T11:24:45+00:00badatprogrammingibe3267315<div class="code"><pre>BUMP<br/>USER<br/>META<br/>PRAY</pre></div>
About Scratch :: Suggestions :: Exponent block
2018-09-15T07:33:08+00:00Botcho_Otkho3251688<blockquote><p class="bb-quote-author">thelostgames wrote:</p><pre class="blocks">define (number) to the power of (exponent)<br/>set [num v] to (number)<br/>repeat (exponent)<br/>set [num v] to ((num) * (num))<br/>end</pre><br/>This should work</blockquote>Not when the number ia negative or decimal.
About Scratch :: Suggestions :: Exponent block
2018-09-15T00:18:35+00:00thelostgames3251492<pre class="blocks">define (number) to the power of (exponent)<br/>set [num v] to (number)<br/>repeat (exponent)<br/>set [num v] to ((num) * (num))<br/>end</pre><br/>This should work