Almost accidentally, while summing two double variables (with just 1 decimal digit), I received in a label, the sum containing many decimal digits. Now I know that doubles are just approximations, yielding many decimal places occasionally, so I tried formating the two doubles using numberFormat(1,2) before summing. No difference!
I submitted these values in a db. The fields under concern, are defined as REAL. If you have a look (db attached) and query
you can see the values entered. Now, if you execute the query
you will see the extra decimal digits! It's annoying, since I cannot exactly understand why numberFormat is not truncating these numbers. To not mention problems causing in a reports' module (the module cannot even recognize some submitted data).
Attached you can find both the database and a screenshot of the two queries.
Any ideas?
I submitted these values in a db. The fields under concern, are defined as REAL. If you have a look (db attached) and query
B4X:
select openorders from pos2
B4X:
select sum(openorders) from pos2
Attached you can find both the database and a screenshot of the two queries.
Any ideas?