Average Error: 2.3 → 1.5
Time: 6.4s
Precision: 64
\[\frac{x - y}{z - y} \cdot t\]
\[\begin{array}{l} \mathbf{if}\;\frac{x - y}{z - y} \cdot t = -\infty:\\ \;\;\;\;1 \cdot \left(\left(x - y\right) \cdot \frac{t}{z - y}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x - y}{z - y} \cdot t\\ \end{array}\]
\frac{x - y}{z - y} \cdot t
\begin{array}{l}
\mathbf{if}\;\frac{x - y}{z - y} \cdot t = -\infty:\\
\;\;\;\;1 \cdot \left(\left(x - y\right) \cdot \frac{t}{z - y}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{x - y}{z - y} \cdot t\\

\end{array}
double f(double x, double y, double z, double t) {
        double r449375 = x;
        double r449376 = y;
        double r449377 = r449375 - r449376;
        double r449378 = z;
        double r449379 = r449378 - r449376;
        double r449380 = r449377 / r449379;
        double r449381 = t;
        double r449382 = r449380 * r449381;
        return r449382;
}

double f(double x, double y, double z, double t) {
        double r449383 = x;
        double r449384 = y;
        double r449385 = r449383 - r449384;
        double r449386 = z;
        double r449387 = r449386 - r449384;
        double r449388 = r449385 / r449387;
        double r449389 = t;
        double r449390 = r449388 * r449389;
        double r449391 = -inf.0;
        bool r449392 = r449390 <= r449391;
        double r449393 = 1.0;
        double r449394 = r449389 / r449387;
        double r449395 = r449385 * r449394;
        double r449396 = r449393 * r449395;
        double r449397 = r449392 ? r449396 : r449390;
        return r449397;
}

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

Original2.3
Target2.2
Herbie1.5
\[\frac{t}{\frac{z - y}{x - y}}\]

Derivation

  1. Split input into 2 regimes
  2. if (* (/ (- x y) (- z y)) t) < -inf.0

    1. Initial program 64.0

      \[\frac{x - y}{z - y} \cdot t\]
    2. Using strategy rm
    3. Applied *-un-lft-identity64.0

      \[\leadsto \frac{x - y}{\color{blue}{1 \cdot \left(z - y\right)}} \cdot t\]
    4. Applied add-cube-cbrt64.0

      \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{x - y} \cdot \sqrt[3]{x - y}\right) \cdot \sqrt[3]{x - y}}}{1 \cdot \left(z - y\right)} \cdot t\]
    5. Applied times-frac64.0

      \[\leadsto \color{blue}{\left(\frac{\sqrt[3]{x - y} \cdot \sqrt[3]{x - y}}{1} \cdot \frac{\sqrt[3]{x - y}}{z - y}\right)} \cdot t\]
    6. Applied associate-*l*4.0

      \[\leadsto \color{blue}{\frac{\sqrt[3]{x - y} \cdot \sqrt[3]{x - y}}{1} \cdot \left(\frac{\sqrt[3]{x - y}}{z - y} \cdot t\right)}\]
    7. Using strategy rm
    8. Applied *-un-lft-identity4.0

      \[\leadsto \color{blue}{\left(1 \cdot \frac{\sqrt[3]{x - y} \cdot \sqrt[3]{x - y}}{1}\right)} \cdot \left(\frac{\sqrt[3]{x - y}}{z - y} \cdot t\right)\]
    9. Applied associate-*l*4.0

      \[\leadsto \color{blue}{1 \cdot \left(\frac{\sqrt[3]{x - y} \cdot \sqrt[3]{x - y}}{1} \cdot \left(\frac{\sqrt[3]{x - y}}{z - y} \cdot t\right)\right)}\]
    10. Simplified0.2

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

    if -inf.0 < (* (/ (- x y) (- z y)) t)

    1. Initial program 1.5

      \[\frac{x - y}{z - y} \cdot t\]
  3. Recombined 2 regimes into one program.
  4. Final simplification1.5

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x - y}{z - y} \cdot t = -\infty:\\ \;\;\;\;1 \cdot \left(\left(x - y\right) \cdot \frac{t}{z - y}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x - y}{z - y} \cdot t\\ \end{array}\]

Reproduce

herbie shell --seed 2019356 
(FPCore (x y z t)
  :name "Numeric.Signal.Multichannel:$cput from hsignal-0.2.7.1"
  :precision binary64

  :herbie-target
  (/ t (/ (- z y) (- x y)))

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