Average Error: 7.8 → 7.8
Time: 3.5s
Precision: 64
\[\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2}\]
\[\frac{x \cdot y - 9 \cdot \left(t \cdot z\right)}{a \cdot 2}\]
\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2}
\frac{x \cdot y - 9 \cdot \left(t \cdot z\right)}{a \cdot 2}
double f(double x, double y, double z, double t, double a) {
        double r951211 = x;
        double r951212 = y;
        double r951213 = r951211 * r951212;
        double r951214 = z;
        double r951215 = 9.0;
        double r951216 = r951214 * r951215;
        double r951217 = t;
        double r951218 = r951216 * r951217;
        double r951219 = r951213 - r951218;
        double r951220 = a;
        double r951221 = 2.0;
        double r951222 = r951220 * r951221;
        double r951223 = r951219 / r951222;
        return r951223;
}

double f(double x, double y, double z, double t, double a) {
        double r951224 = x;
        double r951225 = y;
        double r951226 = r951224 * r951225;
        double r951227 = 9.0;
        double r951228 = t;
        double r951229 = z;
        double r951230 = r951228 * r951229;
        double r951231 = r951227 * r951230;
        double r951232 = r951226 - r951231;
        double r951233 = a;
        double r951234 = 2.0;
        double r951235 = r951233 * r951234;
        double r951236 = r951232 / r951235;
        return r951236;
}

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

Original7.8
Target5.4
Herbie7.8
\[\begin{array}{l} \mathbf{if}\;a \lt -2.090464557976709043451944897028999329376 \cdot 10^{86}:\\ \;\;\;\;0.5 \cdot \frac{y \cdot x}{a} - 4.5 \cdot \frac{t}{\frac{a}{z}}\\ \mathbf{elif}\;a \lt 2.144030707833976090627817222818061808815 \cdot 10^{99}:\\ \;\;\;\;\frac{x \cdot y - z \cdot \left(9 \cdot t\right)}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a} \cdot \left(x \cdot 0.5\right) - \frac{t}{a} \cdot \left(z \cdot 4.5\right)\\ \end{array}\]

Derivation

  1. Initial program 7.8

    \[\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2}\]
  2. Taylor expanded around inf 7.8

    \[\leadsto \frac{\color{blue}{x \cdot y - 9 \cdot \left(t \cdot z\right)}}{a \cdot 2}\]
  3. Final simplification7.8

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

Reproduce

herbie shell --seed 2019353 
(FPCore (x y z t a)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, I"
  :precision binary64

  :herbie-target
  (if (< a -2.090464557976709e+86) (- (* 0.5 (/ (* y x) a)) (* 4.5 (/ t (/ a z)))) (if (< a 2.144030707833976e+99) (/ (- (* x y) (* z (* 9 t))) (* a 2)) (- (* (/ y a) (* x 0.5)) (* (/ t a) (* z 4.5)))))

  (/ (- (* x y) (* (* z 9) t)) (* a 2)))