HP Forums

Full Version: Trig Error in CAS
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Can anyone explain to me (or recreate the bug) why acos(cos(2)) = 2pi - 2, and not 2, which you get when evaluating acos(cos(2.)). Works fine on the home side.

It seems 1 is the only (integer) value that is correct: acos(cos(1))=1.

Worse is acos(cos(4)) = -2 pi + 4 = -2.2831 (Should be positive, or 2 pi - 4).

These are all in radian mode. Degree mode seems to work fine. A little troubling, or I'm missing something.

C
Wolfram says: http://www.wolframalpha.com/input/?i=aco...%284%29%29

Here is my screenshot (Exact mode toggled):
Interesting. Here's my screenshot.[attachment=3125]
HOME MODE (CNES ): Computer Numeric Expert System

ACOS(COS(4)) [ENTER] 2.28318530718 ok
acos(cos(4)) [ENTER] 2.28318530718 ok

CAES MODE: Computer Algebra Expert System

flag on: Simplify Maximum
ACOS(COS(4)) [ENTER] -2*π+4 approx(Ans) −2.28318530718 ?
acos(cos(4)) [ENTER] -2*π+4 approx(Ans) −2.28318530718

SUGGESTION FOR THE FOLLOWING FIRMWARE

for CAS mode, show history with 2 outputs (Exact result & Decimal Approximation) , as does wolfram CAS

ACOS(COS(4)) [ENTER]
____________________ 2*π-4
____________________ 2.28318530718

Is a good idea?
Reference URL's