Average Error: 7.0 → 7.0
Time: 9.1s
Precision: 64
\[\left(x \cdot y - z \cdot y\right) \cdot t\]
\[t \cdot \left(y \cdot \left(x - z\right)\right)\]
\left(x \cdot y - z \cdot y\right) \cdot t
t \cdot \left(y \cdot \left(x - z\right)\right)
double f(double x, double y, double z, double t) {
        double r452478 = x;
        double r452479 = y;
        double r452480 = r452478 * r452479;
        double r452481 = z;
        double r452482 = r452481 * r452479;
        double r452483 = r452480 - r452482;
        double r452484 = t;
        double r452485 = r452483 * r452484;
        return r452485;
}

double f(double x, double y, double z, double t) {
        double r452486 = t;
        double r452487 = y;
        double r452488 = x;
        double r452489 = z;
        double r452490 = r452488 - r452489;
        double r452491 = r452487 * r452490;
        double r452492 = r452486 * r452491;
        return r452492;
}

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.0
Target3.2
Herbie7.0
\[\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 y < -368485883737218.6 or 2.1087438558749025e-26 < y

    1. Initial program 14.7

      \[\left(x \cdot y - z \cdot y\right) \cdot t\]
    2. Simplified14.7

      \[\leadsto \color{blue}{t \cdot \left(y \cdot \left(x - z\right)\right)}\]
    3. Using strategy rm
    4. Applied associate-*r*3.8

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

    if -368485883737218.6 < y < 2.1087438558749025e-26

    1. Initial program 2.0

      \[\left(x \cdot y - z \cdot y\right) \cdot t\]
    2. Simplified2.0

      \[\leadsto \color{blue}{t \cdot \left(y \cdot \left(x - z\right)\right)}\]
    3. Using strategy rm
    4. Applied associate-*r*8.8

      \[\leadsto \color{blue}{\left(t \cdot y\right) \cdot \left(x - z\right)}\]
    5. Using strategy rm
    6. Applied associate-*l*2.0

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

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

Reproduce

herbie shell --seed 2019297 
(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))