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

Percentage Accurate: 77.3% → 94.7%
Time: 12.7s
Alternatives: 11
Speedup: 1.0×

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 11 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: 77.3% 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: 94.7% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot \left(\left(\frac{t}{a - t} + 1\right) - \frac{z}{a - t}\right)\\ t_2 := \left(x + y\right) + \frac{y \cdot \left(t - z\right)}{a - t}\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq -1 \cdot 10^{-199}:\\ \;\;\;\;x + \left(y + \frac{t - z}{\frac{a - t}{y}}\right)\\ \mathbf{elif}\;t_2 \leq 0:\\ \;\;\;\;x + \frac{y}{\frac{t}{z - a}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* y (- (+ (/ t (- a t)) 1.0) (/ z (- a t))))))
        (t_2 (+ (+ x y) (/ (* y (- t z)) (- a t)))))
   (if (<= t_2 (- INFINITY))
     t_1
     (if (<= t_2 -1e-199)
       (+ x (+ y (/ (- t z) (/ (- a t) y))))
       (if (<= t_2 0.0) (+ x (/ y (/ t (- z a)))) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * (((t / (a - t)) + 1.0) - (z / (a - t))));
	double t_2 = (x + y) + ((y * (t - z)) / (a - t));
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = t_1;
	} else if (t_2 <= -1e-199) {
		tmp = x + (y + ((t - z) / ((a - t) / y)));
	} else if (t_2 <= 0.0) {
		tmp = x + (y / (t / (z - a)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * (((t / (a - t)) + 1.0) - (z / (a - t))));
	double t_2 = (x + y) + ((y * (t - z)) / (a - t));
	double tmp;
	if (t_2 <= -Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else if (t_2 <= -1e-199) {
		tmp = x + (y + ((t - z) / ((a - t) / y)));
	} else if (t_2 <= 0.0) {
		tmp = x + (y / (t / (z - a)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (y * (((t / (a - t)) + 1.0) - (z / (a - t))))
	t_2 = (x + y) + ((y * (t - z)) / (a - t))
	tmp = 0
	if t_2 <= -math.inf:
		tmp = t_1
	elif t_2 <= -1e-199:
		tmp = x + (y + ((t - z) / ((a - t) / y)))
	elif t_2 <= 0.0:
		tmp = x + (y / (t / (z - a)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(y * Float64(Float64(Float64(t / Float64(a - t)) + 1.0) - Float64(z / Float64(a - t)))))
	t_2 = Float64(Float64(x + y) + Float64(Float64(y * Float64(t - z)) / Float64(a - t)))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = t_1;
	elseif (t_2 <= -1e-199)
		tmp = Float64(x + Float64(y + Float64(Float64(t - z) / Float64(Float64(a - t) / y))));
	elseif (t_2 <= 0.0)
		tmp = Float64(x + Float64(y / Float64(t / Float64(z - a))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (y * (((t / (a - t)) + 1.0) - (z / (a - t))));
	t_2 = (x + y) + ((y * (t - z)) / (a - t));
	tmp = 0.0;
	if (t_2 <= -Inf)
		tmp = t_1;
	elseif (t_2 <= -1e-199)
		tmp = x + (y + ((t - z) / ((a - t) / y)));
	elseif (t_2 <= 0.0)
		tmp = x + (y / (t / (z - a)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(N[(N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] - N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] + N[(N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -1e-199], N[(x + N[(y + N[(N[(t - z), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 0.0], N[(x + N[(y / N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + y \cdot \left(\left(\frac{t}{a - t} + 1\right) - \frac{z}{a - t}\right)\\
t_2 := \left(x + y\right) + \frac{y \cdot \left(t - z\right)}{a - t}\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t_2 \leq 0:\\
\;\;\;\;x + \frac{y}{\frac{t}{z - a}}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -inf.0 or 0.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t)))

    1. Initial program 68.4%

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

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

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

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

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

    if -inf.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -9.99999999999999982e-200

    1. Initial program 98.3%

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

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

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

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

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

    1. Initial program 4.4%

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

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

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

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

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

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

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

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

        \[\leadsto x + \left(\color{blue}{\frac{-\left(z - t\right)}{\frac{a - t}{y}}} + y\right) \]
      9. associate-/r/49.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 77.3% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -9.4 \cdot 10^{+207}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -1.28 \cdot 10^{+67}:\\ \;\;\;\;x - z \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq -4 \cdot 10^{+21} \lor \neg \left(a \leq 3 \cdot 10^{+53}\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x + \left(z - a\right) \cdot \frac{y}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -9.4e+207)
   (+ x y)
   (if (<= a -1.28e+67)
     (- x (* z (/ y a)))
     (if (or (<= a -4e+21) (not (<= a 3e+53)))
       (+ x y)
       (+ x (* (- z a) (/ y t)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -9.4e+207) {
		tmp = x + y;
	} else if (a <= -1.28e+67) {
		tmp = x - (z * (y / a));
	} else if ((a <= -4e+21) || !(a <= 3e+53)) {
		tmp = x + y;
	} else {
		tmp = x + ((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 <= (-9.4d+207)) then
        tmp = x + y
    else if (a <= (-1.28d+67)) then
        tmp = x - (z * (y / a))
    else if ((a <= (-4d+21)) .or. (.not. (a <= 3d+53))) then
        tmp = x + y
    else
        tmp = x + ((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 <= -9.4e+207) {
		tmp = x + y;
	} else if (a <= -1.28e+67) {
		tmp = x - (z * (y / a));
	} else if ((a <= -4e+21) || !(a <= 3e+53)) {
		tmp = x + y;
	} else {
		tmp = x + ((z - a) * (y / t));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -9.4e+207:
		tmp = x + y
	elif a <= -1.28e+67:
		tmp = x - (z * (y / a))
	elif (a <= -4e+21) or not (a <= 3e+53):
		tmp = x + y
	else:
		tmp = x + ((z - a) * (y / t))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -9.4e+207)
		tmp = Float64(x + y);
	elseif (a <= -1.28e+67)
		tmp = Float64(x - Float64(z * Float64(y / a)));
	elseif ((a <= -4e+21) || !(a <= 3e+53))
		tmp = Float64(x + y);
	else
		tmp = Float64(x + Float64(Float64(z - a) * Float64(y / t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -9.4e+207)
		tmp = x + y;
	elseif (a <= -1.28e+67)
		tmp = x - (z * (y / a));
	elseif ((a <= -4e+21) || ~((a <= 3e+53)))
		tmp = x + y;
	else
		tmp = x + ((z - a) * (y / t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -9.4e+207], N[(x + y), $MachinePrecision], If[LessEqual[a, -1.28e+67], N[(x - N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, -4e+21], N[Not[LessEqual[a, 3e+53]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(N[(z - a), $MachinePrecision] * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.4 \cdot 10^{+207}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;a \leq -1.28 \cdot 10^{+67}:\\
\;\;\;\;x - z \cdot \frac{y}{a}\\

\mathbf{elif}\;a \leq -4 \cdot 10^{+21} \lor \neg \left(a \leq 3 \cdot 10^{+53}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -9.39999999999999951e207 or -1.28e67 < a < -4e21 or 2.99999999999999998e53 < a

    1. Initial program 71.5%

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

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

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

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

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

        \[\leadsto \color{blue}{y + x} \]
    6. Simplified78.4%

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

    if -9.39999999999999951e207 < a < -1.28e67

    1. Initial program 69.2%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(y - \frac{y}{\frac{a}{z}}\right) + x} \]
    7. Taylor expanded in a around 0 70.6%

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

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

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

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

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

    if -4e21 < a < 2.99999999999999998e53

    1. Initial program 72.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + -1 \cdot \frac{a \cdot y - \color{blue}{y \cdot z}}{t} \]
      5. associate-*r/76.1%

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

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

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

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

        \[\leadsto x + \left(-1 \cdot \frac{a \cdot y}{t} - \color{blue}{-1 \cdot \frac{y \cdot z}{t}}\right) \]
      10. cancel-sign-sub-inv75.4%

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

        \[\leadsto x + \left(-1 \cdot \frac{a \cdot y}{t} + \color{blue}{1} \cdot \frac{y \cdot z}{t}\right) \]
      12. *-lft-identity75.4%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.4 \cdot 10^{+207}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -1.28 \cdot 10^{+67}:\\ \;\;\;\;x - z \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq -4 \cdot 10^{+21} \lor \neg \left(a \leq 3 \cdot 10^{+53}\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x + \left(z - a\right) \cdot \frac{y}{t}\\ \end{array} \]

Alternative 3: 77.3% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -9.4 \cdot 10^{+207}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -2.4 \cdot 10^{+67}:\\ \;\;\;\;x - z \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq -6.8 \cdot 10^{+26} \lor \neg \left(a \leq 2.1 \cdot 10^{+53}\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z - a}{\frac{t}{y}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -9.4e+207)
   (+ x y)
   (if (<= a -2.4e+67)
     (- x (* z (/ y a)))
     (if (or (<= a -6.8e+26) (not (<= a 2.1e+53)))
       (+ x y)
       (+ x (/ (- z a) (/ t y)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -9.4e+207) {
		tmp = x + y;
	} else if (a <= -2.4e+67) {
		tmp = x - (z * (y / a));
	} else if ((a <= -6.8e+26) || !(a <= 2.1e+53)) {
		tmp = x + y;
	} else {
		tmp = x + ((z - a) / (t / 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 (a <= (-9.4d+207)) then
        tmp = x + y
    else if (a <= (-2.4d+67)) then
        tmp = x - (z * (y / a))
    else if ((a <= (-6.8d+26)) .or. (.not. (a <= 2.1d+53))) then
        tmp = x + y
    else
        tmp = x + ((z - a) / (t / y))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -9.4e+207) {
		tmp = x + y;
	} else if (a <= -2.4e+67) {
		tmp = x - (z * (y / a));
	} else if ((a <= -6.8e+26) || !(a <= 2.1e+53)) {
		tmp = x + y;
	} else {
		tmp = x + ((z - a) / (t / y));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -9.4e+207:
		tmp = x + y
	elif a <= -2.4e+67:
		tmp = x - (z * (y / a))
	elif (a <= -6.8e+26) or not (a <= 2.1e+53):
		tmp = x + y
	else:
		tmp = x + ((z - a) / (t / y))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -9.4e+207)
		tmp = Float64(x + y);
	elseif (a <= -2.4e+67)
		tmp = Float64(x - Float64(z * Float64(y / a)));
	elseif ((a <= -6.8e+26) || !(a <= 2.1e+53))
		tmp = Float64(x + y);
	else
		tmp = Float64(x + Float64(Float64(z - a) / Float64(t / y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -9.4e+207)
		tmp = x + y;
	elseif (a <= -2.4e+67)
		tmp = x - (z * (y / a));
	elseif ((a <= -6.8e+26) || ~((a <= 2.1e+53)))
		tmp = x + y;
	else
		tmp = x + ((z - a) / (t / y));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -9.4e+207], N[(x + y), $MachinePrecision], If[LessEqual[a, -2.4e+67], N[(x - N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, -6.8e+26], N[Not[LessEqual[a, 2.1e+53]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(N[(z - a), $MachinePrecision] / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.4 \cdot 10^{+207}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;a \leq -2.4 \cdot 10^{+67}:\\
\;\;\;\;x - z \cdot \frac{y}{a}\\

\mathbf{elif}\;a \leq -6.8 \cdot 10^{+26} \lor \neg \left(a \leq 2.1 \cdot 10^{+53}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -9.39999999999999951e207 or -2.40000000000000002e67 < a < -6.8000000000000005e26 or 2.1000000000000002e53 < a

    1. Initial program 71.5%

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

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

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

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

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

        \[\leadsto \color{blue}{y + x} \]
    6. Simplified78.4%

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

    if -9.39999999999999951e207 < a < -2.40000000000000002e67

    1. Initial program 69.2%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(y - \frac{y}{\frac{a}{z}}\right) + x} \]
    7. Taylor expanded in a around 0 70.6%

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

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

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

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

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

    if -6.8000000000000005e26 < a < 2.1000000000000002e53

    1. Initial program 72.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + -1 \cdot \frac{a \cdot y - \color{blue}{y \cdot z}}{t} \]
      5. associate-*r/76.1%

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

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

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

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

        \[\leadsto x + \left(-1 \cdot \frac{a \cdot y}{t} - \color{blue}{-1 \cdot \frac{y \cdot z}{t}}\right) \]
      10. cancel-sign-sub-inv75.4%

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

        \[\leadsto x + \left(-1 \cdot \frac{a \cdot y}{t} + \color{blue}{1} \cdot \frac{y \cdot z}{t}\right) \]
      12. *-lft-identity75.4%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.4 \cdot 10^{+207}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -2.4 \cdot 10^{+67}:\\ \;\;\;\;x - z \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq -6.8 \cdot 10^{+26} \lor \neg \left(a \leq 2.1 \cdot 10^{+53}\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z - a}{\frac{t}{y}}\\ \end{array} \]

Alternative 4: 90.6% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -3.05 \cdot 10^{+206}:\\ \;\;\;\;x + \frac{z - a}{\frac{t}{y}}\\ \mathbf{elif}\;t \leq 7.2 \cdot 10^{+98}:\\ \;\;\;\;x + \left(y + \frac{t - z}{\frac{a - t}{y}}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(z - a\right) \cdot \frac{y}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -3.05e+206)
   (+ x (/ (- z a) (/ t y)))
   (if (<= t 7.2e+98)
     (+ x (+ y (/ (- t z) (/ (- a t) y))))
     (+ x (* (- z a) (/ y t))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -3.05e+206) {
		tmp = x + ((z - a) / (t / y));
	} else if (t <= 7.2e+98) {
		tmp = x + (y + ((t - z) / ((a - t) / y)));
	} else {
		tmp = x + ((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 (t <= (-3.05d+206)) then
        tmp = x + ((z - a) / (t / y))
    else if (t <= 7.2d+98) then
        tmp = x + (y + ((t - z) / ((a - t) / y)))
    else
        tmp = x + ((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 (t <= -3.05e+206) {
		tmp = x + ((z - a) / (t / y));
	} else if (t <= 7.2e+98) {
		tmp = x + (y + ((t - z) / ((a - t) / y)));
	} else {
		tmp = x + ((z - a) * (y / t));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -3.05e+206:
		tmp = x + ((z - a) / (t / y))
	elif t <= 7.2e+98:
		tmp = x + (y + ((t - z) / ((a - t) / y)))
	else:
		tmp = x + ((z - a) * (y / t))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -3.05e+206)
		tmp = Float64(x + Float64(Float64(z - a) / Float64(t / y)));
	elseif (t <= 7.2e+98)
		tmp = Float64(x + Float64(y + Float64(Float64(t - z) / Float64(Float64(a - t) / y))));
	else
		tmp = Float64(x + Float64(Float64(z - a) * Float64(y / t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -3.05e+206)
		tmp = x + ((z - a) / (t / y));
	elseif (t <= 7.2e+98)
		tmp = x + (y + ((t - z) / ((a - t) / y)));
	else
		tmp = x + ((z - a) * (y / t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.05e+206], N[(x + N[(N[(z - a), $MachinePrecision] / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.2e+98], N[(x + N[(y + N[(N[(t - z), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z - a), $MachinePrecision] * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.04999999999999983e206

    1. Initial program 37.0%

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

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

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

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

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

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

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

        \[\leadsto x + -1 \cdot \frac{a \cdot y + \color{blue}{\left(-z\right)} \cdot y}{t} \]
      3. cancel-sign-sub-inv71.0%

        \[\leadsto x + -1 \cdot \frac{\color{blue}{a \cdot y - z \cdot y}}{t} \]
      4. *-commutative71.0%

        \[\leadsto x + -1 \cdot \frac{a \cdot y - \color{blue}{y \cdot z}}{t} \]
      5. associate-*r/71.0%

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

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

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

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

        \[\leadsto x + \left(-1 \cdot \frac{a \cdot y}{t} - \color{blue}{-1 \cdot \frac{y \cdot z}{t}}\right) \]
      10. cancel-sign-sub-inv71.0%

        \[\leadsto x + \color{blue}{\left(-1 \cdot \frac{a \cdot y}{t} + \left(--1\right) \cdot \frac{y \cdot z}{t}\right)} \]
      11. metadata-eval71.0%

        \[\leadsto x + \left(-1 \cdot \frac{a \cdot y}{t} + \color{blue}{1} \cdot \frac{y \cdot z}{t}\right) \]
      12. *-lft-identity71.0%

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

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

        \[\leadsto x + \left(\frac{y \cdot z}{t} + \color{blue}{\left(-\frac{a \cdot y}{t}\right)}\right) \]
      15. sub-neg71.0%

        \[\leadsto x + \color{blue}{\left(\frac{y \cdot z}{t} - \frac{a \cdot y}{t}\right)} \]
      16. div-sub71.0%

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

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

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

        \[\leadsto x + \color{blue}{\frac{z - a}{\frac{t}{y}}} \]
    9. Applied egg-rr93.5%

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

    if -3.04999999999999983e206 < t < 7.19999999999999962e98

    1. Initial program 82.7%

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

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

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

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

    if 7.19999999999999962e98 < t

    1. Initial program 50.2%

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

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

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

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

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

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

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

        \[\leadsto x + -1 \cdot \frac{a \cdot y + \color{blue}{\left(-z\right)} \cdot y}{t} \]
      3. cancel-sign-sub-inv73.0%

        \[\leadsto x + -1 \cdot \frac{\color{blue}{a \cdot y - z \cdot y}}{t} \]
      4. *-commutative73.0%

        \[\leadsto x + -1 \cdot \frac{a \cdot y - \color{blue}{y \cdot z}}{t} \]
      5. associate-*r/73.0%

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

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

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

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

        \[\leadsto x + \left(-1 \cdot \frac{a \cdot y}{t} - \color{blue}{-1 \cdot \frac{y \cdot z}{t}}\right) \]
      10. cancel-sign-sub-inv73.0%

        \[\leadsto x + \color{blue}{\left(-1 \cdot \frac{a \cdot y}{t} + \left(--1\right) \cdot \frac{y \cdot z}{t}\right)} \]
      11. metadata-eval73.0%

        \[\leadsto x + \left(-1 \cdot \frac{a \cdot y}{t} + \color{blue}{1} \cdot \frac{y \cdot z}{t}\right) \]
      12. *-lft-identity73.0%

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

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

        \[\leadsto x + \left(\frac{y \cdot z}{t} + \color{blue}{\left(-\frac{a \cdot y}{t}\right)}\right) \]
      15. sub-neg73.0%

        \[\leadsto x + \color{blue}{\left(\frac{y \cdot z}{t} - \frac{a \cdot y}{t}\right)} \]
      16. div-sub73.0%

        \[\leadsto x + \color{blue}{\frac{y \cdot z - a \cdot y}{t}} \]
    7. Simplified93.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.05 \cdot 10^{+206}:\\ \;\;\;\;x + \frac{z - a}{\frac{t}{y}}\\ \mathbf{elif}\;t \leq 7.2 \cdot 10^{+98}:\\ \;\;\;\;x + \left(y + \frac{t - z}{\frac{a - t}{y}}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(z - a\right) \cdot \frac{y}{t}\\ \end{array} \]

Alternative 5: 82.0% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -3.8 \cdot 10^{-36}:\\ \;\;\;\;x + \frac{z - a}{\frac{t}{y}}\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{-115}:\\ \;\;\;\;x + \left(y - \frac{y}{\frac{a}{z}}\right)\\ \mathbf{elif}\;t \leq 4.05 \cdot 10^{+39}:\\ \;\;\;\;x - \frac{y \cdot z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + \left(z - a\right) \cdot \frac{y}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -3.8e-36)
   (+ x (/ (- z a) (/ t y)))
   (if (<= t 2.1e-115)
     (+ x (- y (/ y (/ a z))))
     (if (<= t 4.05e+39)
       (- x (/ (* y z) (- a t)))
       (+ x (* (- z a) (/ y t)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -3.8e-36) {
		tmp = x + ((z - a) / (t / y));
	} else if (t <= 2.1e-115) {
		tmp = x + (y - (y / (a / z)));
	} else if (t <= 4.05e+39) {
		tmp = x - ((y * z) / (a - t));
	} else {
		tmp = x + ((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 (t <= (-3.8d-36)) then
        tmp = x + ((z - a) / (t / y))
    else if (t <= 2.1d-115) then
        tmp = x + (y - (y / (a / z)))
    else if (t <= 4.05d+39) then
        tmp = x - ((y * z) / (a - t))
    else
        tmp = x + ((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 (t <= -3.8e-36) {
		tmp = x + ((z - a) / (t / y));
	} else if (t <= 2.1e-115) {
		tmp = x + (y - (y / (a / z)));
	} else if (t <= 4.05e+39) {
		tmp = x - ((y * z) / (a - t));
	} else {
		tmp = x + ((z - a) * (y / t));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -3.8e-36:
		tmp = x + ((z - a) / (t / y))
	elif t <= 2.1e-115:
		tmp = x + (y - (y / (a / z)))
	elif t <= 4.05e+39:
		tmp = x - ((y * z) / (a - t))
	else:
		tmp = x + ((z - a) * (y / t))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -3.8e-36)
		tmp = Float64(x + Float64(Float64(z - a) / Float64(t / y)));
	elseif (t <= 2.1e-115)
		tmp = Float64(x + Float64(y - Float64(y / Float64(a / z))));
	elseif (t <= 4.05e+39)
		tmp = Float64(x - Float64(Float64(y * z) / Float64(a - t)));
	else
		tmp = Float64(x + Float64(Float64(z - a) * Float64(y / t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -3.8e-36)
		tmp = x + ((z - a) / (t / y));
	elseif (t <= 2.1e-115)
		tmp = x + (y - (y / (a / z)));
	elseif (t <= 4.05e+39)
		tmp = x - ((y * z) / (a - t));
	else
		tmp = x + ((z - a) * (y / t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.8e-36], N[(x + N[(N[(z - a), $MachinePrecision] / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.1e-115], N[(x + N[(y - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.05e+39], N[(x - N[(N[(y * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z - a), $MachinePrecision] * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t \leq 4.05 \cdot 10^{+39}:\\
\;\;\;\;x - \frac{y \cdot z}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -3.79999999999999971e-36

    1. Initial program 51.0%

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

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

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

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

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

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

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

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

        \[\leadsto x + -1 \cdot \frac{\color{blue}{a \cdot y - z \cdot y}}{t} \]
      4. *-commutative71.2%

        \[\leadsto x + -1 \cdot \frac{a \cdot y - \color{blue}{y \cdot z}}{t} \]
      5. associate-*r/71.2%

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

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

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

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

        \[\leadsto x + \left(-1 \cdot \frac{a \cdot y}{t} - \color{blue}{-1 \cdot \frac{y \cdot z}{t}}\right) \]
      10. cancel-sign-sub-inv71.2%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y \cdot z - a \cdot y}{t}} \]
    7. Simplified85.6%

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

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

        \[\leadsto x + \color{blue}{\frac{z - a}{\frac{t}{y}}} \]
    9. Applied egg-rr85.6%

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

    if -3.79999999999999971e-36 < t < 2.10000000000000002e-115

    1. Initial program 90.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(y - \color{blue}{\frac{y}{\frac{a}{z}}}\right) + x \]
    6. Simplified85.0%

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

    if 2.10000000000000002e-115 < t < 4.0499999999999999e39

    1. Initial program 96.7%

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

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

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

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

      \[\leadsto x + \color{blue}{-1 \cdot \frac{y \cdot z}{a - t}} \]
    5. Step-by-step derivation
      1. associate-*r/91.7%

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

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

        \[\leadsto x + \frac{-\color{blue}{z \cdot y}}{a - t} \]
      4. distribute-lft-neg-in91.7%

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

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

    if 4.0499999999999999e39 < t

    1. Initial program 52.9%

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

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

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

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

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

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

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

        \[\leadsto x + -1 \cdot \frac{a \cdot y + \color{blue}{\left(-z\right)} \cdot y}{t} \]
      3. cancel-sign-sub-inv70.8%

        \[\leadsto x + -1 \cdot \frac{\color{blue}{a \cdot y - z \cdot y}}{t} \]
      4. *-commutative70.8%

        \[\leadsto x + -1 \cdot \frac{a \cdot y - \color{blue}{y \cdot z}}{t} \]
      5. associate-*r/70.8%

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

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

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

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

        \[\leadsto x + \left(-1 \cdot \frac{a \cdot y}{t} - \color{blue}{-1 \cdot \frac{y \cdot z}{t}}\right) \]
      10. cancel-sign-sub-inv70.8%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y \cdot z - a \cdot y}{t}} \]
    7. Simplified87.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.8 \cdot 10^{-36}:\\ \;\;\;\;x + \frac{z - a}{\frac{t}{y}}\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{-115}:\\ \;\;\;\;x + \left(y - \frac{y}{\frac{a}{z}}\right)\\ \mathbf{elif}\;t \leq 4.05 \cdot 10^{+39}:\\ \;\;\;\;x - \frac{y \cdot z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + \left(z - a\right) \cdot \frac{y}{t}\\ \end{array} \]

Alternative 6: 87.0% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -4.7 \cdot 10^{-36}:\\ \;\;\;\;x + \frac{z - a}{\frac{t}{y}}\\ \mathbf{elif}\;t \leq 3.75 \cdot 10^{+40}:\\ \;\;\;\;x + y \cdot \left(1 - \frac{z}{a - t}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(z - a\right) \cdot \frac{y}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -4.7e-36)
   (+ x (/ (- z a) (/ t y)))
   (if (<= t 3.75e+40)
     (+ x (* y (- 1.0 (/ z (- a t)))))
     (+ x (* (- z a) (/ y t))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -4.7e-36) {
		tmp = x + ((z - a) / (t / y));
	} else if (t <= 3.75e+40) {
		tmp = x + (y * (1.0 - (z / (a - t))));
	} else {
		tmp = x + ((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 (t <= (-4.7d-36)) then
        tmp = x + ((z - a) / (t / y))
    else if (t <= 3.75d+40) then
        tmp = x + (y * (1.0d0 - (z / (a - t))))
    else
        tmp = x + ((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 (t <= -4.7e-36) {
		tmp = x + ((z - a) / (t / y));
	} else if (t <= 3.75e+40) {
		tmp = x + (y * (1.0 - (z / (a - t))));
	} else {
		tmp = x + ((z - a) * (y / t));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -4.7e-36:
		tmp = x + ((z - a) / (t / y))
	elif t <= 3.75e+40:
		tmp = x + (y * (1.0 - (z / (a - t))))
	else:
		tmp = x + ((z - a) * (y / t))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -4.7e-36)
		tmp = Float64(x + Float64(Float64(z - a) / Float64(t / y)));
	elseif (t <= 3.75e+40)
		tmp = Float64(x + Float64(y * Float64(1.0 - Float64(z / Float64(a - t)))));
	else
		tmp = Float64(x + Float64(Float64(z - a) * Float64(y / t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -4.7e-36)
		tmp = x + ((z - a) / (t / y));
	elseif (t <= 3.75e+40)
		tmp = x + (y * (1.0 - (z / (a - t))));
	else
		tmp = x + ((z - a) * (y / t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.7e-36], N[(x + N[(N[(z - a), $MachinePrecision] / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.75e+40], N[(x + N[(y * N[(1.0 - N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z - a), $MachinePrecision] * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.7000000000000003e-36

    1. Initial program 51.0%

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

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

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

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

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

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

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

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

        \[\leadsto x + -1 \cdot \frac{\color{blue}{a \cdot y - z \cdot y}}{t} \]
      4. *-commutative71.2%

        \[\leadsto x + -1 \cdot \frac{a \cdot y - \color{blue}{y \cdot z}}{t} \]
      5. associate-*r/71.2%

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

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

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

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

        \[\leadsto x + \left(-1 \cdot \frac{a \cdot y}{t} - \color{blue}{-1 \cdot \frac{y \cdot z}{t}}\right) \]
      10. cancel-sign-sub-inv71.2%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y \cdot z - a \cdot y}{t}} \]
    7. Simplified85.6%

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

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

        \[\leadsto x + \color{blue}{\frac{z - a}{\frac{t}{y}}} \]
    9. Applied egg-rr85.6%

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

    if -4.7000000000000003e-36 < t < 3.7499999999999998e40

    1. Initial program 91.6%

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

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

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

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

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

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

    if 3.7499999999999998e40 < t

    1. Initial program 52.9%

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

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

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

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

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

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

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

        \[\leadsto x + -1 \cdot \frac{a \cdot y + \color{blue}{\left(-z\right)} \cdot y}{t} \]
      3. cancel-sign-sub-inv70.8%

        \[\leadsto x + -1 \cdot \frac{\color{blue}{a \cdot y - z \cdot y}}{t} \]
      4. *-commutative70.8%

        \[\leadsto x + -1 \cdot \frac{a \cdot y - \color{blue}{y \cdot z}}{t} \]
      5. associate-*r/70.8%

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

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

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

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

        \[\leadsto x + \left(-1 \cdot \frac{a \cdot y}{t} - \color{blue}{-1 \cdot \frac{y \cdot z}{t}}\right) \]
      10. cancel-sign-sub-inv70.8%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y \cdot z - a \cdot y}{t}} \]
    7. Simplified87.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.7 \cdot 10^{-36}:\\ \;\;\;\;x + \frac{z - a}{\frac{t}{y}}\\ \mathbf{elif}\;t \leq 3.75 \cdot 10^{+40}:\\ \;\;\;\;x + y \cdot \left(1 - \frac{z}{a - t}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(z - a\right) \cdot \frac{y}{t}\\ \end{array} \]

Alternative 7: 87.1% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -4.7 \cdot 10^{-36}:\\ \;\;\;\;x + \frac{z - a}{\frac{t}{y}}\\ \mathbf{elif}\;t \leq 3.45 \cdot 10^{+40}:\\ \;\;\;\;x + \left(y - \frac{y}{\frac{a - t}{z}}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(z - a\right) \cdot \frac{y}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -4.7e-36)
   (+ x (/ (- z a) (/ t y)))
   (if (<= t 3.45e+40)
     (+ x (- y (/ y (/ (- a t) z))))
     (+ x (* (- z a) (/ y t))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -4.7e-36) {
		tmp = x + ((z - a) / (t / y));
	} else if (t <= 3.45e+40) {
		tmp = x + (y - (y / ((a - t) / z)));
	} else {
		tmp = x + ((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 (t <= (-4.7d-36)) then
        tmp = x + ((z - a) / (t / y))
    else if (t <= 3.45d+40) then
        tmp = x + (y - (y / ((a - t) / z)))
    else
        tmp = x + ((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 (t <= -4.7e-36) {
		tmp = x + ((z - a) / (t / y));
	} else if (t <= 3.45e+40) {
		tmp = x + (y - (y / ((a - t) / z)));
	} else {
		tmp = x + ((z - a) * (y / t));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -4.7e-36:
		tmp = x + ((z - a) / (t / y))
	elif t <= 3.45e+40:
		tmp = x + (y - (y / ((a - t) / z)))
	else:
		tmp = x + ((z - a) * (y / t))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -4.7e-36)
		tmp = Float64(x + Float64(Float64(z - a) / Float64(t / y)));
	elseif (t <= 3.45e+40)
		tmp = Float64(x + Float64(y - Float64(y / Float64(Float64(a - t) / z))));
	else
		tmp = Float64(x + Float64(Float64(z - a) * Float64(y / t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -4.7e-36)
		tmp = x + ((z - a) / (t / y));
	elseif (t <= 3.45e+40)
		tmp = x + (y - (y / ((a - t) / z)));
	else
		tmp = x + ((z - a) * (y / t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.7e-36], N[(x + N[(N[(z - a), $MachinePrecision] / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.45e+40], N[(x + N[(y - N[(y / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z - a), $MachinePrecision] * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.7000000000000003e-36

    1. Initial program 51.0%

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

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

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

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

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

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

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

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

        \[\leadsto x + -1 \cdot \frac{\color{blue}{a \cdot y - z \cdot y}}{t} \]
      4. *-commutative71.2%

        \[\leadsto x + -1 \cdot \frac{a \cdot y - \color{blue}{y \cdot z}}{t} \]
      5. associate-*r/71.2%

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

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

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

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

        \[\leadsto x + \left(-1 \cdot \frac{a \cdot y}{t} - \color{blue}{-1 \cdot \frac{y \cdot z}{t}}\right) \]
      10. cancel-sign-sub-inv71.2%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y \cdot z - a \cdot y}{t}} \]
    7. Simplified85.6%

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

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

        \[\leadsto x + \color{blue}{\frac{z - a}{\frac{t}{y}}} \]
    9. Applied egg-rr85.6%

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

    if -4.7000000000000003e-36 < t < 3.4500000000000001e40

    1. Initial program 91.6%

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

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

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

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

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

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

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

    if 3.4500000000000001e40 < t

    1. Initial program 52.9%

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

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

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

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

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

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

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

        \[\leadsto x + -1 \cdot \frac{a \cdot y + \color{blue}{\left(-z\right)} \cdot y}{t} \]
      3. cancel-sign-sub-inv70.8%

        \[\leadsto x + -1 \cdot \frac{\color{blue}{a \cdot y - z \cdot y}}{t} \]
      4. *-commutative70.8%

        \[\leadsto x + -1 \cdot \frac{a \cdot y - \color{blue}{y \cdot z}}{t} \]
      5. associate-*r/70.8%

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

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

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

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

        \[\leadsto x + \left(-1 \cdot \frac{a \cdot y}{t} - \color{blue}{-1 \cdot \frac{y \cdot z}{t}}\right) \]
      10. cancel-sign-sub-inv70.8%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y \cdot z - a \cdot y}{t}} \]
    7. Simplified87.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.7 \cdot 10^{-36}:\\ \;\;\;\;x + \frac{z - a}{\frac{t}{y}}\\ \mathbf{elif}\;t \leq 3.45 \cdot 10^{+40}:\\ \;\;\;\;x + \left(y - \frac{y}{\frac{a - t}{z}}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(z - a\right) \cdot \frac{y}{t}\\ \end{array} \]

Alternative 8: 81.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.7 \cdot 10^{-36}:\\ \;\;\;\;x + \frac{z - a}{\frac{t}{y}}\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{-13}:\\ \;\;\;\;x + \left(y - \frac{y}{\frac{a}{z}}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(z - a\right) \cdot \frac{y}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -1.7e-36)
   (+ x (/ (- z a) (/ t y)))
   (if (<= t 2.5e-13) (+ x (- y (/ y (/ a z)))) (+ x (* (- z a) (/ y t))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -1.7e-36) {
		tmp = x + ((z - a) / (t / y));
	} else if (t <= 2.5e-13) {
		tmp = x + (y - (y / (a / z)));
	} else {
		tmp = x + ((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 (t <= (-1.7d-36)) then
        tmp = x + ((z - a) / (t / y))
    else if (t <= 2.5d-13) then
        tmp = x + (y - (y / (a / z)))
    else
        tmp = x + ((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 (t <= -1.7e-36) {
		tmp = x + ((z - a) / (t / y));
	} else if (t <= 2.5e-13) {
		tmp = x + (y - (y / (a / z)));
	} else {
		tmp = x + ((z - a) * (y / t));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -1.7e-36:
		tmp = x + ((z - a) / (t / y))
	elif t <= 2.5e-13:
		tmp = x + (y - (y / (a / z)))
	else:
		tmp = x + ((z - a) * (y / t))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -1.7e-36)
		tmp = Float64(x + Float64(Float64(z - a) / Float64(t / y)));
	elseif (t <= 2.5e-13)
		tmp = Float64(x + Float64(y - Float64(y / Float64(a / z))));
	else
		tmp = Float64(x + Float64(Float64(z - a) * Float64(y / t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -1.7e-36)
		tmp = x + ((z - a) / (t / y));
	elseif (t <= 2.5e-13)
		tmp = x + (y - (y / (a / z)));
	else
		tmp = x + ((z - a) * (y / t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.7e-36], N[(x + N[(N[(z - a), $MachinePrecision] / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.5e-13], N[(x + N[(y - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z - a), $MachinePrecision] * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.7000000000000001e-36

    1. Initial program 51.0%

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

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

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

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

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

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

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

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

        \[\leadsto x + -1 \cdot \frac{\color{blue}{a \cdot y - z \cdot y}}{t} \]
      4. *-commutative71.2%

        \[\leadsto x + -1 \cdot \frac{a \cdot y - \color{blue}{y \cdot z}}{t} \]
      5. associate-*r/71.2%

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

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

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

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

        \[\leadsto x + \left(-1 \cdot \frac{a \cdot y}{t} - \color{blue}{-1 \cdot \frac{y \cdot z}{t}}\right) \]
      10. cancel-sign-sub-inv71.2%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y \cdot z - a \cdot y}{t}} \]
    7. Simplified85.6%

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

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

        \[\leadsto x + \color{blue}{\frac{z - a}{\frac{t}{y}}} \]
    9. Applied egg-rr85.6%

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

    if -1.7000000000000001e-36 < t < 2.49999999999999995e-13

    1. Initial program 90.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.49999999999999995e-13 < t

    1. Initial program 60.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + -1 \cdot \frac{a \cdot y - \color{blue}{y \cdot z}}{t} \]
      5. associate-*r/72.3%

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

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

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

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

        \[\leadsto x + \left(-1 \cdot \frac{a \cdot y}{t} - \color{blue}{-1 \cdot \frac{y \cdot z}{t}}\right) \]
      10. cancel-sign-sub-inv72.3%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.7 \cdot 10^{-36}:\\ \;\;\;\;x + \frac{z - a}{\frac{t}{y}}\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{-13}:\\ \;\;\;\;x + \left(y - \frac{y}{\frac{a}{z}}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(z - a\right) \cdot \frac{y}{t}\\ \end{array} \]

Alternative 9: 76.7% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.7 \cdot 10^{+112} \lor \neg \left(a \leq 1.45 \cdot 10^{+53}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.69999999999999997e112 or 1.4500000000000001e53 < a

    1. Initial program 71.5%

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

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

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

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

      \[\leadsto \color{blue}{x + y} \]
    5. Step-by-step derivation
      1. +-commutative76.3%

        \[\leadsto \color{blue}{y + x} \]
    6. Simplified76.3%

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

    if -1.69999999999999997e112 < a < 1.4500000000000001e53

    1. Initial program 72.3%

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

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{t}} \]
    6. Step-by-step derivation
      1. associate-/l*74.6%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{t}{z}}} \]
    7. Simplified74.6%

      \[\leadsto x + \color{blue}{\frac{y}{\frac{t}{z}}} \]
    8. Step-by-step derivation
      1. associate-/r/75.7%

        \[\leadsto x + \color{blue}{\frac{y}{t} \cdot z} \]
    9. Applied egg-rr75.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.7 \cdot 10^{+112} \lor \neg \left(a \leq 1.45 \cdot 10^{+53}\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y}{t}\\ \end{array} \]

Alternative 10: 63.1% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.6 \cdot 10^{+44} \lor \neg \left(a \leq 1.3 \cdot 10^{-88}\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= a -1.6e+44) (not (<= a 1.3e-88))) (+ x y) x))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a <= -1.6e+44) || !(a <= 1.3e-88)) {
		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 ((a <= (-1.6d+44)) .or. (.not. (a <= 1.3d-88))) 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 ((a <= -1.6e+44) || !(a <= 1.3e-88)) {
		tmp = x + y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (a <= -1.6e+44) or not (a <= 1.3e-88):
		tmp = x + y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((a <= -1.6e+44) || !(a <= 1.3e-88))
		tmp = Float64(x + y);
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((a <= -1.6e+44) || ~((a <= 1.3e-88)))
		tmp = x + y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.6e+44], N[Not[LessEqual[a, 1.3e-88]], $MachinePrecision]], N[(x + y), $MachinePrecision], x]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.6 \cdot 10^{+44} \lor \neg \left(a \leq 1.3 \cdot 10^{-88}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.60000000000000002e44 or 1.30000000000000007e-88 < a

    1. Initial program 72.5%

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

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

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

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

      \[\leadsto \color{blue}{x + y} \]
    5. Step-by-step derivation
      1. +-commutative67.5%

        \[\leadsto \color{blue}{y + x} \]
    6. Simplified67.5%

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

    if -1.60000000000000002e44 < a < 1.30000000000000007e-88

    1. Initial program 71.4%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.6 \cdot 10^{+44} \lor \neg \left(a \leq 1.3 \cdot 10^{-88}\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 11: 50.4% 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 72.0%

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification45.4%

    \[\leadsto x \]

Developer target: 88.1% 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 2023333 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
  :precision binary64

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

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