To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=69749


User er changed the following:

                What    |Old value                 |New value
================================================================================
                      CC|''                        |'fst'
--------------------------------------------------------------------------------
                  Status|NEW                       |STARTED
--------------------------------------------------------------------------------
              Issue type|DEFECT                    |ENHANCEMENT
--------------------------------------------------------------------------------
              OS/Version|Linux                     |All
--------------------------------------------------------------------------------
                Platform|PC                        |All
--------------------------------------------------------------------------------
                 Summary|trunc() function returns i|Consolidate precision of b
                        |ncorrect answer           |inary representation and d
                        |                          |ecimal rounding
--------------------------------------------------------------------------------
        Target milestone|OOo 2.x                   |OOo Later
--------------------------------------------------------------------------------




------- Additional comments from [EMAIL PROTECTED] Mon Sep 25 08:21:22 -0700 
2006 -------
This is nothing specific to the TRUNC function, but is initially caused by the
substraction operation, where an exact binary represention of the decimal values
is not possible, for example the result of 22.2 - 22 is _not_ 0.2 but
1.999999999999999 instead, so any further calculation with that value propagates
a rounding error. Note also that the results in column D most times are not
exactly 0 or 60, but for example 0.000000000002557 instead; when loading the
document into Excel they do not equal 0 for similar reasons, just that Excel
seems to apply a slightly different magic to the simple multiplication by 60
operation so the TRUNC results look like they're correct.

For correct calculation a user provided rounding of the interim values to the
desired precision is needed, e.g. in cell C1 the formula
=TRUNC(ROUND(A1-B1;2)*60) produces the expected result.

Taking this issue as a placeholder for "rethink and consolidate rounding 
issues".

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to