from
slatec
by Ben Barrowes The slatec library converted into matlab functions.
[cacosresult,z]=cacos(z);
function [cacosresult,z]=cacos(z);
cacosresult=[];
persistent firstCall pi2 ; if isempty(firstCall),firstCall=1;end;
;
if isempty(pi2), pi2=0; end;
%***BEGIN PROLOGUE CACOS
%***PURPOSE Compute the complex arc cosine.
%***LIBRARY SLATEC (FNLIB)
%***CATEGORY C4A
%***TYPE COMPLEX (CACOS-C)
%***KEYWORDS ARC COSINE, ELEMENTARY FUNCTIONS, FNLIB, TRIGONOMETRIC
%***AUTHOR Fullerton, W., (LANL)
%***DESCRIPTION
%
% CACOS(Z) calculates the complex trigonometric arc cosine of Z.
% The result is in units of radians, and the real part is in the
% first or second quadrant.
%
%***REFERENCES (NONE)
%***ROUTINES CALLED CASIN
%***REVISION HISTORY (YYMMDD)
% 770401 DATE WRITTEN
% 861211 REVISION DATE from Version 3.2
% 891214 Prologue converted to Version 4.0 format. (BAB)
%***end PROLOGUE CACOS
if firstCall, pi2=[1.57079632679489661923e0]; end;
firstCall=0;
%***FIRST EXECUTABLE STATEMENT CACOS
cacosresult = pi2 - casin(z);
%
csnil=dbstack(1); csnil=csnil(1).name(1)~='@';
if csnil&&~isempty(inputname(1)), assignin('caller','FUntemp',z); evalin('caller',[inputname(1),'=FUntemp;']); end
end
%DECK CACOSH