mgreminger / EngineeringPaper.xyz

EngineeringPaper.xyz is a web app that makes it easy to create, save, and share engineering calculations.
https://EngineeringPaper.xyz
MIT License
119 stars 8 forks source link

Significant Figures Truncate Trailing Zeros #197

Open VanHulleOne opened 1 year ago

VanHulleOne commented 1 year ago

Currently, EngineeringPaper.xyz truncates trailing zeros after the decimal even though they should count as significant figures. i.e. if significant figures is set to 4 and you have 1/10 as a result you get 0.1 instead of 0.1000. Personally, I am on the fence about what behavior I would prefer.

Con of showing the trailing zeros: adds a little clutter.

It is a little confusing if you use local sig figs to know how much your result has been rounded (you have to remember each local sig fig setting since it isn't displayed). I was also confused when I changed the sig fig setting and my result did not change until I noticed this issue. Because of these two reasons I am leaning slightly more toward showing the trailing zeros but could be convinced otherwise.

mgreminger commented 1 year ago

Yes, the automatic setting will remove insignificant trailing zeros. To preserve insignificant trailing zeros, use the "Fixed" option as shown below:

Screenshot from 2023-07-07 07-44-34