Average Error: 11.2 → 1.9
Time: 9.4s
Precision: 64
\[\frac{x \cdot \left(y - z\right)}{t - z}\]
\[\begin{array}{l} \mathbf{if}\;z \le -2.83656963214038031 \cdot 10^{-98} \lor \neg \left(z \le 6.88888476702219794 \cdot 10^{-56}\right):\\ \;\;\;\;x \cdot \frac{y - z}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{t - z} \cdot \left(\left(y - z\right) \cdot \sqrt[3]{x}\right)\\ \end{array}\]
\frac{x \cdot \left(y - z\right)}{t - z}
\begin{array}{l}
\mathbf{if}\;z \le -2.83656963214038031 \cdot 10^{-98} \lor \neg \left(z \le 6.88888476702219794 \cdot 10^{-56}\right):\\
\;\;\;\;x \cdot \frac{y - z}{t - z}\\

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

\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 (((z <= -2.8365696321403803e-98) || !(z <= 6.888884767022198e-56))) {
		VAR = ((double) (x * ((double) (((double) (y - z)) / ((double) (t - z))))));
	} else {
		VAR = ((double) (((double) (((double) (((double) cbrt(x)) * ((double) cbrt(x)))) / ((double) (t - z)))) * ((double) (((double) (y - z)) * ((double) cbrt(x))))));
	}
	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.2
Target2.1
Herbie1.9
\[\frac{x}{\frac{t - z}{y - z}}\]

Derivation

  1. Split input into 2 regimes
  2. if z < -2.8365696321403803e-98 or 6.888884767022198e-56 < z

    1. Initial program 14.0

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

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

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

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

    if -2.8365696321403803e-98 < z < 6.888884767022198e-56

    1. Initial program 5.8

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \le -2.83656963214038031 \cdot 10^{-98} \lor \neg \left(z \le 6.88888476702219794 \cdot 10^{-56}\right):\\ \;\;\;\;x \cdot \frac{y - z}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{t - z} \cdot \left(\left(y - z\right) \cdot \sqrt[3]{x}\right)\\ \end{array}\]

Reproduce

herbie shell --seed 2020113 +o rules:numerics
(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)))