Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B

Percentage Accurate: 78.0% → 90.8%
Time: 12.1s
Alternatives: 15
Speedup: 0.6×

Specification

?
\[\begin{array}{l} \\ \left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \end{array} \]
(FPCore (x y z t a) :precision binary64 (- (+ x y) (/ (* (- z t) y) (- a t))))
double code(double x, double y, double z, double t, double a) {
	return (x + y) - (((z - t) * y) / (a - t));
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = (x + y) - (((z - t) * y) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
	return (x + y) - (((z - t) * y) / (a - t));
}
def code(x, y, z, t, a):
	return (x + y) - (((z - t) * y) / (a - t))
function code(x, y, z, t, a)
	return Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t)))
end
function tmp = code(x, y, z, t, a)
	tmp = (x + y) - (((z - t) * y) / (a - t));
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]
\begin{array}{l}

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 15 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 78.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \end{array} \]
(FPCore (x y z t a) :precision binary64 (- (+ x y) (/ (* (- z t) y) (- a t))))
double code(double x, double y, double z, double t, double a) {
	return (x + y) - (((z - t) * y) / (a - t));
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = (x + y) - (((z - t) * y) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
	return (x + y) - (((z - t) * y) / (a - t));
}
def code(x, y, z, t, a):
	return (x + y) - (((z - t) * y) / (a - t))
function code(x, y, z, t, a)
	return Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t)))
end
function tmp = code(x, y, z, t, a)
	tmp = (x + y) - (((z - t) * y) / (a - t));
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]
\begin{array}{l}

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

Alternative 1: 90.8% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.9 \cdot 10^{+95} \lor \neg \left(t \leq 1.9 \cdot 10^{+77}\right):\\ \;\;\;\;\left(x - a \cdot \frac{y}{t}\right) + y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(z - t, \frac{-1}{\frac{a - t}{y}}, x + y\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= t -1.9e+95) (not (<= t 1.9e+77)))
   (+ (- x (* a (/ y t))) (* y (/ z t)))
   (fma (- z t) (/ -1.0 (/ (- a t) y)) (+ x y))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -1.9e+95) || !(t <= 1.9e+77)) {
		tmp = (x - (a * (y / t))) + (y * (z / t));
	} else {
		tmp = fma((z - t), (-1.0 / ((a - t) / y)), (x + y));
	}
	return tmp;
}
function code(x, y, z, t, a)
	tmp = 0.0
	if ((t <= -1.9e+95) || !(t <= 1.9e+77))
		tmp = Float64(Float64(x - Float64(a * Float64(y / t))) + Float64(y * Float64(z / t)));
	else
		tmp = fma(Float64(z - t), Float64(-1.0 / Float64(Float64(a - t) / y)), Float64(x + y));
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.9e+95], N[Not[LessEqual[t, 1.9e+77]], $MachinePrecision]], N[(N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z - t), $MachinePrecision] * N[(-1.0 / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.9 \cdot 10^{+95} \lor \neg \left(t \leq 1.9 \cdot 10^{+77}\right):\\
\;\;\;\;\left(x - a \cdot \frac{y}{t}\right) + y \cdot \frac{z}{t}\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z - t, \frac{-1}{\frac{a - t}{y}}, x + y\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.9e95 or 1.9000000000000001e77 < t

    1. Initial program 56.7%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative56.7%

        \[\leadsto \color{blue}{\left(y + x\right)} - \frac{\left(z - t\right) \cdot y}{a - t} \]
      2. associate--l+56.7%

        \[\leadsto \color{blue}{y + \left(x - \frac{\left(z - t\right) \cdot y}{a - t}\right)} \]
      3. *-commutative56.7%

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

      \[\leadsto \color{blue}{y + \left(x - \frac{y \cdot \left(z - t\right)}{a - t}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 86.3%

      \[\leadsto \color{blue}{\left(x + -1 \cdot \frac{a \cdot y}{t}\right) - -1 \cdot \frac{y \cdot z}{t}} \]
    6. Step-by-step derivation
      1. sub-neg86.3%

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

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

        \[\leadsto \color{blue}{\left(x - \frac{a \cdot y}{t}\right)} + \left(--1 \cdot \frac{y \cdot z}{t}\right) \]
      4. associate-/l*87.4%

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

        \[\leadsto \left(x - a \cdot \frac{y}{t}\right) + \left(-\color{blue}{\left(-\frac{y \cdot z}{t}\right)}\right) \]
      6. remove-double-neg87.4%

        \[\leadsto \left(x - a \cdot \frac{y}{t}\right) + \color{blue}{\frac{y \cdot z}{t}} \]
      7. associate-/l*93.6%

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

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

    if -1.9e95 < t < 1.9000000000000001e77

    1. Initial program 87.7%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg87.7%

        \[\leadsto \color{blue}{\left(x + y\right) + \left(-\frac{\left(z - t\right) \cdot y}{a - t}\right)} \]
      2. +-commutative87.7%

        \[\leadsto \color{blue}{\left(-\frac{\left(z - t\right) \cdot y}{a - t}\right) + \left(x + y\right)} \]
      3. distribute-frac-neg87.7%

        \[\leadsto \color{blue}{\frac{-\left(z - t\right) \cdot y}{a - t}} + \left(x + y\right) \]
      4. distribute-rgt-neg-out87.7%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(-y\right)}}{a - t} + \left(x + y\right) \]
      5. associate-/l*94.1%

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{-y}{a - t}} + \left(x + y\right) \]
      6. fma-define94.2%

        \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{-y}{a - t}, x + y\right)} \]
      7. distribute-frac-neg94.2%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{-\frac{y}{a - t}}, x + y\right) \]
      8. distribute-neg-frac294.2%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{y}{-\left(a - t\right)}}, x + y\right) \]
      9. sub-neg94.2%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in94.2%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}, x + y\right) \]
      11. remove-double-neg94.2%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\left(-a\right) + \color{blue}{t}}, x + y\right) \]
      12. +-commutative94.2%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t + \left(-a\right)}}, x + y\right) \]
      13. sub-neg94.2%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t - a}}, x + y\right) \]
    3. Simplified94.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y}{t - a}, x + y\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num94.2%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{1}{\frac{t - a}{y}}}, x + y\right) \]
      2. inv-pow94.2%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{{\left(\frac{t - a}{y}\right)}^{-1}}, x + y\right) \]
    6. Applied egg-rr94.2%

      \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{{\left(\frac{t - a}{y}\right)}^{-1}}, x + y\right) \]
    7. Step-by-step derivation
      1. unpow-194.2%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{1}{\frac{t - a}{y}}}, x + y\right) \]
    8. Simplified94.2%

      \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{1}{\frac{t - a}{y}}}, x + y\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification93.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.9 \cdot 10^{+95} \lor \neg \left(t \leq 1.9 \cdot 10^{+77}\right):\\ \;\;\;\;\left(x - a \cdot \frac{y}{t}\right) + y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(z - t, \frac{-1}{\frac{a - t}{y}}, x + y\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 90.9% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -6.2 \cdot 10^{+94} \lor \neg \left(t \leq 1.7 \cdot 10^{+82}\right):\\ \;\;\;\;\left(x - a \cdot \frac{y}{t}\right) + y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(z - t, \frac{y}{t - a}, x + y\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= t -6.2e+94) (not (<= t 1.7e+82)))
   (+ (- x (* a (/ y t))) (* y (/ z t)))
   (fma (- z t) (/ y (- t a)) (+ x y))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -6.2e+94) || !(t <= 1.7e+82)) {
		tmp = (x - (a * (y / t))) + (y * (z / t));
	} else {
		tmp = fma((z - t), (y / (t - a)), (x + y));
	}
	return tmp;
}
function code(x, y, z, t, a)
	tmp = 0.0
	if ((t <= -6.2e+94) || !(t <= 1.7e+82))
		tmp = Float64(Float64(x - Float64(a * Float64(y / t))) + Float64(y * Float64(z / t)));
	else
		tmp = fma(Float64(z - t), Float64(y / Float64(t - a)), Float64(x + y));
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -6.2e+94], N[Not[LessEqual[t, 1.7e+82]], $MachinePrecision]], N[(N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z - t), $MachinePrecision] * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.2 \cdot 10^{+94} \lor \neg \left(t \leq 1.7 \cdot 10^{+82}\right):\\
\;\;\;\;\left(x - a \cdot \frac{y}{t}\right) + y \cdot \frac{z}{t}\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z - t, \frac{y}{t - a}, x + y\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.19999999999999983e94 or 1.69999999999999997e82 < t

    1. Initial program 56.7%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative56.7%

        \[\leadsto \color{blue}{\left(y + x\right)} - \frac{\left(z - t\right) \cdot y}{a - t} \]
      2. associate--l+56.7%

        \[\leadsto \color{blue}{y + \left(x - \frac{\left(z - t\right) \cdot y}{a - t}\right)} \]
      3. *-commutative56.7%

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

      \[\leadsto \color{blue}{y + \left(x - \frac{y \cdot \left(z - t\right)}{a - t}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 86.3%

      \[\leadsto \color{blue}{\left(x + -1 \cdot \frac{a \cdot y}{t}\right) - -1 \cdot \frac{y \cdot z}{t}} \]
    6. Step-by-step derivation
      1. sub-neg86.3%

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

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

        \[\leadsto \color{blue}{\left(x - \frac{a \cdot y}{t}\right)} + \left(--1 \cdot \frac{y \cdot z}{t}\right) \]
      4. associate-/l*87.4%

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

        \[\leadsto \left(x - a \cdot \frac{y}{t}\right) + \left(-\color{blue}{\left(-\frac{y \cdot z}{t}\right)}\right) \]
      6. remove-double-neg87.4%

        \[\leadsto \left(x - a \cdot \frac{y}{t}\right) + \color{blue}{\frac{y \cdot z}{t}} \]
      7. associate-/l*93.6%

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

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

    if -6.19999999999999983e94 < t < 1.69999999999999997e82

    1. Initial program 87.7%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg87.7%

        \[\leadsto \color{blue}{\left(x + y\right) + \left(-\frac{\left(z - t\right) \cdot y}{a - t}\right)} \]
      2. +-commutative87.7%

        \[\leadsto \color{blue}{\left(-\frac{\left(z - t\right) \cdot y}{a - t}\right) + \left(x + y\right)} \]
      3. distribute-frac-neg87.7%

        \[\leadsto \color{blue}{\frac{-\left(z - t\right) \cdot y}{a - t}} + \left(x + y\right) \]
      4. distribute-rgt-neg-out87.7%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(-y\right)}}{a - t} + \left(x + y\right) \]
      5. associate-/l*94.1%

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{-y}{a - t}} + \left(x + y\right) \]
      6. fma-define94.2%

        \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{-y}{a - t}, x + y\right)} \]
      7. distribute-frac-neg94.2%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{-\frac{y}{a - t}}, x + y\right) \]
      8. distribute-neg-frac294.2%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{y}{-\left(a - t\right)}}, x + y\right) \]
      9. sub-neg94.2%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in94.2%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}, x + y\right) \]
      11. remove-double-neg94.2%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\left(-a\right) + \color{blue}{t}}, x + y\right) \]
      12. +-commutative94.2%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t + \left(-a\right)}}, x + y\right) \]
      13. sub-neg94.2%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t - a}}, x + y\right) \]
    3. Simplified94.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y}{t - a}, x + y\right)} \]
    4. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification93.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.2 \cdot 10^{+94} \lor \neg \left(t \leq 1.7 \cdot 10^{+82}\right):\\ \;\;\;\;\left(x - a \cdot \frac{y}{t}\right) + y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(z - t, \frac{y}{t - a}, x + y\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 90.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.7 \cdot 10^{+95} \lor \neg \left(t \leq 7.5 \cdot 10^{+79}\right):\\ \;\;\;\;\left(x - a \cdot \frac{y}{t}\right) + y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;y + \left(x + \left(z - t\right) \cdot \left(y \cdot \frac{-1}{a - t}\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= t -2.7e+95) (not (<= t 7.5e+79)))
   (+ (- x (* a (/ y t))) (* y (/ z t)))
   (+ y (+ x (* (- z t) (* y (/ -1.0 (- a t))))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -2.7e+95) || !(t <= 7.5e+79)) {
		tmp = (x - (a * (y / t))) + (y * (z / t));
	} else {
		tmp = y + (x + ((z - t) * (y * (-1.0 / (a - t)))));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((t <= (-2.7d+95)) .or. (.not. (t <= 7.5d+79))) then
        tmp = (x - (a * (y / t))) + (y * (z / t))
    else
        tmp = y + (x + ((z - t) * (y * ((-1.0d0) / (a - t)))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -2.7e+95) || !(t <= 7.5e+79)) {
		tmp = (x - (a * (y / t))) + (y * (z / t));
	} else {
		tmp = y + (x + ((z - t) * (y * (-1.0 / (a - t)))));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (t <= -2.7e+95) or not (t <= 7.5e+79):
		tmp = (x - (a * (y / t))) + (y * (z / t))
	else:
		tmp = y + (x + ((z - t) * (y * (-1.0 / (a - t)))))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((t <= -2.7e+95) || !(t <= 7.5e+79))
		tmp = Float64(Float64(x - Float64(a * Float64(y / t))) + Float64(y * Float64(z / t)));
	else
		tmp = Float64(y + Float64(x + Float64(Float64(z - t) * Float64(y * Float64(-1.0 / Float64(a - t))))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((t <= -2.7e+95) || ~((t <= 7.5e+79)))
		tmp = (x - (a * (y / t))) + (y * (z / t));
	else
		tmp = y + (x + ((z - t) * (y * (-1.0 / (a - t)))));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.7e+95], N[Not[LessEqual[t, 7.5e+79]], $MachinePrecision]], N[(N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(x + N[(N[(z - t), $MachinePrecision] * N[(y * N[(-1.0 / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.7 \cdot 10^{+95} \lor \neg \left(t \leq 7.5 \cdot 10^{+79}\right):\\
\;\;\;\;\left(x - a \cdot \frac{y}{t}\right) + y \cdot \frac{z}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.7e95 or 7.49999999999999967e79 < t

    1. Initial program 56.7%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative56.7%

        \[\leadsto \color{blue}{\left(y + x\right)} - \frac{\left(z - t\right) \cdot y}{a - t} \]
      2. associate--l+56.7%

        \[\leadsto \color{blue}{y + \left(x - \frac{\left(z - t\right) \cdot y}{a - t}\right)} \]
      3. *-commutative56.7%

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

      \[\leadsto \color{blue}{y + \left(x - \frac{y \cdot \left(z - t\right)}{a - t}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 86.3%

      \[\leadsto \color{blue}{\left(x + -1 \cdot \frac{a \cdot y}{t}\right) - -1 \cdot \frac{y \cdot z}{t}} \]
    6. Step-by-step derivation
      1. sub-neg86.3%

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

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

        \[\leadsto \color{blue}{\left(x - \frac{a \cdot y}{t}\right)} + \left(--1 \cdot \frac{y \cdot z}{t}\right) \]
      4. associate-/l*87.4%

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

        \[\leadsto \left(x - a \cdot \frac{y}{t}\right) + \left(-\color{blue}{\left(-\frac{y \cdot z}{t}\right)}\right) \]
      6. remove-double-neg87.4%

        \[\leadsto \left(x - a \cdot \frac{y}{t}\right) + \color{blue}{\frac{y \cdot z}{t}} \]
      7. associate-/l*93.6%

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

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

    if -2.7e95 < t < 7.49999999999999967e79

    1. Initial program 87.7%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative87.7%

        \[\leadsto \color{blue}{\left(y + x\right)} - \frac{\left(z - t\right) \cdot y}{a - t} \]
      2. associate--l+87.7%

        \[\leadsto \color{blue}{y + \left(x - \frac{\left(z - t\right) \cdot y}{a - t}\right)} \]
      3. *-commutative87.7%

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

      \[\leadsto \color{blue}{y + \left(x - \frac{y \cdot \left(z - t\right)}{a - t}\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. div-inv87.8%

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

        \[\leadsto y + \left(x - \color{blue}{\left(\left(z - t\right) \cdot y\right)} \cdot \frac{1}{a - t}\right) \]
      3. associate-*l*94.1%

        \[\leadsto y + \left(x - \color{blue}{\left(z - t\right) \cdot \left(y \cdot \frac{1}{a - t}\right)}\right) \]
    6. Applied egg-rr94.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.7 \cdot 10^{+95} \lor \neg \left(t \leq 7.5 \cdot 10^{+79}\right):\\ \;\;\;\;\left(x - a \cdot \frac{y}{t}\right) + y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;y + \left(x + \left(z - t\right) \cdot \left(y \cdot \frac{-1}{a - t}\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 88.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -6.5 \cdot 10^{+94} \lor \neg \left(t \leq 2.1 \cdot 10^{+77}\right):\\ \;\;\;\;\left(x - a \cdot \frac{y}{t}\right) + y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;y + \left(x + \frac{y \cdot \left(z - t\right)}{t - a}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= t -6.5e+94) (not (<= t 2.1e+77)))
   (+ (- x (* a (/ y t))) (* y (/ z t)))
   (+ y (+ x (/ (* y (- z t)) (- t a))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -6.5e+94) || !(t <= 2.1e+77)) {
		tmp = (x - (a * (y / t))) + (y * (z / t));
	} else {
		tmp = y + (x + ((y * (z - t)) / (t - a)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((t <= (-6.5d+94)) .or. (.not. (t <= 2.1d+77))) then
        tmp = (x - (a * (y / t))) + (y * (z / t))
    else
        tmp = y + (x + ((y * (z - t)) / (t - a)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -6.5e+94) || !(t <= 2.1e+77)) {
		tmp = (x - (a * (y / t))) + (y * (z / t));
	} else {
		tmp = y + (x + ((y * (z - t)) / (t - a)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (t <= -6.5e+94) or not (t <= 2.1e+77):
		tmp = (x - (a * (y / t))) + (y * (z / t))
	else:
		tmp = y + (x + ((y * (z - t)) / (t - a)))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((t <= -6.5e+94) || !(t <= 2.1e+77))
		tmp = Float64(Float64(x - Float64(a * Float64(y / t))) + Float64(y * Float64(z / t)));
	else
		tmp = Float64(y + Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(t - a))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((t <= -6.5e+94) || ~((t <= 2.1e+77)))
		tmp = (x - (a * (y / t))) + (y * (z / t));
	else
		tmp = y + (x + ((y * (z - t)) / (t - a)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -6.5e+94], N[Not[LessEqual[t, 2.1e+77]], $MachinePrecision]], N[(N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{+94} \lor \neg \left(t \leq 2.1 \cdot 10^{+77}\right):\\
\;\;\;\;\left(x - a \cdot \frac{y}{t}\right) + y \cdot \frac{z}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.49999999999999976e94 or 2.0999999999999999e77 < t

    1. Initial program 56.7%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative56.7%

        \[\leadsto \color{blue}{\left(y + x\right)} - \frac{\left(z - t\right) \cdot y}{a - t} \]
      2. associate--l+56.7%

        \[\leadsto \color{blue}{y + \left(x - \frac{\left(z - t\right) \cdot y}{a - t}\right)} \]
      3. *-commutative56.7%

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

      \[\leadsto \color{blue}{y + \left(x - \frac{y \cdot \left(z - t\right)}{a - t}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 86.3%

      \[\leadsto \color{blue}{\left(x + -1 \cdot \frac{a \cdot y}{t}\right) - -1 \cdot \frac{y \cdot z}{t}} \]
    6. Step-by-step derivation
      1. sub-neg86.3%

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

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

        \[\leadsto \color{blue}{\left(x - \frac{a \cdot y}{t}\right)} + \left(--1 \cdot \frac{y \cdot z}{t}\right) \]
      4. associate-/l*87.4%

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

        \[\leadsto \left(x - a \cdot \frac{y}{t}\right) + \left(-\color{blue}{\left(-\frac{y \cdot z}{t}\right)}\right) \]
      6. remove-double-neg87.4%

        \[\leadsto \left(x - a \cdot \frac{y}{t}\right) + \color{blue}{\frac{y \cdot z}{t}} \]
      7. associate-/l*93.6%

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

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

    if -6.49999999999999976e94 < t < 2.0999999999999999e77

    1. Initial program 87.7%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative87.7%

        \[\leadsto \color{blue}{\left(y + x\right)} - \frac{\left(z - t\right) \cdot y}{a - t} \]
      2. associate--l+87.7%

        \[\leadsto \color{blue}{y + \left(x - \frac{\left(z - t\right) \cdot y}{a - t}\right)} \]
      3. *-commutative87.7%

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

      \[\leadsto \color{blue}{y + \left(x - \frac{y \cdot \left(z - t\right)}{a - t}\right)} \]
    4. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification89.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.5 \cdot 10^{+94} \lor \neg \left(t \leq 2.1 \cdot 10^{+77}\right):\\ \;\;\;\;\left(x - a \cdot \frac{y}{t}\right) + y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;y + \left(x + \frac{y \cdot \left(z - t\right)}{t - a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 84.5% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.05 \cdot 10^{+95} \lor \neg \left(t \leq 4.2 \cdot 10^{+78}\right):\\ \;\;\;\;x + \frac{y \cdot z - a \cdot y}{t}\\ \mathbf{else}:\\ \;\;\;\;y + \left(x + \frac{y \cdot \left(z - t\right)}{t - a}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= t -1.05e+95) (not (<= t 4.2e+78)))
   (+ x (/ (- (* y z) (* a y)) t))
   (+ y (+ x (/ (* y (- z t)) (- t a))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -1.05e+95) || !(t <= 4.2e+78)) {
		tmp = x + (((y * z) - (a * y)) / t);
	} else {
		tmp = y + (x + ((y * (z - t)) / (t - a)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((t <= (-1.05d+95)) .or. (.not. (t <= 4.2d+78))) then
        tmp = x + (((y * z) - (a * y)) / t)
    else
        tmp = y + (x + ((y * (z - t)) / (t - a)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -1.05e+95) || !(t <= 4.2e+78)) {
		tmp = x + (((y * z) - (a * y)) / t);
	} else {
		tmp = y + (x + ((y * (z - t)) / (t - a)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (t <= -1.05e+95) or not (t <= 4.2e+78):
		tmp = x + (((y * z) - (a * y)) / t)
	else:
		tmp = y + (x + ((y * (z - t)) / (t - a)))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((t <= -1.05e+95) || !(t <= 4.2e+78))
		tmp = Float64(x + Float64(Float64(Float64(y * z) - Float64(a * y)) / t));
	else
		tmp = Float64(y + Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(t - a))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((t <= -1.05e+95) || ~((t <= 4.2e+78)))
		tmp = x + (((y * z) - (a * y)) / t);
	else
		tmp = y + (x + ((y * (z - t)) / (t - a)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.05e+95], N[Not[LessEqual[t, 4.2e+78]], $MachinePrecision]], N[(x + N[(N[(N[(y * z), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(y + N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{+95} \lor \neg \left(t \leq 4.2 \cdot 10^{+78}\right):\\
\;\;\;\;x + \frac{y \cdot z - a \cdot y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.05e95 or 4.2000000000000002e78 < t

    1. Initial program 56.7%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative56.7%

        \[\leadsto \color{blue}{\left(y + x\right)} - \frac{\left(z - t\right) \cdot y}{a - t} \]
      2. associate--l+56.7%

        \[\leadsto \color{blue}{y + \left(x - \frac{\left(z - t\right) \cdot y}{a - t}\right)} \]
      3. *-commutative56.7%

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

      \[\leadsto \color{blue}{y + \left(x - \frac{y \cdot \left(z - t\right)}{a - t}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around -inf 86.3%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{a \cdot y - y \cdot z}{t}} \]
    6. Step-by-step derivation
      1. mul-1-neg86.3%

        \[\leadsto x + \color{blue}{\left(-\frac{a \cdot y - y \cdot z}{t}\right)} \]
      2. unsub-neg86.3%

        \[\leadsto \color{blue}{x - \frac{a \cdot y - y \cdot z}{t}} \]
      3. *-commutative86.3%

        \[\leadsto x - \frac{\color{blue}{y \cdot a} - y \cdot z}{t} \]
    7. Simplified86.3%

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

    if -1.05e95 < t < 4.2000000000000002e78

    1. Initial program 87.7%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative87.7%

        \[\leadsto \color{blue}{\left(y + x\right)} - \frac{\left(z - t\right) \cdot y}{a - t} \]
      2. associate--l+87.7%

        \[\leadsto \color{blue}{y + \left(x - \frac{\left(z - t\right) \cdot y}{a - t}\right)} \]
      3. *-commutative87.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.05 \cdot 10^{+95} \lor \neg \left(t \leq 4.2 \cdot 10^{+78}\right):\\ \;\;\;\;x + \frac{y \cdot z - a \cdot y}{t}\\ \mathbf{else}:\\ \;\;\;\;y + \left(x + \frac{y \cdot \left(z - t\right)}{t - a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 83.0% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2.1 \cdot 10^{-16} \lor \neg \left(a \leq 3.2 \cdot 10^{-21}\right):\\ \;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot z - a \cdot y}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= a -2.1e-16) (not (<= a 3.2e-21)))
   (- (+ x y) (* y (/ z a)))
   (+ x (/ (- (* y z) (* a y)) t))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a <= -2.1e-16) || !(a <= 3.2e-21)) {
		tmp = (x + y) - (y * (z / a));
	} else {
		tmp = x + (((y * z) - (a * y)) / t);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((a <= (-2.1d-16)) .or. (.not. (a <= 3.2d-21))) then
        tmp = (x + y) - (y * (z / a))
    else
        tmp = x + (((y * z) - (a * y)) / t)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a <= -2.1e-16) || !(a <= 3.2e-21)) {
		tmp = (x + y) - (y * (z / a));
	} else {
		tmp = x + (((y * z) - (a * y)) / t);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (a <= -2.1e-16) or not (a <= 3.2e-21):
		tmp = (x + y) - (y * (z / a))
	else:
		tmp = x + (((y * z) - (a * y)) / t)
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((a <= -2.1e-16) || !(a <= 3.2e-21))
		tmp = Float64(Float64(x + y) - Float64(y * Float64(z / a)));
	else
		tmp = Float64(x + Float64(Float64(Float64(y * z) - Float64(a * y)) / t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((a <= -2.1e-16) || ~((a <= 3.2e-21)))
		tmp = (x + y) - (y * (z / a));
	else
		tmp = x + (((y * z) - (a * y)) / t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.1e-16], N[Not[LessEqual[a, 3.2e-21]], $MachinePrecision]], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(y * z), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.1 \cdot 10^{-16} \lor \neg \left(a \leq 3.2 \cdot 10^{-21}\right):\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.1000000000000001e-16 or 3.2000000000000002e-21 < a

    1. Initial program 80.6%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg80.6%

        \[\leadsto \color{blue}{\left(x + y\right) + \left(-\frac{\left(z - t\right) \cdot y}{a - t}\right)} \]
      2. +-commutative80.6%

        \[\leadsto \color{blue}{\left(-\frac{\left(z - t\right) \cdot y}{a - t}\right) + \left(x + y\right)} \]
      3. distribute-frac-neg80.6%

        \[\leadsto \color{blue}{\frac{-\left(z - t\right) \cdot y}{a - t}} + \left(x + y\right) \]
      4. distribute-rgt-neg-out80.6%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(-y\right)}}{a - t} + \left(x + y\right) \]
      5. associate-/l*89.7%

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{-y}{a - t}} + \left(x + y\right) \]
      6. fma-define89.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{-y}{a - t}, x + y\right)} \]
      7. distribute-frac-neg89.8%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{-\frac{y}{a - t}}, x + y\right) \]
      8. distribute-neg-frac289.8%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{y}{-\left(a - t\right)}}, x + y\right) \]
      9. sub-neg89.8%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in89.8%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}, x + y\right) \]
      11. remove-double-neg89.8%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\left(-a\right) + \color{blue}{t}}, x + y\right) \]
      12. +-commutative89.8%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t + \left(-a\right)}}, x + y\right) \]
      13. sub-neg89.8%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t - a}}, x + y\right) \]
    3. Simplified89.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y}{t - a}, x + y\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 79.5%

      \[\leadsto \color{blue}{x + \left(y + -1 \cdot \frac{y \cdot z}{a}\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg79.5%

        \[\leadsto x + \left(y + \color{blue}{\left(-\frac{y \cdot z}{a}\right)}\right) \]
      2. associate-+r+79.5%

        \[\leadsto \color{blue}{\left(x + y\right) + \left(-\frac{y \cdot z}{a}\right)} \]
      3. sub-neg79.5%

        \[\leadsto \color{blue}{\left(x + y\right) - \frac{y \cdot z}{a}} \]
      4. +-commutative79.5%

        \[\leadsto \color{blue}{\left(y + x\right)} - \frac{y \cdot z}{a} \]
      5. associate-/l*87.5%

        \[\leadsto \left(y + x\right) - \color{blue}{y \cdot \frac{z}{a}} \]
    7. Simplified87.5%

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

    if -2.1000000000000001e-16 < a < 3.2000000000000002e-21

    1. Initial program 71.9%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative71.9%

        \[\leadsto \color{blue}{\left(y + x\right)} - \frac{\left(z - t\right) \cdot y}{a - t} \]
      2. associate--l+71.9%

        \[\leadsto \color{blue}{y + \left(x - \frac{\left(z - t\right) \cdot y}{a - t}\right)} \]
      3. *-commutative71.9%

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

      \[\leadsto \color{blue}{y + \left(x - \frac{y \cdot \left(z - t\right)}{a - t}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around -inf 76.3%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{a \cdot y - y \cdot z}{t}} \]
    6. Step-by-step derivation
      1. mul-1-neg76.3%

        \[\leadsto x + \color{blue}{\left(-\frac{a \cdot y - y \cdot z}{t}\right)} \]
      2. unsub-neg76.3%

        \[\leadsto \color{blue}{x - \frac{a \cdot y - y \cdot z}{t}} \]
      3. *-commutative76.3%

        \[\leadsto x - \frac{\color{blue}{y \cdot a} - y \cdot z}{t} \]
    7. Simplified76.3%

      \[\leadsto \color{blue}{x - \frac{y \cdot a - y \cdot z}{t}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification81.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.1 \cdot 10^{-16} \lor \neg \left(a \leq 3.2 \cdot 10^{-21}\right):\\ \;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot z - a \cdot y}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 73.9% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -9.6 \cdot 10^{+94}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{+81}:\\ \;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -9.6e+94) x (if (<= t 9.5e+81) (- (+ x y) (* y (/ z a))) x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -9.6e+94) {
		tmp = x;
	} else if (t <= 9.5e+81) {
		tmp = (x + y) - (y * (z / a));
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (t <= (-9.6d+94)) then
        tmp = x
    else if (t <= 9.5d+81) then
        tmp = (x + y) - (y * (z / a))
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -9.6e+94) {
		tmp = x;
	} else if (t <= 9.5e+81) {
		tmp = (x + y) - (y * (z / a));
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -9.6e+94:
		tmp = x
	elif t <= 9.5e+81:
		tmp = (x + y) - (y * (z / a))
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -9.6e+94)
		tmp = x;
	elseif (t <= 9.5e+81)
		tmp = Float64(Float64(x + y) - Float64(y * Float64(z / a)));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -9.6e+94)
		tmp = x;
	elseif (t <= 9.5e+81)
		tmp = (x + y) - (y * (z / a));
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -9.6e+94], x, If[LessEqual[t, 9.5e+81], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.6 \cdot 10^{+94}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 9.5 \cdot 10^{+81}:\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -9.5999999999999993e94 or 9.50000000000000083e81 < t

    1. Initial program 56.7%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg56.7%

        \[\leadsto \color{blue}{\left(x + y\right) + \left(-\frac{\left(z - t\right) \cdot y}{a - t}\right)} \]
      2. +-commutative56.7%

        \[\leadsto \color{blue}{\left(-\frac{\left(z - t\right) \cdot y}{a - t}\right) + \left(x + y\right)} \]
      3. distribute-frac-neg56.7%

        \[\leadsto \color{blue}{\frac{-\left(z - t\right) \cdot y}{a - t}} + \left(x + y\right) \]
      4. distribute-rgt-neg-out56.7%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(-y\right)}}{a - t} + \left(x + y\right) \]
      5. associate-/l*62.0%

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{-y}{a - t}} + \left(x + y\right) \]
      6. fma-define62.3%

        \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{-y}{a - t}, x + y\right)} \]
      7. distribute-frac-neg62.3%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{-\frac{y}{a - t}}, x + y\right) \]
      8. distribute-neg-frac262.3%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{y}{-\left(a - t\right)}}, x + y\right) \]
      9. sub-neg62.3%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in62.3%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}, x + y\right) \]
      11. remove-double-neg62.3%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\left(-a\right) + \color{blue}{t}}, x + y\right) \]
      12. +-commutative62.3%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t + \left(-a\right)}}, x + y\right) \]
      13. sub-neg62.3%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y}{t - a}, x + y\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 70.4%

      \[\leadsto \color{blue}{x} \]

    if -9.5999999999999993e94 < t < 9.50000000000000083e81

    1. Initial program 87.7%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg87.7%

        \[\leadsto \color{blue}{\left(x + y\right) + \left(-\frac{\left(z - t\right) \cdot y}{a - t}\right)} \]
      2. +-commutative87.7%

        \[\leadsto \color{blue}{\left(-\frac{\left(z - t\right) \cdot y}{a - t}\right) + \left(x + y\right)} \]
      3. distribute-frac-neg87.7%

        \[\leadsto \color{blue}{\frac{-\left(z - t\right) \cdot y}{a - t}} + \left(x + y\right) \]
      4. distribute-rgt-neg-out87.7%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(-y\right)}}{a - t} + \left(x + y\right) \]
      5. associate-/l*94.1%

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{-y}{a - t}} + \left(x + y\right) \]
      6. fma-define94.2%

        \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{-y}{a - t}, x + y\right)} \]
      7. distribute-frac-neg94.2%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{-\frac{y}{a - t}}, x + y\right) \]
      8. distribute-neg-frac294.2%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{y}{-\left(a - t\right)}}, x + y\right) \]
      9. sub-neg94.2%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in94.2%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}, x + y\right) \]
      11. remove-double-neg94.2%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\left(-a\right) + \color{blue}{t}}, x + y\right) \]
      12. +-commutative94.2%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t + \left(-a\right)}}, x + y\right) \]
      13. sub-neg94.2%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t - a}}, x + y\right) \]
    3. Simplified94.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y}{t - a}, x + y\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 75.3%

      \[\leadsto \color{blue}{x + \left(y + -1 \cdot \frac{y \cdot z}{a}\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg75.3%

        \[\leadsto x + \left(y + \color{blue}{\left(-\frac{y \cdot z}{a}\right)}\right) \]
      2. associate-+r+75.3%

        \[\leadsto \color{blue}{\left(x + y\right) + \left(-\frac{y \cdot z}{a}\right)} \]
      3. sub-neg75.3%

        \[\leadsto \color{blue}{\left(x + y\right) - \frac{y \cdot z}{a}} \]
      4. +-commutative75.3%

        \[\leadsto \color{blue}{\left(y + x\right)} - \frac{y \cdot z}{a} \]
      5. associate-/l*78.2%

        \[\leadsto \left(y + x\right) - \color{blue}{y \cdot \frac{z}{a}} \]
    7. Simplified78.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9.6 \cdot 10^{+94}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{+81}:\\ \;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 65.7% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -7 \cdot 10^{+196} \lor \neg \left(z \leq 4.5 \cdot 10^{+95}\right):\\ \;\;\;\;z \cdot \frac{y}{t - a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -7e+196) (not (<= z 4.5e+95))) (* z (/ y (- t a))) (+ x y)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -7e+196) || !(z <= 4.5e+95)) {
		tmp = z * (y / (t - a));
	} else {
		tmp = x + y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((z <= (-7d+196)) .or. (.not. (z <= 4.5d+95))) then
        tmp = z * (y / (t - a))
    else
        tmp = x + y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -7e+196) || !(z <= 4.5e+95)) {
		tmp = z * (y / (t - a));
	} else {
		tmp = x + y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -7e+196) or not (z <= 4.5e+95):
		tmp = z * (y / (t - a))
	else:
		tmp = x + y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -7e+196) || !(z <= 4.5e+95))
		tmp = Float64(z * Float64(y / Float64(t - a)));
	else
		tmp = Float64(x + y);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -7e+196) || ~((z <= 4.5e+95)))
		tmp = z * (y / (t - a));
	else
		tmp = x + y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -7e+196], N[Not[LessEqual[z, 4.5e+95]], $MachinePrecision]], N[(z * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{+196} \lor \neg \left(z \leq 4.5 \cdot 10^{+95}\right):\\
\;\;\;\;z \cdot \frac{y}{t - a}\\

\mathbf{else}:\\
\;\;\;\;x + y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.9999999999999997e196 or 4.50000000000000017e95 < z

    1. Initial program 77.6%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg77.6%

        \[\leadsto \color{blue}{\left(x + y\right) + \left(-\frac{\left(z - t\right) \cdot y}{a - t}\right)} \]
      2. +-commutative77.6%

        \[\leadsto \color{blue}{\left(-\frac{\left(z - t\right) \cdot y}{a - t}\right) + \left(x + y\right)} \]
      3. distribute-frac-neg77.6%

        \[\leadsto \color{blue}{\frac{-\left(z - t\right) \cdot y}{a - t}} + \left(x + y\right) \]
      4. distribute-rgt-neg-out77.6%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(-y\right)}}{a - t} + \left(x + y\right) \]
      5. associate-/l*92.5%

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{-y}{a - t}} + \left(x + y\right) \]
      6. fma-define92.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{-y}{a - t}, x + y\right)} \]
      7. distribute-frac-neg92.6%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{-\frac{y}{a - t}}, x + y\right) \]
      8. distribute-neg-frac292.6%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{y}{-\left(a - t\right)}}, x + y\right) \]
      9. sub-neg92.6%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in92.6%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}, x + y\right) \]
      11. remove-double-neg92.6%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\left(-a\right) + \color{blue}{t}}, x + y\right) \]
      12. +-commutative92.6%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t + \left(-a\right)}}, x + y\right) \]
      13. sub-neg92.6%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t - a}}, x + y\right) \]
    3. Simplified92.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y}{t - a}, x + y\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 58.0%

      \[\leadsto \color{blue}{\frac{y \cdot z}{t - a}} \]
    6. Step-by-step derivation
      1. *-commutative58.0%

        \[\leadsto \frac{\color{blue}{z \cdot y}}{t - a} \]
      2. *-lft-identity58.0%

        \[\leadsto \frac{z \cdot y}{\color{blue}{1 \cdot \left(t - a\right)}} \]
      3. times-frac71.0%

        \[\leadsto \color{blue}{\frac{z}{1} \cdot \frac{y}{t - a}} \]
      4. /-rgt-identity71.0%

        \[\leadsto \color{blue}{z} \cdot \frac{y}{t - a} \]
    7. Simplified71.0%

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

    if -6.9999999999999997e196 < z < 4.50000000000000017e95

    1. Initial program 75.9%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg75.9%

        \[\leadsto \color{blue}{\left(x + y\right) + \left(-\frac{\left(z - t\right) \cdot y}{a - t}\right)} \]
      2. +-commutative75.9%

        \[\leadsto \color{blue}{\left(-\frac{\left(z - t\right) \cdot y}{a - t}\right) + \left(x + y\right)} \]
      3. distribute-frac-neg75.9%

        \[\leadsto \color{blue}{\frac{-\left(z - t\right) \cdot y}{a - t}} + \left(x + y\right) \]
      4. distribute-rgt-neg-out75.9%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(-y\right)}}{a - t} + \left(x + y\right) \]
      5. associate-/l*79.0%

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{-y}{a - t}} + \left(x + y\right) \]
      6. fma-define79.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{-y}{a - t}, x + y\right)} \]
      7. distribute-frac-neg79.1%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{-\frac{y}{a - t}}, x + y\right) \]
      8. distribute-neg-frac279.1%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{y}{-\left(a - t\right)}}, x + y\right) \]
      9. sub-neg79.1%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in79.1%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}, x + y\right) \]
      11. remove-double-neg79.1%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\left(-a\right) + \color{blue}{t}}, x + y\right) \]
      12. +-commutative79.1%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t + \left(-a\right)}}, x + y\right) \]
      13. sub-neg79.1%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t - a}}, x + y\right) \]
    3. Simplified79.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y}{t - a}, x + y\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 66.9%

      \[\leadsto \color{blue}{x + y} \]
    6. Step-by-step derivation
      1. +-commutative66.9%

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified66.9%

      \[\leadsto \color{blue}{y + x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification67.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7 \cdot 10^{+196} \lor \neg \left(z \leq 4.5 \cdot 10^{+95}\right):\\ \;\;\;\;z \cdot \frac{y}{t - a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 65.4% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{+198} \lor \neg \left(z \leq 5.2 \cdot 10^{+95}\right):\\ \;\;\;\;y \cdot \frac{z}{t - a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -2e+198) (not (<= z 5.2e+95))) (* y (/ z (- t a))) (+ x y)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -2e+198) || !(z <= 5.2e+95)) {
		tmp = y * (z / (t - a));
	} else {
		tmp = x + y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((z <= (-2d+198)) .or. (.not. (z <= 5.2d+95))) then
        tmp = y * (z / (t - a))
    else
        tmp = x + y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -2e+198) || !(z <= 5.2e+95)) {
		tmp = y * (z / (t - a));
	} else {
		tmp = x + y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -2e+198) or not (z <= 5.2e+95):
		tmp = y * (z / (t - a))
	else:
		tmp = x + y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -2e+198) || !(z <= 5.2e+95))
		tmp = Float64(y * Float64(z / Float64(t - a)));
	else
		tmp = Float64(x + y);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -2e+198) || ~((z <= 5.2e+95)))
		tmp = y * (z / (t - a));
	else
		tmp = x + y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2e+198], N[Not[LessEqual[z, 5.2e+95]], $MachinePrecision]], N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{+198} \lor \neg \left(z \leq 5.2 \cdot 10^{+95}\right):\\
\;\;\;\;y \cdot \frac{z}{t - a}\\

\mathbf{else}:\\
\;\;\;\;x + y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.00000000000000004e198 or 5.19999999999999981e95 < z

    1. Initial program 77.6%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg77.6%

        \[\leadsto \color{blue}{\left(x + y\right) + \left(-\frac{\left(z - t\right) \cdot y}{a - t}\right)} \]
      2. +-commutative77.6%

        \[\leadsto \color{blue}{\left(-\frac{\left(z - t\right) \cdot y}{a - t}\right) + \left(x + y\right)} \]
      3. distribute-frac-neg77.6%

        \[\leadsto \color{blue}{\frac{-\left(z - t\right) \cdot y}{a - t}} + \left(x + y\right) \]
      4. distribute-rgt-neg-out77.6%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(-y\right)}}{a - t} + \left(x + y\right) \]
      5. associate-/l*92.5%

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{-y}{a - t}} + \left(x + y\right) \]
      6. fma-define92.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{-y}{a - t}, x + y\right)} \]
      7. distribute-frac-neg92.6%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{-\frac{y}{a - t}}, x + y\right) \]
      8. distribute-neg-frac292.6%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{y}{-\left(a - t\right)}}, x + y\right) \]
      9. sub-neg92.6%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in92.6%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}, x + y\right) \]
      11. remove-double-neg92.6%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\left(-a\right) + \color{blue}{t}}, x + y\right) \]
      12. +-commutative92.6%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t + \left(-a\right)}}, x + y\right) \]
      13. sub-neg92.6%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t - a}}, x + y\right) \]
    3. Simplified92.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y}{t - a}, x + y\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num92.6%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{1}{\frac{t - a}{y}}}, x + y\right) \]
      2. inv-pow92.6%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{{\left(\frac{t - a}{y}\right)}^{-1}}, x + y\right) \]
    6. Applied egg-rr92.6%

      \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{{\left(\frac{t - a}{y}\right)}^{-1}}, x + y\right) \]
    7. Step-by-step derivation
      1. unpow-192.6%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{1}{\frac{t - a}{y}}}, x + y\right) \]
    8. Simplified92.6%

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{t - a}} \]
    10. Step-by-step derivation
      1. associate-/l*61.2%

        \[\leadsto \color{blue}{y \cdot \frac{z}{t - a}} \]
    11. Simplified61.2%

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

    if -2.00000000000000004e198 < z < 5.19999999999999981e95

    1. Initial program 75.9%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg75.9%

        \[\leadsto \color{blue}{\left(x + y\right) + \left(-\frac{\left(z - t\right) \cdot y}{a - t}\right)} \]
      2. +-commutative75.9%

        \[\leadsto \color{blue}{\left(-\frac{\left(z - t\right) \cdot y}{a - t}\right) + \left(x + y\right)} \]
      3. distribute-frac-neg75.9%

        \[\leadsto \color{blue}{\frac{-\left(z - t\right) \cdot y}{a - t}} + \left(x + y\right) \]
      4. distribute-rgt-neg-out75.9%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(-y\right)}}{a - t} + \left(x + y\right) \]
      5. associate-/l*79.0%

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{-y}{a - t}} + \left(x + y\right) \]
      6. fma-define79.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{-y}{a - t}, x + y\right)} \]
      7. distribute-frac-neg79.1%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{-\frac{y}{a - t}}, x + y\right) \]
      8. distribute-neg-frac279.1%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{y}{-\left(a - t\right)}}, x + y\right) \]
      9. sub-neg79.1%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in79.1%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}, x + y\right) \]
      11. remove-double-neg79.1%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\left(-a\right) + \color{blue}{t}}, x + y\right) \]
      12. +-commutative79.1%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t + \left(-a\right)}}, x + y\right) \]
      13. sub-neg79.1%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t - a}}, x + y\right) \]
    3. Simplified79.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y}{t - a}, x + y\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 66.9%

      \[\leadsto \color{blue}{x + y} \]
    6. Step-by-step derivation
      1. +-commutative66.9%

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified66.9%

      \[\leadsto \color{blue}{y + x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification65.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{+198} \lor \neg \left(z \leq 5.2 \cdot 10^{+95}\right):\\ \;\;\;\;y \cdot \frac{z}{t - a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 65.7% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -9 \cdot 10^{+195}:\\ \;\;\;\;z \cdot \frac{y}{t - a}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+95}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{\frac{t - a}{y}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -9e+195)
   (* z (/ y (- t a)))
   (if (<= z 7e+95) (+ x y) (/ z (/ (- t a) y)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -9e+195) {
		tmp = z * (y / (t - a));
	} else if (z <= 7e+95) {
		tmp = x + y;
	} else {
		tmp = z / ((t - a) / y);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-9d+195)) then
        tmp = z * (y / (t - a))
    else if (z <= 7d+95) then
        tmp = x + y
    else
        tmp = z / ((t - a) / y)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -9e+195) {
		tmp = z * (y / (t - a));
	} else if (z <= 7e+95) {
		tmp = x + y;
	} else {
		tmp = z / ((t - a) / y);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -9e+195:
		tmp = z * (y / (t - a))
	elif z <= 7e+95:
		tmp = x + y
	else:
		tmp = z / ((t - a) / y)
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -9e+195)
		tmp = Float64(z * Float64(y / Float64(t - a)));
	elseif (z <= 7e+95)
		tmp = Float64(x + y);
	else
		tmp = Float64(z / Float64(Float64(t - a) / y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -9e+195)
		tmp = z * (y / (t - a));
	elseif (z <= 7e+95)
		tmp = x + y;
	else
		tmp = z / ((t - a) / y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9e+195], N[(z * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7e+95], N[(x + y), $MachinePrecision], N[(z / N[(N[(t - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -9 \cdot 10^{+195}:\\
\;\;\;\;z \cdot \frac{y}{t - a}\\

\mathbf{elif}\;z \leq 7 \cdot 10^{+95}:\\
\;\;\;\;x + y\\

\mathbf{else}:\\
\;\;\;\;\frac{z}{\frac{t - a}{y}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -9.00000000000000018e195

    1. Initial program 82.6%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg82.6%

        \[\leadsto \color{blue}{\left(x + y\right) + \left(-\frac{\left(z - t\right) \cdot y}{a - t}\right)} \]
      2. +-commutative82.6%

        \[\leadsto \color{blue}{\left(-\frac{\left(z - t\right) \cdot y}{a - t}\right) + \left(x + y\right)} \]
      3. distribute-frac-neg82.6%

        \[\leadsto \color{blue}{\frac{-\left(z - t\right) \cdot y}{a - t}} + \left(x + y\right) \]
      4. distribute-rgt-neg-out82.6%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(-y\right)}}{a - t} + \left(x + y\right) \]
      5. associate-/l*94.6%

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{-y}{a - t}} + \left(x + y\right) \]
      6. fma-define94.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{-y}{a - t}, x + y\right)} \]
      7. distribute-frac-neg94.6%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{-\frac{y}{a - t}}, x + y\right) \]
      8. distribute-neg-frac294.6%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{y}{-\left(a - t\right)}}, x + y\right) \]
      9. sub-neg94.6%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in94.6%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}, x + y\right) \]
      11. remove-double-neg94.6%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\left(-a\right) + \color{blue}{t}}, x + y\right) \]
      12. +-commutative94.6%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t + \left(-a\right)}}, x + y\right) \]
      13. sub-neg94.6%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t - a}}, x + y\right) \]
    3. Simplified94.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y}{t - a}, x + y\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 62.3%

      \[\leadsto \color{blue}{\frac{y \cdot z}{t - a}} \]
    6. Step-by-step derivation
      1. *-commutative62.3%

        \[\leadsto \frac{\color{blue}{z \cdot y}}{t - a} \]
      2. *-lft-identity62.3%

        \[\leadsto \frac{z \cdot y}{\color{blue}{1 \cdot \left(t - a\right)}} \]
      3. times-frac70.5%

        \[\leadsto \color{blue}{\frac{z}{1} \cdot \frac{y}{t - a}} \]
      4. /-rgt-identity70.5%

        \[\leadsto \color{blue}{z} \cdot \frac{y}{t - a} \]
    7. Simplified70.5%

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

    if -9.00000000000000018e195 < z < 6.99999999999999999e95

    1. Initial program 75.9%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg75.9%

        \[\leadsto \color{blue}{\left(x + y\right) + \left(-\frac{\left(z - t\right) \cdot y}{a - t}\right)} \]
      2. +-commutative75.9%

        \[\leadsto \color{blue}{\left(-\frac{\left(z - t\right) \cdot y}{a - t}\right) + \left(x + y\right)} \]
      3. distribute-frac-neg75.9%

        \[\leadsto \color{blue}{\frac{-\left(z - t\right) \cdot y}{a - t}} + \left(x + y\right) \]
      4. distribute-rgt-neg-out75.9%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(-y\right)}}{a - t} + \left(x + y\right) \]
      5. associate-/l*79.0%

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{-y}{a - t}} + \left(x + y\right) \]
      6. fma-define79.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{-y}{a - t}, x + y\right)} \]
      7. distribute-frac-neg79.1%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{-\frac{y}{a - t}}, x + y\right) \]
      8. distribute-neg-frac279.1%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{y}{-\left(a - t\right)}}, x + y\right) \]
      9. sub-neg79.1%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in79.1%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}, x + y\right) \]
      11. remove-double-neg79.1%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\left(-a\right) + \color{blue}{t}}, x + y\right) \]
      12. +-commutative79.1%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t + \left(-a\right)}}, x + y\right) \]
      13. sub-neg79.1%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t - a}}, x + y\right) \]
    3. Simplified79.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y}{t - a}, x + y\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 66.9%

      \[\leadsto \color{blue}{x + y} \]
    6. Step-by-step derivation
      1. +-commutative66.9%

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified66.9%

      \[\leadsto \color{blue}{y + x} \]

    if 6.99999999999999999e95 < z

    1. Initial program 72.3%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg72.3%

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

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

        \[\leadsto \color{blue}{\frac{-\left(z - t\right) \cdot y}{a - t}} + \left(x + y\right) \]
      4. distribute-rgt-neg-out72.3%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(-y\right)}}{a - t} + \left(x + y\right) \]
      5. associate-/l*90.3%

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{-y}{a - t}} + \left(x + y\right) \]
      6. fma-define90.3%

        \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{-y}{a - t}, x + y\right)} \]
      7. distribute-frac-neg90.3%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{-\frac{y}{a - t}}, x + y\right) \]
      8. distribute-neg-frac290.3%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{y}{-\left(a - t\right)}}, x + y\right) \]
      9. sub-neg90.3%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in90.3%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}, x + y\right) \]
      11. remove-double-neg90.3%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\left(-a\right) + \color{blue}{t}}, x + y\right) \]
      12. +-commutative90.3%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t + \left(-a\right)}}, x + y\right) \]
      13. sub-neg90.3%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y}{t - a}, x + y\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 53.5%

      \[\leadsto \color{blue}{\frac{y \cdot z}{t - a}} \]
    6. Step-by-step derivation
      1. *-commutative53.5%

        \[\leadsto \frac{\color{blue}{z \cdot y}}{t - a} \]
      2. *-lft-identity53.5%

        \[\leadsto \frac{z \cdot y}{\color{blue}{1 \cdot \left(t - a\right)}} \]
      3. times-frac71.5%

        \[\leadsto \color{blue}{\frac{z}{1} \cdot \frac{y}{t - a}} \]
      4. /-rgt-identity71.5%

        \[\leadsto \color{blue}{z} \cdot \frac{y}{t - a} \]
    7. Simplified71.5%

      \[\leadsto \color{blue}{z \cdot \frac{y}{t - a}} \]
    8. Step-by-step derivation
      1. clear-num71.5%

        \[\leadsto z \cdot \color{blue}{\frac{1}{\frac{t - a}{y}}} \]
      2. un-div-inv71.7%

        \[\leadsto \color{blue}{\frac{z}{\frac{t - a}{y}}} \]
    9. Applied egg-rr71.7%

      \[\leadsto \color{blue}{\frac{z}{\frac{t - a}{y}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification67.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9 \cdot 10^{+195}:\\ \;\;\;\;z \cdot \frac{y}{t - a}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+95}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{\frac{t - a}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 60.2% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{+241}:\\ \;\;\;\;z \cdot \frac{y}{-a}\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{+95}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{t} \cdot z\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -4.2e+241)
   (* z (/ y (- a)))
   (if (<= z 7.2e+95) (+ x y) (* (/ y t) z))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -4.2e+241) {
		tmp = z * (y / -a);
	} else if (z <= 7.2e+95) {
		tmp = x + y;
	} else {
		tmp = (y / t) * z;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-4.2d+241)) then
        tmp = z * (y / -a)
    else if (z <= 7.2d+95) then
        tmp = x + y
    else
        tmp = (y / t) * z
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -4.2e+241) {
		tmp = z * (y / -a);
	} else if (z <= 7.2e+95) {
		tmp = x + y;
	} else {
		tmp = (y / t) * z;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -4.2e+241:
		tmp = z * (y / -a)
	elif z <= 7.2e+95:
		tmp = x + y
	else:
		tmp = (y / t) * z
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -4.2e+241)
		tmp = Float64(z * Float64(y / Float64(-a)));
	elseif (z <= 7.2e+95)
		tmp = Float64(x + y);
	else
		tmp = Float64(Float64(y / t) * z);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -4.2e+241)
		tmp = z * (y / -a);
	elseif (z <= 7.2e+95)
		tmp = x + y;
	else
		tmp = (y / t) * z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.2e+241], N[(z * N[(y / (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.2e+95], N[(x + y), $MachinePrecision], N[(N[(y / t), $MachinePrecision] * z), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{+241}:\\
\;\;\;\;z \cdot \frac{y}{-a}\\

\mathbf{elif}\;z \leq 7.2 \cdot 10^{+95}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.2000000000000001e241

    1. Initial program 84.4%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg84.4%

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

        \[\leadsto \color{blue}{\left(-\frac{\left(z - t\right) \cdot y}{a - t}\right) + \left(x + y\right)} \]
      3. distribute-frac-neg84.4%

        \[\leadsto \color{blue}{\frac{-\left(z - t\right) \cdot y}{a - t}} + \left(x + y\right) \]
      4. distribute-rgt-neg-out84.4%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(-y\right)}}{a - t} + \left(x + y\right) \]
      5. associate-/l*99.9%

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{-y}{a - t}} + \left(x + y\right) \]
      6. fma-define99.9%

        \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{-y}{a - t}, x + y\right)} \]
      7. distribute-frac-neg99.9%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{-\frac{y}{a - t}}, x + y\right) \]
      8. distribute-neg-frac299.9%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{y}{-\left(a - t\right)}}, x + y\right) \]
      9. sub-neg99.9%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in99.9%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}, x + y\right) \]
      11. remove-double-neg99.9%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\left(-a\right) + \color{blue}{t}}, x + y\right) \]
      12. +-commutative99.9%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t + \left(-a\right)}}, x + y\right) \]
      13. sub-neg99.9%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t - a}}, x + y\right) \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y}{t - a}, x + y\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 73.5%

      \[\leadsto \color{blue}{\frac{y \cdot z}{t - a}} \]
    6. Step-by-step derivation
      1. *-commutative73.5%

        \[\leadsto \frac{\color{blue}{z \cdot y}}{t - a} \]
      2. *-lft-identity73.5%

        \[\leadsto \frac{z \cdot y}{\color{blue}{1 \cdot \left(t - a\right)}} \]
      3. times-frac89.0%

        \[\leadsto \color{blue}{\frac{z}{1} \cdot \frac{y}{t - a}} \]
      4. /-rgt-identity89.0%

        \[\leadsto \color{blue}{z} \cdot \frac{y}{t - a} \]
    7. Simplified89.0%

      \[\leadsto \color{blue}{z \cdot \frac{y}{t - a}} \]
    8. Taylor expanded in t around 0 67.6%

      \[\leadsto z \cdot \color{blue}{\left(-1 \cdot \frac{y}{a}\right)} \]
    9. Step-by-step derivation
      1. associate-*r/67.6%

        \[\leadsto z \cdot \color{blue}{\frac{-1 \cdot y}{a}} \]
      2. neg-mul-167.6%

        \[\leadsto z \cdot \frac{\color{blue}{-y}}{a} \]
    10. Simplified67.6%

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

    if -4.2000000000000001e241 < z < 7.19999999999999955e95

    1. Initial program 76.2%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg76.2%

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

        \[\leadsto \color{blue}{\left(-\frac{\left(z - t\right) \cdot y}{a - t}\right) + \left(x + y\right)} \]
      3. distribute-frac-neg76.2%

        \[\leadsto \color{blue}{\frac{-\left(z - t\right) \cdot y}{a - t}} + \left(x + y\right) \]
      4. distribute-rgt-neg-out76.2%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(-y\right)}}{a - t} + \left(x + y\right) \]
      5. associate-/l*79.6%

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{-y}{a - t}} + \left(x + y\right) \]
      6. fma-define79.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{-y}{a - t}, x + y\right)} \]
      7. distribute-frac-neg79.8%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{-\frac{y}{a - t}}, x + y\right) \]
      8. distribute-neg-frac279.8%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{y}{-\left(a - t\right)}}, x + y\right) \]
      9. sub-neg79.8%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in79.8%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}, x + y\right) \]
      11. remove-double-neg79.8%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\left(-a\right) + \color{blue}{t}}, x + y\right) \]
      12. +-commutative79.8%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t + \left(-a\right)}}, x + y\right) \]
      13. sub-neg79.8%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t - a}}, x + y\right) \]
    3. Simplified79.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y}{t - a}, x + y\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 65.4%

      \[\leadsto \color{blue}{x + y} \]
    6. Step-by-step derivation
      1. +-commutative65.4%

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified65.4%

      \[\leadsto \color{blue}{y + x} \]

    if 7.19999999999999955e95 < z

    1. Initial program 72.3%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg72.3%

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

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

        \[\leadsto \color{blue}{\frac{-\left(z - t\right) \cdot y}{a - t}} + \left(x + y\right) \]
      4. distribute-rgt-neg-out72.3%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(-y\right)}}{a - t} + \left(x + y\right) \]
      5. associate-/l*90.3%

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{-y}{a - t}} + \left(x + y\right) \]
      6. fma-define90.3%

        \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{-y}{a - t}, x + y\right)} \]
      7. distribute-frac-neg90.3%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{-\frac{y}{a - t}}, x + y\right) \]
      8. distribute-neg-frac290.3%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{y}{-\left(a - t\right)}}, x + y\right) \]
      9. sub-neg90.3%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in90.3%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}, x + y\right) \]
      11. remove-double-neg90.3%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\left(-a\right) + \color{blue}{t}}, x + y\right) \]
      12. +-commutative90.3%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t + \left(-a\right)}}, x + y\right) \]
      13. sub-neg90.3%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y}{t - a}, x + y\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 53.5%

      \[\leadsto \color{blue}{\frac{y \cdot z}{t - a}} \]
    6. Step-by-step derivation
      1. *-commutative53.5%

        \[\leadsto \frac{\color{blue}{z \cdot y}}{t - a} \]
      2. *-lft-identity53.5%

        \[\leadsto \frac{z \cdot y}{\color{blue}{1 \cdot \left(t - a\right)}} \]
      3. times-frac71.5%

        \[\leadsto \color{blue}{\frac{z}{1} \cdot \frac{y}{t - a}} \]
      4. /-rgt-identity71.5%

        \[\leadsto \color{blue}{z} \cdot \frac{y}{t - a} \]
    7. Simplified71.5%

      \[\leadsto \color{blue}{z \cdot \frac{y}{t - a}} \]
    8. Taylor expanded in t around inf 52.4%

      \[\leadsto z \cdot \frac{y}{\color{blue}{t}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification63.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{+241}:\\ \;\;\;\;z \cdot \frac{y}{-a}\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{+95}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{t} \cdot z\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 64.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -7 \cdot 10^{+188}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{+197}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -7e+188) x (if (<= t 1.1e+197) (+ x y) x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -7e+188) {
		tmp = x;
	} else if (t <= 1.1e+197) {
		tmp = x + y;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (t <= (-7d+188)) then
        tmp = x
    else if (t <= 1.1d+197) then
        tmp = x + y
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -7e+188) {
		tmp = x;
	} else if (t <= 1.1e+197) {
		tmp = x + y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -7e+188:
		tmp = x
	elif t <= 1.1e+197:
		tmp = x + y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -7e+188)
		tmp = x;
	elseif (t <= 1.1e+197)
		tmp = Float64(x + y);
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -7e+188)
		tmp = x;
	elseif (t <= 1.1e+197)
		tmp = x + y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -7e+188], x, If[LessEqual[t, 1.1e+197], N[(x + y), $MachinePrecision], x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -7 \cdot 10^{+188}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 1.1 \cdot 10^{+197}:\\
\;\;\;\;x + y\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -7.00000000000000016e188 or 1.09999999999999995e197 < t

    1. Initial program 43.6%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg43.6%

        \[\leadsto \color{blue}{\left(x + y\right) + \left(-\frac{\left(z - t\right) \cdot y}{a - t}\right)} \]
      2. +-commutative43.6%

        \[\leadsto \color{blue}{\left(-\frac{\left(z - t\right) \cdot y}{a - t}\right) + \left(x + y\right)} \]
      3. distribute-frac-neg43.6%

        \[\leadsto \color{blue}{\frac{-\left(z - t\right) \cdot y}{a - t}} + \left(x + y\right) \]
      4. distribute-rgt-neg-out43.6%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(-y\right)}}{a - t} + \left(x + y\right) \]
      5. associate-/l*49.0%

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{-y}{a - t}} + \left(x + y\right) \]
      6. fma-define49.3%

        \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{-y}{a - t}, x + y\right)} \]
      7. distribute-frac-neg49.3%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{-\frac{y}{a - t}}, x + y\right) \]
      8. distribute-neg-frac249.3%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{y}{-\left(a - t\right)}}, x + y\right) \]
      9. sub-neg49.3%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in49.3%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}, x + y\right) \]
      11. remove-double-neg49.3%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\left(-a\right) + \color{blue}{t}}, x + y\right) \]
      12. +-commutative49.3%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t + \left(-a\right)}}, x + y\right) \]
      13. sub-neg49.3%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y}{t - a}, x + y\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 71.3%

      \[\leadsto \color{blue}{x} \]

    if -7.00000000000000016e188 < t < 1.09999999999999995e197

    1. Initial program 85.2%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg85.2%

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

        \[\leadsto \color{blue}{\left(-\frac{\left(z - t\right) \cdot y}{a - t}\right) + \left(x + y\right)} \]
      3. distribute-frac-neg85.2%

        \[\leadsto \color{blue}{\frac{-\left(z - t\right) \cdot y}{a - t}} + \left(x + y\right) \]
      4. distribute-rgt-neg-out85.2%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(-y\right)}}{a - t} + \left(x + y\right) \]
      5. associate-/l*91.5%

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{-y}{a - t}} + \left(x + y\right) \]
      6. fma-define91.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{-y}{a - t}, x + y\right)} \]
      7. distribute-frac-neg91.5%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{-\frac{y}{a - t}}, x + y\right) \]
      8. distribute-neg-frac291.5%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{y}{-\left(a - t\right)}}, x + y\right) \]
      9. sub-neg91.5%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in91.5%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}, x + y\right) \]
      11. remove-double-neg91.5%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\left(-a\right) + \color{blue}{t}}, x + y\right) \]
      12. +-commutative91.5%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t + \left(-a\right)}}, x + y\right) \]
      13. sub-neg91.5%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t - a}}, x + y\right) \]
    3. Simplified91.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y}{t - a}, x + y\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 60.9%

      \[\leadsto \color{blue}{x + y} \]
    6. Step-by-step derivation
      1. +-commutative60.9%

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified60.9%

      \[\leadsto \color{blue}{y + x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification63.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7 \cdot 10^{+188}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{+197}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 52.6% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.25 \cdot 10^{+258}:\\ \;\;\;\;y\\ \mathbf{elif}\;y \leq 1.75 \cdot 10^{+74}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= y -1.25e+258) y (if (<= y 1.75e+74) x y)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (y <= -1.25e+258) {
		tmp = y;
	} else if (y <= 1.75e+74) {
		tmp = x;
	} else {
		tmp = y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (y <= (-1.25d+258)) then
        tmp = y
    else if (y <= 1.75d+74) then
        tmp = x
    else
        tmp = y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (y <= -1.25e+258) {
		tmp = y;
	} else if (y <= 1.75e+74) {
		tmp = x;
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if y <= -1.25e+258:
		tmp = y
	elif y <= 1.75e+74:
		tmp = x
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (y <= -1.25e+258)
		tmp = y;
	elseif (y <= 1.75e+74)
		tmp = x;
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (y <= -1.25e+258)
		tmp = y;
	elseif (y <= 1.75e+74)
		tmp = x;
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.25e+258], y, If[LessEqual[y, 1.75e+74], x, y]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.25 \cdot 10^{+258}:\\
\;\;\;\;y\\

\mathbf{elif}\;y \leq 1.75 \cdot 10^{+74}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.25e258 or 1.75000000000000007e74 < y

    1. Initial program 53.5%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative53.5%

        \[\leadsto \color{blue}{\left(y + x\right)} - \frac{\left(z - t\right) \cdot y}{a - t} \]
      2. associate--l+53.5%

        \[\leadsto \color{blue}{y + \left(x - \frac{\left(z - t\right) \cdot y}{a - t}\right)} \]
      3. *-commutative53.5%

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

      \[\leadsto \color{blue}{y + \left(x - \frac{y \cdot \left(z - t\right)}{a - t}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around -inf 69.3%

      \[\leadsto \color{blue}{y \cdot \left(1 + -1 \cdot \frac{z - t}{a - t}\right)} \]
    6. Step-by-step derivation
      1. neg-mul-169.3%

        \[\leadsto y \cdot \left(1 + \color{blue}{\left(-\frac{z - t}{a - t}\right)}\right) \]
      2. unsub-neg69.3%

        \[\leadsto y \cdot \color{blue}{\left(1 - \frac{z - t}{a - t}\right)} \]
    7. Simplified69.3%

      \[\leadsto \color{blue}{y \cdot \left(1 - \frac{z - t}{a - t}\right)} \]
    8. Taylor expanded in a around inf 38.7%

      \[\leadsto \color{blue}{y} \]

    if -1.25e258 < y < 1.75000000000000007e74

    1. Initial program 82.4%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg82.4%

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

        \[\leadsto \color{blue}{\left(-\frac{\left(z - t\right) \cdot y}{a - t}\right) + \left(x + y\right)} \]
      3. distribute-frac-neg82.4%

        \[\leadsto \color{blue}{\frac{-\left(z - t\right) \cdot y}{a - t}} + \left(x + y\right) \]
      4. distribute-rgt-neg-out82.4%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(-y\right)}}{a - t} + \left(x + y\right) \]
      5. associate-/l*85.3%

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{-y}{a - t}} + \left(x + y\right) \]
      6. fma-define85.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{-y}{a - t}, x + y\right)} \]
      7. distribute-frac-neg85.4%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{-\frac{y}{a - t}}, x + y\right) \]
      8. distribute-neg-frac285.4%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{y}{-\left(a - t\right)}}, x + y\right) \]
      9. sub-neg85.4%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in85.4%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}, x + y\right) \]
      11. remove-double-neg85.4%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\left(-a\right) + \color{blue}{t}}, x + y\right) \]
      12. +-commutative85.4%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t + \left(-a\right)}}, x + y\right) \]
      13. sub-neg85.4%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t - a}}, x + y\right) \]
    3. Simplified85.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y}{t - a}, x + y\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 59.9%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 14: 50.8% accurate, 13.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
	return x;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x
end function
public static double code(double x, double y, double z, double t, double a) {
	return x;
}
def code(x, y, z, t, a):
	return x
function code(x, y, z, t, a)
	return x
end
function tmp = code(x, y, z, t, a)
	tmp = x;
end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 76.3%

    \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
  2. Step-by-step derivation
    1. sub-neg76.3%

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

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

      \[\leadsto \color{blue}{\frac{-\left(z - t\right) \cdot y}{a - t}} + \left(x + y\right) \]
    4. distribute-rgt-neg-out76.3%

      \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(-y\right)}}{a - t} + \left(x + y\right) \]
    5. associate-/l*82.4%

      \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{-y}{a - t}} + \left(x + y\right) \]
    6. fma-define82.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{-y}{a - t}, x + y\right)} \]
    7. distribute-frac-neg82.5%

      \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{-\frac{y}{a - t}}, x + y\right) \]
    8. distribute-neg-frac282.5%

      \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{y}{-\left(a - t\right)}}, x + y\right) \]
    9. sub-neg82.5%

      \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
    10. distribute-neg-in82.5%

      \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}, x + y\right) \]
    11. remove-double-neg82.5%

      \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\left(-a\right) + \color{blue}{t}}, x + y\right) \]
    12. +-commutative82.5%

      \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t + \left(-a\right)}}, x + y\right) \]
    13. sub-neg82.5%

      \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t - a}}, x + y\right) \]
  3. Simplified82.5%

    \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y}{t - a}, x + y\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in y around 0 50.6%

    \[\leadsto \color{blue}{x} \]
  6. Add Preprocessing

Alternative 15: 2.7% accurate, 13.0× speedup?

\[\begin{array}{l} \\ 0 \end{array} \]
(FPCore (x y z t a) :precision binary64 0.0)
double code(double x, double y, double z, double t, double a) {
	return 0.0;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = 0.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
	return 0.0;
}
def code(x, y, z, t, a):
	return 0.0
function code(x, y, z, t, a)
	return 0.0
end
function tmp = code(x, y, z, t, a)
	tmp = 0.0;
end
code[x_, y_, z_, t_, a_] := 0.0
\begin{array}{l}

\\
0
\end{array}
Derivation
  1. Initial program 76.3%

    \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
  2. Step-by-step derivation
    1. +-commutative76.3%

      \[\leadsto \color{blue}{\left(y + x\right)} - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. associate--l+76.3%

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

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

    \[\leadsto \color{blue}{y + \left(x - \frac{y \cdot \left(z - t\right)}{a - t}\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in x around 0 36.0%

    \[\leadsto \color{blue}{y - \frac{y \cdot \left(z - t\right)}{a - t}} \]
  6. Taylor expanded in z around 0 16.9%

    \[\leadsto \color{blue}{y - -1 \cdot \frac{t \cdot y}{a - t}} \]
  7. Step-by-step derivation
    1. sub-neg16.9%

      \[\leadsto \color{blue}{y + \left(--1 \cdot \frac{t \cdot y}{a - t}\right)} \]
    2. mul-1-neg16.9%

      \[\leadsto y + \left(-\color{blue}{\left(-\frac{t \cdot y}{a - t}\right)}\right) \]
    3. remove-double-neg16.9%

      \[\leadsto y + \color{blue}{\frac{t \cdot y}{a - t}} \]
    4. associate-/l*18.4%

      \[\leadsto y + \color{blue}{t \cdot \frac{y}{a - t}} \]
  8. Simplified18.4%

    \[\leadsto \color{blue}{y + t \cdot \frac{y}{a - t}} \]
  9. Taylor expanded in t around inf 2.7%

    \[\leadsto \color{blue}{y + -1 \cdot y} \]
  10. Step-by-step derivation
    1. distribute-rgt1-in2.7%

      \[\leadsto \color{blue}{\left(-1 + 1\right) \cdot y} \]
    2. metadata-eval2.7%

      \[\leadsto \color{blue}{0} \cdot y \]
    3. mul0-lft2.7%

      \[\leadsto \color{blue}{0} \]
  11. Simplified2.7%

    \[\leadsto \color{blue}{0} \]
  12. Add Preprocessing

Developer Target 1: 88.8% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y + x\right) - \left(\left(z - t\right) \cdot \frac{1}{a - t}\right) \cdot y\\ t_2 := \left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\\ \mathbf{if}\;t\_2 < -1.3664970889390727 \cdot 10^{-7}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 < 1.4754293444577233 \cdot 10^{-239}:\\ \;\;\;\;\frac{y \cdot \left(a - z\right) - x \cdot t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y)))
        (t_2 (- (+ x y) (/ (* (- z t) y) (- a t)))))
   (if (< t_2 -1.3664970889390727e-7)
     t_1
     (if (< t_2 1.4754293444577233e-239)
       (/ (- (* y (- a z)) (* x t)) (- a t))
       t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y);
	double t_2 = (x + y) - (((z - t) * y) / (a - t));
	double tmp;
	if (t_2 < -1.3664970889390727e-7) {
		tmp = t_1;
	} else if (t_2 < 1.4754293444577233e-239) {
		tmp = ((y * (a - z)) - (x * t)) / (a - t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (y + x) - (((z - t) * (1.0d0 / (a - t))) * y)
    t_2 = (x + y) - (((z - t) * y) / (a - t))
    if (t_2 < (-1.3664970889390727d-7)) then
        tmp = t_1
    else if (t_2 < 1.4754293444577233d-239) then
        tmp = ((y * (a - z)) - (x * t)) / (a - t)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y);
	double t_2 = (x + y) - (((z - t) * y) / (a - t));
	double tmp;
	if (t_2 < -1.3664970889390727e-7) {
		tmp = t_1;
	} else if (t_2 < 1.4754293444577233e-239) {
		tmp = ((y * (a - z)) - (x * t)) / (a - t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y)
	t_2 = (x + y) - (((z - t) * y) / (a - t))
	tmp = 0
	if t_2 < -1.3664970889390727e-7:
		tmp = t_1
	elif t_2 < 1.4754293444577233e-239:
		tmp = ((y * (a - z)) - (x * t)) / (a - t)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(y + x) - Float64(Float64(Float64(z - t) * Float64(1.0 / Float64(a - t))) * y))
	t_2 = Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t)))
	tmp = 0.0
	if (t_2 < -1.3664970889390727e-7)
		tmp = t_1;
	elseif (t_2 < 1.4754293444577233e-239)
		tmp = Float64(Float64(Float64(y * Float64(a - z)) - Float64(x * t)) / Float64(a - t));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y);
	t_2 = (x + y) - (((z - t) * y) / (a - t));
	tmp = 0.0;
	if (t_2 < -1.3664970889390727e-7)
		tmp = t_1;
	elseif (t_2 < 1.4754293444577233e-239)
		tmp = ((y * (a - z)) - (x * t)) / (a - t);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y + x), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * N[(1.0 / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$2, -1.3664970889390727e-7], t$95$1, If[Less[t$95$2, 1.4754293444577233e-239], N[(N[(N[(y * N[(a - z), $MachinePrecision]), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(y + x\right) - \left(\left(z - t\right) \cdot \frac{1}{a - t}\right) \cdot y\\
t_2 := \left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{if}\;t\_2 < -1.3664970889390727 \cdot 10^{-7}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 < 1.4754293444577233 \cdot 10^{-239}:\\
\;\;\;\;\frac{y \cdot \left(a - z\right) - x \cdot t}{a - t}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}

Reproduce

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

  :alt
  (! :herbie-platform default (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) -13664970889390727/100000000000000000000000) (- (+ y x) (* (* (- z t) (/ 1 (- a t))) y)) (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) 14754293444577233/1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (- (* y (- a z)) (* x t)) (- a t)) (- (+ y x) (* (* (- z t) (/ 1 (- a t))) y)))))

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