BaRatin-tools/BaRatinAGE

rounded values in tables have unconsistent number of significative digits

Opened this issue · 2 comments

rounding off discharges to the nearest L/s is limiting in some cases: if Q<0.001 m3/s, display a certain number of significant digits (3?), switching to scientific writing if Q<0.001 m3/s

Numbers in tables now get formatted by a new method that (1) converts whole numbers to integers, (2) applies scientific notation for very small or large values and (3) uses varying decimal precision for mid-range values.

In addition, a lossless formatting was implemented; it can be toggled for all tables. This new lossless formatting method is also now used for all non-integer number fields.

@JeromeLeCoz , you'll let me know if that solves the issue during you tests.

Although the original issue for very small values has been solved, there's still display issues in mid-range values (point 3 in my comment above)

(3) uses varying decimal precision for mid-range values.

Sometimes, the number of significative digits displayed is different which is confusing. For example, the number 11.6492 would be rounded to 11.6 when the number 12.0428 would be rounded to 12 instead of the expected 12.0.

I'll rename the issue to better reflect this new issue.