Bug 153701 - LibreOffice Calc function TAN() results are wrong
Summary: LibreOffice Calc function TAN() results are wrong
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.2 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-17 19:14 UTC by simpleaz
Modified: 2023-02-17 19:59 UTC (History)
0 users

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 simpleaz 2023-02-17 19:14:10 UTC
Description:
=TAN(180) result should be 0

The result for =TAN(180) that I get is: 1.33869021035115


Steps to Reproduce:
1.enter =tan(180) into a cell and hit enter.
2.
3.

Actual Results:
the cell displayed:
1.33869021035115

Expected Results:
the cell should display:
0


Reproducible: Always


User Profile Reset: No

Additional Info:
I get the same result on multiple computers running Linux Mint 19.0 and 20.0
Comment 1 Mike Kaganski 2023-02-17 19:59:02 UTC
As explained in the help [1], TAN argument is not in degrees, but in radians.
So:

=TAN(PI()) is nearly 0 (note that value of PI() is approximate, hence a tiny deviation of ~1e-16)
=TAN(RADIANS(180)) gives the same neatrly-0 value.

[1] https://help.libreoffice.org/latest/en-US/text/scalc/01/04060106.html?DbPAR=CALC#bm_id3152195