Crate math_fun

source ·
Expand description

Special functions for science and engineering problems.

Provides several mathematical functions that often appear in many different disciplines of science and engineering.

The goal of this package is to provide simple-to-use, pure-rust implementations without many dependencies. Rather than trying to exhaustively provide as many functions as possible or to cover all possible argument types and ranges, implementing widely used functions in an efficient way is the first priority.

Three types of input arguments are possible for indicating the position at which the function is evaluated.

  1. Point evaluation: a single position e.g., sph_bessel_kind1_ordern_arg_real(order: usize, x: f64),
  2. Range evaluation: Three floating point arguments, start, end, and step to indicate the range (inclusive of start and exclusive of end). step can be negative, in which case end should be less than start. e.g., sph_bessel_kind1_ordern_arg_real_ranged(order: usize, start: f64, end: f64, step: f64)
  3. Iterator evaluation: a collection of positions that implements IntoIterator e.g., sph_bessel_kind1_ordern_arg_real_iterable(order: usize, x_list: impl IntoIterator<Item = f64>

Functions§