Significant Figure Control on Variables and Widgets

Hello!

A feature that would be really great to see would be more robust control of significant figures on numeric entries and variables.

Currently, the “maximum decimal places” field on numeric entries inhibits widget entries from having values that exceed the configured limit, but does not provide any configurable rounding or minimum entry enforcement.

For example, entering the following values (with maximum decimals set to 2) results in the variable being changed to:

  • 2.00 → 2
  • 2.655 → 2.65
  • 2.651 → 2.65
  • 2.6599999999999999999999 → 2.65

Because of this, the numeric entry field usability is extremely limited, in almost all cases meaning a string entry must be used instead so that entry sig-figs are enforced, and then typecast to numeric for calculation purposes.

If the numeric entry widget was updated to allow for:
-maximum significant figures with selectable rounding (always down, always up, truncate, standard, etc.)
-minimum significant figures (allow for the validation to error if the minimum is not met, or to auto-populate trailing 0s)

And if the same features were applied to numeric type variables (meaning variables that are not in entry widgets can also have this enforcement configured or turned off) it would make this datatype significantly more usable, and diminish the need to constantly type cast.

I did see other posts like this one suggest this type of feature:

But I wanted to also specify the value in applying this configuration on the variable level as well.

Thank you!