Average Error: 0.1 → 0.1
Time: 2.1s
Precision: 64
\[1 - x \cdot \left(0.253 + x \cdot 0.12\right)\]
\[1 - x \cdot \frac{\mathsf{fma}\left(0.12, x, 0.253\right) \cdot \mathsf{fma}\left(\sqrt[3]{0.253} \cdot \sqrt[3]{0.253}, \sqrt[3]{0.253}, -0.12 \cdot x\right) + \mathsf{fma}\left(0.12, x, 0.253\right) \cdot \mathsf{fma}\left(-0.12, x, 0.12 \cdot x\right)}{0.253 - x \cdot 0.12}\]
1 - x \cdot \left(0.253 + x \cdot 0.12\right)
1 - x \cdot \frac{\mathsf{fma}\left(0.12, x, 0.253\right) \cdot \mathsf{fma}\left(\sqrt[3]{0.253} \cdot \sqrt[3]{0.253}, \sqrt[3]{0.253}, -0.12 \cdot x\right) + \mathsf{fma}\left(0.12, x, 0.253\right) \cdot \mathsf{fma}\left(-0.12, x, 0.12 \cdot x\right)}{0.253 - x \cdot 0.12}
double f(double x) {
        double r102115 = 1.0;
        double r102116 = x;
        double r102117 = 0.253;
        double r102118 = 0.12;
        double r102119 = r102116 * r102118;
        double r102120 = r102117 + r102119;
        double r102121 = r102116 * r102120;
        double r102122 = r102115 - r102121;
        return r102122;
}

double f(double x) {
        double r102123 = 1.0;
        double r102124 = x;
        double r102125 = 0.12;
        double r102126 = 0.253;
        double r102127 = fma(r102125, r102124, r102126);
        double r102128 = cbrt(r102126);
        double r102129 = r102128 * r102128;
        double r102130 = r102125 * r102124;
        double r102131 = -r102130;
        double r102132 = fma(r102129, r102128, r102131);
        double r102133 = r102127 * r102132;
        double r102134 = -r102125;
        double r102135 = fma(r102134, r102124, r102130);
        double r102136 = r102127 * r102135;
        double r102137 = r102133 + r102136;
        double r102138 = r102124 * r102125;
        double r102139 = r102126 - r102138;
        double r102140 = r102137 / r102139;
        double r102141 = r102124 * r102140;
        double r102142 = r102123 - r102141;
        return r102142;
}

Error

Bits error versus x

Derivation

  1. Initial program 0.1

    \[1 - x \cdot \left(0.253 + x \cdot 0.12\right)\]
  2. Using strategy rm
  3. Applied flip-+0.1

    \[\leadsto 1 - x \cdot \color{blue}{\frac{0.253 \cdot 0.253 - \left(x \cdot 0.12\right) \cdot \left(x \cdot 0.12\right)}{0.253 - x \cdot 0.12}}\]
  4. Simplified0.1

    \[\leadsto 1 - x \cdot \frac{\color{blue}{\mathsf{fma}\left(0.12, x, 0.253\right) \cdot \left(0.253 - x \cdot 0.12\right)}}{0.253 - x \cdot 0.12}\]
  5. Using strategy rm
  6. Applied add-cube-cbrt0.1

    \[\leadsto 1 - x \cdot \frac{\mathsf{fma}\left(0.12, x, 0.253\right) \cdot \left(\color{blue}{\left(\sqrt[3]{0.253} \cdot \sqrt[3]{0.253}\right) \cdot \sqrt[3]{0.253}} - x \cdot 0.12\right)}{0.253 - x \cdot 0.12}\]
  7. Applied prod-diff0.1

    \[\leadsto 1 - x \cdot \frac{\mathsf{fma}\left(0.12, x, 0.253\right) \cdot \color{blue}{\left(\mathsf{fma}\left(\sqrt[3]{0.253} \cdot \sqrt[3]{0.253}, \sqrt[3]{0.253}, -0.12 \cdot x\right) + \mathsf{fma}\left(-0.12, x, 0.12 \cdot x\right)\right)}}{0.253 - x \cdot 0.12}\]
  8. Applied distribute-lft-in0.1

    \[\leadsto 1 - x \cdot \frac{\color{blue}{\mathsf{fma}\left(0.12, x, 0.253\right) \cdot \mathsf{fma}\left(\sqrt[3]{0.253} \cdot \sqrt[3]{0.253}, \sqrt[3]{0.253}, -0.12 \cdot x\right) + \mathsf{fma}\left(0.12, x, 0.253\right) \cdot \mathsf{fma}\left(-0.12, x, 0.12 \cdot x\right)}}{0.253 - x \cdot 0.12}\]
  9. Final simplification0.1

    \[\leadsto 1 - x \cdot \frac{\mathsf{fma}\left(0.12, x, 0.253\right) \cdot \mathsf{fma}\left(\sqrt[3]{0.253} \cdot \sqrt[3]{0.253}, \sqrt[3]{0.253}, -0.12 \cdot x\right) + \mathsf{fma}\left(0.12, x, 0.253\right) \cdot \mathsf{fma}\left(-0.12, x, 0.12 \cdot x\right)}{0.253 - x \cdot 0.12}\]

Reproduce

herbie shell --seed 2020020 +o rules:numerics
(FPCore (x)
  :name "Numeric.SpecFunctions:invIncompleteGamma from math-functions-0.1.5.2, A"
  :precision binary64
  (- 1 (* x (+ 0.253 (* x 0.12)))))