[Libreoffice-bugs] [Bug 100254] Incorrect import of BIG INTEGER as Decimal(18) from CSV

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sun Nov 10 16:04:36 UTC 2019


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

Julien Nabet <serval2412 at yahoo.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |erack at redhat.com

--- Comment #30 from Julien Nabet <serval2412 at yahoo.fr> ---
(In reply to kartis56 from comment #28)
> \core\svl\source\numbers\zformat.cxx(57,40)
> 
> const double EXP_ABS_UPPER_BOUND = 1.0E15;  // use exponential notation
> above that absolute value.
>                                             // Back in time was E16 that lead
>                                             // to display rounding errors,
> see
>                                             // also sal/rtl/math.cxx
>                                             // doubleToString()
> 
> line 1750
> 
> void SvNumberformat::ImpGetOutputStandard(double& fNumber, OUString&
> rOutString)
> {
>     sal_uInt16 nStandardPrec = rScan.GetStandardPrec();
> 
>     if ( fabs(fNumber) > EXP_ABS_UPPER_BOUND )
>     {
>         nStandardPrec = ::std::min(nStandardPrec,
> static_cast<sal_uInt16>(14)); // limits to 14 decimals
> 
> but why use this ?

Taking a look at sal/rtl/math.cxx, we got:
    381     switch (eFormat)
    382     {
    383         case rtl_math_StringFormat_Automatic:
    384         {   // E or F depending on exponent magnitude
    385             int nPrec;
    386             if (nExp <= -15 || nExp >= 15)  // was <-16, >16 in ancient
versions, which leads to inaccuracies
    387             {
    388                 nPrec = 14;
    389                 eFormat = rtl_math_StringFormat_E;
    390             }
(see
https://opengrok.libreoffice.org/xref/core/sal/rtl/math.cxx?r=be8da979#380)

Eike: it seems it might be a WONTFIX, any thoughts?

-- 
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/20191110/a19bedea/attachment.html>


More information about the Libreoffice-bugs mailing list