[Libreoffice-bugs] [Bug 143974] Basic function CStr is failing to properly convert integers after 41 steps in a for loop

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Tue Sep 28 20:10:42 UTC 2021


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

--- Comment #7 from Andreas Heinisch <andreas.heinisch at yahoo.de> ---
Consider this small snippet:


Sub Main

  i = 44
  MsgBox TypeName(i) ' prints integer
  i = i + 1
  MsgBox TypeName(i) ' prints double

End Sub

Because of [1], but the calculations are correct (the variable contains
47.000000000000000). However, the homebrew myftoa in [2] imho does not
correctly calculate the desired precision. I even missed some precision scaling
in [3] for Bug 107953.

Mike what is your opinion about a fix for this problem? Can this be addressed
using the rtl_math_doubleToString as in Bug 130725?

[1]
https://opengrok.libreoffice.org/xref/core/basic/source/sbx/sbxvalue.cxx?r=010e99c7#1084
[2]
https://opengrok.libreoffice.org/xref/core/basic/source/sbx/sbxscan.cxx?r=ef38b9af#320
[3]
https://opengrok.libreoffice.org/xref/core/basic/source/sbx/sbxscan.cxx?r=ef38b9af#810

-- 
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/20210928/63eea908/attachment.htm>


More information about the Libreoffice-bugs mailing list