Skip to main content

thermite_compensated/specialized/special/
pd.rs

1//! Double-double: `Compensated<V>` over an `f64` element, ~106 bits of mantissa.
2//!
3//! Named after `thermite-special`'s `pd.rs`, and for the same reason - this is the
4//! `f64`-element half of the per-width split.
5//!
6//! Empty, so every method takes the generic Stirling/Bernoulli default from [`super`].
7//! This is the width where that default is most likely to be the permanent answer: the
8//! only table that would beat it is Boost's `lanczos24m113`, whose 24 coefficients have
9//! to be sourced and validated at 32 digits, against a shift loop whose cost is already
10//! small relative to double-double arithmetic. Fill this in only if a measurement asks
11//! for it.
12
13use thermite::prelude::*;
14
15use super::SpecializedCompensatedSpecialMath;
16use crate::Compensated;
17
18impl<V: FloatVector<Element = f64>> SpecializedCompensatedSpecialMath<f64> for V {
19    const INV_LANGEVIN_STEPS: usize = 1;
20
21    #[inline(always)]
22    fn dd_const(hi: f64, lo: f64) -> Compensated<Self> {
23        Compensated {
24            value: Self::splat(hi),
25            error: Self::splat(lo),
26        }
27    }
28}
Last built: 2026-09-08 21:35:55 UTC