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)
#1484Yesterday 04:37:44
- 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).
#1485Yesterday 11:55:32
- 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
#1486Yesterday 18:56:01
- 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
#1487Yesterday 19:11:06
- LuigiLasagna
-
Scratcher
6 posts
Could we please have an exponents block? ( ) ^ ( )
100% agree
PLSSSS
PLSSSS
([]^() :: operators)
#1488Yesterday 19:13:26
- unnor
-
Scratcher
1000+ posts
Could we please have an exponents block? ( ) ^ ( )
100% agreeBut why?
PLSSSS([]^() :: operators)
#1489Yesterday 19:16:37
- tsarjosh1049
-
Scratcher
83 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.
#1490Yesterday 19:20:01
- 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
#1491Yesterday 23:53:43
- 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
#1492Today 10:13:11
- Mimi-EEEEE
-
Scratcher
500+ posts
Could we please have an exponents block? ( ) ^ ( )
100% agreeBut why?
PLSSSS([]^() :: operators)
Why NOT?
#1493Today 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?
#1494Today 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?
#1495Today 21:25:35
- robloxnoob27
-
New Scratcher
92 posts
Could we please have an exponents block? ( ) ^ ( )
it is :]WHY NOT IS NOT A VALID REASON100% agreeBut why?
PLSSSS([]^() :: operators)Why NOT?
#1496Today 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 :]
#1497Today 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 (Today 22:27:59)
- Discussion Forums
- » Suggestions
-
» Could we please have an exponents block? ( ) ^ ( )