[Libreoffice-bugs] [Bug 137744] New: CALC: SIN(PI()) and COS(PI()/2) results are different from zero

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sun Oct 25 18:22:35 UTC 2020


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

            Bug ID: 137744
           Summary: CALC: SIN(PI()) and COS(PI()/2) results are different
                    from zero
           Product: LibreOffice
           Version: 6.1.5.2 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: dbdecastro at gmail.com

Description:
CALC: =SIN(PI()) and =COS(PI()/2) results are different from exact zero.
Depending on the application and complexity, the fact that the cosine of pi/2
or sine of pi is different from zero (even though it is very small) can cause
problems and avoidable errors in the results.

Steps to Reproduce:
1. open Calc and select a cell;
2. type =SIN(PI()) or =COS(PI()/2) and press enter;
3. the results should be exact Zero

Actual Results:
=COS(PI()/2) is returning 6,12323399573677E-017 
and =SIN(PI()) is returning 1,22464679914735E-16 

Expected Results:
=COS(PI()/2) should return 0
=SIN(PI()) should return 0


Reproducible: Always


User Profile Reset: No



Additional Info:
all other sines and cosines >= pi/2 that should return exact Zero do not
return.
The problem related in this report do not happen on Excel or
GoogleSpreadsheets.

I think it would make it much easier for all users working with trigonometry in
Calc to have an exact answer for COS (PI / 2) and SEN (PI).

-- 
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/20201025/99879aff/attachment.htm>


More information about the Libreoffice-bugs mailing list