Trait rgsl::trigonometric::Trigonometric
[−]
[src]
pub trait Trigonometric { fn sin(&self) -> Self; fn sin_e(&self) -> (Value, Result); fn cos(&self) -> Self; fn cos_e(&self) -> (Value, Result); fn sf_hypot(&self) -> Self; fn sf_hypot_e(&self) -> (Value, Result); fn sinc(&self) -> Self; fn sinc_e(&self) -> (Value, Result); fn complex_sin_e(&self, zi: f64) -> (Value, Result, Result); fn complex_cos_e(&self, zi: f64) -> (Value, Result, Result); fn complex_logsin_e(&self, zi: f64) -> (Value, Result, Result); fn lnsinh(&self) -> Self; fn lnsinh_e(&self) -> (Value, Result); fn lncosh(&self) -> Self; fn lncosh_e(&self) -> (Value, Result); fn polar_to_rect(&self, theta: f64) -> (Value, Result, Result); fn rect_to_polar(&self, y: f64) -> (Value, Result, Result); fn angle_restrict_symm(&self) -> Self; fn angle_restrict_symm_e(&mut self) -> Value; fn angle_restrict_pos(&self) -> Self; fn angle_restrict_pos_e(&mut self) -> Value; fn sin_err_e(&self, dx: f64) -> (Value, Result); fn cos_err_e(&self, dx: f64) -> (Value, Result); }
Required Methods
fn sin(&self) -> Self
This routine computes the sine function \sin(x).
fn sin_e(&self) -> (Value, Result)
This routine computes the sine function \sin(x).
fn cos(&self) -> Self
This routine computes the cosine function \sin(x).
fn cos_e(&self) -> (Value, Result)
This routine computes the cosine function \sin(x).
fn sf_hypot(&self) -> Self
This routine computes the hypotenuse function \sqrt{x2 + y2} avoiding overflow and underflow.
fn sf_hypot_e(&self) -> (Value, Result)
This routine computes the hypotenuse function \sqrt{x2 + y2} avoiding overflow and underflow.
fn sinc(&self) -> Self
This routine computes \sinc(x) = \sin(\pi x) / (\pi x) for any value of x.
fn sinc_e(&self) -> (Value, Result)
This routine computes \sinc(x) = \sin(\pi x) / (\pi x) for any value of x.
fn complex_sin_e(&self, zi: f64) -> (Value, Result, Result)
This function computes the complex sine, \sin(z_r + i z_i) storing the real and imaginary parts in szr, szi.
fn complex_cos_e(&self, zi: f64) -> (Value, Result, Result)
This function computes the complex cosine, \cos(z_r + i z_i) storing the real and imaginary parts in czr, czi.
fn complex_logsin_e(&self, zi: f64) -> (Value, Result, Result)
This function computes the logarithm of the complex sine, \log(\sin(z_r + i z_i)) storing the real and imaginary parts in lszr, lszi.
fn lnsinh(&self) -> Self
This routine computes \log(\sinh(x)) for x > 0.
fn lnsinh_e(&self) -> (Value, Result)
This routine computes \log(\sinh(x)) for x > 0.
fn lncosh(&self) -> Self
This routine computes \log(\cosh(x)) for x > 0.
fn lncosh_e(&self) -> (Value, Result)
This routine computes \log(\cosh(x)) for x > 0.
fn polar_to_rect(&self, theta: f64) -> (Value, Result, Result)
This function converts the polar coordinates (r,theta) to rectilinear coordinates (x,y), x = r\cos(\theta), y = r\sin(\theta).
fn rect_to_polar(&self, y: f64) -> (Value, Result, Result)
This function converts the rectilinear coordinates (x,y) to polar coordinates (r,theta), such that x = r\cos(\theta), y = r\sin(\theta). The argument theta lies in the range [-\pi, \pi].
fn angle_restrict_symm(&self) -> Self
This routine forces the angle theta to lie in the range (-\pi,\pi].
Note that the mathematical value of \pi is slightly greater than M_PI, so the machine numbers M_PI and -M_PI are included in the range.
fn angle_restrict_symm_e(&mut self) -> Value
This routine forces the angle theta to lie in the range (-\pi,\pi].
Note that the mathematical value of \pi is slightly greater than M_PI, so the machine numbers M_PI and -M_PI are included in the range.
fn angle_restrict_pos(&self) -> Self
This routine forces the angle theta to lie in the range [0, 2\pi).
Note that the mathematical value of 2\pi is slightly greater than 2*M_PI, so the machine number 2*M_PI is included in the range.
fn angle_restrict_pos_e(&mut self) -> Value
This routine forces the angle theta to lie in the range [0, 2\pi).
Note that the mathematical value of 2\pi is slightly greater than 2*M_PI, so the machine number 2*M_PI is included in the range.
fn sin_err_e(&self, dx: f64) -> (Value, Result)
This routine computes the sine of an angle x with an associated absolute error dx, \sin(x \pm dx).
Note that this function is provided in the error-handling form only since its purpose is to compute the propagated error.
fn cos_err_e(&self, dx: f64) -> (Value, Result)
This routine computes the cosine of an angle x with an associated absolute error dx, \cos(x \pm dx).
Note that this function is provided in the error-handling form only since its purpose is to compute the propagated error.
Implementors
impl Trigonometric for f64