Average Error: 1.3 → 0.6
Time: 5.2s
Precision: 64
\[x + y \cdot \frac{z - t}{z - a}\]
\[\begin{array}{l} \mathbf{if}\;y \le -9.0289615565925777 \cdot 10^{-57} \lor \neg \left(y \le 4.8077993396027011 \cdot 10^{-154}\right):\\ \;\;\;\;x + \frac{y}{\frac{z - a}{z - t}}\\ \mathbf{else}:\\ \;\;\;\;x + \left(\left(\sqrt[3]{z - t} \cdot \sqrt[3]{z - t}\right) \cdot y\right) \cdot \frac{\sqrt[3]{z - t}}{z - a}\\ \end{array}\]
x + y \cdot \frac{z - t}{z - a}
\begin{array}{l}
\mathbf{if}\;y \le -9.0289615565925777 \cdot 10^{-57} \lor \neg \left(y \le 4.8077993396027011 \cdot 10^{-154}\right):\\
\;\;\;\;x + \frac{y}{\frac{z - a}{z - t}}\\

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

\end{array}
double code(double x, double y, double z, double t, double a) {
	return (x + (y * ((z - t) / (z - a))));
}
double code(double x, double y, double z, double t, double a) {
	double VAR;
	if (((y <= -9.028961556592578e-57) || !(y <= 4.807799339602701e-154))) {
		VAR = (x + (y / ((z - a) / (z - t))));
	} else {
		VAR = (x + (((cbrt((z - t)) * cbrt((z - t))) * y) * (cbrt((z - t)) / (z - a))));
	}
	return VAR;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original1.3
Target1.2
Herbie0.6
\[x + \frac{y}{\frac{z - a}{z - t}}\]

Derivation

  1. Split input into 2 regimes
  2. if y < -9.028961556592578e-57 or 4.807799339602701e-154 < y

    1. Initial program 0.6

      \[x + y \cdot \frac{z - t}{z - a}\]
    2. Using strategy rm
    3. Applied clear-num0.7

      \[\leadsto x + y \cdot \color{blue}{\frac{1}{\frac{z - a}{z - t}}}\]
    4. Using strategy rm
    5. Applied un-div-inv0.6

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

    if -9.028961556592578e-57 < y < 4.807799339602701e-154

    1. Initial program 2.6

      \[x + y \cdot \frac{z - t}{z - a}\]
    2. Using strategy rm
    3. Applied *-un-lft-identity2.6

      \[\leadsto x + y \cdot \frac{z - t}{\color{blue}{1 \cdot \left(z - a\right)}}\]
    4. Applied add-cube-cbrt2.8

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

      \[\leadsto x + y \cdot \color{blue}{\left(\frac{\sqrt[3]{z - t} \cdot \sqrt[3]{z - t}}{1} \cdot \frac{\sqrt[3]{z - t}}{z - a}\right)}\]
    6. Applied associate-*r*0.6

      \[\leadsto x + \color{blue}{\left(y \cdot \frac{\sqrt[3]{z - t} \cdot \sqrt[3]{z - t}}{1}\right) \cdot \frac{\sqrt[3]{z - t}}{z - a}}\]
    7. Simplified0.6

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \le -9.0289615565925777 \cdot 10^{-57} \lor \neg \left(y \le 4.8077993396027011 \cdot 10^{-154}\right):\\ \;\;\;\;x + \frac{y}{\frac{z - a}{z - t}}\\ \mathbf{else}:\\ \;\;\;\;x + \left(\left(\sqrt[3]{z - t} \cdot \sqrt[3]{z - t}\right) \cdot y\right) \cdot \frac{\sqrt[3]{z - t}}{z - a}\\ \end{array}\]

Reproduce

herbie shell --seed 2020100 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, A"
  :precision binary64

  :herbie-target
  (+ x (/ y (/ (- z a) (- z t))))

  (+ x (* y (/ (- z t) (- z a)))))