Average Error: 0.0 → 0.0
Time: 3.2s
Precision: 64
\[\left(x \cdot \left(y - 1\right) - y \cdot 0.5\right) + 0.918938533204673003\]
\[\left(\mathsf{fma}\left(x, y, -\mathsf{fma}\left(1, x, 0.5 \cdot y\right)\right) + {\left(\sqrt[3]{0.918938533204673003}\right)}^{3}\right) + \mathsf{fma}\left(-\sqrt[3]{\mathsf{fma}\left(x, 1, y \cdot 0.5\right)}, \sqrt[3]{\mathsf{fma}\left(x, 1, y \cdot 0.5\right)} \cdot \sqrt[3]{\mathsf{fma}\left(x, 1, y \cdot 0.5\right)}, \sqrt[3]{\mathsf{fma}\left(x, 1, y \cdot 0.5\right)} \cdot \left(\sqrt[3]{\mathsf{fma}\left(x, 1, y \cdot 0.5\right)} \cdot \sqrt[3]{\mathsf{fma}\left(x, 1, y \cdot 0.5\right)}\right)\right)\]
\left(x \cdot \left(y - 1\right) - y \cdot 0.5\right) + 0.918938533204673003
\left(\mathsf{fma}\left(x, y, -\mathsf{fma}\left(1, x, 0.5 \cdot y\right)\right) + {\left(\sqrt[3]{0.918938533204673003}\right)}^{3}\right) + \mathsf{fma}\left(-\sqrt[3]{\mathsf{fma}\left(x, 1, y \cdot 0.5\right)}, \sqrt[3]{\mathsf{fma}\left(x, 1, y \cdot 0.5\right)} \cdot \sqrt[3]{\mathsf{fma}\left(x, 1, y \cdot 0.5\right)}, \sqrt[3]{\mathsf{fma}\left(x, 1, y \cdot 0.5\right)} \cdot \left(\sqrt[3]{\mathsf{fma}\left(x, 1, y \cdot 0.5\right)} \cdot \sqrt[3]{\mathsf{fma}\left(x, 1, y \cdot 0.5\right)}\right)\right)
double f(double x, double y) {
        double r44202 = x;
        double r44203 = y;
        double r44204 = 1.0;
        double r44205 = r44203 - r44204;
        double r44206 = r44202 * r44205;
        double r44207 = 0.5;
        double r44208 = r44203 * r44207;
        double r44209 = r44206 - r44208;
        double r44210 = 0.918938533204673;
        double r44211 = r44209 + r44210;
        return r44211;
}

double f(double x, double y) {
        double r44212 = x;
        double r44213 = y;
        double r44214 = 1.0;
        double r44215 = 0.5;
        double r44216 = r44215 * r44213;
        double r44217 = fma(r44214, r44212, r44216);
        double r44218 = -r44217;
        double r44219 = fma(r44212, r44213, r44218);
        double r44220 = 0.918938533204673;
        double r44221 = cbrt(r44220);
        double r44222 = 3.0;
        double r44223 = pow(r44221, r44222);
        double r44224 = r44219 + r44223;
        double r44225 = r44213 * r44215;
        double r44226 = fma(r44212, r44214, r44225);
        double r44227 = cbrt(r44226);
        double r44228 = -r44227;
        double r44229 = r44227 * r44227;
        double r44230 = r44227 * r44229;
        double r44231 = fma(r44228, r44229, r44230);
        double r44232 = r44224 + r44231;
        return r44232;
}

Error

Bits error versus x

Bits error versus y

Derivation

  1. Initial program 0.0

    \[\left(x \cdot \left(y - 1\right) - y \cdot 0.5\right) + 0.918938533204673003\]
  2. Simplified0.0

    \[\leadsto \color{blue}{\mathsf{fma}\left(y, x, 0.918938533204673003\right) - \mathsf{fma}\left(x, 1, y \cdot 0.5\right)}\]
  3. Using strategy rm
  4. Applied fma-udef0.0

    \[\leadsto \color{blue}{\left(y \cdot x + 0.918938533204673003\right)} - \mathsf{fma}\left(x, 1, y \cdot 0.5\right)\]
  5. Applied associate--l+0.0

    \[\leadsto \color{blue}{y \cdot x + \left(0.918938533204673003 - \mathsf{fma}\left(x, 1, y \cdot 0.5\right)\right)}\]
  6. Using strategy rm
  7. Applied add-cube-cbrt0.8

    \[\leadsto y \cdot x + \left(0.918938533204673003 - \color{blue}{\left(\sqrt[3]{\mathsf{fma}\left(x, 1, y \cdot 0.5\right)} \cdot \sqrt[3]{\mathsf{fma}\left(x, 1, y \cdot 0.5\right)}\right) \cdot \sqrt[3]{\mathsf{fma}\left(x, 1, y \cdot 0.5\right)}}\right)\]
  8. Applied add-cube-cbrt0.8

    \[\leadsto y \cdot x + \left(\color{blue}{\left(\sqrt[3]{0.918938533204673003} \cdot \sqrt[3]{0.918938533204673003}\right) \cdot \sqrt[3]{0.918938533204673003}} - \left(\sqrt[3]{\mathsf{fma}\left(x, 1, y \cdot 0.5\right)} \cdot \sqrt[3]{\mathsf{fma}\left(x, 1, y \cdot 0.5\right)}\right) \cdot \sqrt[3]{\mathsf{fma}\left(x, 1, y \cdot 0.5\right)}\right)\]
  9. Applied prod-diff0.8

    \[\leadsto y \cdot x + \color{blue}{\left(\mathsf{fma}\left(\sqrt[3]{0.918938533204673003} \cdot \sqrt[3]{0.918938533204673003}, \sqrt[3]{0.918938533204673003}, -\sqrt[3]{\mathsf{fma}\left(x, 1, y \cdot 0.5\right)} \cdot \left(\sqrt[3]{\mathsf{fma}\left(x, 1, y \cdot 0.5\right)} \cdot \sqrt[3]{\mathsf{fma}\left(x, 1, y \cdot 0.5\right)}\right)\right) + \mathsf{fma}\left(-\sqrt[3]{\mathsf{fma}\left(x, 1, y \cdot 0.5\right)}, \sqrt[3]{\mathsf{fma}\left(x, 1, y \cdot 0.5\right)} \cdot \sqrt[3]{\mathsf{fma}\left(x, 1, y \cdot 0.5\right)}, \sqrt[3]{\mathsf{fma}\left(x, 1, y \cdot 0.5\right)} \cdot \left(\sqrt[3]{\mathsf{fma}\left(x, 1, y \cdot 0.5\right)} \cdot \sqrt[3]{\mathsf{fma}\left(x, 1, y \cdot 0.5\right)}\right)\right)\right)}\]
  10. Applied associate-+r+0.8

    \[\leadsto \color{blue}{\left(y \cdot x + \mathsf{fma}\left(\sqrt[3]{0.918938533204673003} \cdot \sqrt[3]{0.918938533204673003}, \sqrt[3]{0.918938533204673003}, -\sqrt[3]{\mathsf{fma}\left(x, 1, y \cdot 0.5\right)} \cdot \left(\sqrt[3]{\mathsf{fma}\left(x, 1, y \cdot 0.5\right)} \cdot \sqrt[3]{\mathsf{fma}\left(x, 1, y \cdot 0.5\right)}\right)\right)\right) + \mathsf{fma}\left(-\sqrt[3]{\mathsf{fma}\left(x, 1, y \cdot 0.5\right)}, \sqrt[3]{\mathsf{fma}\left(x, 1, y \cdot 0.5\right)} \cdot \sqrt[3]{\mathsf{fma}\left(x, 1, y \cdot 0.5\right)}, \sqrt[3]{\mathsf{fma}\left(x, 1, y \cdot 0.5\right)} \cdot \left(\sqrt[3]{\mathsf{fma}\left(x, 1, y \cdot 0.5\right)} \cdot \sqrt[3]{\mathsf{fma}\left(x, 1, y \cdot 0.5\right)}\right)\right)}\]
  11. Simplified0.0

    \[\leadsto \color{blue}{\left(\mathsf{fma}\left(x, y, -\mathsf{fma}\left(1, x, 0.5 \cdot y\right)\right) + {\left(\sqrt[3]{0.918938533204673003}\right)}^{3}\right)} + \mathsf{fma}\left(-\sqrt[3]{\mathsf{fma}\left(x, 1, y \cdot 0.5\right)}, \sqrt[3]{\mathsf{fma}\left(x, 1, y \cdot 0.5\right)} \cdot \sqrt[3]{\mathsf{fma}\left(x, 1, y \cdot 0.5\right)}, \sqrt[3]{\mathsf{fma}\left(x, 1, y \cdot 0.5\right)} \cdot \left(\sqrt[3]{\mathsf{fma}\left(x, 1, y \cdot 0.5\right)} \cdot \sqrt[3]{\mathsf{fma}\left(x, 1, y \cdot 0.5\right)}\right)\right)\]
  12. Final simplification0.0

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

Reproduce

herbie shell --seed 2020018 +o rules:numerics
(FPCore (x y)
  :name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, A"
  :precision binary64
  (+ (- (* x (- y 1)) (* y 0.5)) 0.918938533204673))