Average Error: 10.1 → 1.3
Time: 4.2s
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 r458778 = x;
        double r458779 = y;
        double r458780 = z;
        double r458781 = t;
        double r458782 = r458780 - r458781;
        double r458783 = r458779 * r458782;
        double r458784 = a;
        double r458785 = r458784 - r458781;
        double r458786 = r458783 / r458785;
        double r458787 = r458778 + r458786;
        return r458787;
}

double f(double x, double y, double z, double t, double a) {
        double r458788 = x;
        double r458789 = y;
        double r458790 = z;
        double r458791 = t;
        double r458792 = r458790 - r458791;
        double r458793 = a;
        double r458794 = r458793 - r458791;
        double r458795 = r458792 / r458794;
        double r458796 = r458789 * r458795;
        double r458797 = r458788 + r458796;
        return r458797;
}

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

Derivation

  1. Initial program 10.1

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

    \[\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 2019362 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B"
  :precision binary64

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

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