Average Error: 0.0 → 0.0
Time: 2.1s
Precision: binary64
\[x - \frac{2.30753 + x \cdot 0.27061}{1 + \left(0.99229 + x \cdot 0.04481\right) \cdot x} \]
\[x - \sqrt[3]{\mathsf{expm1}\left(\mathsf{log1p}\left({\left(\frac{\mathsf{fma}\left(x, 0.27061, 2.30753\right)}{\mathsf{fma}\left(x, \mathsf{fma}\left(x, 0.04481, 0.99229\right), 1\right)}\right)}^{3}\right)\right)} \]
x - \frac{2.30753 + x \cdot 0.27061}{1 + \left(0.99229 + x \cdot 0.04481\right) \cdot x}
x - \sqrt[3]{\mathsf{expm1}\left(\mathsf{log1p}\left({\left(\frac{\mathsf{fma}\left(x, 0.27061, 2.30753\right)}{\mathsf{fma}\left(x, \mathsf{fma}\left(x, 0.04481, 0.99229\right), 1\right)}\right)}^{3}\right)\right)}
(FPCore (x)
 :precision binary64
 (- x (/ (+ 2.30753 (* x 0.27061)) (+ 1.0 (* (+ 0.99229 (* x 0.04481)) x)))))
(FPCore (x)
 :precision binary64
 (-
  x
  (cbrt
   (expm1
    (log1p
     (pow
      (/ (fma x 0.27061 2.30753) (fma x (fma x 0.04481 0.99229) 1.0))
      3.0))))))
double code(double x) {
	return x - ((2.30753 + (x * 0.27061)) / (1.0 + ((0.99229 + (x * 0.04481)) * x)));
}
double code(double x) {
	return x - cbrt(expm1(log1p(pow((fma(x, 0.27061, 2.30753) / fma(x, fma(x, 0.04481, 0.99229), 1.0)), 3.0))));
}

Error

Bits error versus x

Derivation

  1. Initial program 0.0

    \[x - \frac{2.30753 + x \cdot 0.27061}{1 + \left(0.99229 + x \cdot 0.04481\right) \cdot x} \]
  2. Simplified0.0

    \[\leadsto \color{blue}{x - \frac{\mathsf{fma}\left(x, 0.27061, 2.30753\right)}{\mathsf{fma}\left(x, \mathsf{fma}\left(x, 0.04481, 0.99229\right), 1\right)}} \]
  3. Applied add-cbrt-cube_binary640.0

    \[\leadsto x - \frac{\mathsf{fma}\left(x, 0.27061, 2.30753\right)}{\color{blue}{\sqrt[3]{\left(\mathsf{fma}\left(x, \mathsf{fma}\left(x, 0.04481, 0.99229\right), 1\right) \cdot \mathsf{fma}\left(x, \mathsf{fma}\left(x, 0.04481, 0.99229\right), 1\right)\right) \cdot \mathsf{fma}\left(x, \mathsf{fma}\left(x, 0.04481, 0.99229\right), 1\right)}}} \]
  4. Applied add-cbrt-cube_binary6421.4

    \[\leadsto x - \frac{\color{blue}{\sqrt[3]{\left(\mathsf{fma}\left(x, 0.27061, 2.30753\right) \cdot \mathsf{fma}\left(x, 0.27061, 2.30753\right)\right) \cdot \mathsf{fma}\left(x, 0.27061, 2.30753\right)}}}{\sqrt[3]{\left(\mathsf{fma}\left(x, \mathsf{fma}\left(x, 0.04481, 0.99229\right), 1\right) \cdot \mathsf{fma}\left(x, \mathsf{fma}\left(x, 0.04481, 0.99229\right), 1\right)\right) \cdot \mathsf{fma}\left(x, \mathsf{fma}\left(x, 0.04481, 0.99229\right), 1\right)}} \]
  5. Applied cbrt-undiv_binary6421.4

    \[\leadsto x - \color{blue}{\sqrt[3]{\frac{\left(\mathsf{fma}\left(x, 0.27061, 2.30753\right) \cdot \mathsf{fma}\left(x, 0.27061, 2.30753\right)\right) \cdot \mathsf{fma}\left(x, 0.27061, 2.30753\right)}{\left(\mathsf{fma}\left(x, \mathsf{fma}\left(x, 0.04481, 0.99229\right), 1\right) \cdot \mathsf{fma}\left(x, \mathsf{fma}\left(x, 0.04481, 0.99229\right), 1\right)\right) \cdot \mathsf{fma}\left(x, \mathsf{fma}\left(x, 0.04481, 0.99229\right), 1\right)}}} \]
  6. Applied expm1-log1p-u_binary6421.4

    \[\leadsto x - \sqrt[3]{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\left(\mathsf{fma}\left(x, 0.27061, 2.30753\right) \cdot \mathsf{fma}\left(x, 0.27061, 2.30753\right)\right) \cdot \mathsf{fma}\left(x, 0.27061, 2.30753\right)}{\left(\mathsf{fma}\left(x, \mathsf{fma}\left(x, 0.04481, 0.99229\right), 1\right) \cdot \mathsf{fma}\left(x, \mathsf{fma}\left(x, 0.04481, 0.99229\right), 1\right)\right) \cdot \mathsf{fma}\left(x, \mathsf{fma}\left(x, 0.04481, 0.99229\right), 1\right)}\right)\right)}} \]
  7. Simplified0.0

    \[\leadsto x - \sqrt[3]{\mathsf{expm1}\left(\color{blue}{\mathsf{log1p}\left({\left(\frac{\mathsf{fma}\left(x, 0.27061, 2.30753\right)}{\mathsf{fma}\left(x, \mathsf{fma}\left(x, 0.04481, 0.99229\right), 1\right)}\right)}^{3}\right)}\right)} \]
  8. Final simplification0.0

    \[\leadsto x - \sqrt[3]{\mathsf{expm1}\left(\mathsf{log1p}\left({\left(\frac{\mathsf{fma}\left(x, 0.27061, 2.30753\right)}{\mathsf{fma}\left(x, \mathsf{fma}\left(x, 0.04481, 0.99229\right), 1\right)}\right)}^{3}\right)\right)} \]

Reproduce

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