Trait mathru::elementary::Hyperbolic
source · pub trait Hyperbolic {
fn sinh(&self) -> Self;
fn cosh(&self) -> Self;
fn tanh(&self) -> Self;
fn coth(&self) -> Self;
fn sech(&self) -> Self;
fn csch(&self) -> Self;
fn arsinh(&self) -> Self;
fn arcosh(&self) -> Self;
fn artanh(&self) -> Self;
fn arcoth(&self) -> Self;
fn arsech(&self) -> Self;
fn arcsch(&self) -> Self;
}
Expand description
Hyperbolic functions
Required Methods
Implementations on Foreign Types
sourceimpl Hyperbolic for f32
impl Hyperbolic for f32
sourcefn arcoth(&self) -> Self
fn arcoth(&self) -> Self
Hyperbolic inverse cotan
Arguments
self
-1.0 > self, self > 1.0
Panics
if -1.0 <= self && self <= 1.0
Example
extern crate mathru;
use mathru::algebra::abstr::{Field};
use mathru::elementary::{Exponential, Hyperbolic};
let x: f64 = 2.0_f64;
let f: f64 = x.arcoth();
let g: f64 = ((x + 1.0) / ( x - 1.0)).ln() / 2.0;
let abs_difference: f64 = (f - g).abs();
assert!(abs_difference < 1.0e-10);
sourcefn arsech(&self) -> Self
fn arsech(&self) -> Self
Hyperbolic inverse secant
Arguments
self
0.0 < self <= 1.0
Panics
if 0.0 >= self || self > 1.0
Example
extern crate mathru;
use mathru::elementary::{Exponential, Hyperbolic};
let x: f64 = 0.5_f64;
let f: f64 = x.arsech();
let g: f64 = (1.0 / x).arcosh();
let abs_difference: f64 = (f - g).abs();
assert!(abs_difference < 1.0e-10);
sourcefn arcsch(&self) -> Self
fn arcsch(&self) -> Self
Hyperbolic inverse cosecant
Arguments
self
<> 0.0
Panics
iff self = 0.0
Example
extern crate mathru;
use mathru::algebra::abstr::{Field};
use mathru::elementary::{Exponential, Hyperbolic};
let x: f64 = 2.0_f64;
let f: f64 = x.arcsch();
let g: f64 = (1.0 / x).arsinh();
let abs_difference: f64 = (f - g).abs();
assert!(abs_difference < 1.0e-10);
sourceimpl Hyperbolic for f64
impl Hyperbolic for f64
sourcefn arcoth(&self) -> Self
fn arcoth(&self) -> Self
Hyperbolic inverse cotan
Arguments
self
-1.0 > self, self > 1.0
Panics
if -1.0 <= self && self <= 1.0
Example
extern crate mathru;
use mathru::algebra::abstr::{Field};
use mathru::elementary::{Exponential, Hyperbolic};
let x: f64 = 2.0_f64;
let f: f64 = x.arcoth();
let g: f64 = ((x + 1.0) / ( x - 1.0)).ln() / 2.0;
let abs_difference: f64 = (f - g).abs();
assert!(abs_difference < 1.0e-10);
sourcefn arsech(&self) -> Self
fn arsech(&self) -> Self
Hyperbolic inverse secant
Arguments
self
0.0 < self <= 1.0
Panics
if 0.0 >= self || self > 1.0
Example
extern crate mathru;
use mathru::elementary::{Exponential, Hyperbolic};
let x: f64 = 0.5_f64;
let f: f64 = x.arsech();
let g: f64 = (1.0 / x).arcosh();
let abs_difference: f64 = (f - g).abs();
assert!(abs_difference < 1.0e-10);
sourcefn arcsch(&self) -> Self
fn arcsch(&self) -> Self
Hyperbolic inverse cosecant
Arguments
self
<> 0.0
Panics
iff self = 0.0
Example
extern crate mathru;
use mathru::algebra::abstr::{Field};
use mathru::elementary::{Exponential, Hyperbolic};
let x: f64 = 2.0_f64;
let f: f64 = x.arcsch();
let g: f64 = (1.0 / x).arsinh();
let abs_difference: f64 = (f - g).abs();
assert!(abs_difference < 1.0e-10);