Docs
Browse Docs
Field guide · Numbers and units

Rounding and precision loss

Digits were dropped when a value was displayed, exported, or converted, and the file now holds the shortened number.

What it looks like

Before
referenceunit_costwhat is actually there
4.50012E+152.33long identifier turned into scientific notation
45001234000567822.3333intact
After
referenceunit_costwhat is actually there
needs the source2.33the missing digits are not in the file
45001234000567822.3333unchanged
Nothing in the first row can rebuild the original identifier. Whether 2.33 was once 2.3333 is also unknowable from the file.

How it happens

  • A spreadsheet showed a rounded value, and the displayed value was what got copied or exported.
  • A very long number was stored as a number instead of text, and its final digits were replaced or folded into scientific notation.
  • Values passed through a system that keeps fewer decimal places than the one before it.

What it breaks

  • Line items no longer add up to their totals, by small amounts that are tedious to trace.
  • Long identifiers stop matching their originals, so joins fail on exactly the rows that were altered.
  • Small rounding differences grow when values are multiplied by large quantities.

How to spot it

  • Look for scientific notation in columns that should hold identifiers.
  • Check whether long numbers end in a run of zeros more often than chance would allow.
  • Recompute a total from its parts and compare. A consistent small gap points to rounding upstream.

How to fix it

  • Go back to the source and export again. Lost digits cannot be recovered from the rounded value.
  • Treat identifiers as text from the moment they are read, so nothing tries to do arithmetic on them.
  • Carry full precision through every step and round once, at the point of presentation.
  • Where the source is gone, keep the value as it is and record that its precision is uncertain.

TermsPrecision, Rounding, Floating point, Identifier

Karg checks for many of these when it profiles a file, applies the fixes it is confident about, and sets the rest aside for your review. See how it works, or have our team clean your data for you.