search for: formatprecision

Displaying 1 result from an estimated 1 matches for "formatprecision".

2015 Aug 10
2
Bug or expected behavior of APFloat class?
...s lately and I came across behavior I was not expecting based on reading the implementation comments and I'm wondering if it's a bug or intentional. The behavior concerns converting an APFloat to a string and back again. In the implementation of ``APFloat::toString(...)`` you can specify ``FormatPrecision`` as 0. The method comments state that this will use the "natural precision" of the number. In the actual implementation the comments say that when FormatPrecision is 0 that ``` // We use enough digits so the number can be round-tripped back to an // APFloat. The formula comes from &quot...