Bug 46705 - CDBL truncates the mantissa
Summary: CDBL truncates the mantissa
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
3.4.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-27 16:46 UTC by Christopher Yeleighton
Modified: 2013-11-26 21:09 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Yeleighton 2012-02-27 16:46:58 UTC
DIM F$
  F$ = CSTR (123.5)
  MSGBOX F$ ' 123,5
  MSGBOX CDBL (F$) ' 123
Comment 1 Christopher Yeleighton 2012-02-28 08:47:07 UTC
LANG=pl_PL.UTF-8
LC_CTYPE="pl_PL.UTF-8"
LC_NUMERIC="pl_PL.UTF-8"
LC_TIME="pl_PL.UTF-8"
LC_COLLATE="pl_PL.UTF-8"
LC_MONETARY="pl_PL.UTF-8"
LC_MESSAGES="pl_PL.UTF-8"
LC_PAPER="pl_PL.UTF-8"
LC_NAME="pl_PL.UTF-8"
LC_ADDRESS="pl_PL.UTF-8"
LC_TELEPHONE="pl_PL.UTF-8"
LC_MEASUREMENT="pl_PL.UTF-8"
LC_IDENTIFICATION="pl_PL.UTF-8"
LC_ALL=

Local Settings = default
Decimal separator key = default
Comment 2 Noel Power 2012-02-29 02:50:56 UTC
while I can confirm the behaviour you describe I don't believe this blocks bug #46704 It's not even clear even if it is related. Possibly some shared code might be involved but that's only speculation unless you debugged the code and confirmed that, have you? If you have then please note that fact here in the description ( that could give someone a pointer then when investigating further )
Comment 3 Christopher Yeleighton 2012-03-05 04:58:51 UTC
Workaround: replace "," with "." and use VAL# instead.
Of course, you can get predictable behavior from STR$, so that workaround is only needed when data have already been written (CSTR$ is locale-dependent, which is undocumented).
Comment 4 Christopher Yeleighton 2012-03-05 05:12:44 UTC
(In reply to comment #3)
\> only needed when data have already been written (CSTR$ is locale-dependent,
> which is undocumented).

It is documented in the Programming Guide, but not in the on-line help.
Comment 5 Joel Madero 2012-10-23 17:43:53 UTC
@Noel, are we calling this one a bug or can we close it? 

Regards,
Joel
Comment 6 sasha.libreoffice 2012-12-20 05:22:58 UTC
@ Christopher Yeleighton
Please, verify if in 3.6 version problem still exist
Comment 7 Joel Madero 2013-11-23 17:13:14 UTC
Version is oldest version that we've seen the problem not latest that it has been tested on.


Thanks!
Comment 8 tommy27 2013-11-24 08:34:09 UTC
I move this to NEEDINFO

@Noel
please reply Joel's answer in Comment 5

@Christopher Yeleighton
is the issue you described still present in recent LibO 4.1.3.2 release?
Comment 9 Joel Madero 2013-11-26 21:09:29 UTC
Since we don't know what patch fixed it correct status is WFM. Updating