by Dylan16807 · 4y ago · 0 comments
What's 'much' here? If I'm doing the math right for a 64 bit number, it's 53 bits of precision vs. 59?
When a number representation uses a fixed number of bits, e.g. 64 bits, there are a fixed number of points on the number axis that can be represented, e.g. 2^64.
Any other representation has the same number of points. If you increase the density of the points in some interval, to increase the precision, you must take them from another interval, where fewer points will remain, resulting in a lower precision.
The traditional floating-point numbers are distributed so that the relative error is almost constant as long as there is neither overflow nor underflow.
For most computations that belong to simulations of complex physical systems, the physical quantities may have values varying within many orders of magnitude and a constant relative error is what is desired for maximum accuracy in the final results.
The posit representation increases the precision for numbers close to 1, with the price of decreasing the precision for large or small numbers.
There are applications that can benefit from the increased precision around 1, but there are also others whose precision would be seriously affected if posits were used.
So it is wrong to claim that posits have greater precision in general. They have greater precision only for the applications that use only numbers that are neither too large, nor too small.
It is likely that the largest benefits from posits are available only for the applications that use only small number sizes, i.e. no more than 32 bits. Such small number formats have a too small exponent range to be used in applications where very large or very small numbers are common, so if 32-bit or smaller floating-point numbers are already used, it is likely that the application belongs to those that might benefit from posits, due to the limited range of the numbers handled by it.
An application that really needs 64-bit numbers, e.g. the simulation of a semiconductor device, is more likely to have its accuracy worsened than improved by posits.
> An application that really needs 64-bit numbers, e.g. the simulation of a semiconductor device, is more likely to have its accuracy worsened than improved by posits.
That really depends on what you're storing. For something like voltages, I would expect posits to have better precision all the time. 64 bit posits don't have less precision until you go over 2^21 or under 2^-21.
I should have replied one level above.
Regarding voltages, an application that would just add voltages would use numbers in a limited range, which could be well represented by posits.
However no such applications exist. The real applcations multiply and divide different kinds of physical quantities before adding them, and they might mix in computations voltages in kilovolts with currents in picoamperes, capacitances in femtofarads, the Boltzmann constant, the elementary charge, and so on.
The intermediate quantities that appear in various computations may have an exponent range at least 2 or 3 times larger than the exponent range present in the input data or output data, so it is frequent to exceed the exponent range provided by single-precision floating-point numbers, i.e. 10^(+/-38).