numbat 1.23.0

A statically typed programming language for scientific computations with first class support for physical dimensions and units.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use std::ffi::c_double;

unsafe extern "C" {
    fn tgamma(n: c_double) -> c_double;
}

// TODO: This will be part of the standard in the future [1] [2]
// [1] https://github.com/rust-lang/rfcs/issues/864
// [2] https://github.com/rust-lang/rust/pull/99747
pub fn gamma(x: f64) -> f64 {
    unsafe { tgamma(x) }
}