Average Error: 0.1 → 0.3
Time: 37.0s
Precision: 64
\[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\]
\[\mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, \mathsf{fma}\left(\sqrt[3]{a} \cdot \sqrt[3]{a}, \sqrt[3]{a}, \mathsf{fma}\left(x, \log y, z\right) + t\right)\right)\right)\]
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, \mathsf{fma}\left(\sqrt[3]{a} \cdot \sqrt[3]{a}, \sqrt[3]{a}, \mathsf{fma}\left(x, \log y, z\right) + t\right)\right)\right)
double f(double x, double y, double z, double t, double a, double b, double c, double i) {
        double r82497 = x;
        double r82498 = y;
        double r82499 = log(r82498);
        double r82500 = r82497 * r82499;
        double r82501 = z;
        double r82502 = r82500 + r82501;
        double r82503 = t;
        double r82504 = r82502 + r82503;
        double r82505 = a;
        double r82506 = r82504 + r82505;
        double r82507 = b;
        double r82508 = 0.5;
        double r82509 = r82507 - r82508;
        double r82510 = c;
        double r82511 = log(r82510);
        double r82512 = r82509 * r82511;
        double r82513 = r82506 + r82512;
        double r82514 = i;
        double r82515 = r82498 * r82514;
        double r82516 = r82513 + r82515;
        return r82516;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i) {
        double r82517 = y;
        double r82518 = i;
        double r82519 = c;
        double r82520 = log(r82519);
        double r82521 = b;
        double r82522 = 0.5;
        double r82523 = r82521 - r82522;
        double r82524 = a;
        double r82525 = cbrt(r82524);
        double r82526 = r82525 * r82525;
        double r82527 = x;
        double r82528 = log(r82517);
        double r82529 = z;
        double r82530 = fma(r82527, r82528, r82529);
        double r82531 = t;
        double r82532 = r82530 + r82531;
        double r82533 = fma(r82526, r82525, r82532);
        double r82534 = fma(r82520, r82523, r82533);
        double r82535 = fma(r82517, r82518, r82534);
        return r82535;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Bits error versus b

Bits error versus c

Bits error versus i

Derivation

  1. Initial program 0.1

    \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\]
  2. Simplified0.1

    \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, a + \left(\mathsf{fma}\left(x, \log y, z\right) + t\right)\right)\right)}\]
  3. Using strategy rm
  4. Applied add-cube-cbrt0.3

    \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, \color{blue}{\left(\sqrt[3]{a} \cdot \sqrt[3]{a}\right) \cdot \sqrt[3]{a}} + \left(\mathsf{fma}\left(x, \log y, z\right) + t\right)\right)\right)\]
  5. Applied fma-def0.3

    \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, \color{blue}{\mathsf{fma}\left(\sqrt[3]{a} \cdot \sqrt[3]{a}, \sqrt[3]{a}, \mathsf{fma}\left(x, \log y, z\right) + t\right)}\right)\right)\]
  6. Final simplification0.3

    \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, \mathsf{fma}\left(\sqrt[3]{a} \cdot \sqrt[3]{a}, \sqrt[3]{a}, \mathsf{fma}\left(x, \log y, z\right) + t\right)\right)\right)\]

Reproduce

herbie shell --seed 2019347 +o rules:numerics
(FPCore (x y z t a b c i)
  :name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, B"
  :precision binary64
  (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))