Average Error: 10.7 → 10.7
Time: 14.0s
Precision: 64
\[x + \frac{y \cdot \left(z - t\right)}{z - a}\]
\[x + \frac{y \cdot \left(z - t\right)}{z - a}\]
x + \frac{y \cdot \left(z - t\right)}{z - a}
x + \frac{y \cdot \left(z - t\right)}{z - a}
double f(double x, double y, double z, double t, double a) {
        double r456314 = x;
        double r456315 = y;
        double r456316 = z;
        double r456317 = t;
        double r456318 = r456316 - r456317;
        double r456319 = r456315 * r456318;
        double r456320 = a;
        double r456321 = r456316 - r456320;
        double r456322 = r456319 / r456321;
        double r456323 = r456314 + r456322;
        return r456323;
}

double f(double x, double y, double z, double t, double a) {
        double r456324 = x;
        double r456325 = y;
        double r456326 = z;
        double r456327 = t;
        double r456328 = r456326 - r456327;
        double r456329 = r456325 * r456328;
        double r456330 = a;
        double r456331 = r456326 - r456330;
        double r456332 = r456329 / r456331;
        double r456333 = r456324 + r456332;
        return r456333;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original10.7
Target1.3
Herbie10.7
\[x + \frac{y}{\frac{z - a}{z - t}}\]

Derivation

  1. Split input into 2 regimes
  2. if (/ (* y (- z t)) (- z a)) < -4.663883987632394e+166 or 2.7311419804575177e+282 < (/ (* y (- z t)) (- z a))

    1. Initial program 49.3

      \[x + \frac{y \cdot \left(z - t\right)}{z - a}\]
    2. Using strategy rm
    3. Applied associate-/l*1.5

      \[\leadsto x + \color{blue}{\frac{y}{\frac{z - a}{z - t}}}\]

    if -4.663883987632394e+166 < (/ (* y (- z t)) (- z a)) < 2.7311419804575177e+282

    1. Initial program 0.3

      \[x + \frac{y \cdot \left(z - t\right)}{z - a}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification10.7

    \[\leadsto x + \frac{y \cdot \left(z - t\right)}{z - a}\]

Reproduce

herbie shell --seed 2019303 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A"
  :precision binary64

  :herbie-target
  (+ x (/ y (/ (- z a) (- z t))))

  (+ x (/ (* y (- z t)) (- z a))))