Average Error: 11.4 → 1.1
Time: 2.9s
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} = -inf.0 \lor \neg \left(\frac{x \cdot \left(y - z\right)}{t - z} \le 6.44776167832283439 \cdot 10^{294}\right):\\ \;\;\;\;\frac{x}{\frac{t}{y - z} - \frac{z}{y - 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} = -inf.0 \lor \neg \left(\frac{x \cdot \left(y - z\right)}{t - z} \le 6.44776167832283439 \cdot 10^{294}\right):\\
\;\;\;\;\frac{x}{\frac{t}{y - z} - \frac{z}{y - z}}\\

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

\end{array}
double code(double x, double y, double z, double t) {
	return ((double) (((double) (x * ((double) (y - z)))) / ((double) (t - z))));
}
double code(double x, double y, double z, double t) {
	double VAR;
	if (((((double) (((double) (x * ((double) (y - z)))) / ((double) (t - z)))) <= -inf.0) || !(((double) (((double) (x * ((double) (y - z)))) / ((double) (t - z)))) <= 6.447761678322834e+294))) {
		VAR = ((double) (x / ((double) (((double) (t / ((double) (y - z)))) - ((double) (z / ((double) (y - z))))))));
	} else {
		VAR = ((double) (((double) (x * ((double) (y - z)))) / ((double) (t - z))));
	}
	return VAR;
}

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

Derivation

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

    1. Initial program 63.0

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

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

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

    if -inf.0 < (/ (* x (- y z)) (- t z)) < 6.447761678322834e+294

    1. Initial program 1.3

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x \cdot \left(y - z\right)}{t - z} = -inf.0 \lor \neg \left(\frac{x \cdot \left(y - z\right)}{t - z} \le 6.44776167832283439 \cdot 10^{294}\right):\\ \;\;\;\;\frac{x}{\frac{t}{y - z} - \frac{z}{y - z}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot \left(y - z\right)}{t - z}\\ \end{array}\]

Reproduce

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