https://bugs.documentfoundation.org/show_bug.cgi?id=139306

--- Comment #9 from Vladislav Tarakanov <[email protected]> ---
Looked at the code again. As a result, the question arose, is it necessary to
do this rounding at all (std::clamp<sal_Int32>(nDecPlaces, -20, 20))? We looked
at the values that nDecPlaces can get before this rounding:

1. (fValue >= fB4) && eFormat != rtl_math_StringFormat_F : [0; 16]

2. (eFormat == rtl_math_StringFormat_Automatic || eFormat ==
rtl_math_StringFormat_F) && aParts.exponent >= 0 && fValue < 0x1p53 : [-15; 15]

3. eFormat = rtl_math_StringFormat_Automatic: [1; 14+|nExp|]

4. eFormat = rtl_math_StringFormat_G: [0; 14+|nExp|]

That is, the largest value of nDecPlaces depends only on the number of zeros
after the separator

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to