The shift-S (
sin] command computes the sine
of an angle or complex number. If the input is an HMS form, it is interpreted
as degrees-minutes-seconds; otherwise, the input is interpreted according
to the current angular mode. It is best to use Radians mode when operating
on complex numbers.
Calc’s “units” mechanism includes angular units like
grad. While ‘sin(45 deg)’ is not evaluated
all the time, the u s (
calc-simplify-units) command will
simplify ‘sin(45 deg)’ by taking the sine of 45 degrees, regardless
of the current angular mode. See Basic Operations on Units.
Also, the symbolic variable
pi is not ordinarily recognized in
arguments to trigonometric functions, as in ‘sin(3 pi / 4)’, but
the default algebraic simplifications recognize many such
formulas when the current angular mode is Radians and Symbolic
mode is enabled; this example would be replaced by ‘sqrt(2) / 2’.
See Symbolic Mode. Beware, this simplification occurs even if you
have stored a different value in the variable ‘pi’; this is one
reason why changing built-in variables is a bad idea. Arguments of
the form ‘x’ plus a multiple of ‘pi/2’ are also simplified.
Calc includes similar formulas for
Calc’s algebraic simplifications know all angles which are integer multiples of ‘pi/12’, ‘pi/10’, or ‘pi/8’ radians. In Degrees mode, analogous simplifications occur for integer multiples of 15 or 18 degrees, and for arguments plus multiples of 90 degrees.
With the Inverse flag,
calc-sin computes an arcsine. This is also
available as the
calc-arcsin command or
function. The returned argument is converted to degrees, radians, or HMS
notation depending on the current angular mode.
With the Hyperbolic flag,
calc-sin computes the hyperbolic
sine, also available as
sinh]. With the
Hyperbolic and Inverse flags, it computes the hyperbolic arcsine
The shift-C (
cos] command computes the cosine
of an angle or complex number, and shift-T (
computes the tangent, along with all the various inverse and hyperbolic
variants of these functions.
The f T (
arctan2] command takes two
numbers from the stack and computes the arc tangent of their ratio. The
result is in the full range from -180 (exclusive) to +180
(inclusive) degrees, or the analogous range in radians. A similar
result would be obtained with / followed by I T, but the
value would only be in the range from -90 to +90 degrees
since the division loses information about the signs of the two
components, and an error might result from an explicit division by zero
arctan2 would avoid. By (arbitrary) definition,
sincos] command computes the sine and
cosine of a number, returning them as a vector of the form
With the Inverse flag [
arcsincos], this command takes a two-element
vector as an argument and computes
arctan2 of the elements.
(This command does not accept the Hyperbolic flag.)
The remaining trigonometric functions,
cot], are also
available. With the Hyperbolic flag, these compute their hyperbolic
counterparts, which are also available separately as
coth]. (These commands do not accept the Inverse flag.)