Average Error: 1.2 → 1.2
Time: 13.0s
Precision: 64
\[x + y \cdot \frac{z - t}{z - a}\]
\[x + y \cdot \frac{z - t}{z - a}\]
x + y \cdot \frac{z - t}{z - a}
x + y \cdot \frac{z - t}{z - a}
double f(double x, double y, double z, double t, double a) {
        double r721838 = x;
        double r721839 = y;
        double r721840 = z;
        double r721841 = t;
        double r721842 = r721840 - r721841;
        double r721843 = a;
        double r721844 = r721840 - r721843;
        double r721845 = r721842 / r721844;
        double r721846 = r721839 * r721845;
        double r721847 = r721838 + r721846;
        return r721847;
}

double f(double x, double y, double z, double t, double a) {
        double r721848 = x;
        double r721849 = y;
        double r721850 = z;
        double r721851 = t;
        double r721852 = r721850 - r721851;
        double r721853 = a;
        double r721854 = r721850 - r721853;
        double r721855 = r721852 / r721854;
        double r721856 = r721849 * r721855;
        double r721857 = r721848 + r721856;
        return r721857;
}

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

Derivation

  1. Initial program 1.2

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

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

Reproduce

herbie shell --seed 2020046 +o rules:numerics
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, A"
  :precision binary64

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

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