#112 (comment)
I see four uses of RenderInExponentialNotation:
- in the Amount constructor, with the fields of an Intl MV Record derived from a FormatNumericToString output string
- in Amount.prototype.convertTo (here), with the fields of an Intl MV Record derived from a FormatNumericToString output string
- in Amount.prototype.toString, with the fields of an Intl MV Record derived from a Number
- in Amount.prototype.toString, with the fields of an Intl MV Record derived from a BigInt::toString(v, 10) decimal digit sequence (where those fields could alternatively be defined directly by counting the digits in the decimal representation of
_v_, e.g. ceiling(log10(abs(_v_) + 1)) or a named equivalent)
The uses of FormatNumericToString seem to be necessary, but it occurs to me that we could probably remove a lot of translation, e.g. carrying non-exponential decimal strings from FormatNumericToString and maybe-exponential decimal strings from Number::toString all the way to the exponent-ensuring and decimal-point-shifting work of RenderInExponentialNotation without passing through non-string intermediaries.
#112 (comment)