Skip to main content

PAdicExp

Struct PAdicExp 

Source
pub struct PAdicExp {
    pub p: u64,
    pub convergence_radius: f64,
}
Expand description

The p-adic exponential function exp_p(x) = Σ x^n / n!.

Fields§

§p: u64

The prime p.

§convergence_radius: f64

Radius of convergence (= p^{-1/(p-1)} for p odd, = 2^{-2} for p=2).

Implementations§

Source§

impl PAdicExp

Source

pub fn new(p: u64) -> Self

Construct the p-adic exponential for the prime p.

Source

pub fn converges_at(&self, x: &PAdicNumber) -> bool

True if the series exp_p(x) converges at x, i.e. |x|_p < convergence_radius.

Source

pub fn evaluate_series(&self, x: f64, terms: u32) -> f64

Numerically evaluate the partial sum Σ_{n=0}^{terms-1} x^n / n! over ℝ.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.