Posted 28 June 2019 - 08:32 AM
Basically I want to make an accurate way of converting numbers between bases
I like to test my method using base 10 to 16 and 10 to 16
but when the numbers get a little larger (34A BFC6 3278 ACBF) specificaly in this case there is a lack of accuracy…
if I convert 34ABFC63278ACBF to decimal and back i get 34ABFC63278ACC0 which is 1 greater than 34ABFC63278ACBF is.
before you tell me to use string.format() or tonumber(), like I have seen others do on the internet, they also have the same problem.
is there any way y'all could think if to make it more accurate?
PS. also not asking for, "No one needs to be that accurate"
I like to test my method using base 10 to 16 and 10 to 16
but when the numbers get a little larger (34A BFC6 3278 ACBF) specificaly in this case there is a lack of accuracy…
if I convert 34ABFC63278ACBF to decimal and back i get 34ABFC63278ACC0 which is 1 greater than 34ABFC63278ACBF is.
before you tell me to use string.format() or tonumber(), like I have seen others do on the internet, they also have the same problem.
is there any way y'all could think if to make it more accurate?
PS. also not asking for, "No one needs to be that accurate"
Edited on 28 June 2019 - 06:34 AM