# =COS(RADIANS(60)) returns error with German UI

Bug #983884 reported by petroo on 2012-04-17
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Undecided
Unassigned

### Bug Description

calculating trigonometric functions for *degrees* requires the addition of the operator RAD.

The libreoffice help system displays respective examples for SIN, COS etc. as

Examples
=COS(RADIANS(60)) returns 0.5, the cosine of 60 degrees.

which will result in an error. The correct version would be: =COS(RAD(60))

Since these kind of examples are given for several functions they are strongly misleading!
---
ApportVersion: 2.0.1-0ubuntu7
Architecture: i386
DistroRelease: Ubuntu 12.04
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Beta i386 (20120405)
Package: libreoffice 1:3.5.2-2ubuntu1
PackageArchitecture: i386
ProcEnviron:
TERM=xterm
PATH=(custom, user)
LANG=de_DE.UTF-8
SHELL=/bin/bash
ProcVersionSignature: Ubuntu 3.2.0-24.37-generic-pae 3.2.14
Tags: precise
Uname: Linux 3.2.0-24-generic-pae i686
UserGroups: adm audio cdrom dip fuse lpadmin netdev plugdev sambashare sudo video

Tags: Edit Tag help
 Changed in libreoffice (Ubuntu): importance: Undecided → Low
 Christopher M. Penalver (penalvch) wrote on 2012-05-01: #1

petroo, thank you for reporting this and helping make Ubuntu better. Regarding your comments:
>"Examples
=COS(RADIANS(60)) returns 0.5, the cosine of 60 degrees.

which will result in an error."

As per LO built-in help for the COS function:
"COS
Returns the cosine of the given angle (in radians).
Syntax
COS(Number)
Returns the (trigonometric) cosine of Number, the angle in radians.
To return the cosine of an angle in degrees, use the RADIANS function."

Syntax
Number is the angle in degrees to be converted to radians.
Example
=RADIANS(90) returns 1.5707963267949, which is PI/2 to Calc's accuracy."

=COS(RADIANS(60)) produces 0.5. This does not produce an error and nothing is misleading about the results. Feel free to report any future bugs you may find.

 Changed in libreoffice (Ubuntu): importance: Low → Undecided status: New → Invalid
 petroo (roosen) wrote on 2012-05-01: Re: [Bug 983884] Re: wrong help text #2

Hello Christopher,

> As per LO built-in help for the COS function:
> "COS
> Returns the cosine of the given angle (in radians).
> Syntax
> COS(Number)
> Returns the (trigonometric) cosine of Number, the angle in radians.
> To return the cosine of an angle in degrees, use the RADIANS function."
>
> Syntax
> Number is the angle in degrees to be converted to radians.
> Example
> =RADIANS(90) returns 1.5707963267949, which is PI/2 to Calc's accuracy."
>
> =COS(RADIANS(60)) produces 0.5. This does not produce an error and
> nothing is misleading about the results. Feel free to report any future
> bugs you may find.

Sorry, but for MY version of LibreOffice I cannot confirm your
statements. I checked them out just a moment ago, with the current
complete setup of LibreOffice in Ubuntu 12.04.

Always the error message (in German) is "Fehler: Ungültiger Name", which
would be translated into: "Error: Invalid (function) name"

The reported LibreOffice version number is:

LibreOffice 3.5.2.2
Build-ID: 350m1(Build:202)

Anyhow: Thanks for looking into this thing!

Kind regards,

Peter
--
Dr. Peter Roosen U. Vollmer & Dr. P. Roosen GbR
http://www.peter-roosen.com
Tel. ++49 241 7091525 Tel. ++49 241 7091520

Vergleichen Sie Ihre Firma: http://www.filius-online.eu
E-xx Kraftstoffe in Flugzeugen: http://vorodyn.de/ExxReport.html

 Christopher M. Penalver (penalvch) wrote on 2012-05-01: Re: wrong help text #3

petroo, I was using the English UI in LO in my test. So, we may have a German function mis-translation issue here.

 Changed in libreoffice (Ubuntu): status: Invalid → New
 Christopher M. Penalver (penalvch) wrote on 2012-05-01: #4

petroo, please execute the following command, as it will automatically gather debugging information, in a terminal:
apport-collect 983884

 Changed in libreoffice (Ubuntu): status: New → Incomplete
 petroo (roosen) wrote on 2012-05-02: Dependencies.txt #5

apport information

 tags: added: apport-collected precise description: updated
 petroo (roosen) wrote on 2012-05-02: Re: wrong help text #6

Just an addition to my reports so far:

Christopher indicated a potential error with respect to the German translation. I assume he pointed to the help text translations, which would not be the crucial point though: From his comment I would expect the "RADIANS" to be a correct invocation of an existing function, which at least in the German version of LO it is not. Instead the "RAD" is, which I found out only by experimental computer science. :-)

So, for my part, I doubt, whether:

# The correct function should indeed be RAD, and the help documentation adapted accordingly, or
# the correct function should be RADIANS. in that case the LO code would have to be adapted in the German version.

Not being a M\$ Office Suite literate I would prefer, in any case, the best possible functional compatibility with Excel - whatever direction of change that means.

 Changed in libreoffice (Ubuntu): status: Incomplete → New
 summary: - wrong help text+ =COS(RADIANS(60)) returns error with German UI