Average Error: 10.9 → 1.3
Time: 42.7s
Precision: 64
\[x + \frac{y \cdot \left(z - t\right)}{a - t}\]
\[x + y \cdot \frac{z - t}{a - t}\]
x + \frac{y \cdot \left(z - t\right)}{a - t}
x + y \cdot \frac{z - t}{a - t}
double f(double x, double y, double z, double t, double a) {
        double r26995074 = x;
        double r26995075 = y;
        double r26995076 = z;
        double r26995077 = t;
        double r26995078 = r26995076 - r26995077;
        double r26995079 = r26995075 * r26995078;
        double r26995080 = a;
        double r26995081 = r26995080 - r26995077;
        double r26995082 = r26995079 / r26995081;
        double r26995083 = r26995074 + r26995082;
        return r26995083;
}

double f(double x, double y, double z, double t, double a) {
        double r26995084 = x;
        double r26995085 = y;
        double r26995086 = z;
        double r26995087 = t;
        double r26995088 = r26995086 - r26995087;
        double r26995089 = a;
        double r26995090 = r26995089 - r26995087;
        double r26995091 = r26995088 / r26995090;
        double r26995092 = r26995085 * r26995091;
        double r26995093 = r26995084 + r26995092;
        return r26995093;
}

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.9
Target1.2
Herbie1.3
\[x + \frac{y}{\frac{a - t}{z - t}}\]

Derivation

  1. Initial program 10.9

    \[x + \frac{y \cdot \left(z - t\right)}{a - t}\]
  2. Using strategy rm
  3. Applied *-un-lft-identity10.9

    \[\leadsto x + \frac{y \cdot \left(z - t\right)}{\color{blue}{1 \cdot \left(a - t\right)}}\]
  4. Applied times-frac1.3

    \[\leadsto x + \color{blue}{\frac{y}{1} \cdot \frac{z - t}{a - t}}\]
  5. Simplified1.3

    \[\leadsto x + \color{blue}{y} \cdot \frac{z - t}{a - t}\]
  6. Final simplification1.3

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

Reproduce

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

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

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