ApasScript.

Trigonometry

cot

cot x = cos x / sin x (radians); an error at its poles.

sec

sec x = 1 / cos x (radians).

csc

csc x = 1 / sin x (radians).

cosec

cosec x = 1 / sin x (radians): the name textbooks use for csc.

sinc

The normalized sinc function sin(pi x)/(pi x), with sinc(0) = 1.

sinpi

sin(pi x), exact at whole and half-whole x.

cospi

cos(pi x), exact at whole and half-whole x.

tanpi

tan(pi x).

wrapRadians

An angle reduced into [-pi, pi).

wrapDegrees

An angle reduced into [0, 360).

atan2Degrees

The angle of the point (x, y) in degrees, in (-180, 180].

harmonic

A sum of sinusoids: offset + A1 sin(w1 x + p1) + ..., each term written [A, w, p] (p optional).

harmonicAt

The value of a harmonic sum at x.

harmonicSlope

The derivative of a harmonic sum at x.

harmonicIntegral

The integral of a harmonic sum from a to b.

meanSquare

The mean of h^2 over [a, b].

rms

The root-mean-square value over [a, b] (A/sqrt(2) for one sine over whole periods).

sinCosForm

The terms regrouped by exact frequency as a sin(wx) + b cos(wx).

harmonicRoots

Roots of a harmonic sum in [a, b], found by scanning n subintervals (a root that only touches zero can be missed).

solveSine

Every solution of A sin(w x + p) + c = 0 in [a, b], exactly from the formula (no numerical search).