Average Error: 0.0 → 0.0
Time: 15.7s
Precision: 64
\[x - \frac{2.30753 + x \cdot 0.27061000000000002}{1 + \left(0.992290000000000005 + x \cdot 0.044810000000000003\right) \cdot x}\]
\[x - \mathsf{fma}\left(x, 0.27061000000000002, 2.30753\right) \cdot \frac{1}{\mathsf{fma}\left(\mathsf{fma}\left(0.044810000000000003, x, 0.992290000000000005\right), x, 1\right)}\]
x - \frac{2.30753 + x \cdot 0.27061000000000002}{1 + \left(0.992290000000000005 + x \cdot 0.044810000000000003\right) \cdot x}
x - \mathsf{fma}\left(x, 0.27061000000000002, 2.30753\right) \cdot \frac{1}{\mathsf{fma}\left(\mathsf{fma}\left(0.044810000000000003, x, 0.992290000000000005\right), x, 1\right)}
double f(double x) {
        double r96818 = x;
        double r96819 = 2.30753;
        double r96820 = 0.27061;
        double r96821 = r96818 * r96820;
        double r96822 = r96819 + r96821;
        double r96823 = 1.0;
        double r96824 = 0.99229;
        double r96825 = 0.04481;
        double r96826 = r96818 * r96825;
        double r96827 = r96824 + r96826;
        double r96828 = r96827 * r96818;
        double r96829 = r96823 + r96828;
        double r96830 = r96822 / r96829;
        double r96831 = r96818 - r96830;
        return r96831;
}

double f(double x) {
        double r96832 = x;
        double r96833 = 0.27061;
        double r96834 = 2.30753;
        double r96835 = fma(r96832, r96833, r96834);
        double r96836 = 1.0;
        double r96837 = 0.04481;
        double r96838 = 0.99229;
        double r96839 = fma(r96837, r96832, r96838);
        double r96840 = 1.0;
        double r96841 = fma(r96839, r96832, r96840);
        double r96842 = r96836 / r96841;
        double r96843 = r96835 * r96842;
        double r96844 = r96832 - r96843;
        return r96844;
}

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}{x - \frac{\mathsf{fma}\left(x, 0.27061000000000002, 2.30753\right)}{\mathsf{fma}\left(\mathsf{fma}\left(0.044810000000000003, x, 0.992290000000000005\right), x, 1\right)}}\]
  3. Using strategy rm
  4. Applied div-inv0.0

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

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

Reproduce

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