Average Error: 16.6 → 7.5
Time: 4.3s
Precision: 64
\[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\]
\[\begin{array}{l} \mathbf{if}\;a \le -9.8452756963430972 \cdot 10^{-282} \lor \neg \left(a \le 3.50539185129691427 \cdot 10^{-186}\right):\\ \;\;\;\;x + \left(y - \frac{\sqrt[3]{z - t} \cdot \sqrt[3]{z - t}}{\sqrt[3]{a - t}} \cdot \left(\frac{\sqrt[3]{z - t}}{\sqrt[3]{a - t}} \cdot \frac{y}{\sqrt[3]{a - t}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{z \cdot y}{t} + x\\ \end{array}\]
\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}
\begin{array}{l}
\mathbf{if}\;a \le -9.8452756963430972 \cdot 10^{-282} \lor \neg \left(a \le 3.50539185129691427 \cdot 10^{-186}\right):\\
\;\;\;\;x + \left(y - \frac{\sqrt[3]{z - t} \cdot \sqrt[3]{z - t}}{\sqrt[3]{a - t}} \cdot \left(\frac{\sqrt[3]{z - t}}{\sqrt[3]{a - t}} \cdot \frac{y}{\sqrt[3]{a - t}}\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{z \cdot y}{t} + x\\

\end{array}
double code(double x, double y, double z, double t, double a) {
	return ((x + y) - (((z - t) * y) / (a - t)));
}
double code(double x, double y, double z, double t, double a) {
	double VAR;
	if (((a <= -9.845275696343097e-282) || !(a <= 3.5053918512969143e-186))) {
		VAR = (x + (y - (((cbrt((z - t)) * cbrt((z - t))) / cbrt((a - t))) * ((cbrt((z - t)) / cbrt((a - t))) * (y / cbrt((a - t)))))));
	} else {
		VAR = (((z * y) / t) + x);
	}
	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

Original16.6
Target8.6
Herbie7.5
\[\begin{array}{l} \mathbf{if}\;\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \lt -1.3664970889390727 \cdot 10^{-7}:\\ \;\;\;\;\left(y + x\right) - \left(\left(z - t\right) \cdot \frac{1}{a - t}\right) \cdot y\\ \mathbf{elif}\;\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \lt 1.47542934445772333 \cdot 10^{-239}:\\ \;\;\;\;\frac{y \cdot \left(a - z\right) - x \cdot t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;\left(y + x\right) - \left(\left(z - t\right) \cdot \frac{1}{a - t}\right) \cdot y\\ \end{array}\]

Derivation

  1. Split input into 2 regimes
  2. if a < -9.845275696343097e-282 or 3.5053918512969143e-186 < a

    1. Initial program 16.2

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

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

      \[\leadsto \left(x + y\right) - \color{blue}{\frac{z - t}{1} \cdot \frac{y}{a - t}}\]
    5. Simplified11.5

      \[\leadsto \left(x + y\right) - \color{blue}{\left(z - t\right)} \cdot \frac{y}{a - t}\]
    6. Using strategy rm
    7. Applied associate--l+8.7

      \[\leadsto \color{blue}{x + \left(y - \left(z - t\right) \cdot \frac{y}{a - t}\right)}\]
    8. Using strategy rm
    9. Applied add-cube-cbrt11.0

      \[\leadsto x + \left(y - \left(z - t\right) \cdot \frac{y}{\color{blue}{\left(\sqrt[3]{a - t} \cdot \sqrt[3]{a - t}\right) \cdot \sqrt[3]{a - t}}}\right)\]
    10. Applied *-un-lft-identity11.0

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

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

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

      \[\leadsto x + \left(y - \color{blue}{\frac{z - t}{\sqrt[3]{a - t} \cdot \sqrt[3]{a - t}}} \cdot \frac{y}{\sqrt[3]{a - t}}\right)\]
    14. Using strategy rm
    15. Applied add-cube-cbrt7.8

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

      \[\leadsto x + \left(y - \color{blue}{\left(\frac{\sqrt[3]{z - t} \cdot \sqrt[3]{z - t}}{\sqrt[3]{a - t}} \cdot \frac{\sqrt[3]{z - t}}{\sqrt[3]{a - t}}\right)} \cdot \frac{y}{\sqrt[3]{a - t}}\right)\]
    17. Applied associate-*l*7.4

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

    if -9.845275696343097e-282 < a < 3.5053918512969143e-186

    1. Initial program 19.5

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\]
    2. Taylor expanded around inf 7.9

      \[\leadsto \color{blue}{\frac{z \cdot y}{t} + x}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification7.5

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

Reproduce

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

  :herbie-target
  (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) -1.3664970889390727e-07) (- (+ y x) (* (* (- z t) (/ 1 (- a t))) y)) (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) 1.4754293444577233e-239) (/ (- (* y (- a z)) (* x t)) (- a t)) (- (+ y x) (* (* (- z t) (/ 1 (- a t))) y))))

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