Average Error: 7.5 → 7.5
Time: 3.7s
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 r1016680 = x;
        double r1016681 = y;
        double r1016682 = r1016680 * r1016681;
        double r1016683 = z;
        double r1016684 = t;
        double r1016685 = r1016683 * r1016684;
        double r1016686 = r1016682 - r1016685;
        double r1016687 = a;
        double r1016688 = r1016686 / r1016687;
        return r1016688;
}

double f(double x, double y, double z, double t, double a) {
        double r1016689 = x;
        double r1016690 = y;
        double r1016691 = r1016689 * r1016690;
        double r1016692 = z;
        double r1016693 = t;
        double r1016694 = r1016692 * r1016693;
        double r1016695 = r1016691 - r1016694;
        double r1016696 = a;
        double r1016697 = r1016695 / r1016696;
        return r1016697;
}

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
Target5.9
Herbie7.5
\[\begin{array}{l} \mathbf{if}\;z \lt -2.46868496869954822 \cdot 10^{170}:\\ \;\;\;\;\frac{y}{a} \cdot x - \frac{t}{a} \cdot z\\ \mathbf{elif}\;z \lt 6.30983112197837121 \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 2020089 
(FPCore (x y z t a)
  :name "Data.Colour.Matrix:inverse from colour-2.3.3, B"
  :precision binary64

  :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))