Wr008 — Excessive trailing zeros in numeric output

§12.13 writer-pathology (sub-class: numeric formatting)

P3 — cosmetic / metadata-only

writer

Sources

Sender

Writers using `printf("%.20f", ..)` or `printf("%.17g", ..)` indiscriminately on every coordinate

Description

Every numeric coordinate is emitted with 17 or more decimal digits, padded with trailing zeros where the underlying value has fewer significant digits (`1.0` is emitted as `1.00000000000000000`). The file inflates 2-3× over what minimal-form output would produce. Spec-conforming, but bandwidth- and storage-hostile. Bug-reporter language: "STEP file unnecessarily huge", "20 digits for every zero", "compresses 95%".

Reproducer recipe

CARTESIAN_POINTs with coordinates such as `(1.00000000000000000,2.50000000000000000,0.00000000000000000)`.

Expected kernel behavior

Heal and accept: parse normally; a re-emit policy may normalize / shorten to minimal round-trip-safe form (`%.17g` shortened to the smallest digit-count that round-trips).

Notes

Cousin of Wr006 from the opposite direction.

Expected validation

occt=empty/empty gmsh=empty ifc=schema_n/a

Byte assertions

Tier-3 assertions

Cross-references

Wr006

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1ISO-10303-21;
2/* Wr008: excessive trailing zeros — 17 decimal digits on every coordinate */
3HEADER;
4FILE_DESCRIPTION(('Wr008 - excessive trailing zeros in numeric output'),'2;1');
5FILE_NAME('Wr008.stp','2026-06-20T00:00:00',('auto-generated'),(''),
6  'auto-generated','','');
7FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }'));
8ENDSEC;
9DATA;
10/* Defect: printf("%.17g") pads every coord with trailing zeros */
11#1=CARTESIAN_POINT('origin',(0.00000000000000000,0.00000000000000000,0.00000000000000000));
12#2=CARTESIAN_POINT('unit-corner',(1.00000000000000000,2.50000000000000000,0.50000000000000000));
13#3=CARTESIAN_POINT('half',(0.50000000000000000,0.25000000000000000,0.12500000000000000));
14#4=DIRECTION('z-axis',(0.00000000000000000,0.00000000000000000,1.00000000000000000));
15#5=GEOMETRIC_CURVE_SET('trailing-zeros',(#1,#2,#3));
16ENDSEC;
17END-ISO-10303-21;