Average Error: 0.1 → 0.1
Time: 2.3s
Precision: 64
\[1 - x \cdot \left(0.253 + x \cdot 0.12\right)\]
\[\left(\left({\left(\sqrt[3]{1}\right)}^{3} - x \cdot 0.253\right) - x \cdot \left(x \cdot 0.12\right)\right) + \mathsf{fma}\left(0.12, x, 0.253\right) \cdot \left(\left(-x\right) + x\right)\]
1 - x \cdot \left(0.253 + x \cdot 0.12\right)
\left(\left({\left(\sqrt[3]{1}\right)}^{3} - x \cdot 0.253\right) - x \cdot \left(x \cdot 0.12\right)\right) + \mathsf{fma}\left(0.12, x, 0.253\right) \cdot \left(\left(-x\right) + x\right)
double f(double x) {
        double r75786 = 1.0;
        double r75787 = x;
        double r75788 = 0.253;
        double r75789 = 0.12;
        double r75790 = r75787 * r75789;
        double r75791 = r75788 + r75790;
        double r75792 = r75787 * r75791;
        double r75793 = r75786 - r75792;
        return r75793;
}

double f(double x) {
        double r75794 = 1.0;
        double r75795 = cbrt(r75794);
        double r75796 = 3.0;
        double r75797 = pow(r75795, r75796);
        double r75798 = x;
        double r75799 = 0.253;
        double r75800 = r75798 * r75799;
        double r75801 = r75797 - r75800;
        double r75802 = 0.12;
        double r75803 = r75798 * r75802;
        double r75804 = r75798 * r75803;
        double r75805 = r75801 - r75804;
        double r75806 = fma(r75802, r75798, r75799);
        double r75807 = -r75798;
        double r75808 = r75807 + r75798;
        double r75809 = r75806 * r75808;
        double r75810 = r75805 + r75809;
        return r75810;
}

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 add-cube-cbrt0.1

    \[\leadsto \color{blue}{\left(\sqrt[3]{1} \cdot \sqrt[3]{1}\right) \cdot \sqrt[3]{1}} - x \cdot \left(0.253 + x \cdot 0.12\right)\]
  4. Applied prod-diff0.1

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

    \[\leadsto \color{blue}{\left(\left({\left(\sqrt[3]{1}\right)}^{3} - x \cdot 0.253\right) - x \cdot \left(x \cdot 0.12\right)\right)} + \mathsf{fma}\left(-\left(0.253 + x \cdot 0.12\right), x, \left(0.253 + x \cdot 0.12\right) \cdot x\right)\]
  6. Simplified0.1

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

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

Reproduce

herbie shell --seed 2020025 +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)))))