Average Error: 11.5 → 2.2
Time: 10.3s
Precision: 64
\[\frac{x \cdot \left(y - z\right)}{t - z}\]
\[\begin{array}{l} \mathbf{if}\;z \le -6.5823688828081441 \cdot 10^{-185} \lor \neg \left(z \le 5.6298607401033476 \cdot 10^{-46}\right):\\ \;\;\;\;x \cdot \frac{y - z}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot \left(\sqrt[3]{y - z} \cdot \sqrt[3]{y - z}\right)}{\frac{t - z}{\sqrt[3]{y - z}}}\\ \end{array}\]
\frac{x \cdot \left(y - z\right)}{t - z}
\begin{array}{l}
\mathbf{if}\;z \le -6.5823688828081441 \cdot 10^{-185} \lor \neg \left(z \le 5.6298607401033476 \cdot 10^{-46}\right):\\
\;\;\;\;x \cdot \frac{y - z}{t - z}\\

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

\end{array}
double code(double x, double y, double z, double t) {
	return ((x * (y - z)) / (t - z));
}
double code(double x, double y, double z, double t) {
	double temp;
	if (((z <= -6.582368882808144e-185) || !(z <= 5.629860740103348e-46))) {
		temp = (x * ((y - z) / (t - z)));
	} else {
		temp = ((x * (cbrt((y - z)) * cbrt((y - z)))) / ((t - z) / cbrt((y - z))));
	}
	return temp;
}

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.5
Target2.4
Herbie2.2
\[\frac{x}{\frac{t - z}{y - z}}\]

Derivation

  1. Split input into 2 regimes
  2. if z < -6.582368882808144e-185 or 5.629860740103348e-46 < z

    1. Initial program 14.1

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

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

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

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

    if -6.582368882808144e-185 < z < 5.629860740103348e-46

    1. Initial program 5.3

      \[\frac{x \cdot \left(y - z\right)}{t - z}\]
    2. Using strategy rm
    3. Applied add-cube-cbrt6.2

      \[\leadsto \frac{x \cdot \color{blue}{\left(\left(\sqrt[3]{y - z} \cdot \sqrt[3]{y - z}\right) \cdot \sqrt[3]{y - z}\right)}}{t - z}\]
    4. Applied associate-*r*6.2

      \[\leadsto \frac{\color{blue}{\left(x \cdot \left(\sqrt[3]{y - z} \cdot \sqrt[3]{y - z}\right)\right) \cdot \sqrt[3]{y - z}}}{t - z}\]
    5. Applied associate-/l*5.2

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

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

Reproduce

herbie shell --seed 2020066 +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)))