abax 0.1.1

A lightweight Rust library providing high-precision mathematical constants and special functions, including Bernoulli numbers, Riemann Zeta values, and the Gamma function.
Documentation
#![allow(dead_code)]

/// B_{2n} for n = 1..=16
pub(crate) const BERNOULLI_EVEN: [f64; 16] = [
    1.0 / 6.0,                 // 0.16666666666666666666666666666667
    -1.0 / 30.0,               // -0.033333333333333333333333333333333
    1.0 / 42.0,                // 0.023809523809523809523809523809524
    -1.0 / 30.0,               // -0.033333333333333333333333333333333
    5.0 / 66.0,                //0.075757575757575757575757575757576
    -691.0 / 2730.0,           //-0.25311355311355311355311355311355
    7.0 / 6.0,                 //1.1666666666666666666666666666667
    -3617.0 / 510.0,           //-7.0921568627450980392156862745098
    43867.0 / 798.0,           //54.971177944862155388471177944862
    -174611.0 / 330.0,         //-529.12424242424242424242424242424
    854513.0 / 138.0,          //6192.1231884057971014492753623188
    -236364091.0 / 2730.0,     //-86580.253113553113553113553113553
    8553103.0 / 6.0,           //1.4255171666666666666666666666667*10^6
    -23749461029.0 / 870.0,    //-2.7298231067816091954022988505747*10^7
    8615841276005.0 / 14322.0, //6.0158087390064236838430386817484*10^8
    -7709321041217.0 / 510.0,  //-1.5116315767092156862745098039216*10^10
];
/// Stirling Series for n = 1..=16: B_{2n} / (2 * n * (2 * n - 1))
pub(crate) const STIRLING_ASYMPTOTIC_SERIES: [f64; 16] = [
    BERNOULLI_EVEN[0] / (2.0 * 1.0), //0.083333333333333333333333333333333,
    BERNOULLI_EVEN[1] / (4.0 * 3.0), //-0.0027777777777777777777777777777778
    BERNOULLI_EVEN[2] / (6.0 * 5.0), //0.00079365079365079365079365079365079
    BERNOULLI_EVEN[3] / (8.0 * 7.0), //-0.00059523809523809523809523809523810
    BERNOULLI_EVEN[4] / (10.0 * 9.0), //0.00084175084175084175084175084175084
    BERNOULLI_EVEN[5] / (12.0 * 11.0), //-0.0019175269175269175269175269175269
    BERNOULLI_EVEN[6] / (14.0 * 13.0), //0.0064102564102564102564102564102564
    BERNOULLI_EVEN[7] / (16.0 * 15.0), //-0.029550653594771241830065359477124
    BERNOULLI_EVEN[8] / (18.0 * 17.0), //0.17964437236883057316493849001589
    BERNOULLI_EVEN[9] / (20.0 * 19.0), //-1.3924322169059011164274322169059
    BERNOULLI_EVEN[10] / (22.0 * 21.0), //13.402864044168391994478951000690
    BERNOULLI_EVEN[11] / (24.0 * 23.0), //-156.84828462600201730636513245209
    BERNOULLI_EVEN[12] / (26.0 * 25.0), //2193.1033333333333333333333333333
    BERNOULLI_EVEN[13] / (28.0 * 27.0), //-36108.771253724989357173265219242
    BERNOULLI_EVEN[14] / (30.0 * 29.0), //691472.26885131306710839525077567
    BERNOULLI_EVEN[15] / (32.0 * 31.0), //-1.5238221539407416192283364958887*10^7
];

/// f64::ln(std::f64::consts::TAU) or f64::ln(2.0 * std::f64::consts::PI)
pub(crate) const LN_2PI: f64 = 1.8378770664093454835606594728112352797227949472755668256343030810;

/// std::f64::consts::PI * std::f64::consts::PI / 6.0
pub(crate) const RIEMANN_ZETA_2: f64 =
    1.644934066848226436472415166646025189218949901206798437735558229;
pub(crate) const RIEMANN_ZETA_3: f64 =
    1.202056903159594285399738161511449990764986292340498881792271555;
pub(crate) const RIEMANN_ZETA_4: f64 =
    1.082323233711138191516003696541167902774750951918726907682976215;
pub(crate) const RIEMANN_ZETA_5: f64 =
    1.036927755143369926331365486457034168057080919501912811974192678;
pub(crate) const RIEMANN_ZETA_6: f64 =
    1.017343061984449139714517929790920527901817490032853561842408664;
pub(crate) const RIEMANN_ZETA_7: f64 =
    1.008349277381922826839797549849796759599863560565238706417283137;
pub(crate) const RIEMANN_ZETA_8: f64 =
    1.004077356197944339378685238508652465258960790649850020329110203;
pub(crate) const RIEMANN_ZETA_9: f64 =
    1.002008392826082214417852769232412060485605851394888756548596616;
pub(crate) const RIEMANN_ZETA_10: f64 =
    1.00099457512781808533714595890031901700601953156447751725778899;
pub(crate) const RIEMANN_ZETA_11: f64 =
    1.000494188604119464558702282526469936468606435758208617119141436;
pub(crate) const RIEMANN_ZETA_12: f64 =
    1.00024608655330804829863799804773967096041608845800340453304095;
pub(crate) const RIEMANN_ZETA_13: f64 =
    1.000122713347578489146751836526357395714275105895509845136702672;
pub(crate) const RIEMANN_ZETA_14: f64 =
    1.00006124813505870482925854510513533374748169616915454948275520;
pub(crate) const RIEMANN_ZETA_15: f64 =
    1.000030588236307020493551728510645062587627948706858177506569933;
pub(crate) const RIEMANN_ZETA_16: f64 =
    1.00001528225940865187173257148763672202323738899047153115310520;

/// \lim _{n\to \infty }\left(\sum _{k=1}^{n}{\frac {1}{k}}-\log n\right)
pub(crate) const EULER_MASCHERONI: f64 =
    0.5772156649015328606065120900824024310421593359399235988057672349;