Average Error: 1.5 → 1.5
Time: 24.7s
Precision: 64
\[x + y \cdot \frac{z - t}{a - t}\]
\[x + y \cdot \frac{z - t}{a - t}\]
x + y \cdot \frac{z - t}{a - t}
x + y \cdot \frac{z - t}{a - t}
double f(double x, double y, double z, double t, double a) {
        double r28573095 = x;
        double r28573096 = y;
        double r28573097 = z;
        double r28573098 = t;
        double r28573099 = r28573097 - r28573098;
        double r28573100 = a;
        double r28573101 = r28573100 - r28573098;
        double r28573102 = r28573099 / r28573101;
        double r28573103 = r28573096 * r28573102;
        double r28573104 = r28573095 + r28573103;
        return r28573104;
}

double f(double x, double y, double z, double t, double a) {
        double r28573105 = x;
        double r28573106 = y;
        double r28573107 = z;
        double r28573108 = t;
        double r28573109 = r28573107 - r28573108;
        double r28573110 = a;
        double r28573111 = r28573110 - r28573108;
        double r28573112 = r28573109 / r28573111;
        double r28573113 = r28573106 * r28573112;
        double r28573114 = r28573105 + r28573113;
        return r28573114;
}

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

Original1.5
Target0.5
Herbie1.5
\[\begin{array}{l} \mathbf{if}\;y \lt -8.508084860551241069024247453646278348229 \cdot 10^{-17}:\\ \;\;\;\;x + y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;y \lt 2.894426862792089097262541964056085749132 \cdot 10^{-49}:\\ \;\;\;\;x + \left(y \cdot \left(z - t\right)\right) \cdot \frac{1}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z - t}{a - t}\\ \end{array}\]

Derivation

  1. Initial program 1.5

    \[x + y \cdot \frac{z - t}{a - t}\]
  2. Final simplification1.5

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

Reproduce

herbie shell --seed 2019172 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, B"

  :herbie-target
  (if (< y -8.508084860551241e-17) (+ x (* y (/ (- z t) (- a t)))) (if (< y 2.894426862792089e-49) (+ x (* (* y (- z t)) (/ 1.0 (- a t)))) (+ x (* y (/ (- z t) (- a t))))))

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