Need help with a binary into decimal reporter

Whenever I put a binary number that goes past 21 bits, it starts to report NaN. When i looked into it it’s because it starts to put Infinity in the list.

I’ll be honest in that I haven’t tried much to fix it except for changing the given binary into another var (don’t know how I expected that to work). But for some reason when I use a joined list instead of typing it out, it works. Ex: 24 1’s gives NaN, but a list of 24 '1’s joined into a single line of 1’s works. I’ve had 1023 1’s work (1024 gives infinity).

So, first of all:
there’s no such thing as “decimal to binary” or “binary to decimal” conversion

Now that we’ve got that out of the way, to answer your question about numbers whose binary numerals have more than 21 bits, have you tried using the Bignums library? It provides infinite-precision integer arithmetic, among other things.

I’ll be honest, I expected that one. Was interesting the whole read.

I’ve tried it but I was completely lost on how to use it correctly. But while testing with it ive realized that my reporter does work after i open it and then close it, but if I save the project and reopen it, it goes back to giving NaN

but if I save the project and reopen it, it goes back to giving NaN

or I guess if it thinks it’s already using bignums you might have to

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.