Discuss Scratch
- Discussion Forums
- » Suggestions
- » Could we please have an exponents block? ( ) ^ ( )
- medians
-
Scratcher
1000+ posts
Could we please have an exponents block? ( ) ^ ( )
?-2.45^-2.125 =I think the problem is not that we have imprecision (I don't know if ST could even avoid them by using complex code),Yeah, but suppose it was:It's called floating point imprecision, and unfortunately, there is no solution to that.
3.2 ^ 5
= 3.2 * 3.2 * 3.2 * 3.2 * 3.2
= 335.54432 (exactly that, it's not rounded)
While scratch's e^5ln(3.2) workaround might give something like 335.5443199999…
You would have to do something more complex to find which decimal places are just floating point error. Maybe if you multiply it by ten, various numbers of times, then round it and check the difference to see how close the decimal part is to 0 / 1.
But that's a bit of a hassle.
but that it's complex to build (I don't know anything about log, so I wouldn't be able to code the workaround myself).
- ILuvDogs-5335
-
Scratcher
100+ posts
Could we please have an exponents block? ( ) ^ ( )
(#1480)I might've dealt with the problem.-2.45^-2.125 =I think the problem is not that we have imprecision (I don't know if ST could even avoid them by using complex code),Yeah, but suppose it was:It's called floating point imprecision, and unfortunately, there is no solution to that.
3.2 ^ 5
= 3.2 * 3.2 * 3.2 * 3.2 * 3.2
= 335.54432 (exactly that, it's not rounded)
While scratch's e^5ln(3.2) workaround might give something like 335.5443199999…
You would have to do something more complex to find which decimal places are just floating point error. Maybe if you multiply it by ten, various numbers of times, then round it and check the difference to see how close the decimal part is to 0 / 1.
But that's a bit of a hassle.
but that it's complex to build (I don't know anything about log, so I wouldn't be able to code the workaround myself).
- bitmap_caketin
-
Scratcher
100+ posts
Could we please have an exponents block? ( ) ^ ( )
You can't have negative bases unless you use my workaround.?-2.45^-2.125 =I think the problem is not that we have imprecision (I don't know if ST could even avoid them by using complex code),Yeah, but suppose it was:It's called floating point imprecision, and unfortunately, there is no solution to that.
3.2 ^ 5
= 3.2 * 3.2 * 3.2 * 3.2 * 3.2
= 335.54432 (exactly that, it's not rounded)
While scratch's e^5ln(3.2) workaround might give something like 335.5443199999…
You would have to do something more complex to find which decimal places are just floating point error. Maybe if you multiply it by ten, various numbers of times, then round it and check the difference to see how close the decimal part is to 0 / 1.
But that's a bit of a hassle.
but that it's complex to build (I don't know anything about log, so I wouldn't be able to code the workaround myself).
Last edited by bitmap_caketin (Aug. 21, 2026 19:30:35)
- ILuvDogs-5335
-
Scratcher
100+ posts
Could we please have an exponents block? ( ) ^ ( )
(#1483)Oh, I would deal with those two problems.You can't have negative bases unless you use my workaround.?-2.45^-2.125 =I think the problem is not that we have imprecision (I don't know if ST could even avoid them by using complex code),Yeah, but suppose it was:It's called floating point imprecision, and unfortunately, there is no solution to that.
3.2 ^ 5
= 3.2 * 3.2 * 3.2 * 3.2 * 3.2
= 335.54432 (exactly that, it's not rounded)
While scratch's e^5ln(3.2) workaround might give something like 335.5443199999…
You would have to do something more complex to find which decimal places are just floating point error. Maybe if you multiply it by ten, various numbers of times, then round it and check the difference to see how close the decimal part is to 0 / 1.
But that's a bit of a hassle.
but that it's complex to build (I don't know anything about log, so I wouldn't be able to code the workaround myself).
- Assycot243
-
Scratcher
52 posts
Could we please have an exponents block? ( ) ^ ( )
snipJavaScript uses floating-point and if you try
It's called floating point imprecision, and unfortunately, there is no solution to that.
2 ** 3
- unnor
-
Scratcher
1000+ posts
Could we please have an exponents block? ( ) ^ ( )
They meant being unavoidable for Scratch.snipJavaScript uses floating-point and if you try
It's called floating point imprecision, and unfortunately, there is no solution to that.it will give you 8.2 ** 3
- LuigiLasagna
-
Scratcher
6 posts
Could we please have an exponents block? ( ) ^ ( )
100% agree
PLSSSS
PLSSSS
([]^() :: operators)
- unnor
-
Scratcher
1000+ posts
Could we please have an exponents block? ( ) ^ ( )
100% agreeBut why?
PLSSSS([]^() :: operators)
- tsarjosh1049
-
Scratcher
87 posts
Could we please have an exponents block? ( ) ^ ( )
Btw guys it's never going to happen.
Unless all of us maybe go and spam.
Unless all of us maybe go and spam.
- Assycot243
-
Scratcher
52 posts
Could we please have an exponents block? ( ) ^ ( )
And one of the points of an exponent block is to make that not the case.They meant being unavoidable for Scratch.snipJavaScript uses floating-point and if you try
It's called floating point imprecision, and unfortunately, there is no solution to that.it will give you 8.2 ** 3
- unnor
-
Scratcher
1000+ posts
Could we please have an exponents block? ( ) ^ ( )
Yes. And it's function can be replicated in other programming languages in one line of code!And one of the points of an exponent block is to make that not the case.They meant being unavoidable for Scratch.snipJavaScript uses floating-point and if you try
It's called floating point imprecision, and unfortunately, there is no solution to that.it will give you 8.2 ** 3
#1492Yesterday 10:13:11
- Mimi-EEEEE
-
Scratcher
500+ posts
Could we please have an exponents block? ( ) ^ ( )
100% agreeBut why?
PLSSSS([]^() :: operators)
Why NOT?
#1493Yesterday 14:29:04
- unnor
-
Scratcher
1000+ posts
Could we please have an exponents block? ( ) ^ ( )
There can be multiple reasons for the exponents block to be added to scratch.100% agreeBut why?
PLSSSS([]^() :: operators)Why NOT?
#1494Yesterday 19:13:38
- purplebunny63
-
Scratcher
1000+ posts
Could we please have an exponents block? ( ) ^ ( )
WHY NOT IS NOT A VALID REASON100% agreeBut why?
PLSSSS([]^() :: operators)Why NOT?
#1495Yesterday 21:25:35
- robloxnoob27
-
New Scratcher
100+ posts
Could we please have an exponents block? ( ) ^ ( )
it is :]WHY NOT IS NOT A VALID REASON100% agreeBut why?
PLSSSS([]^() :: operators)Why NOT?
#1496Yesterday 22:20:41
- CuteRobot22
-
Scratcher
100+ posts
Could we please have an exponents block? ( ) ^ ( )
No, it isn't. Scratch will not add just anything to the site. However, the reasoning behind this suggestion is explained in the OP.WHY NOT IS NOT A VALID REASONit is :]
#1497Yesterday 22:26:33
- bitmap_caketin
-
Scratcher
100+ posts
Could we please have an exponents block? ( ) ^ ( )
However, the reasoning behind this suggestion is explained in the OP.They still aren't adding anything to the discussion
Last edited by bitmap_caketin (Yesterday 22:27:59)
#1498Today 14:01:45
- Mimi-EEEEE
-
Scratcher
500+ posts
Could we please have an exponents block? ( ) ^ ( )
Give me a SINGLE good reason to not add it.However, the reasoning behind this suggestion is explained in the OP.They still aren't adding anything to the discussion
- Discussion Forums
- » Suggestions
-
» Could we please have an exponents block? ( ) ^ ( )