Average Error: 17.0 → 5.0
Time: 17.5s
Precision: binary64
Cost: 8004
\[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
\[\begin{array}{l} t_1 := \left(x + y\right) + \frac{y \cdot \left(t - z\right)}{a - t}\\ t_2 := \frac{y}{t} \cdot \left(z - a\right)\\ \mathbf{if}\;t_1 \leq -1 \cdot 10^{-241}:\\ \;\;\;\;x + \mathsf{fma}\left(\frac{t - z}{a - t}, y, y\right)\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;x + \frac{y \cdot \left(z - a\right)}{t}\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{+307}:\\ \;\;\;\;\left(x + y\right) - \frac{1}{\frac{a - t}{y \cdot \left(z - t\right)}}\\ \mathbf{else}:\\ \;\;\;\;t_2 + \left(x + t_2 \cdot \frac{a}{t}\right)\\ \end{array} \]
(FPCore (x y z t a) :precision binary64 (- (+ x y) (/ (* (- z t) y) (- a t))))
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ (+ x y) (/ (* y (- t z)) (- a t)))) (t_2 (* (/ y t) (- z a))))
   (if (<= t_1 -1e-241)
     (+ x (fma (/ (- t z) (- a t)) y y))
     (if (<= t_1 0.0)
       (+ x (/ (* y (- z a)) t))
       (if (<= t_1 5e+307)
         (- (+ x y) (/ 1.0 (/ (- a t) (* y (- z t)))))
         (+ t_2 (+ x (* t_2 (/ a t)))))))))
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 t_1 = (x + y) + ((y * (t - z)) / (a - t));
	double t_2 = (y / t) * (z - a);
	double tmp;
	if (t_1 <= -1e-241) {
		tmp = x + fma(((t - z) / (a - t)), y, y);
	} else if (t_1 <= 0.0) {
		tmp = x + ((y * (z - a)) / t);
	} else if (t_1 <= 5e+307) {
		tmp = (x + y) - (1.0 / ((a - t) / (y * (z - t))));
	} else {
		tmp = t_2 + (x + (t_2 * (a / t)));
	}
	return tmp;
}
function code(x, y, z, t, a)
	return Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t)))
end
function code(x, y, z, t, a)
	t_1 = Float64(Float64(x + y) + Float64(Float64(y * Float64(t - z)) / Float64(a - t)))
	t_2 = Float64(Float64(y / t) * Float64(z - a))
	tmp = 0.0
	if (t_1 <= -1e-241)
		tmp = Float64(x + fma(Float64(Float64(t - z) / Float64(a - t)), y, y));
	elseif (t_1 <= 0.0)
		tmp = Float64(x + Float64(Float64(y * Float64(z - a)) / t));
	elseif (t_1 <= 5e+307)
		tmp = Float64(Float64(x + y) - Float64(1.0 / Float64(Float64(a - t) / Float64(y * Float64(z - t)))));
	else
		tmp = Float64(t_2 + Float64(x + Float64(t_2 * Float64(a / t))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x + y), $MachinePrecision] + N[(N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y / t), $MachinePrecision] * N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-241], N[(x + N[(N[(N[(t - z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * y + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(x + N[(N[(y * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+307], N[(N[(x + y), $MachinePrecision] - N[(1.0 / N[(N[(a - t), $MachinePrecision] / N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$2 + N[(x + N[(t$95$2 * N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}
\begin{array}{l}
t_1 := \left(x + y\right) + \frac{y \cdot \left(t - z\right)}{a - t}\\
t_2 := \frac{y}{t} \cdot \left(z - a\right)\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{-241}:\\
\;\;\;\;x + \mathsf{fma}\left(\frac{t - z}{a - t}, y, y\right)\\

\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;x + \frac{y \cdot \left(z - a\right)}{t}\\

\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+307}:\\
\;\;\;\;\left(x + y\right) - \frac{1}{\frac{a - t}{y \cdot \left(z - t\right)}}\\

\mathbf{else}:\\
\;\;\;\;t_2 + \left(x + t_2 \cdot \frac{a}{t}\right)\\


\end{array}

Error

Target

Original17.0
Target8.6
Herbie5.0
\[\begin{array}{l} \mathbf{if}\;\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} < -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} < 1.4754293444577233 \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 4 regimes
  2. if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -9.9999999999999997e-242

    1. Initial program 13.2

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Simplified5.8

      \[\leadsto \color{blue}{x + \mathsf{fma}\left(\frac{t - z}{a - t}, y, y\right)} \]
      Proof

      [Start]13.2

      \[ \left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]

      associate--l+ [=>]13.1

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

      sub-neg [=>]13.1

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

      +-commutative [=>]13.1

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

      neg-mul-1 [=>]13.1

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

      associate-*l/ [<=]5.8

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

      associate-*r* [=>]5.8

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

      fma-def [=>]5.8

      \[ x + \color{blue}{\mathsf{fma}\left(-1 \cdot \frac{z - t}{a - t}, y, y\right)} \]

      mul-1-neg [=>]5.8

      \[ x + \mathsf{fma}\left(\color{blue}{-\frac{z - t}{a - t}}, y, y\right) \]

      neg-sub0 [=>]5.8

      \[ x + \mathsf{fma}\left(\color{blue}{0 - \frac{z - t}{a - t}}, y, y\right) \]

      div-sub [=>]5.7

      \[ x + \mathsf{fma}\left(0 - \color{blue}{\left(\frac{z}{a - t} - \frac{t}{a - t}\right)}, y, y\right) \]

      associate--r- [=>]5.7

      \[ x + \mathsf{fma}\left(\color{blue}{\left(0 - \frac{z}{a - t}\right) + \frac{t}{a - t}}, y, y\right) \]

      neg-sub0 [<=]5.7

      \[ x + \mathsf{fma}\left(\color{blue}{\left(-\frac{z}{a - t}\right)} + \frac{t}{a - t}, y, y\right) \]

      +-commutative [=>]5.7

      \[ x + \mathsf{fma}\left(\color{blue}{\frac{t}{a - t} + \left(-\frac{z}{a - t}\right)}, y, y\right) \]

      sub-neg [<=]5.7

      \[ x + \mathsf{fma}\left(\color{blue}{\frac{t}{a - t} - \frac{z}{a - t}}, y, y\right) \]

      div-sub [<=]5.8

      \[ x + \mathsf{fma}\left(\color{blue}{\frac{t - z}{a - t}}, y, y\right) \]

    if -9.9999999999999997e-242 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 0.0

    1. Initial program 58.5

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Simplified34.6

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

      [Start]58.5

      \[ \left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]

      +-rgt-identity [<=]58.5

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

      associate-+l+ [=>]58.5

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

      associate-+r- [<=]34.7

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

      +-rgt-identity [=>]34.7

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

      *-commutative [=>]34.7

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

      associate-/l* [=>]34.6

      \[ x + \left(y - \color{blue}{\frac{y}{\frac{a - t}{z - t}}}\right) \]
    3. Taylor expanded in t around inf 2.2

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

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

      [Start]2.2

      \[ x + \frac{-1 \cdot \left(a \cdot y\right) - -1 \cdot \left(y \cdot z\right)}{t} \]

      *-commutative [<=]2.2

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

      distribute-lft-out-- [=>]2.2

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

      distribute-lft-out-- [=>]2.2

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

      associate-*r* [=>]2.2

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

      neg-mul-1 [<=]2.2

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

    if 0.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 5e307

    1. Initial program 1.2

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Applied egg-rr1.3

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

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

      [Start]1.3

      \[ \left(x + y\right) - {\left(\frac{a - t}{\left(z - t\right) \cdot y}\right)}^{-1} \]

      unpow-1 [=>]1.3

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

      *-commutative [=>]1.3

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

    if 5e307 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t)))

    1. Initial program 63.7

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Simplified20.9

      \[\leadsto \color{blue}{x + \mathsf{fma}\left(\frac{t - z}{a - t}, y, y\right)} \]
      Proof

      [Start]63.7

      \[ \left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]

      associate--l+ [=>]63.7

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

      sub-neg [=>]63.7

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

      +-commutative [=>]63.7

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

      neg-mul-1 [=>]63.7

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

      associate-*l/ [<=]20.9

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

      associate-*r* [=>]20.9

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

      fma-def [=>]20.9

      \[ x + \color{blue}{\mathsf{fma}\left(-1 \cdot \frac{z - t}{a - t}, y, y\right)} \]

      mul-1-neg [=>]20.9

      \[ x + \mathsf{fma}\left(\color{blue}{-\frac{z - t}{a - t}}, y, y\right) \]

      neg-sub0 [=>]20.9

      \[ x + \mathsf{fma}\left(\color{blue}{0 - \frac{z - t}{a - t}}, y, y\right) \]

      div-sub [=>]20.9

      \[ x + \mathsf{fma}\left(0 - \color{blue}{\left(\frac{z}{a - t} - \frac{t}{a - t}\right)}, y, y\right) \]

      associate--r- [=>]20.9

      \[ x + \mathsf{fma}\left(\color{blue}{\left(0 - \frac{z}{a - t}\right) + \frac{t}{a - t}}, y, y\right) \]

      neg-sub0 [<=]20.9

      \[ x + \mathsf{fma}\left(\color{blue}{\left(-\frac{z}{a - t}\right)} + \frac{t}{a - t}, y, y\right) \]

      +-commutative [=>]20.9

      \[ x + \mathsf{fma}\left(\color{blue}{\frac{t}{a - t} + \left(-\frac{z}{a - t}\right)}, y, y\right) \]

      sub-neg [<=]20.9

      \[ x + \mathsf{fma}\left(\color{blue}{\frac{t}{a - t} - \frac{z}{a - t}}, y, y\right) \]

      div-sub [<=]20.9

      \[ x + \mathsf{fma}\left(\color{blue}{\frac{t - z}{a - t}}, y, y\right) \]
    3. Taylor expanded in t around inf 58.7

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

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

      [Start]58.7

      \[ y + \left(\frac{y \cdot \left(z - a\right)}{t} + \left(-1 \cdot y + \left(\frac{a \cdot \left(y \cdot \left(z - a\right)\right)}{{t}^{2}} + x\right)\right)\right) \]

      associate-+r+ [=>]58.7

      \[ y + \color{blue}{\left(\left(\frac{y \cdot \left(z - a\right)}{t} + -1 \cdot y\right) + \left(\frac{a \cdot \left(y \cdot \left(z - a\right)\right)}{{t}^{2}} + x\right)\right)} \]

      associate-+r+ [=>]52.7

      \[ \color{blue}{\left(y + \left(\frac{y \cdot \left(z - a\right)}{t} + -1 \cdot y\right)\right) + \left(\frac{a \cdot \left(y \cdot \left(z - a\right)\right)}{{t}^{2}} + x\right)} \]

      +-commutative [=>]52.7

      \[ \color{blue}{\left(\left(\frac{y \cdot \left(z - a\right)}{t} + -1 \cdot y\right) + y\right)} + \left(\frac{a \cdot \left(y \cdot \left(z - a\right)\right)}{{t}^{2}} + x\right) \]

      associate-+l+ [=>]43.8

      \[ \color{blue}{\left(\frac{y \cdot \left(z - a\right)}{t} + \left(-1 \cdot y + y\right)\right)} + \left(\frac{a \cdot \left(y \cdot \left(z - a\right)\right)}{{t}^{2}} + x\right) \]

      associate-/l* [=>]45.3

      \[ \left(\color{blue}{\frac{y}{\frac{t}{z - a}}} + \left(-1 \cdot y + y\right)\right) + \left(\frac{a \cdot \left(y \cdot \left(z - a\right)\right)}{{t}^{2}} + x\right) \]

      associate-/r/ [=>]43.8

      \[ \left(\color{blue}{\frac{y}{t} \cdot \left(z - a\right)} + \left(-1 \cdot y + y\right)\right) + \left(\frac{a \cdot \left(y \cdot \left(z - a\right)\right)}{{t}^{2}} + x\right) \]

      distribute-lft1-in [=>]43.8

      \[ \left(\frac{y}{t} \cdot \left(z - a\right) + \color{blue}{\left(-1 + 1\right) \cdot y}\right) + \left(\frac{a \cdot \left(y \cdot \left(z - a\right)\right)}{{t}^{2}} + x\right) \]

      metadata-eval [=>]43.8

      \[ \left(\frac{y}{t} \cdot \left(z - a\right) + \color{blue}{0} \cdot y\right) + \left(\frac{a \cdot \left(y \cdot \left(z - a\right)\right)}{{t}^{2}} + x\right) \]

      mul0-lft [=>]43.8

      \[ \left(\frac{y}{t} \cdot \left(z - a\right) + \color{blue}{0}\right) + \left(\frac{a \cdot \left(y \cdot \left(z - a\right)\right)}{{t}^{2}} + x\right) \]

      *-commutative [=>]43.8

      \[ \left(\frac{y}{t} \cdot \left(z - a\right) + 0\right) + \left(\frac{\color{blue}{\left(y \cdot \left(z - a\right)\right) \cdot a}}{{t}^{2}} + x\right) \]

      unpow2 [=>]43.8

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

      times-frac [=>]40.6

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

      associate-/l* [=>]19.3

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

      associate-/r/ [=>]19.3

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(x + y\right) + \frac{y \cdot \left(t - z\right)}{a - t} \leq -1 \cdot 10^{-241}:\\ \;\;\;\;x + \mathsf{fma}\left(\frac{t - z}{a - t}, y, y\right)\\ \mathbf{elif}\;\left(x + y\right) + \frac{y \cdot \left(t - z\right)}{a - t} \leq 0:\\ \;\;\;\;x + \frac{y \cdot \left(z - a\right)}{t}\\ \mathbf{elif}\;\left(x + y\right) + \frac{y \cdot \left(t - z\right)}{a - t} \leq 5 \cdot 10^{+307}:\\ \;\;\;\;\left(x + y\right) - \frac{1}{\frac{a - t}{y \cdot \left(z - t\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{t} \cdot \left(z - a\right) + \left(x + \left(\frac{y}{t} \cdot \left(z - a\right)\right) \cdot \frac{a}{t}\right)\\ \end{array} \]

Alternatives

Alternative 1
Error4.9
Cost4044
\[\begin{array}{l} t_1 := \left(x + y\right) + \frac{y \cdot \left(t - z\right)}{a - t}\\ t_2 := \frac{y}{t} \cdot \left(z - a\right)\\ \mathbf{if}\;t_1 \leq -1 \cdot 10^{-241}:\\ \;\;\;\;x + \left(y - \frac{y}{\frac{a - t}{z - t}}\right)\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;x + \frac{y \cdot \left(z - a\right)}{t}\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{+307}:\\ \;\;\;\;\left(x + y\right) - \frac{1}{\frac{a - t}{y \cdot \left(z - t\right)}}\\ \mathbf{else}:\\ \;\;\;\;t_2 + \left(x + t_2 \cdot \frac{a}{t}\right)\\ \end{array} \]
Alternative 2
Error5.0
Cost3660
\[\begin{array}{l} t_1 := \left(x + y\right) + \frac{y \cdot \left(t - z\right)}{a - t}\\ \mathbf{if}\;t_1 \leq -1 \cdot 10^{-241}:\\ \;\;\;\;x + \left(y - \frac{y}{\frac{a - t}{z - t}}\right)\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;x + \frac{y \cdot \left(z - a\right)}{t}\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{+307}:\\ \;\;\;\;\left(x + y\right) - \frac{1}{\frac{a - t}{y \cdot \left(z - t\right)}}\\ \mathbf{else}:\\ \;\;\;\;x - \left(y \cdot \frac{a}{t} - z \cdot \frac{y}{t}\right)\\ \end{array} \]
Alternative 3
Error4.9
Cost3532
\[\begin{array}{l} t_1 := \left(x + y\right) + \frac{y \cdot \left(t - z\right)}{a - t}\\ \mathbf{if}\;t_1 \leq -1 \cdot 10^{-241}:\\ \;\;\;\;x + \left(y - \frac{y}{\frac{a - t}{z - t}}\right)\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;x + \frac{y \cdot \left(z - a\right)}{t}\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{+307}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{t} \cdot \left(z - a\right)\\ \end{array} \]
Alternative 4
Error5.0
Cost3532
\[\begin{array}{l} t_1 := \left(x + y\right) + \frac{y \cdot \left(t - z\right)}{a - t}\\ \mathbf{if}\;t_1 \leq -1 \cdot 10^{-241}:\\ \;\;\;\;x + \left(y - \frac{y}{\frac{a - t}{z - t}}\right)\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;x + \frac{y \cdot \left(z - a\right)}{t}\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{+307}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x - \left(y \cdot \frac{a}{t} - z \cdot \frac{y}{t}\right)\\ \end{array} \]
Alternative 5
Error7.1
Cost1097
\[\begin{array}{l} \mathbf{if}\;a \leq -1.1 \cdot 10^{-134} \lor \neg \left(a \leq 4.4 \cdot 10^{-81}\right):\\ \;\;\;\;x + \left(y - \frac{y}{\frac{a - t}{z - t}}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot \left(z - a\right)}{t}\\ \end{array} \]
Alternative 6
Error10.6
Cost968
\[\begin{array}{l} \mathbf{if}\;a \leq -7.8 \cdot 10^{+33}:\\ \;\;\;\;\left(x + y\right) - \frac{z}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{+49}:\\ \;\;\;\;x + \frac{y \cdot z}{t - a}\\ \mathbf{else}:\\ \;\;\;\;\left(x + y\right) + t \cdot \frac{y}{a - t}\\ \end{array} \]
Alternative 7
Error10.4
Cost968
\[\begin{array}{l} \mathbf{if}\;a \leq -1.4 \cdot 10^{+37}:\\ \;\;\;\;\left(x + y\right) - \frac{z}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq 1.22 \cdot 10^{-19}:\\ \;\;\;\;x + \frac{y \cdot z}{t - a}\\ \mathbf{else}:\\ \;\;\;\;x + \left(y - \frac{y}{\frac{t - a}{t}}\right)\\ \end{array} \]
Alternative 8
Error12.1
Cost841
\[\begin{array}{l} \mathbf{if}\;a \leq -2.7 \cdot 10^{+100} \lor \neg \left(a \leq 175000000000\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot z}{t - a}\\ \end{array} \]
Alternative 9
Error9.8
Cost841
\[\begin{array}{l} \mathbf{if}\;a \leq -5.8 \cdot 10^{+35} \lor \neg \left(a \leq 92000\right):\\ \;\;\;\;\left(x + y\right) - \frac{z}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot z}{t - a}\\ \end{array} \]
Alternative 10
Error10.9
Cost840
\[\begin{array}{l} \mathbf{if}\;a \leq -1.05 \cdot 10^{+98}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 1200000000000:\\ \;\;\;\;x + z \cdot \frac{y}{t - a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
Alternative 11
Error21.5
Cost720
\[\begin{array}{l} \mathbf{if}\;a \leq -9 \cdot 10^{+33}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -1.25 \cdot 10^{-210}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.65 \cdot 10^{-252}:\\ \;\;\;\;\frac{y}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 7.4 \cdot 10^{-171}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
Alternative 12
Error21.4
Cost720
\[\begin{array}{l} \mathbf{if}\;a \leq -4.6 \cdot 10^{+33}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -1.3 \cdot 10^{-210}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -2 \cdot 10^{-251}:\\ \;\;\;\;\frac{z}{\frac{t}{y}}\\ \mathbf{elif}\;a \leq 7 \cdot 10^{-170}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
Alternative 13
Error14.2
Cost712
\[\begin{array}{l} \mathbf{if}\;a \leq -4.6 \cdot 10^{+35}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{-33}:\\ \;\;\;\;x + z \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
Alternative 14
Error14.1
Cost712
\[\begin{array}{l} \mathbf{if}\;a \leq -2.4 \cdot 10^{+33}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{-32}:\\ \;\;\;\;x + \frac{z}{\frac{t}{y}}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
Alternative 15
Error15.1
Cost712
\[\begin{array}{l} \mathbf{if}\;a \leq -2.6 \cdot 10^{+33}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 4 \cdot 10^{-32}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
Alternative 16
Error20.4
Cost456
\[\begin{array}{l} \mathbf{if}\;t \leq -5.7 \cdot 10^{+184}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{+109}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 17
Error29.2
Cost64
\[x \]

Error

Reproduce

herbie shell --seed 2023016 
(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-7) (- (+ y x) (* (* (- z t) (/ 1.0 (- 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.0 (- a t))) y))))

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