Average Error: 11.4 → 2.2
Time: 14.0s
Precision: 64
\[\frac{x \cdot \left(y - z\right)}{t - z}\]
\[\begin{array}{l} \mathbf{if}\;x \le -15118885371134948671347587713236746633220:\\ \;\;\;\;\frac{\frac{x}{t - z}}{\frac{1}{y - z}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{t}{y - z} - \frac{z}{y - z}}\\ \end{array}\]
\frac{x \cdot \left(y - z\right)}{t - z}
\begin{array}{l}
\mathbf{if}\;x \le -15118885371134948671347587713236746633220:\\
\;\;\;\;\frac{\frac{x}{t - z}}{\frac{1}{y - z}}\\

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

\end{array}
double f(double x, double y, double z, double t) {
        double r402484 = x;
        double r402485 = y;
        double r402486 = z;
        double r402487 = r402485 - r402486;
        double r402488 = r402484 * r402487;
        double r402489 = t;
        double r402490 = r402489 - r402486;
        double r402491 = r402488 / r402490;
        return r402491;
}

double f(double x, double y, double z, double t) {
        double r402492 = x;
        double r402493 = -1.5118885371134949e+40;
        bool r402494 = r402492 <= r402493;
        double r402495 = t;
        double r402496 = z;
        double r402497 = r402495 - r402496;
        double r402498 = r402492 / r402497;
        double r402499 = 1.0;
        double r402500 = y;
        double r402501 = r402500 - r402496;
        double r402502 = r402499 / r402501;
        double r402503 = r402498 / r402502;
        double r402504 = r402495 / r402501;
        double r402505 = r402496 / r402501;
        double r402506 = r402504 - r402505;
        double r402507 = r402492 / r402506;
        double r402508 = r402494 ? r402503 : r402507;
        return r402508;
}

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

Original11.4
Target2.2
Herbie2.2
\[\frac{x}{\frac{t - z}{y - z}}\]

Derivation

  1. Split input into 2 regimes
  2. if x < -1.5118885371134949e+40

    1. Initial program 25.8

      \[\frac{x \cdot \left(y - z\right)}{t - z}\]
    2. Using strategy rm
    3. Applied associate-/l*3.2

      \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}}\]
    4. Using strategy rm
    5. Applied div-inv3.4

      \[\leadsto \frac{x}{\color{blue}{\left(t - z\right) \cdot \frac{1}{y - z}}}\]
    6. Applied associate-/r*3.3

      \[\leadsto \color{blue}{\frac{\frac{x}{t - z}}{\frac{1}{y - z}}}\]

    if -1.5118885371134949e+40 < x

    1. Initial program 7.9

      \[\frac{x \cdot \left(y - z\right)}{t - z}\]
    2. Using strategy rm
    3. Applied associate-/l*2.0

      \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}}\]
    4. Using strategy rm
    5. Applied div-sub2.0

      \[\leadsto \frac{x}{\color{blue}{\frac{t}{y - z} - \frac{z}{y - z}}}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification2.2

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \le -15118885371134948671347587713236746633220:\\ \;\;\;\;\frac{\frac{x}{t - z}}{\frac{1}{y - z}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{t}{y - z} - \frac{z}{y - z}}\\ \end{array}\]

Reproduce

herbie shell --seed 2019325 
(FPCore (x y z t)
  :name "Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3"
  :precision binary64

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

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