pub struct Ball { /* private fields */ }Expand description
Enclosure mid ± rad used to certify that a rounded midpoint is unique.
Implementations§
Source§impl Ball
impl Ball
Sourcepub fn new(mid: ExactNum, rad: ExactNum) -> Ball
pub fn new(mid: ExactNum, rad: ExactNum) -> Ball
mid ± rad. The radius is taken in absolute value.
Sourcepub fn add(&self, other: &Ball, p: usize, rm: RoundingMode) -> Ball
pub fn add(&self, other: &Ball, p: usize, rm: RoundingMode) -> Ball
Sum of two balls: midpoint add at precision p, radius r1+r2 plus a rounding ulp.
Sourcepub fn mul(&self, other: &Ball, p: usize, rm: RoundingMode) -> Ball
pub fn mul(&self, other: &Ball, p: usize, rm: RoundingMode) -> Ball
Product of two balls with a first-order radius bound plus a rounding ulp.
Sourcepub fn exp(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> Ball
pub fn exp(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> Ball
Exponential of a ball. exp is increasing; the radius uses
(\lvert\exp(m)\rvert(e^{r}-1)) plus a rounding ulp (same Up convention as add/mul).
Sourcepub fn sin(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> Ball
pub fn sin(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> Ball
Sine of a ball. (\lvert\sin’\rvert\le 1), so the image radius is at most rad
plus a rounding ulp.
Sourcepub fn cos(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> Ball
pub fn cos(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> Ball
Cosine of a ball. (\lvert\cos’\rvert\le 1).
Sourcepub fn ln(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> Ball
pub fn ln(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> Ball
Natural log of a ball. Domain: the ball must lie in ((0,+\infty)). Lipschitz (\lvert\ln’\rvert=1/x\le 1/(m-r)).
Sourcepub fn sqrt(&self, p: usize, rm: RoundingMode) -> Ball
pub fn sqrt(&self, p: usize, rm: RoundingMode) -> Ball
Square root of a ball. Domain: the ball must lie in ((0,+\infty)). Lipschitz (1/(2\sqrt{x})\le 1/(2\sqrt{m-r})).
Sourcepub fn erf(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> Ball
pub fn erf(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> Ball
Error function of a ball. (\lvert\mathrm{erf}’\rvert\le 2/\sqrt{\pi}).
Sourcepub fn bessel_j0(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> Ball
pub fn bessel_j0(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> Ball
(J_0) of a ball. (\lvert J_0’\rvert=\lvert J_1\rvert\le 1).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Ball
impl RefUnwindSafe for Ball
impl Send for Ball
impl Sync for Ball
impl Unpin for Ball
impl UnsafeUnpin for Ball
impl UnwindSafe for Ball
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more