Skip to main content

Approximant

Trait Approximant 

Source
pub trait Approximant: Send + Sync {
    // Required method
    fn call(&self, n: u64) -> Result<Rational, String>;
}
Expand description

A program’s function a real number is defined by, as the tier running the program calls it from inside a refinement. The tier evaluates the function in a context of its own, so a call made in the middle of another computation changes nothing the program can see.

Required Methods§

Source

fn call(&self, n: u64) -> Result<Rational, String>

The function’s answer at n, as the rational it is; Err is the function’s own failure, or an answer that is no rational.

Implementors§