#engineering #numerical-methods #science #special-functions

math-fun

A package providing mathematical functions commonly used in science and engineering

3 releases

0.0.3 Feb 7, 2024
0.0.2 Feb 4, 2024
0.0.1 Feb 3, 2024

#717 in Math

46 downloads per month

MIT/Apache

28KB
459 lines

math-fun

Special functions for scientific and engineering problems

Usage

Add the following to your Cargo.toml:

[dependencies]
math-fun = "0.0.2"

Features

Currently, only spherical Bessel functions of the first and second kinds for orders 0, 1, and 2 are implemented. More functions will follow.

License

Licensed under either of

at your option.


lib.rs:

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>

No runtime deps