Skip to content

Trigonometric functions

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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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