Average Error: 11.6 → 1.0
Time: 3.3s
Precision: 64
\[\frac{x \cdot \left(y - z\right)}{t - z}\]
\[\begin{array}{l} \mathbf{if}\;\frac{x \cdot \left(y - z\right)}{t - z} \le -3.38115760978392342 \cdot 10^{253} \lor \neg \left(\frac{x \cdot \left(y - z\right)}{t - z} \le -3.3290513729027525 \cdot 10^{-272} \lor \neg \left(\frac{x \cdot \left(y - z\right)}{t - z} \le 3.7548645609617997 \cdot 10^{-176} \lor \neg \left(\frac{x \cdot \left(y - z\right)}{t - z} \le 1.5701424637407852 \cdot 10^{181}\right)\right)\right):\\ \;\;\;\;x \cdot \frac{y - z}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot \left(y - z\right)}{t - z}\\ \end{array}\]
\frac{x \cdot \left(y - z\right)}{t - z}
\begin{array}{l}
\mathbf{if}\;\frac{x \cdot \left(y - z\right)}{t - z} \le -3.38115760978392342 \cdot 10^{253} \lor \neg \left(\frac{x \cdot \left(y - z\right)}{t - z} \le -3.3290513729027525 \cdot 10^{-272} \lor \neg \left(\frac{x \cdot \left(y - z\right)}{t - z} \le 3.7548645609617997 \cdot 10^{-176} \lor \neg \left(\frac{x \cdot \left(y - z\right)}{t - z} \le 1.5701424637407852 \cdot 10^{181}\right)\right)\right):\\
\;\;\;\;x \cdot \frac{y - z}{t - z}\\

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

\end{array}
double f(double x, double y, double z, double t) {
        double r426294 = x;
        double r426295 = y;
        double r426296 = z;
        double r426297 = r426295 - r426296;
        double r426298 = r426294 * r426297;
        double r426299 = t;
        double r426300 = r426299 - r426296;
        double r426301 = r426298 / r426300;
        return r426301;
}

double f(double x, double y, double z, double t) {
        double r426302 = x;
        double r426303 = y;
        double r426304 = z;
        double r426305 = r426303 - r426304;
        double r426306 = r426302 * r426305;
        double r426307 = t;
        double r426308 = r426307 - r426304;
        double r426309 = r426306 / r426308;
        double r426310 = -3.3811576097839234e+253;
        bool r426311 = r426309 <= r426310;
        double r426312 = -3.3290513729027525e-272;
        bool r426313 = r426309 <= r426312;
        double r426314 = 3.7548645609618e-176;
        bool r426315 = r426309 <= r426314;
        double r426316 = 1.5701424637407852e+181;
        bool r426317 = r426309 <= r426316;
        double r426318 = !r426317;
        bool r426319 = r426315 || r426318;
        double r426320 = !r426319;
        bool r426321 = r426313 || r426320;
        double r426322 = !r426321;
        bool r426323 = r426311 || r426322;
        double r426324 = r426305 / r426308;
        double r426325 = r426302 * r426324;
        double r426326 = r426323 ? r426325 : r426309;
        return r426326;
}

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.6
Target2.1
Herbie1.0
\[\frac{x}{\frac{t - z}{y - z}}\]

Derivation

  1. Split input into 2 regimes
  2. if (/ (* x (- y z)) (- t z)) < -3.3811576097839234e+253 or -3.3290513729027525e-272 < (/ (* x (- y z)) (- t z)) < 3.7548645609618e-176 or 1.5701424637407852e+181 < (/ (* x (- y z)) (- t z))

    1. Initial program 27.0

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

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

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

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

    if -3.3811576097839234e+253 < (/ (* x (- y z)) (- t z)) < -3.3290513729027525e-272 or 3.7548645609618e-176 < (/ (* x (- y z)) (- t z)) < 1.5701424637407852e+181

    1. Initial program 0.3

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

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

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

      \[\leadsto \color{blue}{x} \cdot \frac{y - z}{t - z}\]
    6. Using strategy rm
    7. Applied associate-*r/0.3

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x \cdot \left(y - z\right)}{t - z} \le -3.38115760978392342 \cdot 10^{253} \lor \neg \left(\frac{x \cdot \left(y - z\right)}{t - z} \le -3.3290513729027525 \cdot 10^{-272} \lor \neg \left(\frac{x \cdot \left(y - z\right)}{t - z} \le 3.7548645609617997 \cdot 10^{-176} \lor \neg \left(\frac{x \cdot \left(y - z\right)}{t - z} \le 1.5701424637407852 \cdot 10^{181}\right)\right)\right):\\ \;\;\;\;x \cdot \frac{y - z}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot \left(y - z\right)}{t - z}\\ \end{array}\]

Reproduce

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