Can anyone help fix this code

The link to the project is


131071 should come back as 11111111111111111, but instead it comes back as 11111111111111112. Can anyone help?
8 Likes

It probably just rounds it up or smth

3 Likes

I just checked, and apparently 16 is the max amount of numbers on one line before it starts messing up

4 Likes

I don’t know if there’s a way to stop that, the computer rounds it up to 111…2 so that it wouldn’t be a repeating decimal I think.

4 Likes

Does this mean that the issue is solved, even though the answer is that it might not be possible to fix it?

4 Likes

Yes.

2 Likes

There is a way. It works on my Base Converter. Choose Encode (0), enter your number, then enter 2 to convert to binary.

4 Likes

Also, it only rounds up numbers that contains a decimal, 1.1111111… for example. If the number was too high it would convert automatically to Scientific Notation.

4 Likes

It might be because the CUSTOM code doesn’t run/work properly… go to text 3 > When self is tapped > My function > check if else▶️Number<=4095 > check if else▶️Number>=131071 > My function 2 > check if else▶️Number>=65536>My function 2

The my function 2 at the end doesn’t have a “^” button, so there is some bug with it and maybe it is not running the code?

2 Likes

Player version 1.5.0 has really bad floating point error, which can be seen after just 5-8 decimal places after the first digit in any given operations sometimes.

3 Likes

No, it doesn’t have the collapse button when the custom block is placed inside itself.

1 Like