Format a finite number as a valid ISO-10303-21 STEP REAL literal.
A conforming REAL always carries a decimal point in its mantissa and an
uppercase E for the exponent. JavaScript's Number.prototype.toString
emits neither reliably: an integer-valued exponential prints as 5e-8
(lowercase e, no mantissa dot) and would become an invalid token if a bare
. were appended (5e-8.). This rewrites the mantissa/exponent into the
STEP form (5.E-8, 1.5E-7, 1.E+21).
This is the SINGLE source of the mantissa/E rewrite; the export package's
toStepReal / toStepRealScaled reuse it so the rule lives in one place.
Callers guard non-finite input (serializeValue maps it to $).
Format a finite number as a valid ISO-10303-21 STEP REAL literal.
A conforming REAL always carries a decimal point in its mantissa and an uppercase
Efor the exponent. JavaScript'sNumber.prototype.toStringemits neither reliably: an integer-valued exponential prints as5e-8(lowercasee, no mantissa dot) and would become an invalid token if a bare.were appended (5e-8.). This rewrites the mantissa/exponent into the STEP form (5.E-8,1.5E-7,1.E+21).This is the SINGLE source of the mantissa/
Erewrite; the export package'stoStepReal/toStepRealScaledreuse it so the rule lives in one place. Callers guard non-finite input (serializeValuemaps it to$).