Bug 83288 - : sin and cos not calculated correctly
Summary: : sin and cos not calculated correctly
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.4.2 release
Hardware: x86-64 (AMD64) Linux (All)
: highest major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-31 00:47 UTC by Graig Pearen
Modified: 2014-08-31 01:20 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 Graig Pearen 2014-08-31 00:47:05 UTC
math functions are inaccurate as shown below.

sin 68 is 0.927183855. Calc returns a value of -0.897927681
cos 68 is 0.374606593. Calc returns a value of 0.440143022
tan 68 is 2.475086853. Calc returns a value of -2.040081598

The sin and cos errors have a serious affect on a business application that I use so I have marked them "major".

I have not checked any other functions. The calculator in Ubuntu agrees with my scientific calculator but Libre Office does not.
Comment 1 Luke 2014-08-31 01:20:20 UTC
From 
https://help.libreoffice.org/Calc/Mathematical_Functions#SIN

SIN
Returns the sine of the given angle (in radians).
Syntax:
SIN(number)
Returns the (trigonometric) sine of number, the angle in radians.
To return the sine of an angle in degrees, use the RADIANS function.
Example:
SIN(PI()/2) returns 1, the sine of PI/2 radians.
SIN(RADIANS(30)) returns 0.5, the sine of 30 degrees.


You can convert between the two with the following formula:
1 pi radian = 180 deg.

This is the same in all office suites.
http://office.microsoft.com/en-us/excel-help/sin-HP005209257.aspx