Conformance Examples 0.1.0 — Render: number-rendering¶
over-long-integer-renders-fixed-notation¶
An integer literal too large for Long (20 nines) falls back to the ECMA-262 double formatter, which renders it in fixed notation.
Template
Context
Output
exponent-1e20-renders-fixed-notation¶
1e20 is within ECMA-262's fixed-notation range (n <= 21) and renders without an exponent.
Template
Context
Output
exponent-1e21-renders-exponential-notation¶
1e21 is just past ECMA-262's fixed-notation threshold and renders in exponential notation.
Template
Context
Output
exponent-1e-minus-6-renders-fixed-notation¶
1e-6 is within ECMA-262's fixed-notation range (n >= -5) and renders with leading zeros, not an exponent.
Template
Context
Output
exponent-1e-minus-7-renders-exponential-notation¶
1e-7 is just past ECMA-262's fixed-notation threshold on the small side and renders in exponential notation.
Template
Context
Output
negative-zero-renders-as-zero¶
Negative zero renders as "0", not "-0", per ECMA-262 Number::toString.
Template
Context
Output
float-addition-renders-shortest-round-trip-digits¶
0.1 + 0.2 via the plus transform renders the shortest round-trip decimal for the resulting double, exposing the classic binary-floating-point artifact rather than hiding it.
Template
Context
Output
double-max-value-renders-exponential-notation¶
Double.MAX_VALUE is far past the fixed-notation threshold and renders in exponential notation.
Template
Context
Output
Source fixture: render/number-rendering.json