Average Error: 0.0 → 0.0
Time: 4.2s
Precision: 64
\[x - \frac{2.30753 + x \cdot 0.27061000000000002}{1 + \left(0.992290000000000005 + x \cdot 0.044810000000000003\right) \cdot x}\]
\[\left(-\mathsf{fma}\left(0.27061000000000002, x, 2.30753\right)\right) \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\mathsf{fma}\left(x, \mathsf{fma}\left(0.044810000000000003, x, 0.992290000000000005\right), 1\right)}\right)\right) + x\]
x - \frac{2.30753 + x \cdot 0.27061000000000002}{1 + \left(0.992290000000000005 + x \cdot 0.044810000000000003\right) \cdot x}
\left(-\mathsf{fma}\left(0.27061000000000002, x, 2.30753\right)\right) \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\mathsf{fma}\left(x, \mathsf{fma}\left(0.044810000000000003, x, 0.992290000000000005\right), 1\right)}\right)\right) + x
double f(double x) {
        double r123638 = x;
        double r123639 = 2.30753;
        double r123640 = 0.27061;
        double r123641 = r123638 * r123640;
        double r123642 = r123639 + r123641;
        double r123643 = 1.0;
        double r123644 = 0.99229;
        double r123645 = 0.04481;
        double r123646 = r123638 * r123645;
        double r123647 = r123644 + r123646;
        double r123648 = r123647 * r123638;
        double r123649 = r123643 + r123648;
        double r123650 = r123642 / r123649;
        double r123651 = r123638 - r123650;
        return r123651;
}

double f(double x) {
        double r123652 = 0.27061;
        double r123653 = x;
        double r123654 = 2.30753;
        double r123655 = fma(r123652, r123653, r123654);
        double r123656 = -r123655;
        double r123657 = 1.0;
        double r123658 = 0.04481;
        double r123659 = 0.99229;
        double r123660 = fma(r123658, r123653, r123659);
        double r123661 = 1.0;
        double r123662 = fma(r123653, r123660, r123661);
        double r123663 = r123657 / r123662;
        double r123664 = log1p(r123663);
        double r123665 = expm1(r123664);
        double r123666 = r123656 * r123665;
        double r123667 = r123666 + r123653;
        return r123667;
}

Error

Bits error versus x

Derivation

  1. Initial program 0.0

    \[x - \frac{2.30753 + x \cdot 0.27061000000000002}{1 + \left(0.992290000000000005 + x \cdot 0.044810000000000003\right) \cdot x}\]
  2. Simplified0.0

    \[\leadsto \color{blue}{\frac{-\mathsf{fma}\left(0.27061000000000002, x, 2.30753\right)}{\mathsf{fma}\left(x, \mathsf{fma}\left(0.044810000000000003, x, 0.992290000000000005\right), 1\right)} + x}\]
  3. Using strategy rm
  4. Applied div-inv0.0

    \[\leadsto \color{blue}{\left(-\mathsf{fma}\left(0.27061000000000002, x, 2.30753\right)\right) \cdot \frac{1}{\mathsf{fma}\left(x, \mathsf{fma}\left(0.044810000000000003, x, 0.992290000000000005\right), 1\right)}} + x\]
  5. Using strategy rm
  6. Applied expm1-log1p-u0.0

    \[\leadsto \left(-\mathsf{fma}\left(0.27061000000000002, x, 2.30753\right)\right) \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\mathsf{fma}\left(x, \mathsf{fma}\left(0.044810000000000003, x, 0.992290000000000005\right), 1\right)}\right)\right)} + x\]
  7. Final simplification0.0

    \[\leadsto \left(-\mathsf{fma}\left(0.27061000000000002, x, 2.30753\right)\right) \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\mathsf{fma}\left(x, \mathsf{fma}\left(0.044810000000000003, x, 0.992290000000000005\right), 1\right)}\right)\right) + x\]

Reproduce

herbie shell --seed 2020034 +o rules:numerics
(FPCore (x)
  :name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, D"
  :precision binary64
  (- x (/ (+ 2.30753 (* x 0.27061)) (+ 1 (* (+ 0.99229 (* x 0.04481)) x)))))