I'm trying to find a good "normalize"d form for acos, that respects branchcut
conventions. The current form differs from the one in Float and DoubleFloat by
%pi in the left half plane:
(1) -> normalize acos x
+--------+
| 2
\|- x + 1
(1) atan(-----------)
x
Type: Expression(Integer)
and has a single singularity at 0. One manifestation of inconsistency is:
(7) -> acos(-1)
(7) %pi
Type: Expression(Integer)
(8) -> eval(normalize acos z, z=-1)
(8) 0
Type: Expression(Integer)
On Wikipedia, I found
acos x = 2*atan(sqrt(1-x^2)/(1+x)) for -1 < x <= 1
but that doesn't seem much better.
How about %pi/2 - asin x which gives
(24) -> normalize(%pi/2 - asin x)
x
- 2atan(-----------) + %pi
+--------+
| 2
\|- x + 1
(24) --------------------------
2
? This seems to be badly behaved only at x=1 and x=-1, no?
I wonder whether it wouldn't be better to normalize to log and exp...
Suggestions are much appreciated.
Martin
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/fricas-devel?hl=en
-~----------~----~----~----~------~----~------~--~---