Average Error: 7.5 → 7.5
Time: 18.5s
Precision: 64
\[\frac{x \cdot y - z \cdot t}{a}\]
\[\frac{x \cdot y - z \cdot t}{a}\]
\frac{x \cdot y - z \cdot t}{a}
\frac{x \cdot y - z \cdot t}{a}
double f(double x, double y, double z, double t, double a) {
        double r40280076 = x;
        double r40280077 = y;
        double r40280078 = r40280076 * r40280077;
        double r40280079 = z;
        double r40280080 = t;
        double r40280081 = r40280079 * r40280080;
        double r40280082 = r40280078 - r40280081;
        double r40280083 = a;
        double r40280084 = r40280082 / r40280083;
        return r40280084;
}

double f(double x, double y, double z, double t, double a) {
        double r40280085 = x;
        double r40280086 = y;
        double r40280087 = r40280085 * r40280086;
        double r40280088 = z;
        double r40280089 = t;
        double r40280090 = r40280088 * r40280089;
        double r40280091 = r40280087 - r40280090;
        double r40280092 = a;
        double r40280093 = r40280091 / r40280092;
        return r40280093;
}

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.5
Target6.0
Herbie7.5
\[\begin{array}{l} \mathbf{if}\;z \lt -2.468684968699548224247694913169778644284 \cdot 10^{170}:\\ \;\;\;\;\frac{y}{a} \cdot x - \frac{t}{a} \cdot z\\ \mathbf{elif}\;z \lt 6.309831121978371209578784129518242708809 \cdot 10^{-71}:\\ \;\;\;\;\frac{x \cdot y - z \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a} \cdot x - \frac{t}{a} \cdot z\\ \end{array}\]

Derivation

  1. Initial program 7.5

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

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

Reproduce

herbie shell --seed 2019172 
(FPCore (x y z t a)
  :name "Data.Colour.Matrix:inverse from colour-2.3.3, B"

  :herbie-target
  (if (< z -2.468684968699548e+170) (- (* (/ y a) x) (* (/ t a) z)) (if (< z 6.309831121978371e-71) (/ (- (* x y) (* z t)) a) (- (* (/ y a) x) (* (/ t a) z))))

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