A lot of what you’ve mentioned is simply just because of me lacking math skills. I made this module a few years ago with someone smarter than me to help with the math. A few months ago I told some friends about the module and my problems with it, and they decided to help improve the module.
I thought it would be a good idea to open source it, not only so people could use it, but so it could be improved as well.
Most of the accuracy issues are from me missing them, like floor rounding towards zero instead of negative infinity, I just didn’t think/didn’t know about it.
This was because I couldn’t figure out round/ceil/floor while keeping the coefficient and exponent separated (at least with usable performance), so I used the normal functions and assumed rounding after 1000 wouldn’t matter because it would be displayed with one of the notation functions (compact/scientific notation)
Before I learned the correct terms, I used first and second (first for coefficient, second for exponent), and it just never got changed.
Instead of having negative exponents, the coefficient is allowed to go between 0 and 1 for decimals when the exponent is 0. It made implementing arithmetic easier for me.
The metamethods are just there to make using this module look and feel easier. All the .add and .multiply functions will add up and it starts to get confusing, its a lot easier to just be able to use + or -. There is no real gain for this besides ease of use, and I think its important.
The module is built for games like simulators/tycoons, which normally will have a global leaderboard for players. Its important for some games, so they might prefer this module just for having that support.
This module definitely isn’t accurate in the way you describe, like you already mentioned there are multiple inaccuracies. I believe for a simulator/tycoon game, it would be accurate enough, unless there is a heavy focus on math and it being correct.
The reason I open sourced it is in the hope that people smarter than me would point these things out and maybe even fix them, and so that people who maybe don’t care about 100% accuracy could have a module with easier use (I believe) than the current alternatives.