Average Error: 11.4 → 2.0
Time: 12.2s
Precision: 64
\[\frac{x \cdot \left(y - z\right)}{t - z}\]
\[\begin{array}{l} \mathbf{if}\;z \le -8.765285027918579164658313815316181334823 \cdot 10^{-128}:\\ \;\;\;\;x \cdot \frac{y - z}{t - z}\\ \mathbf{elif}\;z \le 1.347010727602843952474086817504475123871 \cdot 10^{-230}:\\ \;\;\;\;\frac{-1}{-\left(t - z\right)} \cdot \left(x \cdot \left(y - z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{-\left(t - z\right)}{-\left(y - z\right)}}\\ \end{array}\]
\frac{x \cdot \left(y - z\right)}{t - z}
\begin{array}{l}
\mathbf{if}\;z \le -8.765285027918579164658313815316181334823 \cdot 10^{-128}:\\
\;\;\;\;x \cdot \frac{y - z}{t - z}\\

\mathbf{elif}\;z \le 1.347010727602843952474086817504475123871 \cdot 10^{-230}:\\
\;\;\;\;\frac{-1}{-\left(t - z\right)} \cdot \left(x \cdot \left(y - z\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{-\left(t - z\right)}{-\left(y - z\right)}}\\

\end{array}
double f(double x, double y, double z, double t) {
        double r527296 = x;
        double r527297 = y;
        double r527298 = z;
        double r527299 = r527297 - r527298;
        double r527300 = r527296 * r527299;
        double r527301 = t;
        double r527302 = r527301 - r527298;
        double r527303 = r527300 / r527302;
        return r527303;
}

double f(double x, double y, double z, double t) {
        double r527304 = z;
        double r527305 = -8.765285027918579e-128;
        bool r527306 = r527304 <= r527305;
        double r527307 = x;
        double r527308 = y;
        double r527309 = r527308 - r527304;
        double r527310 = t;
        double r527311 = r527310 - r527304;
        double r527312 = r527309 / r527311;
        double r527313 = r527307 * r527312;
        double r527314 = 1.347010727602844e-230;
        bool r527315 = r527304 <= r527314;
        double r527316 = -1.0;
        double r527317 = -r527311;
        double r527318 = r527316 / r527317;
        double r527319 = r527307 * r527309;
        double r527320 = r527318 * r527319;
        double r527321 = -r527309;
        double r527322 = r527317 / r527321;
        double r527323 = r527307 / r527322;
        double r527324 = r527315 ? r527320 : r527323;
        double r527325 = r527306 ? r527313 : r527324;
        return r527325;
}

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
Target1.9
Herbie2.0
\[\frac{x}{\frac{t - z}{y - z}}\]

Derivation

  1. Split input into 3 regimes
  2. if z < -8.765285027918579e-128

    1. Initial program 13.1

      \[\frac{x \cdot \left(y - z\right)}{t - z}\]
    2. Using strategy rm
    3. Applied *-un-lft-identity13.1

      \[\leadsto \frac{x \cdot \left(y - z\right)}{\color{blue}{1 \cdot \left(t - z\right)}}\]
    4. Applied times-frac0.8

      \[\leadsto \color{blue}{\frac{x}{1} \cdot \frac{y - z}{t - z}}\]
    5. Simplified0.8

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

    if -8.765285027918579e-128 < z < 1.347010727602844e-230

    1. Initial program 5.4

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

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

      \[\leadsto \frac{x}{\color{blue}{\frac{-\left(t - z\right)}{-\left(y - z\right)}}}\]
    6. Using strategy rm
    7. Applied div-inv5.2

      \[\leadsto \frac{x}{\color{blue}{\left(-\left(t - z\right)\right) \cdot \frac{1}{-\left(y - z\right)}}}\]
    8. Applied *-un-lft-identity5.2

      \[\leadsto \frac{\color{blue}{1 \cdot x}}{\left(-\left(t - z\right)\right) \cdot \frac{1}{-\left(y - z\right)}}\]
    9. Applied times-frac5.6

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

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

    if 1.347010727602844e-230 < z

    1. Initial program 12.5

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \le -8.765285027918579164658313815316181334823 \cdot 10^{-128}:\\ \;\;\;\;x \cdot \frac{y - z}{t - z}\\ \mathbf{elif}\;z \le 1.347010727602843952474086817504475123871 \cdot 10^{-230}:\\ \;\;\;\;\frac{-1}{-\left(t - z\right)} \cdot \left(x \cdot \left(y - z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{-\left(t - z\right)}{-\left(y - z\right)}}\\ \end{array}\]

Reproduce

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