Average Error: 0.1 → 0.1
Time: 25.6s
Precision: 64
\[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b\]
\[b \cdot \left(a - 0.5\right) + \left(x + \left(\left(\left(z - z \cdot \log \left(\sqrt{t}\right)\right) - z \cdot \log \left(\sqrt{t}\right)\right) + y\right)\right)\]
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
b \cdot \left(a - 0.5\right) + \left(x + \left(\left(\left(z - z \cdot \log \left(\sqrt{t}\right)\right) - z \cdot \log \left(\sqrt{t}\right)\right) + y\right)\right)
double f(double x, double y, double z, double t, double a, double b) {
        double r16194571 = x;
        double r16194572 = y;
        double r16194573 = r16194571 + r16194572;
        double r16194574 = z;
        double r16194575 = r16194573 + r16194574;
        double r16194576 = t;
        double r16194577 = log(r16194576);
        double r16194578 = r16194574 * r16194577;
        double r16194579 = r16194575 - r16194578;
        double r16194580 = a;
        double r16194581 = 0.5;
        double r16194582 = r16194580 - r16194581;
        double r16194583 = b;
        double r16194584 = r16194582 * r16194583;
        double r16194585 = r16194579 + r16194584;
        return r16194585;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r16194586 = b;
        double r16194587 = a;
        double r16194588 = 0.5;
        double r16194589 = r16194587 - r16194588;
        double r16194590 = r16194586 * r16194589;
        double r16194591 = x;
        double r16194592 = z;
        double r16194593 = t;
        double r16194594 = sqrt(r16194593);
        double r16194595 = log(r16194594);
        double r16194596 = r16194592 * r16194595;
        double r16194597 = r16194592 - r16194596;
        double r16194598 = r16194597 - r16194596;
        double r16194599 = y;
        double r16194600 = r16194598 + r16194599;
        double r16194601 = r16194591 + r16194600;
        double r16194602 = r16194590 + r16194601;
        return r16194602;
}

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. Taylor expanded around inf 0.1

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

    \[\leadsto \color{blue}{\left(x + \left(\left(z - z \cdot \log t\right) + y\right)\right)} + \left(a - 0.5\right) \cdot b\]
  4. Using strategy rm
  5. Applied add-sqr-sqrt0.1

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

    \[\leadsto \left(x + \left(\left(z - z \cdot \color{blue}{\left(\log \left(\sqrt{t}\right) + \log \left(\sqrt{t}\right)\right)}\right) + y\right)\right) + \left(a - 0.5\right) \cdot b\]
  7. Applied distribute-rgt-in0.1

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

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

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

Reproduce

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

  :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)))