numeris 0.5.2

Pure-Rust numerical algorithms library — high performance with SIMD support while also supporting no-std for embedded and WASM targets.
Documentation
//! Verner 6(5) — 10 stages, order 6(5).
//!
//! Source: <https://www.sfu.ca/~jverner/RKV65.IIIXb.Efficient.00000144617.081204.CoeffsOnlyFLOAT>

use super::adaptive::RKAdaptive;

/// Verner 6(5) — 10 stages, order 6(5).
pub struct RKV65;

const BHAT: [f64; 10] = [
    0.049_099_676_483_824_9,
    0.0,
    0.0,
    0.225_111_222_951_652_42,
    0.469_468_225_302_956_2,
    0.806_579_224_998_886_8,
    0.0,
    -0.607_119_489_177_796,
    0.056_861_139_440_475_696,
    0.0,
];

impl RKAdaptive<10, 6> for RKV65 {
    const ORDER: usize = 6;
    const FSAL: bool = false;

    const C: [f64; 10] = [
        0.0,
        0.06,
        0.095_933_333_333_333_33,
        0.1439,
        0.4973,
        0.9725,
        0.9995,
        1.0,
        1.0,
        0.5,
    ];

    const B: [f64; 10] = [
        0.034_389_578_683_570_36,
        0.0,
        0.0,
        0.258_262_455_563_350_3,
        0.420_937_118_967_353_7,
        4.405_396_469_669_31,
        -176.483_119_024_298_65,
        172.364_133_401_415_07,
        0.0,
        0.0,
    ];

    const BERR: [f64; 10] = {
        let mut berr = [0.0; 10];
        let mut ix: usize = 0;
        while ix < 10 {
            berr[ix] = RKV65::B[ix] - BHAT[ix];
            ix += 1;
        }
        berr
    };

    #[rustfmt::skip]
    const A: [[f64; 10]; 10] = [
        [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
        [0.06, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
        [0.019_239_962_962_962_962, 0.076_693_370_370_370_37, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
        [0.035975, 0.0, 0.107925, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
        [1.318_683_415_233_148_4, 0.0, -5.042_058_063_628_562, 4.220_674_648_395_414, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
        [-41.872_591_664_327_516, 0.0, 159.432_562_163_137_5, -122.119_213_565_010_03, 5.531_743_066_200_054, 0.0, 0.0, 0.0, 0.0, 0.0],
        [-54.430_156_935_316_504, 0.0, 207.067_251_365_018_48, -158.610_813_784_59, 6.991_816_585_950_242, -0.018_597_231_062_203_234, 0.0, 0.0, 0.0, 0.0],
        [-54.663_741_787_281_98, 0.0, 207.952_806_255_389_36, -159.288_957_474_499_5, 7.018_743_740_796_944, -0.018_338_785_905_045_722, -0.000_511_948_499_788_209_9, 0.0, 0.0, 0.0],
        [0.034_389_578_683_570_36, 0.0, 0.0, 0.258_262_455_563_350_3, 0.420_937_118_967_353_7, 4.405_396_469_669_31, -176.483_119_024_298_65, 172.364_133_401_415_07, 0.0, 0.0],
        [0.016_524_159_013_572_806, 0.0, 0.0, 0.305_312_818_751_417_9, 0.207_120_093_820_197_9, -1.293_879_140_655_123, 57.119_884_115_881_49, -55.879_792_075_109_32, 0.024_830_028_297_766_014, 0.0],
    ];

    #[rustfmt::skip]
    const BI: [[f64; 6]; 10] = [
        [1.0, -5.308_169_607_103_577, 10.181_680_448_958_68, -7.520_036_991_611_715, 0.934_048_536_863_116_1, 0.746_867_191_577_065],
        [0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
        [0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
        [0.0, 6.272_050_253_212_501, -16.026_181_474_677_46, 12.844_356_324_519_618, -1.148_794_504_476_759_1, -1.683_168_143_014_549_8],
        [0.0, 6.876_491_702_846_304, -24.635_767_260_846_333, 33.210_786_483_797_17, -17.494_615_282_636_44, 2.464_041_475_806_649_6],
        [0.0, -35.544_451_710_599_6, 165.701_617_019_024_2, -385.463_539_549_114_3, 442.432_413_701_570_17, -182.720_642_991_211_2],
        [0.0, 1_918.654_856_698_011_4, -9_268.121_508_966_042, 20_858.337_028_772_55, -22_645.827_671_584_81, 8_960.474_176_055_992],
        [0.0, -1_883.069_802_132_718_2, 9_101.025_187_200_634, -20_473.188_551_959_534, 22_209.765_551_256_532, -8_782.168_250_963_5],
        [0.0, 0.119_024_796_351_236_43, -0.125_026_967_050_393_76, 1.779_956_919_394_999_1, -4.660_932_123_043_763, 2.886_977_374_347_921],
        [0.0, -8.0, 32.0, -40.0, 16.0, 0.0],
    ];
}