Average Error: 0.1 → 0.1
Time: 5.0s
Precision: 64
\[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b\]
\[\left(x + y\right) + \left(\left(1 - \log t\right) \cdot z + \left(a - 0.5\right) \cdot b\right)\]
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\left(x + y\right) + \left(\left(1 - \log t\right) \cdot z + \left(a - 0.5\right) \cdot b\right)
double f(double x, double y, double z, double t, double a, double b) {
        double r477646 = x;
        double r477647 = y;
        double r477648 = r477646 + r477647;
        double r477649 = z;
        double r477650 = r477648 + r477649;
        double r477651 = t;
        double r477652 = log(r477651);
        double r477653 = r477649 * r477652;
        double r477654 = r477650 - r477653;
        double r477655 = a;
        double r477656 = 0.5;
        double r477657 = r477655 - r477656;
        double r477658 = b;
        double r477659 = r477657 * r477658;
        double r477660 = r477654 + r477659;
        return r477660;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r477661 = x;
        double r477662 = y;
        double r477663 = r477661 + r477662;
        double r477664 = 1.0;
        double r477665 = t;
        double r477666 = log(r477665);
        double r477667 = r477664 - r477666;
        double r477668 = z;
        double r477669 = r477667 * r477668;
        double r477670 = a;
        double r477671 = 0.5;
        double r477672 = r477670 - r477671;
        double r477673 = b;
        double r477674 = r477672 * r477673;
        double r477675 = r477669 + r477674;
        double r477676 = r477663 + r477675;
        return r477676;
}

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

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.1
Target0.3
Herbie0.1
\[\left(\left(x + y\right) + \frac{\left(1 - {\left(\log t\right)}^{2}\right) \cdot z}{1 + \log t}\right) + \left(a - 0.5\right) \cdot b\]

Derivation

  1. Initial program 0.1

    \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b\]
  2. Using strategy rm
  3. Applied associate--l+0.1

    \[\leadsto \color{blue}{\left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right)} + \left(a - 0.5\right) \cdot b\]
  4. Applied associate-+l+0.1

    \[\leadsto \color{blue}{\left(x + y\right) + \left(\left(z - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b\right)}\]
  5. Taylor expanded around 0 0.1

    \[\leadsto \left(x + y\right) + \left(\color{blue}{z \cdot \left(1 - \log t\right)} + \left(a - 0.5\right) \cdot b\right)\]
  6. Simplified0.1

    \[\leadsto \left(x + y\right) + \left(\color{blue}{\left(1 - \log t\right) \cdot z} + \left(a - 0.5\right) \cdot b\right)\]
  7. Final simplification0.1

    \[\leadsto \left(x + y\right) + \left(\left(1 - \log t\right) \cdot z + \left(a - 0.5\right) \cdot b\right)\]

Reproduce

herbie shell --seed 2020057 
(FPCore (x y z t a b)
  :name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, A"
  :precision binary64

  :herbie-target
  (+ (+ (+ x y) (/ (* (- 1 (pow (log t) 2)) z) (+ 1 (log t)))) (* (- a 0.5) b))

  (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))