You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Monetary amounts and prices are mostly exact decimal numbers. It is well documented that monetary amounts are poorly represented by binary single- and double-precision floating-point numbers that programmers are familiar with. This problem has a long and dreary history. C language and its descendants were originally developed for engineering problems such as telephone switches, not for financial applications. The languages that support decimal types often treat them as a class rather than as a primitive type. Due to poor and non-standard representations of decimal numbers in programming languages, we made a decision for SBE v1.0 to use a composite type of mantissa + exponent.
I would like to revisit that decision for SBE 2.x and am soliciting opinions on it. One of the drivers for reconsideration is digital tokens that may have exact decimals with high precision.
As a matter of fact, the IEEE-754:2008 standard does have representations of exact decimal floating-point numbers, along with the familiar binaries. It defines decimal32, decimal64, and decimal128 types. Recent versions of C and C++ have bindings to those types, but many other languages do not. Some may have accessibility through libraries.
Questions:
Are the IEEE-754:2008 decimal standards suitable for SBE?
Does even decimal128 support sufficient precision, or is arbitrary precision a requirement?
The text was updated successfully, but these errors were encountered:
Monetary amounts and prices are mostly exact decimal numbers. It is well documented that monetary amounts are poorly represented by binary single- and double-precision floating-point numbers that programmers are familiar with. This problem has a long and dreary history. C language and its descendants were originally developed for engineering problems such as telephone switches, not for financial applications. The languages that support decimal types often treat them as a class rather than as a primitive type. Due to poor and non-standard representations of decimal numbers in programming languages, we made a decision for SBE v1.0 to use a composite type of mantissa + exponent.
I would like to revisit that decision for SBE 2.x and am soliciting opinions on it. One of the drivers for reconsideration is digital tokens that may have exact decimals with high precision.
As a matter of fact, the IEEE-754:2008 standard does have representations of exact decimal floating-point numbers, along with the familiar binaries. It defines decimal32, decimal64, and decimal128 types. Recent versions of C and C++ have bindings to those types, but many other languages do not. Some may have accessibility through libraries.
Questions:
The text was updated successfully, but these errors were encountered: