Formats a U256 number to string, adding an exponential notation hint if it
is larger than 10_000, with a precision of 4 figures, and trimming the
trailing zeros.
Returns the number expressed as a string in exponential notation
with the given precision (number of significant figures),
optionally removing trailing zeros from the mantissa.