Invfunc := table([
arccos = cos,
sin = (proc(x)
global _Z1, _B1;
option `Copyright (c) 1993 Gaston Gonnet, Wissenschaftliches Rechnen, ETH Zurich. All rights reserved.`;
if x = 1 then assume(_Z1, integer); 1/2*Pi + 2*Pi*_Z1
elif x = -1 then assume(_Z1, integer); - 1/2*Pi + 2*Pi*_Z1
elif x = 0 then assume(_Z1, integer); Pi*_Z1
else
assume(_Z1, integer, _B1, OrProp(0, 1));
(1 - 2*_B1)*arcsin(x) + Pi*(2*_Z1 + _B1)
fi
end),
arccosh = cosh,
csc = (proc(x)
global _Z1, _B1;
option `Copyright (c) 1993 Gaston Gonnet, Wissenschaftliches Rechnen, ETH Zurich. All rights reserved.`;
if x = 1 then assume(_Z1, integer); 1/2*Pi + 2*Pi*_Z1
elif x = -1 then assume(_Z1, integer); - 1/2*Pi + 2*Pi*_Z1
elif x = infinity or x = -infinity then
assume(_Z1, integer); Pi*_Z1
else
assume(_Z1, integer, _B1, OrProp(0, 1));
(1 - 2*_B1)*arccsc(x) + Pi*(2*_Z1 + _B1)
fi
end),
arccot = cot,
tan = (proc(x)
global _Z;
option `Copyright (c) 1993 Gaston Gonnet, Wissenschaftliches Rechnen, ETH Zurich. All rights reserved.`;
assume(_Z1, integer);
if nargs = 2 then arctan(args) + 2*Pi*_Z1
else arctan(args) + Pi*_Z1
fi
end),
arccoth = coth,
cos = (proc(x)
global _Z1, _B1;
option `Copyright (c) 1993 Gaston Gonnet, Wissenschaftliches Rechnen, ETH Zurich. All rights reserved.`;
if x = 1 then assume(_Z1, integer); 2*Pi*_Z1
elif x = -1 then assume(_Z1, integer); Pi + 2*Pi*_Z1
elif x = 0 then assume(_Z1, integer); 1/2*Pi + Pi*_Z1
else
assume(_Z1, integer, _B1, OrProp(0, 1));
(1 - 2*_B1)*arccos(x) + 2*Pi*_Z1
fi
end),
exp = (proc(x)
global _Z;
option `Copyright (c) 1993 Gaston Gonnet, Wissenschaftliches Rechnen, ETH Zurich. All rights reserved.`;
assume(_Z1, integer); ln(x) + 2*I*Pi*_Z1
end),
arctanh = tanh,
arccsc = csc,
cot = (proc(x)
global _Z;
option `Copyright (c) 1993 Gaston Gonnet, Wissenschaftliches Rechnen, ETH Zurich. All rights reserved.`;
assume(_Z1, integer); arccot(x) + Pi*_Z1
end),
arccsch = csch,
conjugate = conjugate,
arcsec = sec,
arcsech = sech,
tanh = (proc(x)
global _Z;
option `Copyright (c) 1993 Gaston Gonnet, Wissenschaftliches Rechnen, ETH Zurich. All rights reserved.`;
assume(_Z1, integer); arctanh(x) + I*Pi*_Z1
end),
cosh = (proc(x)
global _Z;
option `Copyright (c) 1993 Gaston Gonnet, Wissenschaftliches Rechnen, ETH Zurich. All rights reserved.`;
assume(_Z1, integer);
arccosh(x) + 2*I*Pi*_Z1, -arccosh(x) + 2*I*Pi*_Z1
end),

arcsin = sin,
coth = (proc(x)
global _Z;
option `Copyright (c) 1993 Gaston Gonnet, Wissenschaftliches Rechnen, ETH Zurich. All rights reserved.`;
assume(_Z1, integer); arccoth(x) + I*Pi*_Z1
end),
arcsinh = sinh,
sech = (proc(x)
global _Z;
option `Copyright (c) 1993 Gaston Gonnet, Wissenschaftliches Rechnen, ETH Zurich. All rights reserved.`;
assume(_Z1, integer);
arcsech(x) + 2*I*Pi*_Z1, -arcsech(x) + 2*I*Pi*_Z1
end),
csch = (proc(x)
global _Z;
option `Copyright (c) 1993 Gaston Gonnet, Wissenschaftliches Rechnen, ETH Zurich. All rights reserved.`;
assume(_Z1, integer); arccsch(x) + 2*I*Pi*_Z1
end),
sec = (proc(x)
global _Z1, _B1;
option `Copyright (c) 1993 Gaston Gonnet, Wissenschaftliches Rechnen, ETH Zurich. All rights reserved.`;
if x = 1 then assume(_Z1, integer); 2*Pi*_Z1
elif x = -1 then assume(_Z1, integer); Pi + 2*Pi*_Z1
elif x = infinity or x = -infinity then
assume(_Z1, integer); 1/2*Pi + Pi*_Z1
else
assume(_Z1, integer, _B1, OrProp(0, 1));
(1 - 2*_B1)*arcsec(x) + 2*Pi*_Z1
fi
end),
arctan = (proc(x)
option `Copyright (c) 1995 by the University of Waterloo. All rights reserved.`;
if nargs <> 1 then ERROR(`invalid arguments`) fi; tan(x)
end),
LambertW = (proc(x)
option `Copyright (c) 1995 by the University of Waterloo. All rights reserved.`;
if nargs <> 1 then ERROR(`invalid arguments`) fi; x*exp(x)
end),
sinh = (proc(x)
global _Z;
option `Copyright (c) 1993 Gaston Gonnet, Wissenschaftliches Rechnen, ETH Zurich. All rights reserved.`;
assume(_Z1, integer); arcsinh(x) + 2*I*Pi*_Z1
end),
ln = exp
]):


back