@Chris-Kawa thanks for all your help.
Using a double instead of float I can get good display precision for up to 17 digits (which meets my minimum, but I'd prefer it if I could go even higher), so now this happens:
12345678901234567 -> 12345678901234568
As for 'f', the problem I'm having with using 'f' over 'g' is that they handle the given precision number differently, if i put say
QString::number(12, 'f', 2);
it will be printed as 12.00 (basically it adds zeroes after the dot to fill in every slot that doesn't have a number in it with zero, so if I put precision to 42, I will get 42 zeroes, or 12.000000000000000000000000000000000000000000; if I put 0 precision, then I get flat 12 as I would want. Regardless of what I set the precision to, the main number (before the dot) will always support 17 digits before getting scrambled, but if I don't add numbers after the dot, it adds zeroes for every possible point precision as given by the number (although if I'm reading correctly into these operations, that one will also get scrambled after the 17th digit just like the one before the dot))
While for 'g', the precision number sets the total amount digits it can represent before getting scrambled, so unlike 'f', if I set the value to 2, it will get scrambled at 123 (on the 3), but just as 'f', if I set it to something high like 42, it will still get scrambled after the 17th digit.
What I want is to represent numbers that can go from 1 to 999999999999999.99 (minimum, ideally I'd want even higher possible presicion) with the numbers after the dot being limited to two per number (hence the .99) 'f' seems to handle this fairly well if I give it 2 point precision, however the problem there is of course that any integer number will have .00 appended to it, and I do not want that. I want 12 to be read as 12 and not 12.00, while I want 12.2 to still be read as 12.2 or 12.20 (either way is fine since it's the same value, but I definitely would not want it shown as 12.199999999999999 which is what I get if it has higher precision).
There is some rounding that needs to be done on the numbers during calculations but I think I will handle that separately (so the output to the display would always be a number with a maximum of 2 point numbers to work with)
Well, if there's any way to use the 'f' with 2 point precision number and prevent the output from printing .00 after every single number that doesn't use points, then I guess my problem would be solved.