- #1
- 4,715
- 2,983
Is there a standard way of representing numbers of arbitrary size or precision for storage in a text file, JSON message, variable etc.?
I am thinking of representing integers as decimal strings e.g. "-12345678901234567" and floats as an ordered pair (array) of strings representing decimal mantissa and exponent e.g. ["-1.2345678901234567", "17"], but if there is some existing standard I would rather follow that.
I am thinking of representing integers as decimal strings e.g. "-12345678901234567" and floats as an ordered pair (array) of strings representing decimal mantissa and exponent e.g. ["-1.2345678901234567", "17"], but if there is some existing standard I would rather follow that.