[Libreoffice-bugs] [Bug 143575] New: Strings are not converted correctly to their nearest double representation
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Wed Jul 28 08:22:10 UTC 2021
https://bugs.documentfoundation.org/show_bug.cgi?id=143575
Bug ID: 143575
Summary: Strings are not converted correctly to their nearest
double representation
Product: LibreOffice
Version: 7.3.0.0 alpha0+ Master
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: BASIC
Assignee: libreoffice-bugs at lists.freedesktop.org
Reporter: andreas.heinisch at yahoo.de
Description:
Consider the following double in BASIC: 691.2
The nearest double representation is according to IEEE 754 is
691.200000000000045474735088646411895751953125
Currently, a double value will be converted in basic/source/sbx/sbxdbl.cxx
using 17 significant digits with ImpCvtNum( n, 17, *p->pOUString, bCoreString
);
Steps to Reproduce:
Insert the following macro:
Sub Test
MsgBox 691.2
End Sub
Actual Results:
691.2000000000001
Expected Results:
691.2
Reproducible: Always
User Profile Reset: No
Additional Info:
This bug is a follow up of 107953. Prior versions are not affected due to
reduced precision.
--
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/20210728/81d64222/attachment.htm>
More information about the Libreoffice-bugs
mailing list