I have recently started making my own numbering system so that I can go above the cap of 1e+308.
The system itself works great, I can do Multiplication, Division, Addition, and Subtraction with no problems or lag at all. I even got the cap to be 1e+1e+308, which I’d never need even in a game about big numbers.
The problem is being able to display 10000 as 10k. I’ve made a compact notation system before, but this system works a bit different.
Basically, instead of 10000, I have a string “1, 4”. the first number in the string is the first part of e+, and the second is the number of digits, or the second part of e+.
For example, “1, 308” is 1e+308. “1, 1000” is 1e+1000. I even have a system to display numbers as scientific notation. But since its not a single number, my existing system for compact notation won’t work.
I’ve tried a few things, but I ended up getting completely wrong numbers, and I’m not sure where to look.
I could simply set numbers below 1e+308 as compact notation, and use the compact notation converter with a number, and then anything above that use scientific notation, but I’d like to be able to use compact notation through the entire game.
I don’t need an entire script, just an idea on how I’d do this would help a lot.