Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3

Percentage Accurate: 68.8% → 89.0%
Time: 30.5s
Alternatives: 28
Speedup: 0.9×

Specification

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

\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{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 28 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: 68.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
	return x + (((y - x) * (z - t)) / (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 - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a):
	return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a)
	return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t)))
end
function tmp = code(x, y, z, t, a)
	tmp = x + (((y - x) * (z - t)) / (a - t));
end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 89.0% accurate, 0.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.00000000000000026e193 or 4.19999999999999972e89 < t

    1. Initial program 34.6%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv64.1%

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

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{z - t}{a - t}}, x\right) \]
    5. Applied egg-rr64.2%

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

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

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

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

        \[\leadsto y - \color{blue}{\frac{y - x}{\frac{t}{z - a}}} \]
    8. Simplified89.4%

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

    if -4.00000000000000026e193 < t < 4.19999999999999972e89

    1. Initial program 82.9%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv94.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4 \cdot 10^{+193} \lor \neg \left(t \leq 4.2 \cdot 10^{+89}\right):\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)\\ \end{array} \]

Alternative 2: 56.3% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ t_2 := x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{if}\;a \leq -2 \cdot 10^{+214}:\\ \;\;\;\;x \cdot \left(\frac{t}{a - t} + 1\right)\\ \mathbf{elif}\;a \leq -5.8 \cdot 10^{+83}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -22000000000000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -9.2 \cdot 10^{-107}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -6.6 \cdot 10^{-118}:\\ \;\;\;\;\frac{x \cdot \left(-z\right)}{a - t}\\ \mathbf{elif}\;a \leq -1.5 \cdot 10^{-204}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -9 \cdot 10^{-263}:\\ \;\;\;\;\frac{z}{t} \cdot \left(x - y\right)\\ \mathbf{elif}\;a \leq 9 \cdot 10^{+122}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- z t) (- a t)))) (t_2 (* x (- 1.0 (/ z a)))))
   (if (<= a -2e+214)
     (* x (+ (/ t (- a t)) 1.0))
     (if (<= a -5.8e+83)
       t_1
       (if (<= a -22000000000000.0)
         t_2
         (if (<= a -9.2e-107)
           t_1
           (if (<= a -6.6e-118)
             (/ (* x (- z)) (- a t))
             (if (<= a -1.5e-204)
               t_1
               (if (<= a -9e-263)
                 (* (/ z t) (- x y))
                 (if (<= a 9e+122) t_1 t_2))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((z - t) / (a - t));
	double t_2 = x * (1.0 - (z / a));
	double tmp;
	if (a <= -2e+214) {
		tmp = x * ((t / (a - t)) + 1.0);
	} else if (a <= -5.8e+83) {
		tmp = t_1;
	} else if (a <= -22000000000000.0) {
		tmp = t_2;
	} else if (a <= -9.2e-107) {
		tmp = t_1;
	} else if (a <= -6.6e-118) {
		tmp = (x * -z) / (a - t);
	} else if (a <= -1.5e-204) {
		tmp = t_1;
	} else if (a <= -9e-263) {
		tmp = (z / t) * (x - y);
	} else if (a <= 9e+122) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	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 * ((z - t) / (a - t))
    t_2 = x * (1.0d0 - (z / a))
    if (a <= (-2d+214)) then
        tmp = x * ((t / (a - t)) + 1.0d0)
    else if (a <= (-5.8d+83)) then
        tmp = t_1
    else if (a <= (-22000000000000.0d0)) then
        tmp = t_2
    else if (a <= (-9.2d-107)) then
        tmp = t_1
    else if (a <= (-6.6d-118)) then
        tmp = (x * -z) / (a - t)
    else if (a <= (-1.5d-204)) then
        tmp = t_1
    else if (a <= (-9d-263)) then
        tmp = (z / t) * (x - y)
    else if (a <= 9d+122) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((z - t) / (a - t));
	double t_2 = x * (1.0 - (z / a));
	double tmp;
	if (a <= -2e+214) {
		tmp = x * ((t / (a - t)) + 1.0);
	} else if (a <= -5.8e+83) {
		tmp = t_1;
	} else if (a <= -22000000000000.0) {
		tmp = t_2;
	} else if (a <= -9.2e-107) {
		tmp = t_1;
	} else if (a <= -6.6e-118) {
		tmp = (x * -z) / (a - t);
	} else if (a <= -1.5e-204) {
		tmp = t_1;
	} else if (a <= -9e-263) {
		tmp = (z / t) * (x - y);
	} else if (a <= 9e+122) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((z - t) / (a - t))
	t_2 = x * (1.0 - (z / a))
	tmp = 0
	if a <= -2e+214:
		tmp = x * ((t / (a - t)) + 1.0)
	elif a <= -5.8e+83:
		tmp = t_1
	elif a <= -22000000000000.0:
		tmp = t_2
	elif a <= -9.2e-107:
		tmp = t_1
	elif a <= -6.6e-118:
		tmp = (x * -z) / (a - t)
	elif a <= -1.5e-204:
		tmp = t_1
	elif a <= -9e-263:
		tmp = (z / t) * (x - y)
	elif a <= 9e+122:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(z - t) / Float64(a - t)))
	t_2 = Float64(x * Float64(1.0 - Float64(z / a)))
	tmp = 0.0
	if (a <= -2e+214)
		tmp = Float64(x * Float64(Float64(t / Float64(a - t)) + 1.0));
	elseif (a <= -5.8e+83)
		tmp = t_1;
	elseif (a <= -22000000000000.0)
		tmp = t_2;
	elseif (a <= -9.2e-107)
		tmp = t_1;
	elseif (a <= -6.6e-118)
		tmp = Float64(Float64(x * Float64(-z)) / Float64(a - t));
	elseif (a <= -1.5e-204)
		tmp = t_1;
	elseif (a <= -9e-263)
		tmp = Float64(Float64(z / t) * Float64(x - y));
	elseif (a <= 9e+122)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((z - t) / (a - t));
	t_2 = x * (1.0 - (z / a));
	tmp = 0.0;
	if (a <= -2e+214)
		tmp = x * ((t / (a - t)) + 1.0);
	elseif (a <= -5.8e+83)
		tmp = t_1;
	elseif (a <= -22000000000000.0)
		tmp = t_2;
	elseif (a <= -9.2e-107)
		tmp = t_1;
	elseif (a <= -6.6e-118)
		tmp = (x * -z) / (a - t);
	elseif (a <= -1.5e-204)
		tmp = t_1;
	elseif (a <= -9e-263)
		tmp = (z / t) * (x - y);
	elseif (a <= 9e+122)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2e+214], N[(x * N[(N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -5.8e+83], t$95$1, If[LessEqual[a, -22000000000000.0], t$95$2, If[LessEqual[a, -9.2e-107], t$95$1, If[LessEqual[a, -6.6e-118], N[(N[(x * (-z)), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.5e-204], t$95$1, If[LessEqual[a, -9e-263], N[(N[(z / t), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9e+122], t$95$1, t$95$2]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -5.8 \cdot 10^{+83}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -22000000000000:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq -9.2 \cdot 10^{-107}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -6.6 \cdot 10^{-118}:\\
\;\;\;\;\frac{x \cdot \left(-z\right)}{a - t}\\

\mathbf{elif}\;a \leq -1.5 \cdot 10^{-204}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 9 \cdot 10^{+122}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -1.9999999999999999e214

    1. Initial program 59.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv90.6%

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

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

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

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

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

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

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

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

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

    if -1.9999999999999999e214 < a < -5.79999999999999999e83 or -2.2e13 < a < -9.20000000000000014e-107 or -6.5999999999999999e-118 < a < -1.4999999999999999e-204 or -8.9999999999999994e-263 < a < 8.99999999999999995e122

    1. Initial program 67.6%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv84.8%

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right)} \]
    7. Step-by-step derivation
      1. div-sub69.3%

        \[\leadsto y \cdot \color{blue}{\frac{z - t}{a - t}} \]
    8. Simplified69.3%

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

    if -5.79999999999999999e83 < a < -2.2e13 or 8.99999999999999995e122 < a

    1. Initial program 78.3%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv94.0%

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{z - t}{a - t}\right)} \]
    8. Simplified77.0%

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

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

    if -9.20000000000000014e-107 < a < -6.5999999999999999e-118

    1. Initial program 61.5%

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

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

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

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

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

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

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

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

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

    if -1.4999999999999999e-204 < a < -8.9999999999999994e-263

    1. Initial program 68.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\frac{\color{blue}{\left(y - x\right) \cdot z}}{t} \]
      3. associate-*r/92.6%

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

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \left(-\frac{z}{t}\right)} \]
      5. distribute-neg-frac92.6%

        \[\leadsto \left(y - x\right) \cdot \color{blue}{\frac{-z}{t}} \]
    10. Simplified92.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2 \cdot 10^{+214}:\\ \;\;\;\;x \cdot \left(\frac{t}{a - t} + 1\right)\\ \mathbf{elif}\;a \leq -5.8 \cdot 10^{+83}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq -22000000000000:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;a \leq -9.2 \cdot 10^{-107}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq -6.6 \cdot 10^{-118}:\\ \;\;\;\;\frac{x \cdot \left(-z\right)}{a - t}\\ \mathbf{elif}\;a \leq -1.5 \cdot 10^{-204}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq -9 \cdot 10^{-263}:\\ \;\;\;\;\frac{z}{t} \cdot \left(x - y\right)\\ \mathbf{elif}\;a \leq 9 \cdot 10^{+122}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \end{array} \]

Alternative 3: 42.2% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{if}\;a \leq -3.8 \cdot 10^{+165}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.6 \cdot 10^{+95}:\\ \;\;\;\;y \cdot \frac{z - t}{a}\\ \mathbf{elif}\;a \leq -10000000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -3.2 \cdot 10^{-144}:\\ \;\;\;\;\frac{\left(y - x\right) \cdot z}{a}\\ \mathbf{elif}\;a \leq -1.9 \cdot 10^{-204}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq -1.18 \cdot 10^{-291}:\\ \;\;\;\;x \cdot \frac{-z}{a - t}\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{+66}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ z a)))))
   (if (<= a -3.8e+165)
     t_1
     (if (<= a -1.6e+95)
       (* y (/ (- z t) a))
       (if (<= a -10000000000.0)
         t_1
         (if (<= a -3.2e-144)
           (/ (* (- y x) z) a)
           (if (<= a -1.9e-204)
             y
             (if (<= a -1.18e-291)
               (* x (/ (- z) (- a t)))
               (if (<= a 3.6e+66) y t_1)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (z / a));
	double tmp;
	if (a <= -3.8e+165) {
		tmp = t_1;
	} else if (a <= -1.6e+95) {
		tmp = y * ((z - t) / a);
	} else if (a <= -10000000000.0) {
		tmp = t_1;
	} else if (a <= -3.2e-144) {
		tmp = ((y - x) * z) / a;
	} else if (a <= -1.9e-204) {
		tmp = y;
	} else if (a <= -1.18e-291) {
		tmp = x * (-z / (a - t));
	} else if (a <= 3.6e+66) {
		tmp = y;
	} 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) :: tmp
    t_1 = x * (1.0d0 - (z / a))
    if (a <= (-3.8d+165)) then
        tmp = t_1
    else if (a <= (-1.6d+95)) then
        tmp = y * ((z - t) / a)
    else if (a <= (-10000000000.0d0)) then
        tmp = t_1
    else if (a <= (-3.2d-144)) then
        tmp = ((y - x) * z) / a
    else if (a <= (-1.9d-204)) then
        tmp = y
    else if (a <= (-1.18d-291)) then
        tmp = x * (-z / (a - t))
    else if (a <= 3.6d+66) then
        tmp = y
    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 = x * (1.0 - (z / a));
	double tmp;
	if (a <= -3.8e+165) {
		tmp = t_1;
	} else if (a <= -1.6e+95) {
		tmp = y * ((z - t) / a);
	} else if (a <= -10000000000.0) {
		tmp = t_1;
	} else if (a <= -3.2e-144) {
		tmp = ((y - x) * z) / a;
	} else if (a <= -1.9e-204) {
		tmp = y;
	} else if (a <= -1.18e-291) {
		tmp = x * (-z / (a - t));
	} else if (a <= 3.6e+66) {
		tmp = y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (z / a))
	tmp = 0
	if a <= -3.8e+165:
		tmp = t_1
	elif a <= -1.6e+95:
		tmp = y * ((z - t) / a)
	elif a <= -10000000000.0:
		tmp = t_1
	elif a <= -3.2e-144:
		tmp = ((y - x) * z) / a
	elif a <= -1.9e-204:
		tmp = y
	elif a <= -1.18e-291:
		tmp = x * (-z / (a - t))
	elif a <= 3.6e+66:
		tmp = y
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(z / a)))
	tmp = 0.0
	if (a <= -3.8e+165)
		tmp = t_1;
	elseif (a <= -1.6e+95)
		tmp = Float64(y * Float64(Float64(z - t) / a));
	elseif (a <= -10000000000.0)
		tmp = t_1;
	elseif (a <= -3.2e-144)
		tmp = Float64(Float64(Float64(y - x) * z) / a);
	elseif (a <= -1.9e-204)
		tmp = y;
	elseif (a <= -1.18e-291)
		tmp = Float64(x * Float64(Float64(-z) / Float64(a - t)));
	elseif (a <= 3.6e+66)
		tmp = y;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (z / a));
	tmp = 0.0;
	if (a <= -3.8e+165)
		tmp = t_1;
	elseif (a <= -1.6e+95)
		tmp = y * ((z - t) / a);
	elseif (a <= -10000000000.0)
		tmp = t_1;
	elseif (a <= -3.2e-144)
		tmp = ((y - x) * z) / a;
	elseif (a <= -1.9e-204)
		tmp = y;
	elseif (a <= -1.18e-291)
		tmp = x * (-z / (a - t));
	elseif (a <= 3.6e+66)
		tmp = y;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.8e+165], t$95$1, If[LessEqual[a, -1.6e+95], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -10000000000.0], t$95$1, If[LessEqual[a, -3.2e-144], N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[a, -1.9e-204], y, If[LessEqual[a, -1.18e-291], N[(x * N[((-z) / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.6e+66], y, t$95$1]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{if}\;a \leq -3.8 \cdot 10^{+165}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -1.6 \cdot 10^{+95}:\\
\;\;\;\;y \cdot \frac{z - t}{a}\\

\mathbf{elif}\;a \leq -10000000000:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -3.2 \cdot 10^{-144}:\\
\;\;\;\;\frac{\left(y - x\right) \cdot z}{a}\\

\mathbf{elif}\;a \leq -1.9 \cdot 10^{-204}:\\
\;\;\;\;y\\

\mathbf{elif}\;a \leq -1.18 \cdot 10^{-291}:\\
\;\;\;\;x \cdot \frac{-z}{a - t}\\

\mathbf{elif}\;a \leq 3.6 \cdot 10^{+66}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -3.7999999999999999e165 or -1.6e95 < a < -1e10 or 3.6e66 < a

    1. Initial program 70.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv94.0%

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

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

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

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

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

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

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

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

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

    if -3.7999999999999999e165 < a < -1.6e95

    1. Initial program 73.0%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv99.8%

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right)} \]
    7. Step-by-step derivation
      1. div-sub79.2%

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

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

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

    if -1e10 < a < -3.19999999999999973e-144

    1. Initial program 74.6%

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

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

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

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

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

    if -3.19999999999999973e-144 < a < -1.89999999999999991e-204 or -1.18e-291 < a < 3.6e66

    1. Initial program 64.6%

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

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

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

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

    if -1.89999999999999991e-204 < a < -1.18e-291

    1. Initial program 67.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv66.9%

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

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{z - t}{a - t}}, x\right) \]
    5. Applied egg-rr66.8%

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{z - t}{a - t}\right)} \]
    8. Simplified39.5%

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

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

        \[\leadsto x \cdot \color{blue}{\frac{-1 \cdot z}{a - t}} \]
      2. neg-mul-167.9%

        \[\leadsto x \cdot \frac{\color{blue}{-z}}{a - t} \]
    11. Simplified67.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.8 \cdot 10^{+165}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;a \leq -1.6 \cdot 10^{+95}:\\ \;\;\;\;y \cdot \frac{z - t}{a}\\ \mathbf{elif}\;a \leq -10000000000:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;a \leq -3.2 \cdot 10^{-144}:\\ \;\;\;\;\frac{\left(y - x\right) \cdot z}{a}\\ \mathbf{elif}\;a \leq -1.9 \cdot 10^{-204}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq -1.18 \cdot 10^{-291}:\\ \;\;\;\;x \cdot \frac{-z}{a - t}\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{+66}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \end{array} \]

Alternative 4: 48.2% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{t - z}{t}\\ t_2 := x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{if}\;a \leq -3.5 \cdot 10^{+165}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -1.8 \cdot 10^{+95}:\\ \;\;\;\;y \cdot \frac{z - t}{a}\\ \mathbf{elif}\;a \leq -20000000000000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -3.2 \cdot 10^{-144}:\\ \;\;\;\;\frac{\left(y - x\right) \cdot z}{a}\\ \mathbf{elif}\;a \leq -6 \cdot 10^{-205}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.8 \cdot 10^{-263}:\\ \;\;\;\;x \cdot \frac{-z}{a - t}\\ \mathbf{elif}\;a \leq 5.6 \cdot 10^{+122}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- t z) t))) (t_2 (* x (- 1.0 (/ z a)))))
   (if (<= a -3.5e+165)
     t_2
     (if (<= a -1.8e+95)
       (* y (/ (- z t) a))
       (if (<= a -20000000000000.0)
         t_2
         (if (<= a -3.2e-144)
           (/ (* (- y x) z) a)
           (if (<= a -6e-205)
             t_1
             (if (<= a -1.8e-263)
               (* x (/ (- z) (- a t)))
               (if (<= a 5.6e+122) t_1 t_2)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((t - z) / t);
	double t_2 = x * (1.0 - (z / a));
	double tmp;
	if (a <= -3.5e+165) {
		tmp = t_2;
	} else if (a <= -1.8e+95) {
		tmp = y * ((z - t) / a);
	} else if (a <= -20000000000000.0) {
		tmp = t_2;
	} else if (a <= -3.2e-144) {
		tmp = ((y - x) * z) / a;
	} else if (a <= -6e-205) {
		tmp = t_1;
	} else if (a <= -1.8e-263) {
		tmp = x * (-z / (a - t));
	} else if (a <= 5.6e+122) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	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 * ((t - z) / t)
    t_2 = x * (1.0d0 - (z / a))
    if (a <= (-3.5d+165)) then
        tmp = t_2
    else if (a <= (-1.8d+95)) then
        tmp = y * ((z - t) / a)
    else if (a <= (-20000000000000.0d0)) then
        tmp = t_2
    else if (a <= (-3.2d-144)) then
        tmp = ((y - x) * z) / a
    else if (a <= (-6d-205)) then
        tmp = t_1
    else if (a <= (-1.8d-263)) then
        tmp = x * (-z / (a - t))
    else if (a <= 5.6d+122) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((t - z) / t);
	double t_2 = x * (1.0 - (z / a));
	double tmp;
	if (a <= -3.5e+165) {
		tmp = t_2;
	} else if (a <= -1.8e+95) {
		tmp = y * ((z - t) / a);
	} else if (a <= -20000000000000.0) {
		tmp = t_2;
	} else if (a <= -3.2e-144) {
		tmp = ((y - x) * z) / a;
	} else if (a <= -6e-205) {
		tmp = t_1;
	} else if (a <= -1.8e-263) {
		tmp = x * (-z / (a - t));
	} else if (a <= 5.6e+122) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((t - z) / t)
	t_2 = x * (1.0 - (z / a))
	tmp = 0
	if a <= -3.5e+165:
		tmp = t_2
	elif a <= -1.8e+95:
		tmp = y * ((z - t) / a)
	elif a <= -20000000000000.0:
		tmp = t_2
	elif a <= -3.2e-144:
		tmp = ((y - x) * z) / a
	elif a <= -6e-205:
		tmp = t_1
	elif a <= -1.8e-263:
		tmp = x * (-z / (a - t))
	elif a <= 5.6e+122:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(t - z) / t))
	t_2 = Float64(x * Float64(1.0 - Float64(z / a)))
	tmp = 0.0
	if (a <= -3.5e+165)
		tmp = t_2;
	elseif (a <= -1.8e+95)
		tmp = Float64(y * Float64(Float64(z - t) / a));
	elseif (a <= -20000000000000.0)
		tmp = t_2;
	elseif (a <= -3.2e-144)
		tmp = Float64(Float64(Float64(y - x) * z) / a);
	elseif (a <= -6e-205)
		tmp = t_1;
	elseif (a <= -1.8e-263)
		tmp = Float64(x * Float64(Float64(-z) / Float64(a - t)));
	elseif (a <= 5.6e+122)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((t - z) / t);
	t_2 = x * (1.0 - (z / a));
	tmp = 0.0;
	if (a <= -3.5e+165)
		tmp = t_2;
	elseif (a <= -1.8e+95)
		tmp = y * ((z - t) / a);
	elseif (a <= -20000000000000.0)
		tmp = t_2;
	elseif (a <= -3.2e-144)
		tmp = ((y - x) * z) / a;
	elseif (a <= -6e-205)
		tmp = t_1;
	elseif (a <= -1.8e-263)
		tmp = x * (-z / (a - t));
	elseif (a <= 5.6e+122)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.5e+165], t$95$2, If[LessEqual[a, -1.8e+95], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -20000000000000.0], t$95$2, If[LessEqual[a, -3.2e-144], N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[a, -6e-205], t$95$1, If[LessEqual[a, -1.8e-263], N[(x * N[((-z) / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.6e+122], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1.8 \cdot 10^{+95}:\\
\;\;\;\;y \cdot \frac{z - t}{a}\\

\mathbf{elif}\;a \leq -20000000000000:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq -3.2 \cdot 10^{-144}:\\
\;\;\;\;\frac{\left(y - x\right) \cdot z}{a}\\

\mathbf{elif}\;a \leq -6 \cdot 10^{-205}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -1.8 \cdot 10^{-263}:\\
\;\;\;\;x \cdot \frac{-z}{a - t}\\

\mathbf{elif}\;a \leq 5.6 \cdot 10^{+122}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -3.49999999999999996e165 or -1.79999999999999989e95 < a < -2e13 or 5.5999999999999999e122 < a

    1. Initial program 70.7%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv93.1%

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{z - t}{a - t}\right)} \]
    8. Simplified70.0%

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

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

    if -3.49999999999999996e165 < a < -1.79999999999999989e95

    1. Initial program 73.0%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv99.8%

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right)} \]
    7. Step-by-step derivation
      1. div-sub79.2%

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

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

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

    if -2e13 < a < -3.19999999999999973e-144

    1. Initial program 74.6%

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

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

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

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

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

    if -3.19999999999999973e-144 < a < -6e-205 or -1.8e-263 < a < 5.5999999999999999e122

    1. Initial program 65.3%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv81.4%

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{1}{\frac{a - t}{z - t}}, x\right)} \]
      5. clear-num81.4%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{z - t}{a - t}}, x\right) \]
    5. Applied egg-rr81.4%

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

      \[\leadsto \color{blue}{y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right)} \]
    7. Step-by-step derivation
      1. div-sub67.9%

        \[\leadsto y \cdot \color{blue}{\frac{z - t}{a - t}} \]
    8. Simplified67.9%

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

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

        \[\leadsto y \cdot \color{blue}{\frac{-1 \cdot \left(z - t\right)}{t}} \]
      2. neg-mul-160.5%

        \[\leadsto y \cdot \frac{\color{blue}{-\left(z - t\right)}}{t} \]
    11. Simplified60.5%

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

    if -6e-205 < a < -1.8e-263

    1. Initial program 70.4%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv70.1%

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

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{z - t}{a - t}}, x\right) \]
    5. Applied egg-rr70.2%

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{z - t}{a - t}\right)} \]
    8. Simplified44.6%

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

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

        \[\leadsto x \cdot \color{blue}{\frac{-1 \cdot z}{a - t}} \]
      2. neg-mul-173.9%

        \[\leadsto x \cdot \frac{\color{blue}{-z}}{a - t} \]
    11. Simplified73.9%

      \[\leadsto x \cdot \color{blue}{\frac{-z}{a - t}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification61.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.5 \cdot 10^{+165}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;a \leq -1.8 \cdot 10^{+95}:\\ \;\;\;\;y \cdot \frac{z - t}{a}\\ \mathbf{elif}\;a \leq -20000000000000:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;a \leq -3.2 \cdot 10^{-144}:\\ \;\;\;\;\frac{\left(y - x\right) \cdot z}{a}\\ \mathbf{elif}\;a \leq -6 \cdot 10^{-205}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{elif}\;a \leq -1.8 \cdot 10^{-263}:\\ \;\;\;\;x \cdot \frac{-z}{a - t}\\ \mathbf{elif}\;a \leq 5.6 \cdot 10^{+122}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \end{array} \]

Alternative 5: 48.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{t - z}{t}\\ t_2 := x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{if}\;a \leq -3.5 \cdot 10^{+165}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -9.5 \cdot 10^{+94}:\\ \;\;\;\;y \cdot \frac{z - t}{a}\\ \mathbf{elif}\;a \leq -75000000000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -6.2 \cdot 10^{-144}:\\ \;\;\;\;\frac{\left(y - x\right) \cdot z}{a}\\ \mathbf{elif}\;a \leq -1 \cdot 10^{-204}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -6.8 \cdot 10^{-292}:\\ \;\;\;\;\frac{z}{t} \cdot \left(x - y\right)\\ \mathbf{elif}\;a \leq 9 \cdot 10^{+122}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- t z) t))) (t_2 (* x (- 1.0 (/ z a)))))
   (if (<= a -3.5e+165)
     t_2
     (if (<= a -9.5e+94)
       (* y (/ (- z t) a))
       (if (<= a -75000000000.0)
         t_2
         (if (<= a -6.2e-144)
           (/ (* (- y x) z) a)
           (if (<= a -1e-204)
             t_1
             (if (<= a -6.8e-292)
               (* (/ z t) (- x y))
               (if (<= a 9e+122) t_1 t_2)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((t - z) / t);
	double t_2 = x * (1.0 - (z / a));
	double tmp;
	if (a <= -3.5e+165) {
		tmp = t_2;
	} else if (a <= -9.5e+94) {
		tmp = y * ((z - t) / a);
	} else if (a <= -75000000000.0) {
		tmp = t_2;
	} else if (a <= -6.2e-144) {
		tmp = ((y - x) * z) / a;
	} else if (a <= -1e-204) {
		tmp = t_1;
	} else if (a <= -6.8e-292) {
		tmp = (z / t) * (x - y);
	} else if (a <= 9e+122) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	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 * ((t - z) / t)
    t_2 = x * (1.0d0 - (z / a))
    if (a <= (-3.5d+165)) then
        tmp = t_2
    else if (a <= (-9.5d+94)) then
        tmp = y * ((z - t) / a)
    else if (a <= (-75000000000.0d0)) then
        tmp = t_2
    else if (a <= (-6.2d-144)) then
        tmp = ((y - x) * z) / a
    else if (a <= (-1d-204)) then
        tmp = t_1
    else if (a <= (-6.8d-292)) then
        tmp = (z / t) * (x - y)
    else if (a <= 9d+122) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((t - z) / t);
	double t_2 = x * (1.0 - (z / a));
	double tmp;
	if (a <= -3.5e+165) {
		tmp = t_2;
	} else if (a <= -9.5e+94) {
		tmp = y * ((z - t) / a);
	} else if (a <= -75000000000.0) {
		tmp = t_2;
	} else if (a <= -6.2e-144) {
		tmp = ((y - x) * z) / a;
	} else if (a <= -1e-204) {
		tmp = t_1;
	} else if (a <= -6.8e-292) {
		tmp = (z / t) * (x - y);
	} else if (a <= 9e+122) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((t - z) / t)
	t_2 = x * (1.0 - (z / a))
	tmp = 0
	if a <= -3.5e+165:
		tmp = t_2
	elif a <= -9.5e+94:
		tmp = y * ((z - t) / a)
	elif a <= -75000000000.0:
		tmp = t_2
	elif a <= -6.2e-144:
		tmp = ((y - x) * z) / a
	elif a <= -1e-204:
		tmp = t_1
	elif a <= -6.8e-292:
		tmp = (z / t) * (x - y)
	elif a <= 9e+122:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(t - z) / t))
	t_2 = Float64(x * Float64(1.0 - Float64(z / a)))
	tmp = 0.0
	if (a <= -3.5e+165)
		tmp = t_2;
	elseif (a <= -9.5e+94)
		tmp = Float64(y * Float64(Float64(z - t) / a));
	elseif (a <= -75000000000.0)
		tmp = t_2;
	elseif (a <= -6.2e-144)
		tmp = Float64(Float64(Float64(y - x) * z) / a);
	elseif (a <= -1e-204)
		tmp = t_1;
	elseif (a <= -6.8e-292)
		tmp = Float64(Float64(z / t) * Float64(x - y));
	elseif (a <= 9e+122)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((t - z) / t);
	t_2 = x * (1.0 - (z / a));
	tmp = 0.0;
	if (a <= -3.5e+165)
		tmp = t_2;
	elseif (a <= -9.5e+94)
		tmp = y * ((z - t) / a);
	elseif (a <= -75000000000.0)
		tmp = t_2;
	elseif (a <= -6.2e-144)
		tmp = ((y - x) * z) / a;
	elseif (a <= -1e-204)
		tmp = t_1;
	elseif (a <= -6.8e-292)
		tmp = (z / t) * (x - y);
	elseif (a <= 9e+122)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.5e+165], t$95$2, If[LessEqual[a, -9.5e+94], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -75000000000.0], t$95$2, If[LessEqual[a, -6.2e-144], N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[a, -1e-204], t$95$1, If[LessEqual[a, -6.8e-292], N[(N[(z / t), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9e+122], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -9.5 \cdot 10^{+94}:\\
\;\;\;\;y \cdot \frac{z - t}{a}\\

\mathbf{elif}\;a \leq -75000000000:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq -6.2 \cdot 10^{-144}:\\
\;\;\;\;\frac{\left(y - x\right) \cdot z}{a}\\

\mathbf{elif}\;a \leq -1 \cdot 10^{-204}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 9 \cdot 10^{+122}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -3.49999999999999996e165 or -9.4999999999999998e94 < a < -7.5e10 or 8.99999999999999995e122 < a

    1. Initial program 70.7%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv93.1%

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{z - t}{a - t}\right)} \]
    8. Simplified70.0%

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

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

    if -3.49999999999999996e165 < a < -9.4999999999999998e94

    1. Initial program 73.0%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv99.8%

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right)} \]
    7. Step-by-step derivation
      1. div-sub79.2%

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

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

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

    if -7.5e10 < a < -6.2000000000000001e-144

    1. Initial program 74.6%

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

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

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

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

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

    if -6.2000000000000001e-144 < a < -1e-204 or -6.80000000000000035e-292 < a < 8.99999999999999995e122

    1. Initial program 65.5%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv82.8%

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

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{z - t}{a - t}}, x\right) \]
    5. Applied egg-rr82.8%

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

      \[\leadsto \color{blue}{y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right)} \]
    7. Step-by-step derivation
      1. div-sub68.8%

        \[\leadsto y \cdot \color{blue}{\frac{z - t}{a - t}} \]
    8. Simplified68.8%

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

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

        \[\leadsto y \cdot \color{blue}{\frac{-1 \cdot \left(z - t\right)}{t}} \]
      2. neg-mul-160.9%

        \[\leadsto y \cdot \frac{\color{blue}{-\left(z - t\right)}}{t} \]
    11. Simplified60.9%

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

    if -1e-204 < a < -6.80000000000000035e-292

    1. Initial program 67.8%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{z \cdot \left(y - x\right)}{t}} \]
    9. Step-by-step derivation
      1. mul-1-neg76.7%

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

        \[\leadsto -\frac{\color{blue}{\left(y - x\right) \cdot z}}{t} \]
      3. associate-*r/81.5%

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

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \left(-\frac{z}{t}\right)} \]
      5. distribute-neg-frac81.5%

        \[\leadsto \left(y - x\right) \cdot \color{blue}{\frac{-z}{t}} \]
    10. Simplified81.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.5 \cdot 10^{+165}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;a \leq -9.5 \cdot 10^{+94}:\\ \;\;\;\;y \cdot \frac{z - t}{a}\\ \mathbf{elif}\;a \leq -75000000000:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;a \leq -6.2 \cdot 10^{-144}:\\ \;\;\;\;\frac{\left(y - x\right) \cdot z}{a}\\ \mathbf{elif}\;a \leq -1 \cdot 10^{-204}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{elif}\;a \leq -6.8 \cdot 10^{-292}:\\ \;\;\;\;\frac{z}{t} \cdot \left(x - y\right)\\ \mathbf{elif}\;a \leq 9 \cdot 10^{+122}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \end{array} \]

Alternative 6: 47.2% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{if}\;a \leq -4.5 \cdot 10^{+165}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.8 \cdot 10^{+95}:\\ \;\;\;\;y \cdot \frac{z - t}{a}\\ \mathbf{elif}\;a \leq -16500000000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -3.9 \cdot 10^{-146}:\\ \;\;\;\;\frac{\left(y - x\right) \cdot z}{a}\\ \mathbf{elif}\;a \leq -2.3 \cdot 10^{-204}:\\ \;\;\;\;\frac{-t}{\frac{a - t}{y}}\\ \mathbf{elif}\;a \leq -1.55 \cdot 10^{-291}:\\ \;\;\;\;\frac{z}{t} \cdot \left(x - y\right)\\ \mathbf{elif}\;a \leq 5.6 \cdot 10^{+122}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ z a)))))
   (if (<= a -4.5e+165)
     t_1
     (if (<= a -1.8e+95)
       (* y (/ (- z t) a))
       (if (<= a -16500000000000.0)
         t_1
         (if (<= a -3.9e-146)
           (/ (* (- y x) z) a)
           (if (<= a -2.3e-204)
             (/ (- t) (/ (- a t) y))
             (if (<= a -1.55e-291)
               (* (/ z t) (- x y))
               (if (<= a 5.6e+122) (* y (/ (- t z) t)) t_1)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (z / a));
	double tmp;
	if (a <= -4.5e+165) {
		tmp = t_1;
	} else if (a <= -1.8e+95) {
		tmp = y * ((z - t) / a);
	} else if (a <= -16500000000000.0) {
		tmp = t_1;
	} else if (a <= -3.9e-146) {
		tmp = ((y - x) * z) / a;
	} else if (a <= -2.3e-204) {
		tmp = -t / ((a - t) / y);
	} else if (a <= -1.55e-291) {
		tmp = (z / t) * (x - y);
	} else if (a <= 5.6e+122) {
		tmp = y * ((t - z) / 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) :: tmp
    t_1 = x * (1.0d0 - (z / a))
    if (a <= (-4.5d+165)) then
        tmp = t_1
    else if (a <= (-1.8d+95)) then
        tmp = y * ((z - t) / a)
    else if (a <= (-16500000000000.0d0)) then
        tmp = t_1
    else if (a <= (-3.9d-146)) then
        tmp = ((y - x) * z) / a
    else if (a <= (-2.3d-204)) then
        tmp = -t / ((a - t) / y)
    else if (a <= (-1.55d-291)) then
        tmp = (z / t) * (x - y)
    else if (a <= 5.6d+122) then
        tmp = y * ((t - z) / 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 = x * (1.0 - (z / a));
	double tmp;
	if (a <= -4.5e+165) {
		tmp = t_1;
	} else if (a <= -1.8e+95) {
		tmp = y * ((z - t) / a);
	} else if (a <= -16500000000000.0) {
		tmp = t_1;
	} else if (a <= -3.9e-146) {
		tmp = ((y - x) * z) / a;
	} else if (a <= -2.3e-204) {
		tmp = -t / ((a - t) / y);
	} else if (a <= -1.55e-291) {
		tmp = (z / t) * (x - y);
	} else if (a <= 5.6e+122) {
		tmp = y * ((t - z) / t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (z / a))
	tmp = 0
	if a <= -4.5e+165:
		tmp = t_1
	elif a <= -1.8e+95:
		tmp = y * ((z - t) / a)
	elif a <= -16500000000000.0:
		tmp = t_1
	elif a <= -3.9e-146:
		tmp = ((y - x) * z) / a
	elif a <= -2.3e-204:
		tmp = -t / ((a - t) / y)
	elif a <= -1.55e-291:
		tmp = (z / t) * (x - y)
	elif a <= 5.6e+122:
		tmp = y * ((t - z) / t)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(z / a)))
	tmp = 0.0
	if (a <= -4.5e+165)
		tmp = t_1;
	elseif (a <= -1.8e+95)
		tmp = Float64(y * Float64(Float64(z - t) / a));
	elseif (a <= -16500000000000.0)
		tmp = t_1;
	elseif (a <= -3.9e-146)
		tmp = Float64(Float64(Float64(y - x) * z) / a);
	elseif (a <= -2.3e-204)
		tmp = Float64(Float64(-t) / Float64(Float64(a - t) / y));
	elseif (a <= -1.55e-291)
		tmp = Float64(Float64(z / t) * Float64(x - y));
	elseif (a <= 5.6e+122)
		tmp = Float64(y * Float64(Float64(t - z) / t));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (z / a));
	tmp = 0.0;
	if (a <= -4.5e+165)
		tmp = t_1;
	elseif (a <= -1.8e+95)
		tmp = y * ((z - t) / a);
	elseif (a <= -16500000000000.0)
		tmp = t_1;
	elseif (a <= -3.9e-146)
		tmp = ((y - x) * z) / a;
	elseif (a <= -2.3e-204)
		tmp = -t / ((a - t) / y);
	elseif (a <= -1.55e-291)
		tmp = (z / t) * (x - y);
	elseif (a <= 5.6e+122)
		tmp = y * ((t - z) / t);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4.5e+165], t$95$1, If[LessEqual[a, -1.8e+95], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -16500000000000.0], t$95$1, If[LessEqual[a, -3.9e-146], N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[a, -2.3e-204], N[((-t) / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.55e-291], N[(N[(z / t), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.6e+122], N[(y * N[(N[(t - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{if}\;a \leq -4.5 \cdot 10^{+165}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -1.8 \cdot 10^{+95}:\\
\;\;\;\;y \cdot \frac{z - t}{a}\\

\mathbf{elif}\;a \leq -16500000000000:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -3.9 \cdot 10^{-146}:\\
\;\;\;\;\frac{\left(y - x\right) \cdot z}{a}\\

\mathbf{elif}\;a \leq -2.3 \cdot 10^{-204}:\\
\;\;\;\;\frac{-t}{\frac{a - t}{y}}\\

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

\mathbf{elif}\;a \leq 5.6 \cdot 10^{+122}:\\
\;\;\;\;y \cdot \frac{t - z}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if a < -4.4999999999999996e165 or -1.79999999999999989e95 < a < -1.65e13 or 5.5999999999999999e122 < a

    1. Initial program 70.7%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv93.1%

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{z - t}{a - t}\right)} \]
    8. Simplified70.0%

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

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

    if -4.4999999999999996e165 < a < -1.79999999999999989e95

    1. Initial program 73.0%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv99.8%

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right)} \]
    7. Step-by-step derivation
      1. div-sub79.2%

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

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

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

    if -1.65e13 < a < -3.90000000000000002e-146

    1. Initial program 74.6%

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

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

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

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

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

    if -3.90000000000000002e-146 < a < -2.2999999999999999e-204

    1. Initial program 65.6%

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot y}{a - t}} \]
    6. Step-by-step derivation
      1. mul-1-neg45.1%

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

        \[\leadsto -\color{blue}{\frac{t}{\frac{a - t}{y}}} \]
      3. distribute-neg-frac65.3%

        \[\leadsto \color{blue}{\frac{-t}{\frac{a - t}{y}}} \]
    7. Simplified65.3%

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

    if -2.2999999999999999e-204 < a < -1.55000000000000006e-291

    1. Initial program 67.8%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{z \cdot \left(y - x\right)}{t}} \]
    9. Step-by-step derivation
      1. mul-1-neg76.7%

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

        \[\leadsto -\frac{\color{blue}{\left(y - x\right) \cdot z}}{t} \]
      3. associate-*r/81.5%

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

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \left(-\frac{z}{t}\right)} \]
      5. distribute-neg-frac81.5%

        \[\leadsto \left(y - x\right) \cdot \color{blue}{\frac{-z}{t}} \]
    10. Simplified81.5%

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

    if -1.55000000000000006e-291 < a < 5.5999999999999999e122

    1. Initial program 65.5%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv83.4%

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{1}{\frac{a - t}{z - t}}, x\right)} \]
      5. clear-num83.4%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{z - t}{a - t}}, x\right) \]
    5. Applied egg-rr83.4%

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

      \[\leadsto \color{blue}{y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right)} \]
    7. Step-by-step derivation
      1. div-sub68.2%

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{-1 \cdot \left(z - t\right)}{t}} \]
      2. neg-mul-160.2%

        \[\leadsto y \cdot \frac{\color{blue}{-\left(z - t\right)}}{t} \]
    11. Simplified60.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.5 \cdot 10^{+165}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;a \leq -1.8 \cdot 10^{+95}:\\ \;\;\;\;y \cdot \frac{z - t}{a}\\ \mathbf{elif}\;a \leq -16500000000000:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;a \leq -3.9 \cdot 10^{-146}:\\ \;\;\;\;\frac{\left(y - x\right) \cdot z}{a}\\ \mathbf{elif}\;a \leq -2.3 \cdot 10^{-204}:\\ \;\;\;\;\frac{-t}{\frac{a - t}{y}}\\ \mathbf{elif}\;a \leq -1.55 \cdot 10^{-291}:\\ \;\;\;\;\frac{z}{t} \cdot \left(x - y\right)\\ \mathbf{elif}\;a \leq 5.6 \cdot 10^{+122}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \end{array} \]

Alternative 7: 46.5% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{if}\;a \leq -4.25 \cdot 10^{+167}:\\ \;\;\;\;x \cdot \left(\frac{t}{a - t} + 1\right)\\ \mathbf{elif}\;a \leq -5 \cdot 10^{+94}:\\ \;\;\;\;y \cdot \frac{z - t}{a}\\ \mathbf{elif}\;a \leq -4200000000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -8.2 \cdot 10^{-145}:\\ \;\;\;\;\frac{\left(y - x\right) \cdot z}{a}\\ \mathbf{elif}\;a \leq -5.1 \cdot 10^{-204}:\\ \;\;\;\;\frac{-t}{\frac{a - t}{y}}\\ \mathbf{elif}\;a \leq -7.2 \cdot 10^{-292}:\\ \;\;\;\;\frac{z}{t} \cdot \left(x - y\right)\\ \mathbf{elif}\;a \leq 5.6 \cdot 10^{+122}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ z a)))))
   (if (<= a -4.25e+167)
     (* x (+ (/ t (- a t)) 1.0))
     (if (<= a -5e+94)
       (* y (/ (- z t) a))
       (if (<= a -4200000000000.0)
         t_1
         (if (<= a -8.2e-145)
           (/ (* (- y x) z) a)
           (if (<= a -5.1e-204)
             (/ (- t) (/ (- a t) y))
             (if (<= a -7.2e-292)
               (* (/ z t) (- x y))
               (if (<= a 5.6e+122) (* y (/ (- t z) t)) t_1)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (z / a));
	double tmp;
	if (a <= -4.25e+167) {
		tmp = x * ((t / (a - t)) + 1.0);
	} else if (a <= -5e+94) {
		tmp = y * ((z - t) / a);
	} else if (a <= -4200000000000.0) {
		tmp = t_1;
	} else if (a <= -8.2e-145) {
		tmp = ((y - x) * z) / a;
	} else if (a <= -5.1e-204) {
		tmp = -t / ((a - t) / y);
	} else if (a <= -7.2e-292) {
		tmp = (z / t) * (x - y);
	} else if (a <= 5.6e+122) {
		tmp = y * ((t - z) / 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) :: tmp
    t_1 = x * (1.0d0 - (z / a))
    if (a <= (-4.25d+167)) then
        tmp = x * ((t / (a - t)) + 1.0d0)
    else if (a <= (-5d+94)) then
        tmp = y * ((z - t) / a)
    else if (a <= (-4200000000000.0d0)) then
        tmp = t_1
    else if (a <= (-8.2d-145)) then
        tmp = ((y - x) * z) / a
    else if (a <= (-5.1d-204)) then
        tmp = -t / ((a - t) / y)
    else if (a <= (-7.2d-292)) then
        tmp = (z / t) * (x - y)
    else if (a <= 5.6d+122) then
        tmp = y * ((t - z) / 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 = x * (1.0 - (z / a));
	double tmp;
	if (a <= -4.25e+167) {
		tmp = x * ((t / (a - t)) + 1.0);
	} else if (a <= -5e+94) {
		tmp = y * ((z - t) / a);
	} else if (a <= -4200000000000.0) {
		tmp = t_1;
	} else if (a <= -8.2e-145) {
		tmp = ((y - x) * z) / a;
	} else if (a <= -5.1e-204) {
		tmp = -t / ((a - t) / y);
	} else if (a <= -7.2e-292) {
		tmp = (z / t) * (x - y);
	} else if (a <= 5.6e+122) {
		tmp = y * ((t - z) / t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (z / a))
	tmp = 0
	if a <= -4.25e+167:
		tmp = x * ((t / (a - t)) + 1.0)
	elif a <= -5e+94:
		tmp = y * ((z - t) / a)
	elif a <= -4200000000000.0:
		tmp = t_1
	elif a <= -8.2e-145:
		tmp = ((y - x) * z) / a
	elif a <= -5.1e-204:
		tmp = -t / ((a - t) / y)
	elif a <= -7.2e-292:
		tmp = (z / t) * (x - y)
	elif a <= 5.6e+122:
		tmp = y * ((t - z) / t)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(z / a)))
	tmp = 0.0
	if (a <= -4.25e+167)
		tmp = Float64(x * Float64(Float64(t / Float64(a - t)) + 1.0));
	elseif (a <= -5e+94)
		tmp = Float64(y * Float64(Float64(z - t) / a));
	elseif (a <= -4200000000000.0)
		tmp = t_1;
	elseif (a <= -8.2e-145)
		tmp = Float64(Float64(Float64(y - x) * z) / a);
	elseif (a <= -5.1e-204)
		tmp = Float64(Float64(-t) / Float64(Float64(a - t) / y));
	elseif (a <= -7.2e-292)
		tmp = Float64(Float64(z / t) * Float64(x - y));
	elseif (a <= 5.6e+122)
		tmp = Float64(y * Float64(Float64(t - z) / t));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (z / a));
	tmp = 0.0;
	if (a <= -4.25e+167)
		tmp = x * ((t / (a - t)) + 1.0);
	elseif (a <= -5e+94)
		tmp = y * ((z - t) / a);
	elseif (a <= -4200000000000.0)
		tmp = t_1;
	elseif (a <= -8.2e-145)
		tmp = ((y - x) * z) / a;
	elseif (a <= -5.1e-204)
		tmp = -t / ((a - t) / y);
	elseif (a <= -7.2e-292)
		tmp = (z / t) * (x - y);
	elseif (a <= 5.6e+122)
		tmp = y * ((t - z) / t);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4.25e+167], N[(x * N[(N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -5e+94], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -4200000000000.0], t$95$1, If[LessEqual[a, -8.2e-145], N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[a, -5.1e-204], N[((-t) / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -7.2e-292], N[(N[(z / t), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.6e+122], N[(y * N[(N[(t - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{if}\;a \leq -4.25 \cdot 10^{+167}:\\
\;\;\;\;x \cdot \left(\frac{t}{a - t} + 1\right)\\

\mathbf{elif}\;a \leq -5 \cdot 10^{+94}:\\
\;\;\;\;y \cdot \frac{z - t}{a}\\

\mathbf{elif}\;a \leq -4200000000000:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -8.2 \cdot 10^{-145}:\\
\;\;\;\;\frac{\left(y - x\right) \cdot z}{a}\\

\mathbf{elif}\;a \leq -5.1 \cdot 10^{-204}:\\
\;\;\;\;\frac{-t}{\frac{a - t}{y}}\\

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

\mathbf{elif}\;a \leq 5.6 \cdot 10^{+122}:\\
\;\;\;\;y \cdot \frac{t - z}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if a < -4.25000000000000003e167

    1. Initial program 59.5%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv91.4%

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

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

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

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

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

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

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

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

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

    if -4.25000000000000003e167 < a < -5.0000000000000001e94

    1. Initial program 73.0%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv99.8%

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right)} \]
    7. Step-by-step derivation
      1. div-sub79.2%

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

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

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

    if -5.0000000000000001e94 < a < -4.2e12 or 5.5999999999999999e122 < a

    1. Initial program 77.0%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv94.1%

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

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

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

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

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

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

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

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

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

    if -4.2e12 < a < -8.1999999999999995e-145

    1. Initial program 74.6%

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

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

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

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

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

    if -8.1999999999999995e-145 < a < -5.10000000000000027e-204

    1. Initial program 65.6%

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot y}{a - t}} \]
    6. Step-by-step derivation
      1. mul-1-neg45.1%

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

        \[\leadsto -\color{blue}{\frac{t}{\frac{a - t}{y}}} \]
      3. distribute-neg-frac65.3%

        \[\leadsto \color{blue}{\frac{-t}{\frac{a - t}{y}}} \]
    7. Simplified65.3%

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

    if -5.10000000000000027e-204 < a < -7.2000000000000004e-292

    1. Initial program 67.8%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{z \cdot \left(y - x\right)}{t}} \]
    9. Step-by-step derivation
      1. mul-1-neg76.7%

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

        \[\leadsto -\frac{\color{blue}{\left(y - x\right) \cdot z}}{t} \]
      3. associate-*r/81.5%

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

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \left(-\frac{z}{t}\right)} \]
      5. distribute-neg-frac81.5%

        \[\leadsto \left(y - x\right) \cdot \color{blue}{\frac{-z}{t}} \]
    10. Simplified81.5%

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

    if -7.2000000000000004e-292 < a < 5.5999999999999999e122

    1. Initial program 65.5%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv83.4%

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{1}{\frac{a - t}{z - t}}, x\right)} \]
      5. clear-num83.4%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{z - t}{a - t}}, x\right) \]
    5. Applied egg-rr83.4%

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

      \[\leadsto \color{blue}{y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right)} \]
    7. Step-by-step derivation
      1. div-sub68.2%

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{-1 \cdot \left(z - t\right)}{t}} \]
      2. neg-mul-160.2%

        \[\leadsto y \cdot \frac{\color{blue}{-\left(z - t\right)}}{t} \]
    11. Simplified60.2%

      \[\leadsto y \cdot \color{blue}{\frac{-\left(z - t\right)}{t}} \]
  3. Recombined 7 regimes into one program.
  4. Final simplification63.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.25 \cdot 10^{+167}:\\ \;\;\;\;x \cdot \left(\frac{t}{a - t} + 1\right)\\ \mathbf{elif}\;a \leq -5 \cdot 10^{+94}:\\ \;\;\;\;y \cdot \frac{z - t}{a}\\ \mathbf{elif}\;a \leq -4200000000000:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;a \leq -8.2 \cdot 10^{-145}:\\ \;\;\;\;\frac{\left(y - x\right) \cdot z}{a}\\ \mathbf{elif}\;a \leq -5.1 \cdot 10^{-204}:\\ \;\;\;\;\frac{-t}{\frac{a - t}{y}}\\ \mathbf{elif}\;a \leq -7.2 \cdot 10^{-292}:\\ \;\;\;\;\frac{z}{t} \cdot \left(x - y\right)\\ \mathbf{elif}\;a \leq 5.6 \cdot 10^{+122}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \end{array} \]

Alternative 8: 36.9% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{\frac{t}{z}}\\ \mathbf{if}\;a \leq -3.6 \cdot 10^{+165}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.25 \cdot 10^{+116}:\\ \;\;\;\;\frac{z}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq -750000000000:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -4.2 \cdot 10^{-55}:\\ \;\;\;\;\frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq -6.6 \cdot 10^{-60}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.2 \cdot 10^{-141}:\\ \;\;\;\;\frac{-x}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq -1.95 \cdot 10^{-291}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 5.4 \cdot 10^{+75}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ x (/ t z))))
   (if (<= a -3.6e+165)
     x
     (if (<= a -1.25e+116)
       (/ z (/ a y))
       (if (<= a -750000000000.0)
         x
         (if (<= a -4.2e-55)
           (/ y (/ a z))
           (if (<= a -6.6e-60)
             t_1
             (if (<= a -1.2e-141)
               (/ (- x) (/ a z))
               (if (<= a -1.95e-291) t_1 (if (<= a 5.4e+75) y x))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x / (t / z);
	double tmp;
	if (a <= -3.6e+165) {
		tmp = x;
	} else if (a <= -1.25e+116) {
		tmp = z / (a / y);
	} else if (a <= -750000000000.0) {
		tmp = x;
	} else if (a <= -4.2e-55) {
		tmp = y / (a / z);
	} else if (a <= -6.6e-60) {
		tmp = t_1;
	} else if (a <= -1.2e-141) {
		tmp = -x / (a / z);
	} else if (a <= -1.95e-291) {
		tmp = t_1;
	} else if (a <= 5.4e+75) {
		tmp = 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) :: t_1
    real(8) :: tmp
    t_1 = x / (t / z)
    if (a <= (-3.6d+165)) then
        tmp = x
    else if (a <= (-1.25d+116)) then
        tmp = z / (a / y)
    else if (a <= (-750000000000.0d0)) then
        tmp = x
    else if (a <= (-4.2d-55)) then
        tmp = y / (a / z)
    else if (a <= (-6.6d-60)) then
        tmp = t_1
    else if (a <= (-1.2d-141)) then
        tmp = -x / (a / z)
    else if (a <= (-1.95d-291)) then
        tmp = t_1
    else if (a <= 5.4d+75) then
        tmp = 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 t_1 = x / (t / z);
	double tmp;
	if (a <= -3.6e+165) {
		tmp = x;
	} else if (a <= -1.25e+116) {
		tmp = z / (a / y);
	} else if (a <= -750000000000.0) {
		tmp = x;
	} else if (a <= -4.2e-55) {
		tmp = y / (a / z);
	} else if (a <= -6.6e-60) {
		tmp = t_1;
	} else if (a <= -1.2e-141) {
		tmp = -x / (a / z);
	} else if (a <= -1.95e-291) {
		tmp = t_1;
	} else if (a <= 5.4e+75) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x / (t / z)
	tmp = 0
	if a <= -3.6e+165:
		tmp = x
	elif a <= -1.25e+116:
		tmp = z / (a / y)
	elif a <= -750000000000.0:
		tmp = x
	elif a <= -4.2e-55:
		tmp = y / (a / z)
	elif a <= -6.6e-60:
		tmp = t_1
	elif a <= -1.2e-141:
		tmp = -x / (a / z)
	elif a <= -1.95e-291:
		tmp = t_1
	elif a <= 5.4e+75:
		tmp = y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x / Float64(t / z))
	tmp = 0.0
	if (a <= -3.6e+165)
		tmp = x;
	elseif (a <= -1.25e+116)
		tmp = Float64(z / Float64(a / y));
	elseif (a <= -750000000000.0)
		tmp = x;
	elseif (a <= -4.2e-55)
		tmp = Float64(y / Float64(a / z));
	elseif (a <= -6.6e-60)
		tmp = t_1;
	elseif (a <= -1.2e-141)
		tmp = Float64(Float64(-x) / Float64(a / z));
	elseif (a <= -1.95e-291)
		tmp = t_1;
	elseif (a <= 5.4e+75)
		tmp = y;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x / (t / z);
	tmp = 0.0;
	if (a <= -3.6e+165)
		tmp = x;
	elseif (a <= -1.25e+116)
		tmp = z / (a / y);
	elseif (a <= -750000000000.0)
		tmp = x;
	elseif (a <= -4.2e-55)
		tmp = y / (a / z);
	elseif (a <= -6.6e-60)
		tmp = t_1;
	elseif (a <= -1.2e-141)
		tmp = -x / (a / z);
	elseif (a <= -1.95e-291)
		tmp = t_1;
	elseif (a <= 5.4e+75)
		tmp = y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x / N[(t / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.6e+165], x, If[LessEqual[a, -1.25e+116], N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -750000000000.0], x, If[LessEqual[a, -4.2e-55], N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -6.6e-60], t$95$1, If[LessEqual[a, -1.2e-141], N[((-x) / N[(a / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.95e-291], t$95$1, If[LessEqual[a, 5.4e+75], y, x]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{x}{\frac{t}{z}}\\
\mathbf{if}\;a \leq -3.6 \cdot 10^{+165}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -1.25 \cdot 10^{+116}:\\
\;\;\;\;\frac{z}{\frac{a}{y}}\\

\mathbf{elif}\;a \leq -750000000000:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -4.2 \cdot 10^{-55}:\\
\;\;\;\;\frac{y}{\frac{a}{z}}\\

\mathbf{elif}\;a \leq -6.6 \cdot 10^{-60}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -1.2 \cdot 10^{-141}:\\
\;\;\;\;\frac{-x}{\frac{a}{z}}\\

\mathbf{elif}\;a \leq -1.95 \cdot 10^{-291}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 5.4 \cdot 10^{+75}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if a < -3.5999999999999998e165 or -1.25000000000000006e116 < a < -7.5e11 or 5.39999999999999996e75 < a

    1. Initial program 70.5%

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

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

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

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

    if -3.5999999999999998e165 < a < -1.25000000000000006e116

    1. Initial program 76.3%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z}{\frac{a}{y - x}}} \]
    7. Simplified59.1%

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

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

    if -7.5e11 < a < -4.2000000000000003e-55

    1. Initial program 71.0%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - t}{z}}} \]
    7. Simplified47.6%

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

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

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

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

    if -4.2000000000000003e-55 < a < -6.5999999999999996e-60 or -1.2e-141 < a < -1.95000000000000008e-291

    1. Initial program 67.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{z}}} \]
    10. Simplified54.6%

      \[\leadsto \color{blue}{\frac{x}{\frac{t}{z}}} \]

    if -6.5999999999999996e-60 < a < -1.2e-141

    1. Initial program 78.4%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z}{\frac{a}{y - x}}} \]
    7. Simplified52.4%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{a}} \]
    9. Step-by-step derivation
      1. mul-1-neg40.6%

        \[\leadsto \color{blue}{-\frac{x \cdot z}{a}} \]
      2. associate-/l*45.7%

        \[\leadsto -\color{blue}{\frac{x}{\frac{a}{z}}} \]
    10. Simplified45.7%

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

    if -1.95000000000000008e-291 < a < 5.39999999999999996e75

    1. Initial program 64.6%

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

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

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

      \[\leadsto \color{blue}{y} \]
  3. Recombined 6 regimes into one program.
  4. Final simplification51.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.6 \cdot 10^{+165}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.25 \cdot 10^{+116}:\\ \;\;\;\;\frac{z}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq -750000000000:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -4.2 \cdot 10^{-55}:\\ \;\;\;\;\frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq -6.6 \cdot 10^{-60}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq -1.2 \cdot 10^{-141}:\\ \;\;\;\;\frac{-x}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq -1.95 \cdot 10^{-291}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 5.4 \cdot 10^{+75}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 9: 48.3% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z - a\right) \cdot \frac{x}{t}\\ \mathbf{if}\;t \leq -5.2 \cdot 10^{+99}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 1.18 \cdot 10^{+28}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 5.6 \cdot 10^{+85}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.35 \cdot 10^{+90}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{+154}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{+228}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* (- z a) (/ x t))))
   (if (<= t -5.2e+99)
     y
     (if (<= t 1.18e+28)
       (* x (- 1.0 (/ z a)))
       (if (<= t 5.6e+85)
         t_1
         (if (<= t 2.35e+90)
           (* y (/ z a))
           (if (<= t 3.2e+154) y (if (<= t 1.6e+228) t_1 y))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (z - a) * (x / t);
	double tmp;
	if (t <= -5.2e+99) {
		tmp = y;
	} else if (t <= 1.18e+28) {
		tmp = x * (1.0 - (z / a));
	} else if (t <= 5.6e+85) {
		tmp = t_1;
	} else if (t <= 2.35e+90) {
		tmp = y * (z / a);
	} else if (t <= 3.2e+154) {
		tmp = y;
	} else if (t <= 1.6e+228) {
		tmp = t_1;
	} else {
		tmp = y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (z - a) * (x / t)
    if (t <= (-5.2d+99)) then
        tmp = y
    else if (t <= 1.18d+28) then
        tmp = x * (1.0d0 - (z / a))
    else if (t <= 5.6d+85) then
        tmp = t_1
    else if (t <= 2.35d+90) then
        tmp = y * (z / a)
    else if (t <= 3.2d+154) then
        tmp = y
    else if (t <= 1.6d+228) then
        tmp = t_1
    else
        tmp = y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (z - a) * (x / t);
	double tmp;
	if (t <= -5.2e+99) {
		tmp = y;
	} else if (t <= 1.18e+28) {
		tmp = x * (1.0 - (z / a));
	} else if (t <= 5.6e+85) {
		tmp = t_1;
	} else if (t <= 2.35e+90) {
		tmp = y * (z / a);
	} else if (t <= 3.2e+154) {
		tmp = y;
	} else if (t <= 1.6e+228) {
		tmp = t_1;
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (z - a) * (x / t)
	tmp = 0
	if t <= -5.2e+99:
		tmp = y
	elif t <= 1.18e+28:
		tmp = x * (1.0 - (z / a))
	elif t <= 5.6e+85:
		tmp = t_1
	elif t <= 2.35e+90:
		tmp = y * (z / a)
	elif t <= 3.2e+154:
		tmp = y
	elif t <= 1.6e+228:
		tmp = t_1
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(z - a) * Float64(x / t))
	tmp = 0.0
	if (t <= -5.2e+99)
		tmp = y;
	elseif (t <= 1.18e+28)
		tmp = Float64(x * Float64(1.0 - Float64(z / a)));
	elseif (t <= 5.6e+85)
		tmp = t_1;
	elseif (t <= 2.35e+90)
		tmp = Float64(y * Float64(z / a));
	elseif (t <= 3.2e+154)
		tmp = y;
	elseif (t <= 1.6e+228)
		tmp = t_1;
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (z - a) * (x / t);
	tmp = 0.0;
	if (t <= -5.2e+99)
		tmp = y;
	elseif (t <= 1.18e+28)
		tmp = x * (1.0 - (z / a));
	elseif (t <= 5.6e+85)
		tmp = t_1;
	elseif (t <= 2.35e+90)
		tmp = y * (z / a);
	elseif (t <= 3.2e+154)
		tmp = y;
	elseif (t <= 1.6e+228)
		tmp = t_1;
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - a), $MachinePrecision] * N[(x / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.2e+99], y, If[LessEqual[t, 1.18e+28], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.6e+85], t$95$1, If[LessEqual[t, 2.35e+90], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.2e+154], y, If[LessEqual[t, 1.6e+228], t$95$1, y]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(z - a\right) \cdot \frac{x}{t}\\
\mathbf{if}\;t \leq -5.2 \cdot 10^{+99}:\\
\;\;\;\;y\\

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

\mathbf{elif}\;t \leq 5.6 \cdot 10^{+85}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 2.35 \cdot 10^{+90}:\\
\;\;\;\;y \cdot \frac{z}{a}\\

\mathbf{elif}\;t \leq 3.2 \cdot 10^{+154}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq 1.6 \cdot 10^{+228}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -5.1999999999999999e99 or 2.3500000000000001e90 < t < 3.2e154 or 1.6000000000000001e228 < t

    1. Initial program 36.6%

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

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

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

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

    if -5.1999999999999999e99 < t < 1.18000000000000009e28

    1. Initial program 87.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv96.6%

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

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

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

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

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

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

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

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

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

    if 1.18000000000000009e28 < t < 5.5999999999999998e85 or 3.2e154 < t < 1.6000000000000001e228

    1. Initial program 52.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv67.2%

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

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

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

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

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

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

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

        \[\leadsto y - \color{blue}{\frac{y - x}{\frac{t}{z - a}}} \]
    8. Simplified74.8%

      \[\leadsto \color{blue}{y - \frac{y - x}{\frac{t}{z - a}}} \]
    9. Taylor expanded in y around 0 53.2%

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{z - a}}} \]
      2. associate-/r/60.2%

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

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

    if 5.5999999999999998e85 < t < 2.3500000000000001e90

    1. Initial program 100.0%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv100.0%

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{1}{\frac{a - t}{z - t}}, x\right)} \]
      5. clear-num100.0%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{z - t}{a - t}}, x\right) \]
    5. Applied egg-rr100.0%

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

      \[\leadsto \color{blue}{y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right)} \]
    7. Step-by-step derivation
      1. div-sub52.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.2 \cdot 10^{+99}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 1.18 \cdot 10^{+28}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 5.6 \cdot 10^{+85}:\\ \;\;\;\;\left(z - a\right) \cdot \frac{x}{t}\\ \mathbf{elif}\;t \leq 2.35 \cdot 10^{+90}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{+154}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{+228}:\\ \;\;\;\;\left(z - a\right) \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 10: 41.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{if}\;a \leq -1.56 \cdot 10^{+168}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.5 \cdot 10^{+95}:\\ \;\;\;\;y \cdot \frac{z - t}{a}\\ \mathbf{elif}\;a \leq -22000000000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -2.75 \cdot 10^{-145}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq -1.2 \cdot 10^{-291}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 4.6 \cdot 10^{+66}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ z a)))))
   (if (<= a -1.56e+168)
     t_1
     (if (<= a -1.5e+95)
       (* y (/ (- z t) a))
       (if (<= a -22000000000000.0)
         t_1
         (if (<= a -2.75e-145)
           (* (- y x) (/ z a))
           (if (<= a -1.2e-291) (/ x (/ t z)) (if (<= a 4.6e+66) y t_1))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (z / a));
	double tmp;
	if (a <= -1.56e+168) {
		tmp = t_1;
	} else if (a <= -1.5e+95) {
		tmp = y * ((z - t) / a);
	} else if (a <= -22000000000000.0) {
		tmp = t_1;
	} else if (a <= -2.75e-145) {
		tmp = (y - x) * (z / a);
	} else if (a <= -1.2e-291) {
		tmp = x / (t / z);
	} else if (a <= 4.6e+66) {
		tmp = y;
	} 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) :: tmp
    t_1 = x * (1.0d0 - (z / a))
    if (a <= (-1.56d+168)) then
        tmp = t_1
    else if (a <= (-1.5d+95)) then
        tmp = y * ((z - t) / a)
    else if (a <= (-22000000000000.0d0)) then
        tmp = t_1
    else if (a <= (-2.75d-145)) then
        tmp = (y - x) * (z / a)
    else if (a <= (-1.2d-291)) then
        tmp = x / (t / z)
    else if (a <= 4.6d+66) then
        tmp = y
    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 = x * (1.0 - (z / a));
	double tmp;
	if (a <= -1.56e+168) {
		tmp = t_1;
	} else if (a <= -1.5e+95) {
		tmp = y * ((z - t) / a);
	} else if (a <= -22000000000000.0) {
		tmp = t_1;
	} else if (a <= -2.75e-145) {
		tmp = (y - x) * (z / a);
	} else if (a <= -1.2e-291) {
		tmp = x / (t / z);
	} else if (a <= 4.6e+66) {
		tmp = y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (z / a))
	tmp = 0
	if a <= -1.56e+168:
		tmp = t_1
	elif a <= -1.5e+95:
		tmp = y * ((z - t) / a)
	elif a <= -22000000000000.0:
		tmp = t_1
	elif a <= -2.75e-145:
		tmp = (y - x) * (z / a)
	elif a <= -1.2e-291:
		tmp = x / (t / z)
	elif a <= 4.6e+66:
		tmp = y
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(z / a)))
	tmp = 0.0
	if (a <= -1.56e+168)
		tmp = t_1;
	elseif (a <= -1.5e+95)
		tmp = Float64(y * Float64(Float64(z - t) / a));
	elseif (a <= -22000000000000.0)
		tmp = t_1;
	elseif (a <= -2.75e-145)
		tmp = Float64(Float64(y - x) * Float64(z / a));
	elseif (a <= -1.2e-291)
		tmp = Float64(x / Float64(t / z));
	elseif (a <= 4.6e+66)
		tmp = y;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (z / a));
	tmp = 0.0;
	if (a <= -1.56e+168)
		tmp = t_1;
	elseif (a <= -1.5e+95)
		tmp = y * ((z - t) / a);
	elseif (a <= -22000000000000.0)
		tmp = t_1;
	elseif (a <= -2.75e-145)
		tmp = (y - x) * (z / a);
	elseif (a <= -1.2e-291)
		tmp = x / (t / z);
	elseif (a <= 4.6e+66)
		tmp = y;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.56e+168], t$95$1, If[LessEqual[a, -1.5e+95], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -22000000000000.0], t$95$1, If[LessEqual[a, -2.75e-145], N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.2e-291], N[(x / N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.6e+66], y, t$95$1]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{if}\;a \leq -1.56 \cdot 10^{+168}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -1.5 \cdot 10^{+95}:\\
\;\;\;\;y \cdot \frac{z - t}{a}\\

\mathbf{elif}\;a \leq -22000000000000:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -2.75 \cdot 10^{-145}:\\
\;\;\;\;\left(y - x\right) \cdot \frac{z}{a}\\

\mathbf{elif}\;a \leq -1.2 \cdot 10^{-291}:\\
\;\;\;\;\frac{x}{\frac{t}{z}}\\

\mathbf{elif}\;a \leq 4.6 \cdot 10^{+66}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -1.5599999999999999e168 or -1.49999999999999996e95 < a < -2.2e13 or 4.6e66 < a

    1. Initial program 70.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv94.0%

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

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

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

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

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

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

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

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

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

    if -1.5599999999999999e168 < a < -1.49999999999999996e95

    1. Initial program 73.0%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv99.8%

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right)} \]
    7. Step-by-step derivation
      1. div-sub79.2%

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

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

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

    if -2.2e13 < a < -2.75000000000000008e-145

    1. Initial program 74.6%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z}{a} \cdot \left(y - x\right)} \]
    9. Applied egg-rr49.0%

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

    if -2.75000000000000008e-145 < a < -1.20000000000000006e-291

    1. Initial program 66.9%

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\left(-z\right)} \cdot \left(y - x\right)}{t} \]
    7. Simplified55.8%

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{z}}} \]
    10. Simplified56.0%

      \[\leadsto \color{blue}{\frac{x}{\frac{t}{z}}} \]

    if -1.20000000000000006e-291 < a < 4.6e66

    1. Initial program 64.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.56 \cdot 10^{+168}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;a \leq -1.5 \cdot 10^{+95}:\\ \;\;\;\;y \cdot \frac{z - t}{a}\\ \mathbf{elif}\;a \leq -22000000000000:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;a \leq -2.75 \cdot 10^{-145}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq -1.2 \cdot 10^{-291}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 4.6 \cdot 10^{+66}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \end{array} \]

Alternative 11: 41.7% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{if}\;a \leq -3.65 \cdot 10^{+165}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -3.1 \cdot 10^{+94}:\\ \;\;\;\;y \cdot \frac{z - t}{a}\\ \mathbf{elif}\;a \leq -52000000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -5.2 \cdot 10^{-147}:\\ \;\;\;\;\frac{\left(y - x\right) \cdot z}{a}\\ \mathbf{elif}\;a \leq -9.6 \cdot 10^{-292}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 3.4 \cdot 10^{+66}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ z a)))))
   (if (<= a -3.65e+165)
     t_1
     (if (<= a -3.1e+94)
       (* y (/ (- z t) a))
       (if (<= a -52000000000.0)
         t_1
         (if (<= a -5.2e-147)
           (/ (* (- y x) z) a)
           (if (<= a -9.6e-292) (/ x (/ t z)) (if (<= a 3.4e+66) y t_1))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (z / a));
	double tmp;
	if (a <= -3.65e+165) {
		tmp = t_1;
	} else if (a <= -3.1e+94) {
		tmp = y * ((z - t) / a);
	} else if (a <= -52000000000.0) {
		tmp = t_1;
	} else if (a <= -5.2e-147) {
		tmp = ((y - x) * z) / a;
	} else if (a <= -9.6e-292) {
		tmp = x / (t / z);
	} else if (a <= 3.4e+66) {
		tmp = y;
	} 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) :: tmp
    t_1 = x * (1.0d0 - (z / a))
    if (a <= (-3.65d+165)) then
        tmp = t_1
    else if (a <= (-3.1d+94)) then
        tmp = y * ((z - t) / a)
    else if (a <= (-52000000000.0d0)) then
        tmp = t_1
    else if (a <= (-5.2d-147)) then
        tmp = ((y - x) * z) / a
    else if (a <= (-9.6d-292)) then
        tmp = x / (t / z)
    else if (a <= 3.4d+66) then
        tmp = y
    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 = x * (1.0 - (z / a));
	double tmp;
	if (a <= -3.65e+165) {
		tmp = t_1;
	} else if (a <= -3.1e+94) {
		tmp = y * ((z - t) / a);
	} else if (a <= -52000000000.0) {
		tmp = t_1;
	} else if (a <= -5.2e-147) {
		tmp = ((y - x) * z) / a;
	} else if (a <= -9.6e-292) {
		tmp = x / (t / z);
	} else if (a <= 3.4e+66) {
		tmp = y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (z / a))
	tmp = 0
	if a <= -3.65e+165:
		tmp = t_1
	elif a <= -3.1e+94:
		tmp = y * ((z - t) / a)
	elif a <= -52000000000.0:
		tmp = t_1
	elif a <= -5.2e-147:
		tmp = ((y - x) * z) / a
	elif a <= -9.6e-292:
		tmp = x / (t / z)
	elif a <= 3.4e+66:
		tmp = y
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(z / a)))
	tmp = 0.0
	if (a <= -3.65e+165)
		tmp = t_1;
	elseif (a <= -3.1e+94)
		tmp = Float64(y * Float64(Float64(z - t) / a));
	elseif (a <= -52000000000.0)
		tmp = t_1;
	elseif (a <= -5.2e-147)
		tmp = Float64(Float64(Float64(y - x) * z) / a);
	elseif (a <= -9.6e-292)
		tmp = Float64(x / Float64(t / z));
	elseif (a <= 3.4e+66)
		tmp = y;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (z / a));
	tmp = 0.0;
	if (a <= -3.65e+165)
		tmp = t_1;
	elseif (a <= -3.1e+94)
		tmp = y * ((z - t) / a);
	elseif (a <= -52000000000.0)
		tmp = t_1;
	elseif (a <= -5.2e-147)
		tmp = ((y - x) * z) / a;
	elseif (a <= -9.6e-292)
		tmp = x / (t / z);
	elseif (a <= 3.4e+66)
		tmp = y;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.65e+165], t$95$1, If[LessEqual[a, -3.1e+94], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -52000000000.0], t$95$1, If[LessEqual[a, -5.2e-147], N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[a, -9.6e-292], N[(x / N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.4e+66], y, t$95$1]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{if}\;a \leq -3.65 \cdot 10^{+165}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -3.1 \cdot 10^{+94}:\\
\;\;\;\;y \cdot \frac{z - t}{a}\\

\mathbf{elif}\;a \leq -52000000000:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -5.2 \cdot 10^{-147}:\\
\;\;\;\;\frac{\left(y - x\right) \cdot z}{a}\\

\mathbf{elif}\;a \leq -9.6 \cdot 10^{-292}:\\
\;\;\;\;\frac{x}{\frac{t}{z}}\\

\mathbf{elif}\;a \leq 3.4 \cdot 10^{+66}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -3.6500000000000001e165 or -3.09999999999999991e94 < a < -5.2e10 or 3.4000000000000003e66 < a

    1. Initial program 70.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv94.0%

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

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

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

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

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

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

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

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

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

    if -3.6500000000000001e165 < a < -3.09999999999999991e94

    1. Initial program 73.0%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv99.8%

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right)} \]
    7. Step-by-step derivation
      1. div-sub79.2%

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

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

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

    if -5.2e10 < a < -5.1999999999999997e-147

    1. Initial program 74.6%

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

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

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

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

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

    if -5.1999999999999997e-147 < a < -9.6000000000000005e-292

    1. Initial program 66.9%

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\left(-z\right)} \cdot \left(y - x\right)}{t} \]
    7. Simplified55.8%

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{z}}} \]
    10. Simplified56.0%

      \[\leadsto \color{blue}{\frac{x}{\frac{t}{z}}} \]

    if -9.6000000000000005e-292 < a < 3.4000000000000003e66

    1. Initial program 64.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.65 \cdot 10^{+165}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;a \leq -3.1 \cdot 10^{+94}:\\ \;\;\;\;y \cdot \frac{z - t}{a}\\ \mathbf{elif}\;a \leq -52000000000:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;a \leq -5.2 \cdot 10^{-147}:\\ \;\;\;\;\frac{\left(y - x\right) \cdot z}{a}\\ \mathbf{elif}\;a \leq -9.6 \cdot 10^{-292}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 3.4 \cdot 10^{+66}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \end{array} \]

Alternative 12: 54.8% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ t_2 := x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{if}\;a \leq -2.3 \cdot 10^{+214}:\\ \;\;\;\;x \cdot \left(\frac{t}{a - t} + 1\right)\\ \mathbf{elif}\;a \leq -7 \cdot 10^{+83}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -20000000000000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -1.2 \cdot 10^{-291}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;a \leq 1.12 \cdot 10^{+123}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- z t) (- a t)))) (t_2 (* x (- 1.0 (/ z a)))))
   (if (<= a -2.3e+214)
     (* x (+ (/ t (- a t)) 1.0))
     (if (<= a -7e+83)
       t_1
       (if (<= a -20000000000000.0)
         t_2
         (if (<= a -1.2e-291)
           (* z (/ (- y x) (- a t)))
           (if (<= a 1.12e+123) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((z - t) / (a - t));
	double t_2 = x * (1.0 - (z / a));
	double tmp;
	if (a <= -2.3e+214) {
		tmp = x * ((t / (a - t)) + 1.0);
	} else if (a <= -7e+83) {
		tmp = t_1;
	} else if (a <= -20000000000000.0) {
		tmp = t_2;
	} else if (a <= -1.2e-291) {
		tmp = z * ((y - x) / (a - t));
	} else if (a <= 1.12e+123) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	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 * ((z - t) / (a - t))
    t_2 = x * (1.0d0 - (z / a))
    if (a <= (-2.3d+214)) then
        tmp = x * ((t / (a - t)) + 1.0d0)
    else if (a <= (-7d+83)) then
        tmp = t_1
    else if (a <= (-20000000000000.0d0)) then
        tmp = t_2
    else if (a <= (-1.2d-291)) then
        tmp = z * ((y - x) / (a - t))
    else if (a <= 1.12d+123) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((z - t) / (a - t));
	double t_2 = x * (1.0 - (z / a));
	double tmp;
	if (a <= -2.3e+214) {
		tmp = x * ((t / (a - t)) + 1.0);
	} else if (a <= -7e+83) {
		tmp = t_1;
	} else if (a <= -20000000000000.0) {
		tmp = t_2;
	} else if (a <= -1.2e-291) {
		tmp = z * ((y - x) / (a - t));
	} else if (a <= 1.12e+123) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((z - t) / (a - t))
	t_2 = x * (1.0 - (z / a))
	tmp = 0
	if a <= -2.3e+214:
		tmp = x * ((t / (a - t)) + 1.0)
	elif a <= -7e+83:
		tmp = t_1
	elif a <= -20000000000000.0:
		tmp = t_2
	elif a <= -1.2e-291:
		tmp = z * ((y - x) / (a - t))
	elif a <= 1.12e+123:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(z - t) / Float64(a - t)))
	t_2 = Float64(x * Float64(1.0 - Float64(z / a)))
	tmp = 0.0
	if (a <= -2.3e+214)
		tmp = Float64(x * Float64(Float64(t / Float64(a - t)) + 1.0));
	elseif (a <= -7e+83)
		tmp = t_1;
	elseif (a <= -20000000000000.0)
		tmp = t_2;
	elseif (a <= -1.2e-291)
		tmp = Float64(z * Float64(Float64(y - x) / Float64(a - t)));
	elseif (a <= 1.12e+123)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((z - t) / (a - t));
	t_2 = x * (1.0 - (z / a));
	tmp = 0.0;
	if (a <= -2.3e+214)
		tmp = x * ((t / (a - t)) + 1.0);
	elseif (a <= -7e+83)
		tmp = t_1;
	elseif (a <= -20000000000000.0)
		tmp = t_2;
	elseif (a <= -1.2e-291)
		tmp = z * ((y - x) / (a - t));
	elseif (a <= 1.12e+123)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.3e+214], N[(x * N[(N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -7e+83], t$95$1, If[LessEqual[a, -20000000000000.0], t$95$2, If[LessEqual[a, -1.2e-291], N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.12e+123], t$95$1, t$95$2]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -7 \cdot 10^{+83}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -20000000000000:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq -1.2 \cdot 10^{-291}:\\
\;\;\;\;z \cdot \frac{y - x}{a - t}\\

\mathbf{elif}\;a \leq 1.12 \cdot 10^{+123}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.2999999999999999e214

    1. Initial program 59.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv90.6%

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

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

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

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

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

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

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

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

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

    if -2.2999999999999999e214 < a < -6.99999999999999954e83 or -1.20000000000000006e-291 < a < 1.12e123

    1. Initial program 65.4%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv86.4%

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right)} \]
    7. Step-by-step derivation
      1. div-sub69.3%

        \[\leadsto y \cdot \color{blue}{\frac{z - t}{a - t}} \]
    8. Simplified69.3%

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

    if -6.99999999999999954e83 < a < -2e13 or 1.12e123 < a

    1. Initial program 78.3%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv94.0%

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{z - t}{a - t}\right)} \]
    8. Simplified77.0%

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

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

    if -2e13 < a < -1.20000000000000006e-291

    1. Initial program 70.7%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.3 \cdot 10^{+214}:\\ \;\;\;\;x \cdot \left(\frac{t}{a - t} + 1\right)\\ \mathbf{elif}\;a \leq -7 \cdot 10^{+83}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq -20000000000000:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;a \leq -1.2 \cdot 10^{-291}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;a \leq 1.12 \cdot 10^{+123}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \end{array} \]

Alternative 13: 73.6% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := x - \frac{y}{a - t} \cdot \left(t - z\right)\\
\mathbf{if}\;a \leq -1.8 \cdot 10^{-17}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -6.2 \cdot 10^{-144}:\\
\;\;\;\;z \cdot \frac{y - x}{a - t}\\

\mathbf{elif}\;a \leq 7 \cdot 10^{-170}:\\
\;\;\;\;y - \frac{y - x}{\frac{t}{z}}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.79999999999999997e-17 or 6.99999999999999996e34 < a

    1. Initial program 70.9%

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

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

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

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

    if -1.79999999999999997e-17 < a < -6.2000000000000001e-144

    1. Initial program 76.0%

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

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

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

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

        \[\leadsto z \cdot \color{blue}{\frac{y - x}{a - t}} \]
    6. Simplified71.9%

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

    if -6.2000000000000001e-144 < a < 6.9999999999999997e-170

    1. Initial program 63.2%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv77.3%

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

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

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

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

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

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

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

        \[\leadsto y - \color{blue}{\frac{y - x}{\frac{t}{z - a}}} \]
    8. Simplified92.5%

      \[\leadsto \color{blue}{y - \frac{y - x}{\frac{t}{z - a}}} \]
    9. Taylor expanded in z around inf 92.5%

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

    if 6.9999999999999997e-170 < a < 6.99999999999999996e34

    1. Initial program 67.7%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv75.5%

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

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

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

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

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

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

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

        \[\leadsto y - \color{blue}{\frac{y - x}{\frac{t}{z - a}}} \]
    8. Simplified73.9%

      \[\leadsto \color{blue}{y - \frac{y - x}{\frac{t}{z - a}}} \]
    9. Taylor expanded in y around 0 76.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.8 \cdot 10^{-17}:\\ \;\;\;\;x - \frac{y}{a - t} \cdot \left(t - z\right)\\ \mathbf{elif}\;a \leq -6.2 \cdot 10^{-144}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;a \leq 7 \cdot 10^{-170}:\\ \;\;\;\;y - \frac{y - x}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 7 \cdot 10^{+34}:\\ \;\;\;\;y + \left(z - a\right) \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{a - t} \cdot \left(t - z\right)\\ \end{array} \]

Alternative 14: 37.7% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z}{a}\\ \mathbf{if}\;a \leq -5.3 \cdot 10^{+165}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.2 \cdot 10^{+116}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1850000000000:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -7 \cdot 10^{-146}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -3.5 \cdot 10^{-215}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq -6.9 \cdot 10^{-292}:\\ \;\;\;\;z \cdot \frac{x}{t}\\ \mathbf{elif}\;a \leq 6.4 \cdot 10^{+77}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ z a))))
   (if (<= a -5.3e+165)
     x
     (if (<= a -1.2e+116)
       t_1
       (if (<= a -1850000000000.0)
         x
         (if (<= a -7e-146)
           t_1
           (if (<= a -3.5e-215)
             y
             (if (<= a -6.9e-292) (* z (/ x t)) (if (<= a 6.4e+77) y x)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (z / a);
	double tmp;
	if (a <= -5.3e+165) {
		tmp = x;
	} else if (a <= -1.2e+116) {
		tmp = t_1;
	} else if (a <= -1850000000000.0) {
		tmp = x;
	} else if (a <= -7e-146) {
		tmp = t_1;
	} else if (a <= -3.5e-215) {
		tmp = y;
	} else if (a <= -6.9e-292) {
		tmp = z * (x / t);
	} else if (a <= 6.4e+77) {
		tmp = 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) :: t_1
    real(8) :: tmp
    t_1 = y * (z / a)
    if (a <= (-5.3d+165)) then
        tmp = x
    else if (a <= (-1.2d+116)) then
        tmp = t_1
    else if (a <= (-1850000000000.0d0)) then
        tmp = x
    else if (a <= (-7d-146)) then
        tmp = t_1
    else if (a <= (-3.5d-215)) then
        tmp = y
    else if (a <= (-6.9d-292)) then
        tmp = z * (x / t)
    else if (a <= 6.4d+77) then
        tmp = 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 t_1 = y * (z / a);
	double tmp;
	if (a <= -5.3e+165) {
		tmp = x;
	} else if (a <= -1.2e+116) {
		tmp = t_1;
	} else if (a <= -1850000000000.0) {
		tmp = x;
	} else if (a <= -7e-146) {
		tmp = t_1;
	} else if (a <= -3.5e-215) {
		tmp = y;
	} else if (a <= -6.9e-292) {
		tmp = z * (x / t);
	} else if (a <= 6.4e+77) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * (z / a)
	tmp = 0
	if a <= -5.3e+165:
		tmp = x
	elif a <= -1.2e+116:
		tmp = t_1
	elif a <= -1850000000000.0:
		tmp = x
	elif a <= -7e-146:
		tmp = t_1
	elif a <= -3.5e-215:
		tmp = y
	elif a <= -6.9e-292:
		tmp = z * (x / t)
	elif a <= 6.4e+77:
		tmp = y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(z / a))
	tmp = 0.0
	if (a <= -5.3e+165)
		tmp = x;
	elseif (a <= -1.2e+116)
		tmp = t_1;
	elseif (a <= -1850000000000.0)
		tmp = x;
	elseif (a <= -7e-146)
		tmp = t_1;
	elseif (a <= -3.5e-215)
		tmp = y;
	elseif (a <= -6.9e-292)
		tmp = Float64(z * Float64(x / t));
	elseif (a <= 6.4e+77)
		tmp = y;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * (z / a);
	tmp = 0.0;
	if (a <= -5.3e+165)
		tmp = x;
	elseif (a <= -1.2e+116)
		tmp = t_1;
	elseif (a <= -1850000000000.0)
		tmp = x;
	elseif (a <= -7e-146)
		tmp = t_1;
	elseif (a <= -3.5e-215)
		tmp = y;
	elseif (a <= -6.9e-292)
		tmp = z * (x / t);
	elseif (a <= 6.4e+77)
		tmp = y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.3e+165], x, If[LessEqual[a, -1.2e+116], t$95$1, If[LessEqual[a, -1850000000000.0], x, If[LessEqual[a, -7e-146], t$95$1, If[LessEqual[a, -3.5e-215], y, If[LessEqual[a, -6.9e-292], N[(z * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.4e+77], y, x]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \frac{z}{a}\\
\mathbf{if}\;a \leq -5.3 \cdot 10^{+165}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -1.2 \cdot 10^{+116}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -1850000000000:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -7 \cdot 10^{-146}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -3.5 \cdot 10^{-215}:\\
\;\;\;\;y\\

\mathbf{elif}\;a \leq -6.9 \cdot 10^{-292}:\\
\;\;\;\;z \cdot \frac{x}{t}\\

\mathbf{elif}\;a \leq 6.4 \cdot 10^{+77}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -5.3000000000000001e165 or -1.2e116 < a < -1.85e12 or 6.4000000000000003e77 < a

    1. Initial program 70.5%

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

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

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

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

    if -5.3000000000000001e165 < a < -1.2e116 or -1.85e12 < a < -7.0000000000000003e-146

    1. Initial program 75.1%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv87.3%

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{1}{\frac{a - t}{z - t}}, x\right)} \]
      5. clear-num87.4%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{z - t}{a - t}}, x\right) \]
    5. Applied egg-rr87.4%

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

      \[\leadsto \color{blue}{y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right)} \]
    7. Step-by-step derivation
      1. div-sub66.8%

        \[\leadsto y \cdot \color{blue}{\frac{z - t}{a - t}} \]
    8. Simplified66.8%

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

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

    if -7.0000000000000003e-146 < a < -3.5000000000000002e-215 or -6.89999999999999969e-292 < a < 6.4000000000000003e77

    1. Initial program 64.5%

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

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

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

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

    if -3.5000000000000002e-215 < a < -6.89999999999999969e-292

    1. Initial program 69.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{z}}} \]
    10. Simplified61.6%

      \[\leadsto \color{blue}{\frac{x}{\frac{t}{z}}} \]
    11. Step-by-step derivation
      1. associate-/r/59.8%

        \[\leadsto \color{blue}{\frac{x}{t} \cdot z} \]
    12. Applied egg-rr59.8%

      \[\leadsto \color{blue}{\frac{x}{t} \cdot z} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification50.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.3 \cdot 10^{+165}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.2 \cdot 10^{+116}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq -1850000000000:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -7 \cdot 10^{-146}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq -3.5 \cdot 10^{-215}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq -6.9 \cdot 10^{-292}:\\ \;\;\;\;z \cdot \frac{x}{t}\\ \mathbf{elif}\;a \leq 6.4 \cdot 10^{+77}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 15: 68.8% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \leq -7 \cdot 10^{-145}:\\
\;\;\;\;z \cdot \frac{y - x}{a - t}\\

\mathbf{elif}\;a \leq 7.5 \cdot 10^{-170}:\\
\;\;\;\;y - \frac{y - x}{\frac{t}{z}}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.1e11 or 5.80000000000000059e39 < a

    1. Initial program 71.8%

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

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} \]
      2. clear-num94.7%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - t}{z - t}}{y - x}}} \]
      3. associate-/r/94.8%

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

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

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

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

    if -2.1e11 < a < -6.99999999999999994e-145

    1. Initial program 74.6%

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

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

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

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

        \[\leadsto z \cdot \color{blue}{\frac{y - x}{a - t}} \]
    6. Simplified70.8%

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

    if -6.99999999999999994e-145 < a < 7.4999999999999998e-170

    1. Initial program 63.2%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv77.3%

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

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

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

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

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

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

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

        \[\leadsto y - \color{blue}{\frac{y - x}{\frac{t}{z - a}}} \]
    8. Simplified92.5%

      \[\leadsto \color{blue}{y - \frac{y - x}{\frac{t}{z - a}}} \]
    9. Taylor expanded in z around inf 92.5%

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

    if 7.4999999999999998e-170 < a < 5.80000000000000059e39

    1. Initial program 66.1%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv76.1%

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

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{z - t}{a - t}}, x\right) \]
    5. Applied egg-rr76.2%

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

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

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

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

        \[\leadsto y - \color{blue}{\frac{y - x}{\frac{t}{z - a}}} \]
    8. Simplified74.6%

      \[\leadsto \color{blue}{y - \frac{y - x}{\frac{t}{z - a}}} \]
    9. Taylor expanded in y around 0 76.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -210000000000:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq -7 \cdot 10^{-145}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;a \leq 7.5 \cdot 10^{-170}:\\ \;\;\;\;y - \frac{y - x}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 5.8 \cdot 10^{+39}:\\ \;\;\;\;y + \left(z - a\right) \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\ \end{array} \]

Alternative 16: 78.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := y + \left(z - a\right) \cdot \frac{x}{t}\\
\mathbf{if}\;t \leq -6.5 \cdot 10^{+193}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -6.4999999999999997e193 or 1.35e89 < t

    1. Initial program 34.6%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv64.1%

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

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{z - t}{a - t}}, x\right) \]
    5. Applied egg-rr64.2%

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

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

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

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

        \[\leadsto y - \color{blue}{\frac{y - x}{\frac{t}{z - a}}} \]
    8. Simplified89.4%

      \[\leadsto \color{blue}{y - \frac{y - x}{\frac{t}{z - a}}} \]
    9. Taylor expanded in y around 0 74.1%

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

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

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

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

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

    if -6.4999999999999997e193 < t < -5.2e18

    1. Initial program 56.3%

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

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

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

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

    if -5.2e18 < t < 1.35e89

    1. Initial program 88.7%

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

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} \]
    3. Simplified96.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.5 \cdot 10^{+193}:\\ \;\;\;\;y + \left(z - a\right) \cdot \frac{x}{t}\\ \mathbf{elif}\;t \leq -5.2 \cdot 10^{+18}:\\ \;\;\;\;x - \frac{y}{a - t} \cdot \left(t - z\right)\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{+89}:\\ \;\;\;\;x + \frac{y - x}{\frac{a - t}{z}}\\ \mathbf{else}:\\ \;\;\;\;y + \left(z - a\right) \cdot \frac{x}{t}\\ \end{array} \]

Alternative 17: 79.9% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -9e192 or 9.1999999999999992e25 < t

    1. Initial program 42.0%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv67.5%

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

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

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

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

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

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

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

        \[\leadsto y - \color{blue}{\frac{y - x}{\frac{t}{z - a}}} \]
    8. Simplified84.2%

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

    if -9e192 < t < -2.2e22

    1. Initial program 56.3%

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

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

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

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

    if -2.2e22 < t < 9.1999999999999992e25

    1. Initial program 89.9%

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

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} \]
    3. Simplified97.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9 \cdot 10^{+192}:\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\ \mathbf{elif}\;t \leq -2.2 \cdot 10^{+22}:\\ \;\;\;\;x - \frac{y}{a - t} \cdot \left(t - z\right)\\ \mathbf{elif}\;t \leq 9.2 \cdot 10^{+25}:\\ \;\;\;\;x + \frac{y - x}{\frac{a - t}{z}}\\ \mathbf{else}:\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\ \end{array} \]

Alternative 18: 86.8% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -8.20000000000000006e192 or 2.5000000000000001e91 < t

    1. Initial program 34.6%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv64.1%

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

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{z - t}{a - t}}, x\right) \]
    5. Applied egg-rr64.2%

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

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

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

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

        \[\leadsto y - \color{blue}{\frac{y - x}{\frac{t}{z - a}}} \]
    8. Simplified89.4%

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

    if -8.20000000000000006e192 < t < 2.5000000000000001e91

    1. Initial program 82.9%

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

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

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

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

Alternative 19: 89.0% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.99999999999999989e194 or 5.49999999999999999e90 < t

    1. Initial program 34.6%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv64.1%

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

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{z - t}{a - t}}, x\right) \]
    5. Applied egg-rr64.2%

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

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

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

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

        \[\leadsto y - \color{blue}{\frac{y - x}{\frac{t}{z - a}}} \]
    8. Simplified89.4%

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

    if -1.99999999999999989e194 < t < 5.49999999999999999e90

    1. Initial program 82.9%

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

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} \]
      2. clear-num94.7%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - t}{z - t}}{y - x}}} \]
      3. associate-/r/94.8%

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

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

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

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

Alternative 20: 62.5% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;a \leq -1.35 \cdot 10^{-291}:\\
\;\;\;\;z \cdot \frac{y - x}{a - t}\\

\mathbf{elif}\;a \leq 3.2 \cdot 10^{+50}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.3e10 or 3.19999999999999983e50 < a

    1. Initial program 71.3%

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

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} \]
      2. clear-num94.6%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - t}{z - t}}{y - x}}} \]
      3. associate-/r/94.7%

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

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

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

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

    if -2.3e10 < a < -1.34999999999999996e-291

    1. Initial program 70.7%

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

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

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

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

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

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

    if -1.34999999999999996e-291 < a < 3.19999999999999983e50

    1. Initial program 64.0%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv80.1%

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right)} \]
    7. Step-by-step derivation
      1. div-sub68.8%

        \[\leadsto y \cdot \color{blue}{\frac{z - t}{a - t}} \]
    8. Simplified68.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -23000000000:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq -1.35 \cdot 10^{-291}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{+50}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\ \end{array} \]

Alternative 21: 69.7% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;a \leq -7 \cdot 10^{-145}:\\
\;\;\;\;z \cdot \frac{y - x}{a - t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -8e10 or 2.2499999999999999e38 < a

    1. Initial program 71.8%

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

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} \]
      2. clear-num94.7%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - t}{z - t}}{y - x}}} \]
      3. associate-/r/94.8%

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

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

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

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

    if -8e10 < a < -6.99999999999999994e-145

    1. Initial program 74.6%

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

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

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Taylor expanded in z around inf 70.8%

      \[\leadsto \color{blue}{z \cdot \left(\frac{y}{a - t} - \frac{x}{a - t}\right)} \]
    5. Step-by-step derivation
      1. div-sub70.8%

        \[\leadsto z \cdot \color{blue}{\frac{y - x}{a - t}} \]
    6. Simplified70.8%

      \[\leadsto \color{blue}{z \cdot \frac{y - x}{a - t}} \]

    if -6.99999999999999994e-145 < a < 2.2499999999999999e38

    1. Initial program 64.3%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/72.6%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified72.6%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Step-by-step derivation
      1. +-commutative72.6%

        \[\leadsto \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right) + x} \]
      2. associate-/r/76.9%

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv76.9%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{1}{\frac{a - t}{z - t}}} + x \]
      4. fma-def76.9%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{1}{\frac{a - t}{z - t}}, x\right)} \]
      5. clear-num76.9%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{z - t}{a - t}}, x\right) \]
    5. Applied egg-rr76.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    6. Taylor expanded in t around -inf 79.4%

      \[\leadsto \color{blue}{y + -1 \cdot \frac{\left(y - x\right) \cdot \left(z - a\right)}{t}} \]
    7. Step-by-step derivation
      1. mul-1-neg79.4%

        \[\leadsto y + \color{blue}{\left(-\frac{\left(y - x\right) \cdot \left(z - a\right)}{t}\right)} \]
      2. unsub-neg79.4%

        \[\leadsto \color{blue}{y - \frac{\left(y - x\right) \cdot \left(z - a\right)}{t}} \]
      3. associate-/l*85.9%

        \[\leadsto y - \color{blue}{\frac{y - x}{\frac{t}{z - a}}} \]
    8. Simplified85.9%

      \[\leadsto \color{blue}{y - \frac{y - x}{\frac{t}{z - a}}} \]
    9. Taylor expanded in z around inf 75.0%

      \[\leadsto y - \color{blue}{\frac{z \cdot \left(y - x\right)}{t}} \]
    10. Step-by-step derivation
      1. *-commutative75.0%

        \[\leadsto y - \frac{\color{blue}{\left(y - x\right) \cdot z}}{t} \]
      2. associate-*r/82.4%

        \[\leadsto y - \color{blue}{\left(y - x\right) \cdot \frac{z}{t}} \]
    11. Simplified82.4%

      \[\leadsto y - \color{blue}{\left(y - x\right) \cdot \frac{z}{t}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification75.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -80000000000:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq -7 \cdot 10^{-145}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;a \leq 2.25 \cdot 10^{+38}:\\ \;\;\;\;y + \frac{z}{t} \cdot \left(x - y\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\ \end{array} \]

Alternative 22: 69.6% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(y - x\right) \cdot \frac{z}{a}\\ \mathbf{if}\;a \leq -10000000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -6.2 \cdot 10^{-144}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;a \leq 5.8 \cdot 10^{+39}:\\ \;\;\;\;y - \frac{y - x}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (- y x) (/ z a)))))
   (if (<= a -10000000000.0)
     t_1
     (if (<= a -6.2e-144)
       (* z (/ (- y x) (- a t)))
       (if (<= a 5.8e+39) (- y (/ (- y x) (/ t z))) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - x) * (z / a));
	double tmp;
	if (a <= -10000000000.0) {
		tmp = t_1;
	} else if (a <= -6.2e-144) {
		tmp = z * ((y - x) / (a - t));
	} else if (a <= 5.8e+39) {
		tmp = y - ((y - x) / (t / z));
	} 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) :: tmp
    t_1 = x + ((y - x) * (z / a))
    if (a <= (-10000000000.0d0)) then
        tmp = t_1
    else if (a <= (-6.2d-144)) then
        tmp = z * ((y - x) / (a - t))
    else if (a <= 5.8d+39) then
        tmp = y - ((y - x) / (t / z))
    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 = x + ((y - x) * (z / a));
	double tmp;
	if (a <= -10000000000.0) {
		tmp = t_1;
	} else if (a <= -6.2e-144) {
		tmp = z * ((y - x) / (a - t));
	} else if (a <= 5.8e+39) {
		tmp = y - ((y - x) / (t / z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((y - x) * (z / a))
	tmp = 0
	if a <= -10000000000.0:
		tmp = t_1
	elif a <= -6.2e-144:
		tmp = z * ((y - x) / (a - t))
	elif a <= 5.8e+39:
		tmp = y - ((y - x) / (t / z))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(y - x) * Float64(z / a)))
	tmp = 0.0
	if (a <= -10000000000.0)
		tmp = t_1;
	elseif (a <= -6.2e-144)
		tmp = Float64(z * Float64(Float64(y - x) / Float64(a - t)));
	elseif (a <= 5.8e+39)
		tmp = Float64(y - Float64(Float64(y - x) / Float64(t / z)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((y - x) * (z / a));
	tmp = 0.0;
	if (a <= -10000000000.0)
		tmp = t_1;
	elseif (a <= -6.2e-144)
		tmp = z * ((y - x) / (a - t));
	elseif (a <= 5.8e+39)
		tmp = y - ((y - x) / (t / z));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -10000000000.0], t$95$1, If[LessEqual[a, -6.2e-144], N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.8e+39], N[(y - N[(N[(y - x), $MachinePrecision] / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \left(y - x\right) \cdot \frac{z}{a}\\
\mathbf{if}\;a \leq -10000000000:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -6.2 \cdot 10^{-144}:\\
\;\;\;\;z \cdot \frac{y - x}{a - t}\\

\mathbf{elif}\;a \leq 5.8 \cdot 10^{+39}:\\
\;\;\;\;y - \frac{y - x}{\frac{t}{z}}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1e10 or 5.80000000000000059e39 < a

    1. Initial program 71.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-/l*94.8%

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} \]
      2. clear-num94.7%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - t}{z - t}}{y - x}}} \]
      3. associate-/r/94.8%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{a - t}{z - t}} \cdot \left(y - x\right)} \]
      4. clear-num94.9%

        \[\leadsto x + \color{blue}{\frac{z - t}{a - t}} \cdot \left(y - x\right) \]
    3. Applied egg-rr94.9%

      \[\leadsto x + \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} \]
    4. Taylor expanded in t around 0 71.5%

      \[\leadsto x + \color{blue}{\frac{z}{a}} \cdot \left(y - x\right) \]

    if -1e10 < a < -6.2000000000000001e-144

    1. Initial program 74.6%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/77.5%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified77.5%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Taylor expanded in z around inf 70.8%

      \[\leadsto \color{blue}{z \cdot \left(\frac{y}{a - t} - \frac{x}{a - t}\right)} \]
    5. Step-by-step derivation
      1. div-sub70.8%

        \[\leadsto z \cdot \color{blue}{\frac{y - x}{a - t}} \]
    6. Simplified70.8%

      \[\leadsto \color{blue}{z \cdot \frac{y - x}{a - t}} \]

    if -6.2000000000000001e-144 < a < 5.80000000000000059e39

    1. Initial program 64.3%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/72.6%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified72.6%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Step-by-step derivation
      1. +-commutative72.6%

        \[\leadsto \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right) + x} \]
      2. associate-/r/76.9%

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv76.9%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{1}{\frac{a - t}{z - t}}} + x \]
      4. fma-def76.9%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{1}{\frac{a - t}{z - t}}, x\right)} \]
      5. clear-num76.9%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{z - t}{a - t}}, x\right) \]
    5. Applied egg-rr76.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    6. Taylor expanded in t around -inf 79.4%

      \[\leadsto \color{blue}{y + -1 \cdot \frac{\left(y - x\right) \cdot \left(z - a\right)}{t}} \]
    7. Step-by-step derivation
      1. mul-1-neg79.4%

        \[\leadsto y + \color{blue}{\left(-\frac{\left(y - x\right) \cdot \left(z - a\right)}{t}\right)} \]
      2. unsub-neg79.4%

        \[\leadsto \color{blue}{y - \frac{\left(y - x\right) \cdot \left(z - a\right)}{t}} \]
      3. associate-/l*85.9%

        \[\leadsto y - \color{blue}{\frac{y - x}{\frac{t}{z - a}}} \]
    8. Simplified85.9%

      \[\leadsto \color{blue}{y - \frac{y - x}{\frac{t}{z - a}}} \]
    9. Taylor expanded in z around inf 82.4%

      \[\leadsto y - \frac{y - x}{\color{blue}{\frac{t}{z}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification75.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -10000000000:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq -6.2 \cdot 10^{-144}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;a \leq 5.8 \cdot 10^{+39}:\\ \;\;\;\;y - \frac{y - x}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\ \end{array} \]

Alternative 23: 38.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z}{a}\\ \mathbf{if}\;a \leq -3.5 \cdot 10^{+165}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.25 \cdot 10^{+116}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -5500000000000:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -6.2 \cdot 10^{-144}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{+74}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ z a))))
   (if (<= a -3.5e+165)
     x
     (if (<= a -1.25e+116)
       t_1
       (if (<= a -5500000000000.0)
         x
         (if (<= a -6.2e-144) t_1 (if (<= a 6.2e+74) y x)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (z / a);
	double tmp;
	if (a <= -3.5e+165) {
		tmp = x;
	} else if (a <= -1.25e+116) {
		tmp = t_1;
	} else if (a <= -5500000000000.0) {
		tmp = x;
	} else if (a <= -6.2e-144) {
		tmp = t_1;
	} else if (a <= 6.2e+74) {
		tmp = 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) :: t_1
    real(8) :: tmp
    t_1 = y * (z / a)
    if (a <= (-3.5d+165)) then
        tmp = x
    else if (a <= (-1.25d+116)) then
        tmp = t_1
    else if (a <= (-5500000000000.0d0)) then
        tmp = x
    else if (a <= (-6.2d-144)) then
        tmp = t_1
    else if (a <= 6.2d+74) then
        tmp = 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 t_1 = y * (z / a);
	double tmp;
	if (a <= -3.5e+165) {
		tmp = x;
	} else if (a <= -1.25e+116) {
		tmp = t_1;
	} else if (a <= -5500000000000.0) {
		tmp = x;
	} else if (a <= -6.2e-144) {
		tmp = t_1;
	} else if (a <= 6.2e+74) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * (z / a)
	tmp = 0
	if a <= -3.5e+165:
		tmp = x
	elif a <= -1.25e+116:
		tmp = t_1
	elif a <= -5500000000000.0:
		tmp = x
	elif a <= -6.2e-144:
		tmp = t_1
	elif a <= 6.2e+74:
		tmp = y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(z / a))
	tmp = 0.0
	if (a <= -3.5e+165)
		tmp = x;
	elseif (a <= -1.25e+116)
		tmp = t_1;
	elseif (a <= -5500000000000.0)
		tmp = x;
	elseif (a <= -6.2e-144)
		tmp = t_1;
	elseif (a <= 6.2e+74)
		tmp = y;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * (z / a);
	tmp = 0.0;
	if (a <= -3.5e+165)
		tmp = x;
	elseif (a <= -1.25e+116)
		tmp = t_1;
	elseif (a <= -5500000000000.0)
		tmp = x;
	elseif (a <= -6.2e-144)
		tmp = t_1;
	elseif (a <= 6.2e+74)
		tmp = y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.5e+165], x, If[LessEqual[a, -1.25e+116], t$95$1, If[LessEqual[a, -5500000000000.0], x, If[LessEqual[a, -6.2e-144], t$95$1, If[LessEqual[a, 6.2e+74], y, x]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \frac{z}{a}\\
\mathbf{if}\;a \leq -3.5 \cdot 10^{+165}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -1.25 \cdot 10^{+116}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -5500000000000:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -6.2 \cdot 10^{-144}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 6.2 \cdot 10^{+74}:\\
\;\;\;\;y\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.49999999999999996e165 or -1.25000000000000006e116 < a < -5.5e12 or 6.20000000000000043e74 < a

    1. Initial program 70.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/89.6%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified89.6%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Taylor expanded in a around inf 54.0%

      \[\leadsto \color{blue}{x} \]

    if -3.49999999999999996e165 < a < -1.25000000000000006e116 or -5.5e12 < a < -6.2000000000000001e-144

    1. Initial program 75.1%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/83.3%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified83.3%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Step-by-step derivation
      1. +-commutative83.3%

        \[\leadsto \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right) + x} \]
      2. associate-/r/87.2%

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv87.3%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{1}{\frac{a - t}{z - t}}} + x \]
      4. fma-def87.3%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{1}{\frac{a - t}{z - t}}, x\right)} \]
      5. clear-num87.4%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{z - t}{a - t}}, x\right) \]
    5. Applied egg-rr87.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    6. Taylor expanded in y around inf 66.8%

      \[\leadsto \color{blue}{y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right)} \]
    7. Step-by-step derivation
      1. div-sub66.8%

        \[\leadsto y \cdot \color{blue}{\frac{z - t}{a - t}} \]
    8. Simplified66.8%

      \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t}} \]
    9. Taylor expanded in t around 0 36.8%

      \[\leadsto y \cdot \color{blue}{\frac{z}{a}} \]

    if -6.2000000000000001e-144 < a < 6.20000000000000043e74

    1. Initial program 65.4%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/74.1%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified74.1%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Taylor expanded in t around inf 44.0%

      \[\leadsto \color{blue}{y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification46.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.5 \cdot 10^{+165}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.25 \cdot 10^{+116}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq -5500000000000:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -6.2 \cdot 10^{-144}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{+74}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 24: 37.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -3.5 \cdot 10^{+165}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.25 \cdot 10^{+116}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq -3.8 \cdot 10^{-16}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{-292}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 5.8 \cdot 10^{+74}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -3.5e+165)
   x
   (if (<= a -1.25e+116)
     (* y (/ z a))
     (if (<= a -3.8e-16)
       x
       (if (<= a -6.5e-292) (/ x (/ t z)) (if (<= a 5.8e+74) y x))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -3.5e+165) {
		tmp = x;
	} else if (a <= -1.25e+116) {
		tmp = y * (z / a);
	} else if (a <= -3.8e-16) {
		tmp = x;
	} else if (a <= -6.5e-292) {
		tmp = x / (t / z);
	} else if (a <= 5.8e+74) {
		tmp = 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 <= (-3.5d+165)) then
        tmp = x
    else if (a <= (-1.25d+116)) then
        tmp = y * (z / a)
    else if (a <= (-3.8d-16)) then
        tmp = x
    else if (a <= (-6.5d-292)) then
        tmp = x / (t / z)
    else if (a <= 5.8d+74) then
        tmp = 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 <= -3.5e+165) {
		tmp = x;
	} else if (a <= -1.25e+116) {
		tmp = y * (z / a);
	} else if (a <= -3.8e-16) {
		tmp = x;
	} else if (a <= -6.5e-292) {
		tmp = x / (t / z);
	} else if (a <= 5.8e+74) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -3.5e+165:
		tmp = x
	elif a <= -1.25e+116:
		tmp = y * (z / a)
	elif a <= -3.8e-16:
		tmp = x
	elif a <= -6.5e-292:
		tmp = x / (t / z)
	elif a <= 5.8e+74:
		tmp = y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -3.5e+165)
		tmp = x;
	elseif (a <= -1.25e+116)
		tmp = Float64(y * Float64(z / a));
	elseif (a <= -3.8e-16)
		tmp = x;
	elseif (a <= -6.5e-292)
		tmp = Float64(x / Float64(t / z));
	elseif (a <= 5.8e+74)
		tmp = y;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -3.5e+165)
		tmp = x;
	elseif (a <= -1.25e+116)
		tmp = y * (z / a);
	elseif (a <= -3.8e-16)
		tmp = x;
	elseif (a <= -6.5e-292)
		tmp = x / (t / z);
	elseif (a <= 5.8e+74)
		tmp = y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.5e+165], x, If[LessEqual[a, -1.25e+116], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -3.8e-16], x, If[LessEqual[a, -6.5e-292], N[(x / N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.8e+74], y, x]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.5 \cdot 10^{+165}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -1.25 \cdot 10^{+116}:\\
\;\;\;\;y \cdot \frac{z}{a}\\

\mathbf{elif}\;a \leq -3.8 \cdot 10^{-16}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -6.5 \cdot 10^{-292}:\\
\;\;\;\;\frac{x}{\frac{t}{z}}\\

\mathbf{elif}\;a \leq 5.8 \cdot 10^{+74}:\\
\;\;\;\;y\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -3.49999999999999996e165 or -1.25000000000000006e116 < a < -3.80000000000000012e-16 or 5.8000000000000005e74 < a

    1. Initial program 70.1%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/89.8%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified89.8%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Taylor expanded in a around inf 53.0%

      \[\leadsto \color{blue}{x} \]

    if -3.49999999999999996e165 < a < -1.25000000000000006e116

    1. Initial program 76.3%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/99.7%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Step-by-step derivation
      1. +-commutative99.7%

        \[\leadsto \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right) + x} \]
      2. associate-/r/99.6%

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv99.7%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{1}{\frac{a - t}{z - t}}} + x \]
      4. fma-def99.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{1}{\frac{a - t}{z - t}}, x\right)} \]
      5. clear-num99.9%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{z - t}{a - t}}, x\right) \]
    5. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    6. Taylor expanded in y around inf 83.8%

      \[\leadsto \color{blue}{y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right)} \]
    7. Step-by-step derivation
      1. div-sub83.8%

        \[\leadsto y \cdot \color{blue}{\frac{z - t}{a - t}} \]
    8. Simplified83.8%

      \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t}} \]
    9. Taylor expanded in t around 0 51.1%

      \[\leadsto y \cdot \color{blue}{\frac{z}{a}} \]

    if -3.80000000000000012e-16 < a < -6.4999999999999997e-292

    1. Initial program 71.2%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/73.1%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified73.1%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Taylor expanded in z around -inf 67.8%

      \[\leadsto \color{blue}{\frac{z \cdot \left(y - x\right)}{a - t}} \]
    5. Taylor expanded in a around 0 46.7%

      \[\leadsto \color{blue}{-1 \cdot \frac{z \cdot \left(y - x\right)}{t}} \]
    6. Step-by-step derivation
      1. associate-*r/46.7%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(z \cdot \left(y - x\right)\right)}{t}} \]
      2. associate-*r*46.7%

        \[\leadsto \frac{\color{blue}{\left(-1 \cdot z\right) \cdot \left(y - x\right)}}{t} \]
      3. mul-1-neg46.7%

        \[\leadsto \frac{\color{blue}{\left(-z\right)} \cdot \left(y - x\right)}{t} \]
    7. Simplified46.7%

      \[\leadsto \color{blue}{\frac{\left(-z\right) \cdot \left(y - x\right)}{t}} \]
    8. Taylor expanded in y around 0 34.6%

      \[\leadsto \color{blue}{\frac{x \cdot z}{t}} \]
    9. Step-by-step derivation
      1. associate-/l*42.3%

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{z}}} \]
    10. Simplified42.3%

      \[\leadsto \color{blue}{\frac{x}{\frac{t}{z}}} \]

    if -6.4999999999999997e-292 < a < 5.8000000000000005e74

    1. Initial program 64.6%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/75.9%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified75.9%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Taylor expanded in t around inf 51.3%

      \[\leadsto \color{blue}{y} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification49.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.5 \cdot 10^{+165}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.25 \cdot 10^{+116}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq -3.8 \cdot 10^{-16}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{-292}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 5.8 \cdot 10^{+74}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 25: 37.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -3.5 \cdot 10^{+165}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.12 \cdot 10^{+116}:\\ \;\;\;\;\frac{z}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq -6.2 \cdot 10^{-16}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.1 \cdot 10^{-291}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{+74}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -3.5e+165)
   x
   (if (<= a -1.12e+116)
     (/ z (/ a y))
     (if (<= a -6.2e-16)
       x
       (if (<= a -1.1e-291) (/ x (/ t z)) (if (<= a 4.5e+74) y x))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -3.5e+165) {
		tmp = x;
	} else if (a <= -1.12e+116) {
		tmp = z / (a / y);
	} else if (a <= -6.2e-16) {
		tmp = x;
	} else if (a <= -1.1e-291) {
		tmp = x / (t / z);
	} else if (a <= 4.5e+74) {
		tmp = 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 <= (-3.5d+165)) then
        tmp = x
    else if (a <= (-1.12d+116)) then
        tmp = z / (a / y)
    else if (a <= (-6.2d-16)) then
        tmp = x
    else if (a <= (-1.1d-291)) then
        tmp = x / (t / z)
    else if (a <= 4.5d+74) then
        tmp = 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 <= -3.5e+165) {
		tmp = x;
	} else if (a <= -1.12e+116) {
		tmp = z / (a / y);
	} else if (a <= -6.2e-16) {
		tmp = x;
	} else if (a <= -1.1e-291) {
		tmp = x / (t / z);
	} else if (a <= 4.5e+74) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -3.5e+165:
		tmp = x
	elif a <= -1.12e+116:
		tmp = z / (a / y)
	elif a <= -6.2e-16:
		tmp = x
	elif a <= -1.1e-291:
		tmp = x / (t / z)
	elif a <= 4.5e+74:
		tmp = y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -3.5e+165)
		tmp = x;
	elseif (a <= -1.12e+116)
		tmp = Float64(z / Float64(a / y));
	elseif (a <= -6.2e-16)
		tmp = x;
	elseif (a <= -1.1e-291)
		tmp = Float64(x / Float64(t / z));
	elseif (a <= 4.5e+74)
		tmp = y;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -3.5e+165)
		tmp = x;
	elseif (a <= -1.12e+116)
		tmp = z / (a / y);
	elseif (a <= -6.2e-16)
		tmp = x;
	elseif (a <= -1.1e-291)
		tmp = x / (t / z);
	elseif (a <= 4.5e+74)
		tmp = y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.5e+165], x, If[LessEqual[a, -1.12e+116], N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -6.2e-16], x, If[LessEqual[a, -1.1e-291], N[(x / N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.5e+74], y, x]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.5 \cdot 10^{+165}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -1.12 \cdot 10^{+116}:\\
\;\;\;\;\frac{z}{\frac{a}{y}}\\

\mathbf{elif}\;a \leq -6.2 \cdot 10^{-16}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -1.1 \cdot 10^{-291}:\\
\;\;\;\;\frac{x}{\frac{t}{z}}\\

\mathbf{elif}\;a \leq 4.5 \cdot 10^{+74}:\\
\;\;\;\;y\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -3.49999999999999996e165 or -1.12e116 < a < -6.2000000000000002e-16 or 4.5e74 < a

    1. Initial program 70.1%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/89.8%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified89.8%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Taylor expanded in a around inf 53.0%

      \[\leadsto \color{blue}{x} \]

    if -3.49999999999999996e165 < a < -1.12e116

    1. Initial program 76.3%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/99.7%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Taylor expanded in z around -inf 43.7%

      \[\leadsto \color{blue}{\frac{z \cdot \left(y - x\right)}{a - t}} \]
    5. Taylor expanded in a around inf 43.5%

      \[\leadsto \color{blue}{\frac{z \cdot \left(y - x\right)}{a}} \]
    6. Step-by-step derivation
      1. associate-/l*59.1%

        \[\leadsto \color{blue}{\frac{z}{\frac{a}{y - x}}} \]
    7. Simplified59.1%

      \[\leadsto \color{blue}{\frac{z}{\frac{a}{y - x}}} \]
    8. Taylor expanded in y around inf 51.1%

      \[\leadsto \frac{z}{\color{blue}{\frac{a}{y}}} \]

    if -6.2000000000000002e-16 < a < -1.10000000000000001e-291

    1. Initial program 71.2%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/73.1%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified73.1%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Taylor expanded in z around -inf 67.8%

      \[\leadsto \color{blue}{\frac{z \cdot \left(y - x\right)}{a - t}} \]
    5. Taylor expanded in a around 0 46.7%

      \[\leadsto \color{blue}{-1 \cdot \frac{z \cdot \left(y - x\right)}{t}} \]
    6. Step-by-step derivation
      1. associate-*r/46.7%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(z \cdot \left(y - x\right)\right)}{t}} \]
      2. associate-*r*46.7%

        \[\leadsto \frac{\color{blue}{\left(-1 \cdot z\right) \cdot \left(y - x\right)}}{t} \]
      3. mul-1-neg46.7%

        \[\leadsto \frac{\color{blue}{\left(-z\right)} \cdot \left(y - x\right)}{t} \]
    7. Simplified46.7%

      \[\leadsto \color{blue}{\frac{\left(-z\right) \cdot \left(y - x\right)}{t}} \]
    8. Taylor expanded in y around 0 34.6%

      \[\leadsto \color{blue}{\frac{x \cdot z}{t}} \]
    9. Step-by-step derivation
      1. associate-/l*42.3%

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{z}}} \]
    10. Simplified42.3%

      \[\leadsto \color{blue}{\frac{x}{\frac{t}{z}}} \]

    if -1.10000000000000001e-291 < a < 4.5e74

    1. Initial program 64.6%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/75.9%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified75.9%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Taylor expanded in t around inf 51.3%

      \[\leadsto \color{blue}{y} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification49.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.5 \cdot 10^{+165}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.12 \cdot 10^{+116}:\\ \;\;\;\;\frac{z}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq -6.2 \cdot 10^{-16}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.1 \cdot 10^{-291}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{+74}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 26: 50.0% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -9.5 \cdot 10^{+99}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{+88}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -9.5e+99) y (if (<= t 4.4e+88) (* x (- 1.0 (/ z a))) y)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -9.5e+99) {
		tmp = y;
	} else if (t <= 4.4e+88) {
		tmp = x * (1.0 - (z / a));
	} else {
		tmp = y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (t <= (-9.5d+99)) then
        tmp = y
    else if (t <= 4.4d+88) then
        tmp = x * (1.0d0 - (z / a))
    else
        tmp = y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -9.5e+99) {
		tmp = y;
	} else if (t <= 4.4e+88) {
		tmp = x * (1.0 - (z / a));
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -9.5e+99:
		tmp = y
	elif t <= 4.4e+88:
		tmp = x * (1.0 - (z / a))
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -9.5e+99)
		tmp = y;
	elseif (t <= 4.4e+88)
		tmp = Float64(x * Float64(1.0 - Float64(z / a)));
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -9.5e+99)
		tmp = y;
	elseif (t <= 4.4e+88)
		tmp = x * (1.0 - (z / a));
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -9.5e+99], y, If[LessEqual[t, 4.4e+88], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.5 \cdot 10^{+99}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq 4.4 \cdot 10^{+88}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\

\mathbf{else}:\\
\;\;\;\;y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -9.49999999999999908e99 or 4.40000000000000017e88 < t

    1. Initial program 36.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/63.6%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified63.6%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Taylor expanded in t around inf 57.2%

      \[\leadsto \color{blue}{y} \]

    if -9.49999999999999908e99 < t < 4.40000000000000017e88

    1. Initial program 86.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/91.8%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified91.8%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Step-by-step derivation
      1. +-commutative91.8%

        \[\leadsto \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right) + x} \]
      2. associate-/r/95.4%

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv95.4%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{1}{\frac{a - t}{z - t}}} + x \]
      4. fma-def95.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{1}{\frac{a - t}{z - t}}, x\right)} \]
      5. clear-num95.5%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{z - t}{a - t}}, x\right) \]
    5. Applied egg-rr95.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    6. Taylor expanded in x around inf 60.6%

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z - t}{a - t}\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg60.6%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{z - t}{a - t}\right)}\right) \]
      2. unsub-neg60.6%

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{z - t}{a - t}\right)} \]
    8. Simplified60.6%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{z - t}{a - t}\right)} \]
    9. Taylor expanded in t around 0 50.7%

      \[\leadsto x \cdot \color{blue}{\left(1 - \frac{z}{a}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification53.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9.5 \cdot 10^{+99}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{+88}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 27: 40.4% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -15500000000000:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{+75}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -15500000000000.0) x (if (<= a 5.2e+75) y x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -15500000000000.0) {
		tmp = x;
	} else if (a <= 5.2e+75) {
		tmp = 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 <= (-15500000000000.0d0)) then
        tmp = x
    else if (a <= 5.2d+75) then
        tmp = 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 <= -15500000000000.0) {
		tmp = x;
	} else if (a <= 5.2e+75) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -15500000000000.0:
		tmp = x
	elif a <= 5.2e+75:
		tmp = y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -15500000000000.0)
		tmp = x;
	elseif (a <= 5.2e+75)
		tmp = y;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -15500000000000.0)
		tmp = x;
	elseif (a <= 5.2e+75)
		tmp = y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -15500000000000.0], x, If[LessEqual[a, 5.2e+75], y, x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -15500000000000:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 5.2 \cdot 10^{+75}:\\
\;\;\;\;y\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.55e13 or 5.1999999999999997e75 < a

    1. Initial program 71.1%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/90.7%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified90.7%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Taylor expanded in a around inf 49.5%

      \[\leadsto \color{blue}{x} \]

    if -1.55e13 < a < 5.1999999999999997e75

    1. Initial program 67.6%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/74.9%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified74.9%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Taylor expanded in t around inf 37.8%

      \[\leadsto \color{blue}{y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification43.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -15500000000000:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{+75}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 28: 25.5% 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 69.1%

    \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
  2. Step-by-step derivation
    1. associate-*l/81.9%

      \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
  3. Simplified81.9%

    \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
  4. Taylor expanded in a around inf 25.1%

    \[\leadsto \color{blue}{x} \]
  5. Final simplification25.1%

    \[\leadsto x \]

Developer target: 87.2% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\ \mathbf{if}\;a < -1.6153062845442575 \cdot 10^{-142}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a < 3.774403170083174 \cdot 10^{-182}:\\ \;\;\;\;y - \frac{z}{t} \cdot \left(y - x\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))
   (if (< a -1.6153062845442575e-142)
     t_1
     (if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
	double tmp;
	if (a < -1.6153062845442575e-142) {
		tmp = t_1;
	} else if (a < 3.774403170083174e-182) {
		tmp = y - ((z / t) * (y - x));
	} 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) :: tmp
    t_1 = x + (((y - x) / 1.0d0) * ((z - t) / (a - t)))
    if (a < (-1.6153062845442575d-142)) then
        tmp = t_1
    else if (a < 3.774403170083174d-182) then
        tmp = y - ((z / t) * (y - x))
    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 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
	double tmp;
	if (a < -1.6153062845442575e-142) {
		tmp = t_1;
	} else if (a < 3.774403170083174e-182) {
		tmp = y - ((z / t) * (y - x));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)))
	tmp = 0
	if a < -1.6153062845442575e-142:
		tmp = t_1
	elif a < 3.774403170083174e-182:
		tmp = y - ((z / t) * (y - x))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(Float64(y - x) / 1.0) * Float64(Float64(z - t) / Float64(a - t))))
	tmp = 0.0
	if (a < -1.6153062845442575e-142)
		tmp = t_1;
	elseif (a < 3.774403170083174e-182)
		tmp = Float64(y - Float64(Float64(z / t) * Float64(y - x)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
	tmp = 0.0;
	if (a < -1.6153062845442575e-142)
		tmp = t_1;
	elseif (a < 3.774403170083174e-182)
		tmp = y - ((z / t) * (y - x));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - x), $MachinePrecision] / 1.0), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[a, -1.6153062845442575e-142], t$95$1, If[Less[a, 3.774403170083174e-182], N[(y - N[(N[(z / t), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;a < -1.6153062845442575 \cdot 10^{-142}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a < 3.774403170083174 \cdot 10^{-182}:\\
\;\;\;\;y - \frac{z}{t} \cdot \left(y - x\right)\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023297 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
  :precision binary64

  :herbie-target
  (if (< a -1.6153062845442575e-142) (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t)))) (if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))

  (+ x (/ (* (- y x) (- z t)) (- a t))))