[Libreoffice-bugs] [Bug 138220] calc: calculation: roundup: rounddown: fail in 7.1 alpha

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sat May 22 10:32:10 UTC 2021


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

--- Comment #7 from b. <newbie-02 at gmx.de> ---
it sounds like magic, but with that little change: 

                // tdf124286 : round to 12 significant digits before rounding
                //             down or up to avoid unexpected rounding errors
                //             caused by decimal -> binary -> decimal
conversion
                // [edit b. 2021-05-22: try with roundsig 15 instead of
roundsig 12 to keep precision]
                double fRes;
                //ori was: RoundSignificant( fX, 12, fRes );
                RoundSignificant( fX, 15, fRes );
                fVal = ::rtl::math::round( fRes, nDec, eMode );

instead of: 

                // tdf124286 : round to 12 significant digits before rounding
                //             down or up to avoid unexpected rounding errors
                //             caused by decimal -> binary -> decimal
conversion
                double fRes;
                RoundSignificant( fX, 12, fRes );
                fVal = ::rtl::math::round( fRes, nDec, eMode );

in sc/source/core/tool/interpr2.cxx 

the above issues seem gone, while the 'healing' against the cancellation issue
from tdf#124286 (8,94-8) still holds ... 

would one of the more experienced users or devs like to: 
- recheck, 
- if good lead me through the process of implementing it as a patch?  

(tried with Kali (Debian) Linux and master source from 2021-05-20)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210522/251c8c29/attachment.htm>


More information about the Libreoffice-bugs mailing list