Bug 142504 - error in functions cos
Summary: error in functions cos
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.0.7.3 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-26 16:04 UTC by Huysmans
Modified: 2021-05-26 16:33 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
calc file (30.42 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-05-26 16:05 UTC, Huysmans
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Huysmans 2021-05-26 16:04:46 UTC
Description:
for an angel of 90° Calc gives  cos=6,12323399573677E-17     cos must be 0
for an angel of 270° Calc gives  cos=-1,83697019872103E-16   cos must be 0


Steps to Reproduce:
Formula used cos(radialen(angel))
3.

Actual Results:
for an angel of 90° Calc gives  cos=6,12323399573677E-17    
for an angel of 270° Calc gives  cos=-1,83697019872103E-16

Expected Results:
in both cases the anser is 0


Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
Versie: 6.0.7.3
Build ID: 1:6.0.7-0ubuntu0.18.04.10
CPU-threads: 12; Besturingssysteem: Linux 5.4; UI-render: standaard; VCL: gtk3; 
Locale: nl-BE (nl_BE.UTF-8); Calc: group
Comment 1 Huysmans 2021-05-26 16:05:25 UTC
Created attachment 172369 [details]
calc file
Comment 2 Mike Kaganski 2021-05-26 16:33:48 UTC
This is not a bug. Multiples of pi are not representable in IEEE 754 numbers used in Calc. See FAQ at [1].

[1] https://wiki.documentfoundation.org/Faq/Calc/Accuracy