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
For representation with posit in the command line, the decimal output does not have enough bits, which will confuse rounding results with accurate results.
However, no posit can exactly represent 0.1. For instance, posit<32,2> (0.1) = 0.10000000009313226... not 0.1. The command line output seems to not have enough bits to cover the dynamic range of inaccurate representation.
The text was updated successfully, but these errors were encountered:
@Yunfei-Ma-McMaster thanks for pointing this out. As you can see from the command line options, the command posit is meant to give you a quick insight into the posit encoding, with the decimal values being there as guidance to scale.
As you can see in the output, the posit<64,#> values have 0's in their LSBs, which your decimal value of 0.1 should fill. What you observe there is that the command line interprets the value as a native double and that gets converted to a posit. As a double has fewer precision bits as the posit<64,#>, there is no information to fill the more precise posit bits.
On the roadmap are native decimal string converters for all number systems.
You will have full control over decimal output in the C++ classes, if you are studying the LSBs. There are also ULP methods to lift the ulp values.
Would you be interested to implement the decimal string converter for posits?
For representation with posit in the command line, the decimal output does not have enough bits, which will confuse rounding results with accurate results.
For example:
The output:
However, no posit can exactly represent 0.1. For instance, posit<32,2> (0.1) = 0.10000000009313226... not 0.1. The command line output seems to not have enough bits to cover the dynamic range of inaccurate representation.
The text was updated successfully, but these errors were encountered: