Average Error: 7.2 → 7.2
Time: 6.0s
Precision: 64
\[\left(x \cdot y - z \cdot y\right) \cdot t\]
\[y \cdot \left(\left(x - z\right) \cdot t\right)\]
\left(x \cdot y - z \cdot y\right) \cdot t
y \cdot \left(\left(x - z\right) \cdot t\right)
double f(double x, double y, double z, double t) {
        double r378566 = x;
        double r378567 = y;
        double r378568 = r378566 * r378567;
        double r378569 = z;
        double r378570 = r378569 * r378567;
        double r378571 = r378568 - r378570;
        double r378572 = t;
        double r378573 = r378571 * r378572;
        return r378573;
}

double f(double x, double y, double z, double t) {
        double r378574 = y;
        double r378575 = x;
        double r378576 = z;
        double r378577 = r378575 - r378576;
        double r378578 = t;
        double r378579 = r378577 * r378578;
        double r378580 = r378574 * r378579;
        return r378580;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original7.2
Target3.0
Herbie7.2
\[\begin{array}{l} \mathbf{if}\;t \lt -9.231879582886776938073886590448747944753 \cdot 10^{-80}:\\ \;\;\;\;\left(y \cdot t\right) \cdot \left(x - z\right)\\ \mathbf{elif}\;t \lt 2.543067051564877116200336808272775217995 \cdot 10^{83}:\\ \;\;\;\;y \cdot \left(t \cdot \left(x - z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot \left(x - z\right)\right) \cdot t\\ \end{array}\]

Derivation

  1. Split input into 2 regimes
  2. if (- (* x y) (* z y)) < -5.34400978543849e+238 or -3.0325630152132626e-207 < (- (* x y) (* z y)) < 3.7352386529616e-316 or 1.1466478937381798e+156 < (- (* x y) (* z y))

    1. Initial program 23.1

      \[\left(x \cdot y - z \cdot y\right) \cdot t\]
    2. Using strategy rm
    3. Applied distribute-rgt-out--23.1

      \[\leadsto \color{blue}{\left(y \cdot \left(x - z\right)\right)} \cdot t\]
    4. Applied associate-*l*1.4

      \[\leadsto \color{blue}{y \cdot \left(\left(x - z\right) \cdot t\right)}\]

    if -5.34400978543849e+238 < (- (* x y) (* z y)) < -3.0325630152132626e-207 or 3.7352386529616e-316 < (- (* x y) (* z y)) < 1.1466478937381798e+156

    1. Initial program 0.3

      \[\left(x \cdot y - z \cdot y\right) \cdot t\]
  3. Recombined 2 regimes into one program.
  4. Final simplification7.2

    \[\leadsto y \cdot \left(\left(x - z\right) \cdot t\right)\]

Reproduce

herbie shell --seed 1978988140 
(FPCore (x y z t)
  :name "Linear.Projection:inverseInfinitePerspective from linear-1.19.1.3"
  :precision binary64

  :herbie-target
  (if (< t -9.2318795828867769e-80) (* (* y t) (- x z)) (if (< t 2.5430670515648771e83) (* y (* t (- x z))) (* (* y (- x z)) t)))

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