Trigonometric functions

Trigonometric functions are supported for arbitrary uncertain values of different types. Like for elementary operations, a resampling approach is used for the computations.

Syntax

Because elementary operations should work on arbitrary uncertain values, a resampling approach is used to perform the mathematical operations. All mathematical operations thus return a vector containing the results of repeated element-wise operations (where each element is a resampled draw from the furnishing distribution(s) of the uncertain value(s)).

Each trigonometric function comes in two versions.

  • The first syntax allows skipping providing the number of draws, which is set to 10000 by default (e.g. cos(x::AbstractUncertainValue; n::Int = 10000).
  • Using the second syntax, you have to explicitly provide the number of draws (e.g. cos(x::AbstractUncertainValue, n::Int)).

Possible errors

Beware: if the support of the funishing distribution for an uncertain value lies partly outside the domain of the function, you risk encountering errors.

Supported trigonometric functions

Sine

Base.sinMethod
Base.sin(x::AbstractUncertainValue; n::Int = 10000) -> Vector{Float64}

Compute the sine of the uncertain value x, where x is in radians. Computes the element-wise sine for n realizations.

source
Base.sinMethod
Base.sin(x::AbstractUncertainValue, n::Int = 10000) -> Vector{Float64}

Compute the sine of the uncertain value x, where x is in radians. Computes the element-wise sine for n realizations.

source
Base.Math.sindMethod
Base.sind(x::AbstractUncertainValue; n::Int = 10000) -> Vector{Float64}

Compute the sine of the uncertain value x, where x is in degrees. Computes the element-wise sine for n realizations.

source
Base.Math.sindMethod
Base.sind(x::AbstractUncertainValue, n::Int = 10000) -> Vector{Float64}

Compute the sine of the uncertain value x, where x is in degrees. Computes the element-wise sine for n realizations.

source
Base.sinhMethod
Base.sinh(x::AbstractUncertainValue; n::Int = 10000) -> Vector{Float64}

Compute the hyperbolic sine of the uncertain value x. Computes the element-wise hyperbolic sine for n realizations.

source
Base.sinhMethod
Base.sinh(x::AbstractUncertainValue, n::Int = 10000) -> Vector{Float64}

Compute the hyperbolic sine of the uncertain value x. Computes the element-wise hyperbolic sine for n realizations.

source

Cosine

Base.cosMethod
Base.cos(x::AbstractUncertainValue; n::Int = 10000) -> Vector{Float64}

Compute the cosine of the uncertain value x, where x is in radians. Computes the element-wise cosine for n realizations.

source
Base.cosMethod
Base.cos(x::AbstractUncertainValue, n::Int = 10000) -> Vector{Float64}

Compute the cosine of the uncertain value x, where x is in radians. Computes the element-wise cosine for n realizations.

source
Base.Math.cosdMethod
Base.cos(x::AbstractUncertainValue; n::Int = 10000) -> Vector{Float64}

Compute the cosine of the uncertain value x, where x is in degrees. Computes the element-wise cosine for n realizations.

source
Base.Math.cosdMethod
Base.cos(x::AbstractUncertainValue, n::Int = 10000) -> Vector{Float64}

Compute the cosine of the uncertain value x, where x is in degrees. Computes the element-wise cosine for n realizations.

source
Base.coshMethod
Base.cos(x::AbstractUncertainValue; n::Int = 10000) -> Vector{Float64}

Compute the hyperbolic cosine of the uncertain value x. Computes the element-wise hyperbolic cosine for n realizations.

source
Base.coshMethod
Base.cos(x::AbstractUncertainValue, n::Int = 10000) -> Vector{Float64}

Compute the hyperbolic cosine of the uncertain value x. Computes the element-wise hyperbolic cosine for n realizations.

source

Tangent

Base.atanMethod
Base.atan(x::AbstractUncertainValue; n::Int = 10000) -> Vector{Float64}

Compute the inverse tangent of the uncertain value x, where x is in radians. Computes the element-wise inverse tangent for n realizations.

source
Base.atanMethod
Base.atan(x::AbstractUncertainValue, n::Int = 10000) -> Vector{Float64}

Compute the inverse tangent of the uncertain value x, where x is in radians. Computes the element-wise inverse tangent for n realizations.

source
Base.Math.atandMethod
Base.atand(x::AbstractUncertainValue; n::Int = 10000) -> Vector{Float64}

Compute the inverse tangent of the uncertain value x, where x is in degrees. Computes the element-wise inverse tangent for n realizations.

source
Base.Math.atandMethod
Base.atand(x::AbstractUncertainValue, n::Int = 10000) -> Vector{Float64}

Compute the inverse tangent of the uncertain value x, where x is in degrees. Computes the element-wise inverse tangent for n realizations.

source
Base.atanhMethod
Base.atanh(x::AbstractUncertainValue; n::Int = 10000) -> Vector{Float64}

Compute the inverse hypoerbolic tangent of the uncertain value x. Computes the element-wise inverse hypoerbolic tangent for n realizations.

source
Base.atanhMethod
Base.atanh(x::AbstractUncertainValue, n::Int = 10000) -> Vector{Float64}

Compute the inverse hypoerbolic tangent of the uncertain value x. Computes the element-wise inverse hypoerbolic tangent for n realizations.

source

Reciprocal trig functions

Cosecant

Base.Math.cscMethod
Base.csc(x::AbstractUncertainValue; n::Int = 10000) -> Vector{Float64}

Compute the cosecant of the uncertain value x, where x is in radians. Computes the element-wise cosecant for n realizations.

source
Base.Math.cscMethod
Base.csc(x::AbstractUncertainValue, n::Int = 10000) -> Vector{Float64}

Compute the cosecant of the uncertain value x, where x is in radians. Computes the element-wise cosecant for n realizations.

source
Base.Math.cscdMethod
Base.cscd(x::AbstractUncertainValue; n::Int = 10000) -> Vector{Float64}

Compute the cosecant of the uncertain value x, where x is in degrees. Computes the element-wise cosecant for n realizations.

source
Base.Math.cscdMethod
Base.cscd(x::AbstractUncertainValue, n::Int = 10000) -> Vector{Float64}

Compute the cosecant of the uncertain value x, where x is in degrees. Computes the element-wise cosecant for n realizations.

source
Base.Math.cschMethod
Base.cscd(x::AbstractUncertainValue; n::Int = 10000) -> Vector{Float64}

Compute the hyperbolic cosecant of the uncertain value x, where x is in degrees. Computes the element-wise hyperbolic cosecant for n realizations.

source
Base.Math.cschMethod
Base.cscd(x::AbstractUncertainValue, n::Int = 10000) -> Vector{Float64}

Compute the hyperbolic cosecant of the uncertain value x, where x is in degrees. Computes the element-wise hyperbolic cosecant for n realizations.

source

Secant

Base.Math.secMethod
Base.sec(x::AbstractUncertainValue; n::Int = 10000) -> Vector{Float64}

Compute the secant of the uncertain value x, where x is in radians. Computes the element-wise secant for n realizations.

source
Base.Math.secMethod
Base.sec(x::AbstractUncertainValue, n::Int = 10000) -> Vector{Float64}

Compute the secant of the uncertain value x, where x is in radians. Computes the element-wise secant for n realizations.

source
Base.Math.secdMethod
Base.secd(x::AbstractUncertainValue; n::Int = 10000) -> Vector{Float64}

Compute the secant of the uncertain value x, where x is in degrees. Computes the element-wise cosecant for n realizations.

source
Base.Math.secdMethod
Base.secd(x::AbstractUncertainValue, n::Int = 10000) -> Vector{Float64}

Compute the secant of the uncertain value x, where x is in degrees. Computes the element-wise cosecant for n realizations.

source
Base.Math.sechMethod
Base.sech(x::AbstractUncertainValue; n::Int = 10000) -> Vector{Float64}

Compute the hyperbolic secant of the uncertain value x, where x is in degrees. Computes the element-wise hyperbolic secant for n realizations.

source
Base.Math.sechMethod
Base.sech(x::AbstractUncertainValue, n::Int = 10000) -> Vector{Float64}

Compute the hyperbolic secant of the uncertain value x, where x is in degrees. Computes the element-wise hyperbolic secant for n realizations.

source

Cotangent

Base.Math.cotMethod
Base.cot(x::AbstractUncertainValue; n::Int = 10000) -> Vector{Float64}

Compute the cotangent of the uncertain value x, where x is in radians. Computes the element-wise cotangent for n realizations.

source
Base.Math.cotMethod
Base.cot(x::AbstractUncertainValue, n::Int = 10000) -> Vector{Float64}

Compute the cotangent of the uncertain value x, where x is in radians. Computes the element-wise cotangent for n realizations.

source
Base.Math.cotdMethod
Base.cotd(x::AbstractUncertainValue; n::Int = 10000) -> Vector{Float64}

Compute the cotangent of the uncertain value x, where x is in degrees. Computes the element-wise cotangent for n realizations.

source
Base.Math.cotdMethod
Base.cotd(x::AbstractUncertainValue, n::Int = 10000) -> Vector{Float64}

Compute the cotangent of the uncertain value x, where x is in degrees. Computes the element-wise cotangent for n realizations.

source
Base.Math.cothMethod
Base.coth(x::AbstractUncertainValue; n::Int = 10000) -> Vector{Float64}

Compute the hyperbolic cotangent of the uncertain value x, where x is in radians. Computes the element-wise hyperbolic cotangent for n realizations.

source
Base.Math.cothMethod
Base.coth(x::AbstractUncertainValue, n::Int = 10000) -> Vector{Float64}

Compute the hyperbolic cotangent of the uncertain value x, where x is in radians. Computes the element-wise hyperbolic cotangent for n realizations.

source

Inverse trig functions

Sine

Base.asinMethod
Base.asin(x::AbstractUncertainValue; n::Int = 10000) -> Vector{Float64}

Compute the inverse sine of the uncertain value x, where x is in radians. Computes the element-wise inverse sine for n realizations.

source
Base.asinMethod
Base.asin(x::AbstractUncertainValue, n::Int = 10000) -> Vector{Float64}

Compute the inverse sine of the uncertain value x, where x is in radians. Computes the element-wise inverse sine for n realizations.

source
Base.Math.asindMethod
Base.asind(x::AbstractUncertainValue; n::Int = 10000) -> Vector{Float64}

Compute the inverse sine of the uncertain value x, where x is in degrees. Computes the element-wise inverse sine for n realizations.

source
Base.Math.asindMethod
Base.asind(x::AbstractUncertainValue, n::Int = 10000) -> Vector{Float64}

Compute the inverse sine of the uncertain value x, where x is in degrees. Computes the element-wise inverse sine for n realizations.

source
Base.asinhMethod
Base.asinh(x::AbstractUncertainValue; n::Int = 10000) -> Vector{Float64}

Compute the inverse hyperbolic sine of the uncertain value x. Computes the element-wise inverse hyperbolic csine for n realizations.

source
Base.asinhMethod
Base.asinh(x::AbstractUncertainValue, n::Int = 10000) -> Vector{Float64}

Compute the inverse hyperbolic sine of the uncertain value x. Computes the element-wise inverse hyperbolic csine for n realizations.

source

Cosine

Base.acosMethod
Base.acos(x::AbstractUncertainValue; n::Int = 10000) -> Vector{Float64}

Compute the inverse cosine of the uncertain value x, where x is in radians. Computes the element-wise inverse cosine for n realizations.

source
Base.acosMethod
Base.acos(x::AbstractUncertainValue, n::Int = 10000) -> Vector{Float64}

Compute the inverse cosine of the uncertain value x, where x is in radians. Computes the element-wise inverse cosine for n realizations.

source
Base.Math.acosdMethod
Base.acosd(x::AbstractUncertainValue; n::Int = 10000) -> Vector{Float64}

Compute the inverse cosine of the uncertain value x, where x is in degrees. Computes the element-wise inverse cosine for n realizations.

source
Base.Math.acosdMethod
Base.acosd(x::AbstractUncertainValue, n::Int = 10000) -> Vector{Float64}

Compute the inverse cosine of the uncertain value x, where x is in degrees. Computes the element-wise inverse cosine for n realizations.

source
Base.acoshMethod
Base.acosh(x::AbstractUncertainValue; n::Int = 10000) -> Vector{Float64}

Compute the inverse hyperbolic cosine of the uncertain value x. Computes the element-wise inverse hyperbolic cosine for n realizations.

source
Base.acoshMethod
Base.acosh(x::AbstractUncertainValue, n::Int = 10000) -> Vector{Float64}

Compute the inverse hyperbolic cosine of the uncertain value x. Computes the element-wise inverse hyperbolic cosine for n realizations.

source

Tangent

Base.tanMethod
Base.tan(x::AbstractUncertainValue; n::Int = 10000) -> Vector{Float64}

Compute the tangent of the uncertain value x, where x is in radians. Computes the element-wise tangent for n realizations.

source
Base.tanMethod
Base.tan(x::AbstractUncertainValue, n::Int = 10000) -> Vector{Float64}

Compute the tangent of the uncertain value x, where x is in radians. Computes the element-wise tangent for n realizations.

source
Base.Math.tandMethod
Base.tand(x::AbstractUncertainValue; n::Int = 10000) -> Vector{Float64}

Compute the tangent of the uncertain value x, where x is in degrees. Computes the element-wise tangent for n realizations.

source
Base.Math.tandMethod
Base.tand(x::AbstractUncertainValue, n::Int = 10000) -> Vector{Float64}

Compute the tangent of the uncertain value x, where x is in degrees. Computes the element-wise tangent for n realizations.

source
Base.tanhMethod
Base.tanh(x::AbstractUncertainValue; n::Int = 10000) -> Vector{Float64}

Compute the hyperbolic tangent of the uncertain value x. Computes the element-wise hyperbolic tangent for n realizations.

source
Base.tanhMethod
Base.tanh(x::AbstractUncertainValue, n::Int = 10000) -> Vector{Float64}

Compute the hyperbolic tangent of the uncertain value x. Computes the element-wise hyperbolic tangent for n realizations.

source

Inverse cosecant

Base.Math.acscMethod
Base.acsc(x::AbstractUncertainValue; n::Int = 10000) -> Vector{Float64}

Compute the inverse cosecant of the uncertain value x, where x is in radians. Computes the element-wise inverse cosecant for n realizations.

source
Base.Math.acscMethod
Base.acsc(x::AbstractUncertainValue, n::Int = 10000) -> Vector{Float64}

Compute the inverse cosecant of the uncertain value x, where x is in radians. Computes the element-wise inverse cosecant for n realizations.

source
Base.Math.acscdMethod
Base.acscd(x::AbstractUncertainValue; n::Int = 10000) -> Vector{Float64}

Compute the inverse cosecant of the uncertain value x, where x is in degrees. Computes the element-wise inverse cosecant for n realizations.

source
Base.Math.acscdMethod
Base.acscd(x::AbstractUncertainValue, n::Int = 10000) -> Vector{Float64}

Compute the inverse cosecant of the uncertain value x, where x is in degrees. Computes the element-wise inverse cosecant for n realizations.

source
Base.Math.acschMethod
Base.acscd(x::AbstractUncertainValue; n::Int = 10000) -> Vector{Float64}

Compute the inverse hyperbolic cosecant of the uncertain value x. Computes the element-wise inverse hypoerbolic cosecant for n realizations.

source
Base.Math.acschMethod
Base.acscd(x::AbstractUncertainValue, n::Int = 10000) -> Vector{Float64}

Compute the inverse hyperbolic cosecant of the uncertain value x. Computes the element-wise inverse hypoerbolic cosecant for n realizations.

source

Inverse secant

Base.Math.asecMethod
Base.asec(x::AbstractUncertainValue; n::Int = 10000) -> Vector{Float64}

Compute the inverse secant of the uncertain value x, where x is in radians. Computes the element-wise inverse secant for n realizations.

source
Base.Math.asecMethod
Base.asec(x::AbstractUncertainValue, n::Int = 10000) -> Vector{Float64}

Compute the inverse secant of the uncertain value x, where x is in radians. Computes the element-wise inverse secant for n realizations.

source
Base.Math.asecdMethod
Base.asecd(x::AbstractUncertainValue; n::Int = 10000) -> Vector{Float64}

Compute the inverse secant of the uncertain value x, where x is in degrees. Computes the element-wise inverse secant for n realizations.

source
Base.Math.asecdMethod
Base.asecd(x::AbstractUncertainValue, n::Int = 10000) -> Vector{Float64}

Compute the inverse secant of the uncertain value x, where x is in degrees. Computes the element-wise inverse secant for n realizations.

source
Base.Math.asechMethod
Base.asech(x::AbstractUncertainValue; n::Int = 10000) -> Vector{Float64}

Compute the inverse hyperbolic secant of the uncertain value x. Computes the element-wise inverse hyperbolic secant for n realizations.

source
Base.Math.asechMethod
Base.asech(x::AbstractUncertainValue, n::Int = 10000) -> Vector{Float64}

Compute the inverse hyperbolic secant of the uncertain value x. Computes the element-wise inverse hyperbolic secant for n realizations.

source

Inverse cotangent

Base.Math.acotMethod
Base.acot(x::AbstractUncertainValue; n::Int = 10000) -> Vector{Float64}

Compute the inverse cotangent of the uncertain value x, where x is in radians. Computes the element-wise inverse secant for n realizations.

source
Base.Math.acotMethod
Base.acot(x::AbstractUncertainValue, n::Int = 10000) -> Vector{Float64}

Compute the inverse cotangent of the uncertain value x, where x is in radians. Computes the element-wise inverse secant for n realizations.

source
Base.Math.acotdMethod
Base.acotd(x::AbstractUncertainValue; n::Int = 10000) -> Vector{Float64}

Compute the inverse cotangent of the uncertain value x, where x is in degrees. Computes the element-wise inverse secant for n realizations.

source
Base.Math.acotdMethod
Base.acotd(x::AbstractUncertainValue, n::Int = 10000) -> Vector{Float64}

Compute the inverse cotangent of the uncertain value x, where x is in degrees. Computes the element-wise inverse secant for n realizations.

source
Base.Math.acothMethod
Base.acoth(x::AbstractUncertainValue; n::Int = 10000) -> Vector{Float64}

Compute the inverse hyperbolic cotangent of the uncertain value x. Computes the element-wise inverse hyperbolic secant for n realizations.

source
Base.Math.acothMethod
Base.acoth(x::AbstractUncertainValue, n::Int = 10000) -> Vector{Float64}

Compute the inverse hyperbolic cotangent of the uncertain value x. Computes the element-wise inverse hyperbolic secant for n realizations.

source

Other trig functions

Base.Math.sincosMethod
Base.sincos(x::AbstractUncertainValue; n::Int = 10000)

Simultaneously compute the sine and cosine of the uncertain value x, where x is in radians. Computes the element-wise sincos for n realizations.

source
Base.Math.sincosMethod
Base.sincos(x::AbstractUncertainValue, n::Int = 10000)

Simultaneously compute the sine and cosine of the uncertain value x, where x is in radians. Computes the element-wise sincos for n realizations.

source
Base.Math.sincMethod
Base.sinc(x::AbstractUncertainValue; n::Int = 10000)

In an element-wise manner for n realizations of the uncertain value x, compute $\sin(\pi x) / (\pi x)$ if $x \neq 0$, and $1$ if $x = 0$.

source
Base.Math.sincMethod
Base.sinc(x::AbstractUncertainValue, n::Int = 10000)

Compute $\sin(\pi x) / (\pi x)$ if $x \neq 0$, and $1$ if $x = 0$ element-wise over n realizations of the uncertain value x.

source
Base.Math.sinpiMethod
Base.sinpi(x::AbstractUncertainValue; n::Int = 10000)

Compute $\sin(\pi x)$ more accurately than sin(pi*x), especially for large x, in an element-wise over n realizations of the uncertain value x.

source
Base.Math.sinpiMethod
Base.sinpi(x::AbstractUncertainValue; n::Int = 10000)

Compute $\sin(\pi x)$ more accurately than sin(pi*x), especially for large x, in an element-wise over n realizations of the uncertain value x.

source
Base.Math.coscMethod
Base.cosc(x::AbstractUncertainValue; n::Int = 10000)

Compute $\cos(\pi x) / x - \sin(\pi x) / (\pi x^2)$ if $x \neq 0$, and $0$ if $x = 0$, in an element-wise manner over n realizations of the uncertain value x.

This is the derivative of sinc(x).

source
Base.Math.coscMethod
Base.cosc(x::AbstractUncertainValue, n::Int = 10000)

Compute $\cos(\pi x) / x - \sin(\pi x) / (\pi x^2)$ if $x \neq 0$, and $0$ if $x = 0$, in an element-wise manner over n realizations of the uncertain value x.

This is the derivative of sinc(x).

source
Base.Math.cospiMethod
Base.cospi(x::AbstractUncertainValue; n::Int = 10000)

Compute $\cos(\pi x)$ more accurately than cos(pi*x), especially for large x, in an element-wise over n realizations of the uncertain value x.

source
Base.Math.cospiMethod
Base.cospi(x::AbstractUncertainValue, n::Int = 10000)

Compute $\cos(\pi x)$ more accurately than cos(pi*x), especially for large x, in an element-wise over n realizations of the uncertain value x.

source