NAME
    cos - cosine

SYNOPSIS
    cos(x [,acc])

TYPES
    x		real, complex
    acc		real

    return	real, complex

DESCRIPTION
    Calculate the cosine of x with an accuracy within acc.
    By default, acc is epsilon().

    The complex cos is calculated by the formula:

	cos(a + bi) = cos(a) * cosh(b) - sin(a) * sinh(b) * i

EXAMPLE
    > print cos(-1), cos(0), cos(2^-23)
    ~.54030230586813971740 1 ~.99999999999999289457

    > print cos(0.4), cos(0.4, 0.01), cos(acos(1), 0.001)
    ~.92106099400288508279 .921875 1

    > print cos(2i), cos(1+1i)
    ~3.76219569108363145956 ~.83373002513114904888-~.98889770576286509638i

LIMITS
    acc > 0

LIBRARY
    NUMBER *qcos(NUMBER *x, *acc)
    COMPLEX *ccos(COMPLEX *x, NUMBER *acc)

SEE ALSO
    acos, asin, atan, atan2, epsilon, sin, tan
