This a simple X^Y custom block in only 65 blocks! (Though the whole project itself is approximately 260 blocks for the text) ---------------------------------------------------------------------- Instructions: - Left arrow: backspace - Down arrow or enter key to write on Value Y - Up arrow to write on Value X ---------------------------------------------------------------------- Features: - Positive to the power of a positive - Positive to the power of a negative (and the opposite) - Negative to the power of a negative - Decimals (could be used to make roots) - Decimal to the power of a decimal - x^0 = 1 - 0^y (if y is negative) is undefined - x^1 is x ---------------------------------------------------------------------- This doesn't include is roots of negatives, as it can lead to imaginary numbers. Note: You might notice that it will sometimes output an answer with long decimals (like 1000.00000000003). This is because of floating point errors, and I unfortunately can't fix it...
(Originally on my old account, @ysf313) ---------------------------------------------------------------------- Code -- 100% by me Design -- Thumbnail from Canva You can use the custom block with credit. Click see inside and check the backdrop's code. ---------------------------------------------------------------------- Update log: 9/8/2021 == Reshared to fix a bug with negative decimals being outputted incorrectly. It turns out it was all because of an "if...else loop" instead of an "if loop" ---------------------------------------------------------------------- Tags: #math #custom #block #exponent