Using XML to Exchange Floating Point Data

SEI Report
This paper explains issues of using XML to exchange floating point values, how to address them, and the limits of technology to enforce a correct implementation.
Publisher

Software Engineering Institute

Abstract

This short paper explains some issues that arise when XML is used to exchange floating point values, how to address those issues, and the limits of technology to enforce a correct implementation. We begin by specifying the problem to be solved and the correctness conditions of a solution. We then provide brief background on the relevant aspects of XML and floating point data arithmetic. We conclude by describing how to solve the problem using the features of several programming languages.

Cite This SEI Report

Klein, J. (2022, February 10). Using XML to Exchange Floating Point Data. Retrieved August 8, 2026, from https://www.sei.cmu.edu/library/using-xml-to-exchange-floating-point-data/.

@techreport{klein_2022,
author={Klein, John},
title={Using XML to Exchange Floating Point Data},
month={Feb},
year={2022},
institution={Software Engineering Institute, Carnegie Mellon University},
url={https://www.sei.cmu.edu/library/using-xml-to-exchange-floating-point-data/},
note={Accessed: 2026-Aug-8}
}

Klein, John. "Using XML to Exchange Floating Point Data." Software Engineering Institute, Carnegie Mellon University. Software Engineering Institute, February 10, 2022. https://www.sei.cmu.edu/library/using-xml-to-exchange-floating-point-data/.

J. Klein, "Using XML to Exchange Floating Point Data," Software Engineering Institute, Carnegie Mellon University. Software Engineering Institute, 10-Feb-2022 [Online]. Available: https://www.sei.cmu.edu/library/using-xml-to-exchange-floating-point-data/. [Accessed: 8-Aug-2026].

Klein, John. "Using XML to Exchange Floating Point Data." Software Engineering Institute, Carnegie Mellon University, Software Engineering Institute, 10 Feb. 2022. https://www.sei.cmu.edu/library/using-xml-to-exchange-floating-point-data/. Accessed 8 Aug. 2026.

Klein, John. Using XML to Exchange Floating Point Data. Software Engineering Institute. 2022. https://www.sei.cmu.edu/library/using-xml-to-exchange-floating-point-data/