Average Error: 1.2 → 0.7
Time: 4.4s
Precision: binary64
\[x + y \cdot \frac{z - t}{z - a}\]
\[\begin{array}{l} \mathbf{if}\;y \le -3.10370005860666554 \cdot 10^{-91} \lor \neg \left(y \le 6.5697408763529354 \cdot 10^{-75}\right):\\ \;\;\;\;x + y \cdot \frac{z - t}{z - a}\\ \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 -3.10370005860666554 \cdot 10^{-91} \lor \neg \left(y \le 6.5697408763529354 \cdot 10^{-75}\right):\\
\;\;\;\;x + y \cdot \frac{z - t}{z - a}\\

\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 ((double) (x + ((double) (y * ((double) (((double) (z - t)) / ((double) (z - a))))))));
}
double code(double x, double y, double z, double t, double a) {
	double VAR;
	if (((y <= -3.1037000586066655e-91) || !(y <= 6.569740876352935e-75))) {
		VAR = ((double) (x + ((double) (y * ((double) (((double) (z - t)) / ((double) (z - a))))))));
	} else {
		VAR = ((double) (x + ((double) (((double) (((double) (((double) cbrt(((double) (z - t)))) * ((double) cbrt(((double) (z - t)))))) * y)) * ((double) (((double) cbrt(((double) (z - t)))) / ((double) (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.2
Target1.1
Herbie0.7
\[x + \frac{y}{\frac{z - a}{z - t}}\]

Derivation

  1. Split input into 2 regimes
  2. if y < -3.10370005860666554e-91 or 6.5697408763529354e-75 < y

    1. Initial program 0.6

      \[x + y \cdot \frac{z - t}{z - a}\]

    if -3.10370005860666554e-91 < y < 6.5697408763529354e-75

    1. Initial program 2.0

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

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

      \[\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.2

      \[\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.8

      \[\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.8

      \[\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.7

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \le -3.10370005860666554 \cdot 10^{-91} \lor \neg \left(y \le 6.5697408763529354 \cdot 10^{-75}\right):\\ \;\;\;\;x + y \cdot \frac{z - t}{z - a}\\ \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 2020149 
(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)))))