SQLite Forum

Decimal128
Login
There are a couple of efficiency based reasons for binary floating point.

One is that, because the underlying representation in any "digital" hardware in common use is a collection of binary states, conventionally called 1 and 0 (but manifested as various voltage levels, charge absence/presence, magnetization polarity, and maybe some others. Decimal representations require more binary bits per possible represented state (by about 20 percent) because 10 is well below the next higher power of 2.

The other is that hardware designed to do arithmetic would have to be more complex to manipulate "decimal" representations. This is because they must themselves be represented as a small number of binary states and because decimal arithmetic is inherently more complex than binary arithmetic. (There are many more input and output values for the fundamental digit operations.) And that additional complexity, while quite manageable by modern design methods, would necessarily slow down the operations. Without going into off-topic detail here: more complex logic to describe digit set transformations becomes greater logic propagation delay, which in turn requires deeper [pipelines](https://en.wikipedia.org/wiki/Pipeline_(computing\)) or lower clock rates. 

So there is more than inertia behind the popularity of binary FP.

(Edited for grammar and markdown mess-up.)