<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Basic function CStr is failing to properly convert integers after 41 steps in a for loop"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=143974#c7">Comment # 7</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Basic function CStr is failing to properly convert integers after 41 steps in a for loop"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=143974">bug 143974</a>
from <span class="vcard"><a class="email" href="mailto:andreas.heinisch@yahoo.de" title="Andreas Heinisch <andreas.heinisch@yahoo.de>"> <span class="fn">Andreas Heinisch</span></a>
</span></b>
<pre>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 <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - Not enough precision when showing single-precision variable in BASIC debugger watch"
href="show_bug.cgi?id=107953">Bug 107953</a>.
Mike what is your opinion about a fix for this problem? Can this be addressed
using the rtl_math_doubleToString as in <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - ImpSvNumberInputScan::StringToDouble may produce inaccurate result"
href="show_bug.cgi?id=130725">Bug 130725</a>?
[1]
<a href="https://opengrok.libreoffice.org/xref/core/basic/source/sbx/sbxvalue.cxx?r=010e99c7#1084">https://opengrok.libreoffice.org/xref/core/basic/source/sbx/sbxvalue.cxx?r=010e99c7#1084</a>
[2]
<a href="https://opengrok.libreoffice.org/xref/core/basic/source/sbx/sbxscan.cxx?r=ef38b9af#320">https://opengrok.libreoffice.org/xref/core/basic/source/sbx/sbxscan.cxx?r=ef38b9af#320</a>
[3]
<a href="https://opengrok.libreoffice.org/xref/core/basic/source/sbx/sbxscan.cxx?r=ef38b9af#810">https://opengrok.libreoffice.org/xref/core/basic/source/sbx/sbxscan.cxx?r=ef38b9af#810</a></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>