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

Percentage Accurate: 68.5% → 87.6%
Time: 33.4s
Alternatives: 27
Speedup: 0.6×

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 27 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.5% 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: 87.6% accurate, 0.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.4e47 or 1.72e103 < t

    1. Initial program 32.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.4e47 < t < 1.72e103

    1. Initial program 88.2%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/94.4%

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

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

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

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

Alternative 2: 52.6% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot \frac{z}{a}\\ t_2 := x \cdot \frac{z - a}{t}\\ \mathbf{if}\;t \leq -6.8 \cdot 10^{+66}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -4.8 \cdot 10^{-53}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -1.3 \cdot 10^{-53}:\\ \;\;\;\;y \cdot \frac{-t}{a}\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{-116}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{-52}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 6 \cdot 10^{+38}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{+99}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{+101}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{+126}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* y (/ z a)))) (t_2 (* x (/ (- z a) t))))
   (if (<= t -6.8e+66)
     y
     (if (<= t -4.8e-53)
       t_2
       (if (<= t -1.3e-53)
         (* y (/ (- t) a))
         (if (<= t 3.5e-116)
           t_1
           (if (<= t 1.4e-52)
             (* x (- 1.0 (/ z a)))
             (if (<= t 6e+38)
               t_1
               (if (<= t 1.55e+99)
                 y
                 (if (<= t 2.25e+101) x (if (<= t 6.2e+126) t_2 y)))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * (z / a));
	double t_2 = x * ((z - a) / t);
	double tmp;
	if (t <= -6.8e+66) {
		tmp = y;
	} else if (t <= -4.8e-53) {
		tmp = t_2;
	} else if (t <= -1.3e-53) {
		tmp = y * (-t / a);
	} else if (t <= 3.5e-116) {
		tmp = t_1;
	} else if (t <= 1.4e-52) {
		tmp = x * (1.0 - (z / a));
	} else if (t <= 6e+38) {
		tmp = t_1;
	} else if (t <= 1.55e+99) {
		tmp = y;
	} else if (t <= 2.25e+101) {
		tmp = x;
	} else if (t <= 6.2e+126) {
		tmp = t_2;
	} 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) :: t_2
    real(8) :: tmp
    t_1 = x + (y * (z / a))
    t_2 = x * ((z - a) / t)
    if (t <= (-6.8d+66)) then
        tmp = y
    else if (t <= (-4.8d-53)) then
        tmp = t_2
    else if (t <= (-1.3d-53)) then
        tmp = y * (-t / a)
    else if (t <= 3.5d-116) then
        tmp = t_1
    else if (t <= 1.4d-52) then
        tmp = x * (1.0d0 - (z / a))
    else if (t <= 6d+38) then
        tmp = t_1
    else if (t <= 1.55d+99) then
        tmp = y
    else if (t <= 2.25d+101) then
        tmp = x
    else if (t <= 6.2d+126) then
        tmp = t_2
    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 = x + (y * (z / a));
	double t_2 = x * ((z - a) / t);
	double tmp;
	if (t <= -6.8e+66) {
		tmp = y;
	} else if (t <= -4.8e-53) {
		tmp = t_2;
	} else if (t <= -1.3e-53) {
		tmp = y * (-t / a);
	} else if (t <= 3.5e-116) {
		tmp = t_1;
	} else if (t <= 1.4e-52) {
		tmp = x * (1.0 - (z / a));
	} else if (t <= 6e+38) {
		tmp = t_1;
	} else if (t <= 1.55e+99) {
		tmp = y;
	} else if (t <= 2.25e+101) {
		tmp = x;
	} else if (t <= 6.2e+126) {
		tmp = t_2;
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (y * (z / a))
	t_2 = x * ((z - a) / t)
	tmp = 0
	if t <= -6.8e+66:
		tmp = y
	elif t <= -4.8e-53:
		tmp = t_2
	elif t <= -1.3e-53:
		tmp = y * (-t / a)
	elif t <= 3.5e-116:
		tmp = t_1
	elif t <= 1.4e-52:
		tmp = x * (1.0 - (z / a))
	elif t <= 6e+38:
		tmp = t_1
	elif t <= 1.55e+99:
		tmp = y
	elif t <= 2.25e+101:
		tmp = x
	elif t <= 6.2e+126:
		tmp = t_2
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(y * Float64(z / a)))
	t_2 = Float64(x * Float64(Float64(z - a) / t))
	tmp = 0.0
	if (t <= -6.8e+66)
		tmp = y;
	elseif (t <= -4.8e-53)
		tmp = t_2;
	elseif (t <= -1.3e-53)
		tmp = Float64(y * Float64(Float64(-t) / a));
	elseif (t <= 3.5e-116)
		tmp = t_1;
	elseif (t <= 1.4e-52)
		tmp = Float64(x * Float64(1.0 - Float64(z / a)));
	elseif (t <= 6e+38)
		tmp = t_1;
	elseif (t <= 1.55e+99)
		tmp = y;
	elseif (t <= 2.25e+101)
		tmp = x;
	elseif (t <= 6.2e+126)
		tmp = t_2;
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (y * (z / a));
	t_2 = x * ((z - a) / t);
	tmp = 0.0;
	if (t <= -6.8e+66)
		tmp = y;
	elseif (t <= -4.8e-53)
		tmp = t_2;
	elseif (t <= -1.3e-53)
		tmp = y * (-t / a);
	elseif (t <= 3.5e-116)
		tmp = t_1;
	elseif (t <= 1.4e-52)
		tmp = x * (1.0 - (z / a));
	elseif (t <= 6e+38)
		tmp = t_1;
	elseif (t <= 1.55e+99)
		tmp = y;
	elseif (t <= 2.25e+101)
		tmp = x;
	elseif (t <= 6.2e+126)
		tmp = t_2;
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.8e+66], y, If[LessEqual[t, -4.8e-53], t$95$2, If[LessEqual[t, -1.3e-53], N[(y * N[((-t) / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.5e-116], t$95$1, If[LessEqual[t, 1.4e-52], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6e+38], t$95$1, If[LessEqual[t, 1.55e+99], y, If[LessEqual[t, 2.25e+101], x, If[LessEqual[t, 6.2e+126], t$95$2, y]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{a}\\
t_2 := x \cdot \frac{z - a}{t}\\
\mathbf{if}\;t \leq -6.8 \cdot 10^{+66}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq -4.8 \cdot 10^{-53}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;t \leq 3.5 \cdot 10^{-116}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 6 \cdot 10^{+38}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 1.55 \cdot 10^{+99}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq 2.25 \cdot 10^{+101}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 6.2 \cdot 10^{+126}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -6.8000000000000006e66 or 6.0000000000000002e38 < t < 1.55e99 or 6.2e126 < t

    1. Initial program 38.2%

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

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

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

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

    if -6.8000000000000006e66 < t < -4.80000000000000015e-53 or 2.2500000000000001e101 < t < 6.2e126

    1. Initial program 60.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a - t}{z - t}}} \]
    9. Simplified49.3%

      \[\leadsto \color{blue}{x - \frac{x}{\frac{a - t}{z - t}}} \]
    10. Taylor expanded in t around inf 42.5%

      \[\leadsto \color{blue}{\frac{-1 \cdot \left(a \cdot x\right) - -1 \cdot \left(x \cdot z\right)}{t}} \]
    11. Step-by-step derivation
      1. distribute-lft-out--42.5%

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

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

        \[\leadsto \frac{-\left(\color{blue}{x \cdot a} - x \cdot z\right)}{t} \]
      4. distribute-lft-out--42.5%

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{z - a}{t}} \]
    15. Simplified52.5%

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

    if -4.80000000000000015e-53 < t < -1.29999999999999998e-53

    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/99.2%

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{t}{\frac{a}{y - x}}} \]
    10. Simplified53.0%

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

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

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

        \[\leadsto -\color{blue}{\frac{t}{a} \cdot y} \]
      3. *-commutative53.0%

        \[\leadsto -\color{blue}{y \cdot \frac{t}{a}} \]
      4. distribute-rgt-neg-in53.0%

        \[\leadsto \color{blue}{y \cdot \left(-\frac{t}{a}\right)} \]
      5. distribute-frac-neg53.0%

        \[\leadsto y \cdot \color{blue}{\frac{-t}{a}} \]
    13. Simplified53.0%

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

    if -1.29999999999999998e-53 < t < 3.49999999999999984e-116 or 1.39999999999999997e-52 < t < 6.0000000000000002e38

    1. Initial program 91.4%

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

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

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

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

      \[\leadsto x + \frac{\color{blue}{y \cdot z}}{a} \]
    7. Step-by-step derivation
      1. *-commutative62.0%

        \[\leadsto x + \frac{\color{blue}{z \cdot y}}{a} \]
    8. Simplified62.0%

      \[\leadsto x + \frac{\color{blue}{z \cdot y}}{a} \]
    9. Step-by-step derivation
      1. div-inv62.0%

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

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

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

        \[\leadsto x + y \cdot \color{blue}{\frac{z}{a}} \]
    10. Applied egg-rr66.5%

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

    if 3.49999999999999984e-116 < t < 1.39999999999999997e-52

    1. Initial program 85.4%

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

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

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

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

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

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

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

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

    if 1.55e99 < t < 2.2500000000000001e101

    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. Add Preprocessing
    5. Taylor expanded in a around inf 100.0%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 6 regimes into one program.
  4. Final simplification60.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.8 \cdot 10^{+66}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -4.8 \cdot 10^{-53}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq -1.3 \cdot 10^{-53}:\\ \;\;\;\;y \cdot \frac{-t}{a}\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{-116}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{-52}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 6 \cdot 10^{+38}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{+99}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{+101}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{+126}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 52.6% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{z - a}{t}\\ \mathbf{if}\;t \leq -1.9 \cdot 10^{+66}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -4.8 \cdot 10^{-53}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.3 \cdot 10^{-53}:\\ \;\;\;\;y \cdot \frac{-t}{a}\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{-116}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 6.8 \cdot 10^{-53}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 5.8 \cdot 10^{+38}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{+99}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 8.7 \cdot 10^{+102}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.08 \cdot 10^{+126}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (/ (- z a) t))))
   (if (<= t -1.9e+66)
     y
     (if (<= t -4.8e-53)
       t_1
       (if (<= t -1.3e-53)
         (* y (/ (- t) a))
         (if (<= t 3.1e-116)
           (+ x (/ y (/ a z)))
           (if (<= t 6.8e-53)
             (* x (- 1.0 (/ z a)))
             (if (<= t 5.8e+38)
               (+ x (* y (/ z a)))
               (if (<= t 1.55e+99)
                 y
                 (if (<= t 8.7e+102) x (if (<= t 1.08e+126) t_1 y)))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * ((z - a) / t);
	double tmp;
	if (t <= -1.9e+66) {
		tmp = y;
	} else if (t <= -4.8e-53) {
		tmp = t_1;
	} else if (t <= -1.3e-53) {
		tmp = y * (-t / a);
	} else if (t <= 3.1e-116) {
		tmp = x + (y / (a / z));
	} else if (t <= 6.8e-53) {
		tmp = x * (1.0 - (z / a));
	} else if (t <= 5.8e+38) {
		tmp = x + (y * (z / a));
	} else if (t <= 1.55e+99) {
		tmp = y;
	} else if (t <= 8.7e+102) {
		tmp = x;
	} else if (t <= 1.08e+126) {
		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 = x * ((z - a) / t)
    if (t <= (-1.9d+66)) then
        tmp = y
    else if (t <= (-4.8d-53)) then
        tmp = t_1
    else if (t <= (-1.3d-53)) then
        tmp = y * (-t / a)
    else if (t <= 3.1d-116) then
        tmp = x + (y / (a / z))
    else if (t <= 6.8d-53) then
        tmp = x * (1.0d0 - (z / a))
    else if (t <= 5.8d+38) then
        tmp = x + (y * (z / a))
    else if (t <= 1.55d+99) then
        tmp = y
    else if (t <= 8.7d+102) then
        tmp = x
    else if (t <= 1.08d+126) 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 = x * ((z - a) / t);
	double tmp;
	if (t <= -1.9e+66) {
		tmp = y;
	} else if (t <= -4.8e-53) {
		tmp = t_1;
	} else if (t <= -1.3e-53) {
		tmp = y * (-t / a);
	} else if (t <= 3.1e-116) {
		tmp = x + (y / (a / z));
	} else if (t <= 6.8e-53) {
		tmp = x * (1.0 - (z / a));
	} else if (t <= 5.8e+38) {
		tmp = x + (y * (z / a));
	} else if (t <= 1.55e+99) {
		tmp = y;
	} else if (t <= 8.7e+102) {
		tmp = x;
	} else if (t <= 1.08e+126) {
		tmp = t_1;
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * ((z - a) / t)
	tmp = 0
	if t <= -1.9e+66:
		tmp = y
	elif t <= -4.8e-53:
		tmp = t_1
	elif t <= -1.3e-53:
		tmp = y * (-t / a)
	elif t <= 3.1e-116:
		tmp = x + (y / (a / z))
	elif t <= 6.8e-53:
		tmp = x * (1.0 - (z / a))
	elif t <= 5.8e+38:
		tmp = x + (y * (z / a))
	elif t <= 1.55e+99:
		tmp = y
	elif t <= 8.7e+102:
		tmp = x
	elif t <= 1.08e+126:
		tmp = t_1
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(Float64(z - a) / t))
	tmp = 0.0
	if (t <= -1.9e+66)
		tmp = y;
	elseif (t <= -4.8e-53)
		tmp = t_1;
	elseif (t <= -1.3e-53)
		tmp = Float64(y * Float64(Float64(-t) / a));
	elseif (t <= 3.1e-116)
		tmp = Float64(x + Float64(y / Float64(a / z)));
	elseif (t <= 6.8e-53)
		tmp = Float64(x * Float64(1.0 - Float64(z / a)));
	elseif (t <= 5.8e+38)
		tmp = Float64(x + Float64(y * Float64(z / a)));
	elseif (t <= 1.55e+99)
		tmp = y;
	elseif (t <= 8.7e+102)
		tmp = x;
	elseif (t <= 1.08e+126)
		tmp = t_1;
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * ((z - a) / t);
	tmp = 0.0;
	if (t <= -1.9e+66)
		tmp = y;
	elseif (t <= -4.8e-53)
		tmp = t_1;
	elseif (t <= -1.3e-53)
		tmp = y * (-t / a);
	elseif (t <= 3.1e-116)
		tmp = x + (y / (a / z));
	elseif (t <= 6.8e-53)
		tmp = x * (1.0 - (z / a));
	elseif (t <= 5.8e+38)
		tmp = x + (y * (z / a));
	elseif (t <= 1.55e+99)
		tmp = y;
	elseif (t <= 8.7e+102)
		tmp = x;
	elseif (t <= 1.08e+126)
		tmp = t_1;
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.9e+66], y, If[LessEqual[t, -4.8e-53], t$95$1, If[LessEqual[t, -1.3e-53], N[(y * N[((-t) / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.1e-116], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.8e-53], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.8e+38], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.55e+99], y, If[LessEqual[t, 8.7e+102], x, If[LessEqual[t, 1.08e+126], t$95$1, y]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -4.8 \cdot 10^{-53}:\\
\;\;\;\;t_1\\

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

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

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

\mathbf{elif}\;t \leq 5.8 \cdot 10^{+38}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\

\mathbf{elif}\;t \leq 1.55 \cdot 10^{+99}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq 8.7 \cdot 10^{+102}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 1.08 \cdot 10^{+126}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if t < -1.9000000000000001e66 or 5.80000000000000013e38 < t < 1.55e99 or 1.0799999999999999e126 < t

    1. Initial program 38.2%

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

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

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

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

    if -1.9000000000000001e66 < t < -4.80000000000000015e-53 or 8.69999999999999974e102 < t < 1.0799999999999999e126

    1. Initial program 60.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a - t}{z - t}}} \]
    9. Simplified49.3%

      \[\leadsto \color{blue}{x - \frac{x}{\frac{a - t}{z - t}}} \]
    10. Taylor expanded in t around inf 42.5%

      \[\leadsto \color{blue}{\frac{-1 \cdot \left(a \cdot x\right) - -1 \cdot \left(x \cdot z\right)}{t}} \]
    11. Step-by-step derivation
      1. distribute-lft-out--42.5%

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

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

        \[\leadsto \frac{-\left(\color{blue}{x \cdot a} - x \cdot z\right)}{t} \]
      4. distribute-lft-out--42.5%

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{z - a}{t}} \]
    15. Simplified52.5%

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

    if -4.80000000000000015e-53 < t < -1.29999999999999998e-53

    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/99.2%

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{t}{\frac{a}{y - x}}} \]
    10. Simplified53.0%

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

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

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

        \[\leadsto -\color{blue}{\frac{t}{a} \cdot y} \]
      3. *-commutative53.0%

        \[\leadsto -\color{blue}{y \cdot \frac{t}{a}} \]
      4. distribute-rgt-neg-in53.0%

        \[\leadsto \color{blue}{y \cdot \left(-\frac{t}{a}\right)} \]
      5. distribute-frac-neg53.0%

        \[\leadsto y \cdot \color{blue}{\frac{-t}{a}} \]
    13. Simplified53.0%

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

    if -1.29999999999999998e-53 < t < 3.10000000000000018e-116

    1. Initial program 93.4%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{z}}} \]
    8. Simplified67.8%

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

    if 3.10000000000000018e-116 < t < 6.8e-53

    1. Initial program 85.4%

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

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

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

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

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

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

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

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

    if 6.8e-53 < t < 5.80000000000000013e38

    1. Initial program 81.0%

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

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

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

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

      \[\leadsto x + \frac{\color{blue}{y \cdot z}}{a} \]
    7. Step-by-step derivation
      1. *-commutative45.3%

        \[\leadsto x + \frac{\color{blue}{z \cdot y}}{a} \]
    8. Simplified45.3%

      \[\leadsto x + \frac{\color{blue}{z \cdot y}}{a} \]
    9. Step-by-step derivation
      1. div-inv45.3%

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

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

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

        \[\leadsto x + y \cdot \color{blue}{\frac{z}{a}} \]
    10. Applied egg-rr59.4%

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

    if 1.55e99 < t < 8.69999999999999974e102

    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. Add Preprocessing
    5. Taylor expanded in a around inf 100.0%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 7 regimes into one program.
  4. Final simplification60.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.9 \cdot 10^{+66}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -4.8 \cdot 10^{-53}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq -1.3 \cdot 10^{-53}:\\ \;\;\;\;y \cdot \frac{-t}{a}\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{-116}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 6.8 \cdot 10^{-53}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 5.8 \cdot 10^{+38}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{+99}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 8.7 \cdot 10^{+102}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.08 \cdot 10^{+126}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 52.7% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \frac{x - y}{t}\\ \mathbf{if}\;t \leq -2.2 \cdot 10^{+69}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -8.5 \cdot 10^{-23}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-117}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-69}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.08 \cdot 10^{+39}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{+97}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 1.03 \cdot 10^{+102}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 5.1 \cdot 10^{+127}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* z (/ (- x y) t))))
   (if (<= t -2.2e+69)
     y
     (if (<= t -8.5e-23)
       t_1
       (if (<= t 7e-117)
         (+ x (/ y (/ a z)))
         (if (<= t 4.8e-69)
           t_1
           (if (<= t 1.08e+39)
             (+ x (* y (/ z a)))
             (if (<= t 2.7e+97)
               y
               (if (<= t 1.03e+102)
                 x
                 (if (<= t 5.1e+127) (* x (/ (- z a) t)) y))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = z * ((x - y) / t);
	double tmp;
	if (t <= -2.2e+69) {
		tmp = y;
	} else if (t <= -8.5e-23) {
		tmp = t_1;
	} else if (t <= 7e-117) {
		tmp = x + (y / (a / z));
	} else if (t <= 4.8e-69) {
		tmp = t_1;
	} else if (t <= 1.08e+39) {
		tmp = x + (y * (z / a));
	} else if (t <= 2.7e+97) {
		tmp = y;
	} else if (t <= 1.03e+102) {
		tmp = x;
	} else if (t <= 5.1e+127) {
		tmp = x * ((z - a) / t);
	} 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 * ((x - y) / t)
    if (t <= (-2.2d+69)) then
        tmp = y
    else if (t <= (-8.5d-23)) then
        tmp = t_1
    else if (t <= 7d-117) then
        tmp = x + (y / (a / z))
    else if (t <= 4.8d-69) then
        tmp = t_1
    else if (t <= 1.08d+39) then
        tmp = x + (y * (z / a))
    else if (t <= 2.7d+97) then
        tmp = y
    else if (t <= 1.03d+102) then
        tmp = x
    else if (t <= 5.1d+127) then
        tmp = x * ((z - a) / t)
    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 * ((x - y) / t);
	double tmp;
	if (t <= -2.2e+69) {
		tmp = y;
	} else if (t <= -8.5e-23) {
		tmp = t_1;
	} else if (t <= 7e-117) {
		tmp = x + (y / (a / z));
	} else if (t <= 4.8e-69) {
		tmp = t_1;
	} else if (t <= 1.08e+39) {
		tmp = x + (y * (z / a));
	} else if (t <= 2.7e+97) {
		tmp = y;
	} else if (t <= 1.03e+102) {
		tmp = x;
	} else if (t <= 5.1e+127) {
		tmp = x * ((z - a) / t);
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = z * ((x - y) / t)
	tmp = 0
	if t <= -2.2e+69:
		tmp = y
	elif t <= -8.5e-23:
		tmp = t_1
	elif t <= 7e-117:
		tmp = x + (y / (a / z))
	elif t <= 4.8e-69:
		tmp = t_1
	elif t <= 1.08e+39:
		tmp = x + (y * (z / a))
	elif t <= 2.7e+97:
		tmp = y
	elif t <= 1.03e+102:
		tmp = x
	elif t <= 5.1e+127:
		tmp = x * ((z - a) / t)
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(z * Float64(Float64(x - y) / t))
	tmp = 0.0
	if (t <= -2.2e+69)
		tmp = y;
	elseif (t <= -8.5e-23)
		tmp = t_1;
	elseif (t <= 7e-117)
		tmp = Float64(x + Float64(y / Float64(a / z)));
	elseif (t <= 4.8e-69)
		tmp = t_1;
	elseif (t <= 1.08e+39)
		tmp = Float64(x + Float64(y * Float64(z / a)));
	elseif (t <= 2.7e+97)
		tmp = y;
	elseif (t <= 1.03e+102)
		tmp = x;
	elseif (t <= 5.1e+127)
		tmp = Float64(x * Float64(Float64(z - a) / t));
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = z * ((x - y) / t);
	tmp = 0.0;
	if (t <= -2.2e+69)
		tmp = y;
	elseif (t <= -8.5e-23)
		tmp = t_1;
	elseif (t <= 7e-117)
		tmp = x + (y / (a / z));
	elseif (t <= 4.8e-69)
		tmp = t_1;
	elseif (t <= 1.08e+39)
		tmp = x + (y * (z / a));
	elseif (t <= 2.7e+97)
		tmp = y;
	elseif (t <= 1.03e+102)
		tmp = x;
	elseif (t <= 5.1e+127)
		tmp = x * ((z - a) / t);
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.2e+69], y, If[LessEqual[t, -8.5e-23], t$95$1, If[LessEqual[t, 7e-117], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.8e-69], t$95$1, If[LessEqual[t, 1.08e+39], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.7e+97], y, If[LessEqual[t, 1.03e+102], x, If[LessEqual[t, 5.1e+127], N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], y]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := z \cdot \frac{x - y}{t}\\
\mathbf{if}\;t \leq -2.2 \cdot 10^{+69}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq -8.5 \cdot 10^{-23}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 4.8 \cdot 10^{-69}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 2.7 \cdot 10^{+97}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq 1.03 \cdot 10^{+102}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 5.1 \cdot 10^{+127}:\\
\;\;\;\;x \cdot \frac{z - a}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -2.2000000000000002e69 or 1.07999999999999998e39 < t < 2.69999999999999993e97 or 5.10000000000000038e127 < t

    1. Initial program 38.2%

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

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

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

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

    if -2.2000000000000002e69 < t < -8.4999999999999996e-23 or 6.9999999999999997e-117 < t < 4.8000000000000002e-69

    1. Initial program 80.1%

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

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

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

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

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

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

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

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

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

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

    if -8.4999999999999996e-23 < t < 6.9999999999999997e-117

    1. Initial program 92.8%

      \[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. Add Preprocessing
    5. Taylor expanded in t around 0 74.2%

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{z}}} \]
    8. Simplified66.4%

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

    if 4.8000000000000002e-69 < t < 1.07999999999999998e39

    1. Initial program 80.1%

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

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

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

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

      \[\leadsto x + \frac{\color{blue}{y \cdot z}}{a} \]
    7. Step-by-step derivation
      1. *-commutative40.0%

        \[\leadsto x + \frac{\color{blue}{z \cdot y}}{a} \]
    8. Simplified40.0%

      \[\leadsto x + \frac{\color{blue}{z \cdot y}}{a} \]
    9. Step-by-step derivation
      1. div-inv40.0%

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

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

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

        \[\leadsto x + y \cdot \color{blue}{\frac{z}{a}} \]
    10. Applied egg-rr51.8%

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

    if 2.69999999999999993e97 < t < 1.03e102

    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. Add Preprocessing
    5. Taylor expanded in a around inf 100.0%

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

    if 1.03e102 < t < 5.10000000000000038e127

    1. Initial program 4.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a - t}{z - t}}} \]
    9. Simplified41.6%

      \[\leadsto \color{blue}{x - \frac{x}{\frac{a - t}{z - t}}} \]
    10. Taylor expanded in t around inf 62.8%

      \[\leadsto \color{blue}{\frac{-1 \cdot \left(a \cdot x\right) - -1 \cdot \left(x \cdot z\right)}{t}} \]
    11. Step-by-step derivation
      1. distribute-lft-out--62.8%

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

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

        \[\leadsto \frac{-\left(\color{blue}{x \cdot a} - x \cdot z\right)}{t} \]
      4. distribute-lft-out--62.8%

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{z - a}{t}} \]
    15. Simplified100.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.2 \cdot 10^{+69}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -8.5 \cdot 10^{-23}:\\ \;\;\;\;z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-117}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-69}:\\ \;\;\;\;z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq 1.08 \cdot 10^{+39}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{+97}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 1.03 \cdot 10^{+102}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 5.1 \cdot 10^{+127}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 53.3% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.45 \cdot 10^{+69}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -5.8 \cdot 10^{-30}:\\ \;\;\;\;z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{-115}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 1.85 \cdot 10^{-52}:\\ \;\;\;\;x \cdot \left(\frac{t - z}{a} + 1\right)\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{+39}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{+99}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{+100}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 9.2 \cdot 10^{+125}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -1.45e+69)
   y
   (if (<= t -5.8e-30)
     (* z (/ (- x y) t))
     (if (<= t 1.2e-115)
       (+ x (/ y (/ a z)))
       (if (<= t 1.85e-52)
         (* x (+ (/ (- t z) a) 1.0))
         (if (<= t 2.5e+39)
           (+ x (* y (/ z a)))
           (if (<= t 1.55e+99)
             y
             (if (<= t 1.55e+100)
               x
               (if (<= t 9.2e+125) (* x (/ (- z a) t)) y)))))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -1.45e+69) {
		tmp = y;
	} else if (t <= -5.8e-30) {
		tmp = z * ((x - y) / t);
	} else if (t <= 1.2e-115) {
		tmp = x + (y / (a / z));
	} else if (t <= 1.85e-52) {
		tmp = x * (((t - z) / a) + 1.0);
	} else if (t <= 2.5e+39) {
		tmp = x + (y * (z / a));
	} else if (t <= 1.55e+99) {
		tmp = y;
	} else if (t <= 1.55e+100) {
		tmp = x;
	} else if (t <= 9.2e+125) {
		tmp = x * ((z - a) / t);
	} 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 <= (-1.45d+69)) then
        tmp = y
    else if (t <= (-5.8d-30)) then
        tmp = z * ((x - y) / t)
    else if (t <= 1.2d-115) then
        tmp = x + (y / (a / z))
    else if (t <= 1.85d-52) then
        tmp = x * (((t - z) / a) + 1.0d0)
    else if (t <= 2.5d+39) then
        tmp = x + (y * (z / a))
    else if (t <= 1.55d+99) then
        tmp = y
    else if (t <= 1.55d+100) then
        tmp = x
    else if (t <= 9.2d+125) then
        tmp = x * ((z - a) / t)
    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 <= -1.45e+69) {
		tmp = y;
	} else if (t <= -5.8e-30) {
		tmp = z * ((x - y) / t);
	} else if (t <= 1.2e-115) {
		tmp = x + (y / (a / z));
	} else if (t <= 1.85e-52) {
		tmp = x * (((t - z) / a) + 1.0);
	} else if (t <= 2.5e+39) {
		tmp = x + (y * (z / a));
	} else if (t <= 1.55e+99) {
		tmp = y;
	} else if (t <= 1.55e+100) {
		tmp = x;
	} else if (t <= 9.2e+125) {
		tmp = x * ((z - a) / t);
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -1.45e+69:
		tmp = y
	elif t <= -5.8e-30:
		tmp = z * ((x - y) / t)
	elif t <= 1.2e-115:
		tmp = x + (y / (a / z))
	elif t <= 1.85e-52:
		tmp = x * (((t - z) / a) + 1.0)
	elif t <= 2.5e+39:
		tmp = x + (y * (z / a))
	elif t <= 1.55e+99:
		tmp = y
	elif t <= 1.55e+100:
		tmp = x
	elif t <= 9.2e+125:
		tmp = x * ((z - a) / t)
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -1.45e+69)
		tmp = y;
	elseif (t <= -5.8e-30)
		tmp = Float64(z * Float64(Float64(x - y) / t));
	elseif (t <= 1.2e-115)
		tmp = Float64(x + Float64(y / Float64(a / z)));
	elseif (t <= 1.85e-52)
		tmp = Float64(x * Float64(Float64(Float64(t - z) / a) + 1.0));
	elseif (t <= 2.5e+39)
		tmp = Float64(x + Float64(y * Float64(z / a)));
	elseif (t <= 1.55e+99)
		tmp = y;
	elseif (t <= 1.55e+100)
		tmp = x;
	elseif (t <= 9.2e+125)
		tmp = Float64(x * Float64(Float64(z - a) / t));
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -1.45e+69)
		tmp = y;
	elseif (t <= -5.8e-30)
		tmp = z * ((x - y) / t);
	elseif (t <= 1.2e-115)
		tmp = x + (y / (a / z));
	elseif (t <= 1.85e-52)
		tmp = x * (((t - z) / a) + 1.0);
	elseif (t <= 2.5e+39)
		tmp = x + (y * (z / a));
	elseif (t <= 1.55e+99)
		tmp = y;
	elseif (t <= 1.55e+100)
		tmp = x;
	elseif (t <= 9.2e+125)
		tmp = x * ((z - a) / t);
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.45e+69], y, If[LessEqual[t, -5.8e-30], N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.2e-115], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.85e-52], N[(x * N[(N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.5e+39], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.55e+99], y, If[LessEqual[t, 1.55e+100], x, If[LessEqual[t, 9.2e+125], N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], y]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.45 \cdot 10^{+69}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq -5.8 \cdot 10^{-30}:\\
\;\;\;\;z \cdot \frac{x - y}{t}\\

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

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

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

\mathbf{elif}\;t \leq 1.55 \cdot 10^{+99}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq 1.55 \cdot 10^{+100}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 9.2 \cdot 10^{+125}:\\
\;\;\;\;x \cdot \frac{z - a}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if t < -1.4499999999999999e69 or 2.50000000000000008e39 < t < 1.55e99 or 9.20000000000000051e125 < t

    1. Initial program 38.2%

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

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

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

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

    if -1.4499999999999999e69 < t < -5.79999999999999978e-30

    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/85.2%

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

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

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

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

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

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

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

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

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

    if -5.79999999999999978e-30 < t < 1.20000000000000011e-115

    1. Initial program 92.8%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{z}}} \]
    8. Simplified65.8%

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

    if 1.20000000000000011e-115 < t < 1.8499999999999999e-52

    1. Initial program 85.4%

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

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

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

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

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

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

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

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

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

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

    if 1.8499999999999999e-52 < t < 2.50000000000000008e39

    1. Initial program 81.0%

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

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

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

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

      \[\leadsto x + \frac{\color{blue}{y \cdot z}}{a} \]
    7. Step-by-step derivation
      1. *-commutative45.3%

        \[\leadsto x + \frac{\color{blue}{z \cdot y}}{a} \]
    8. Simplified45.3%

      \[\leadsto x + \frac{\color{blue}{z \cdot y}}{a} \]
    9. Step-by-step derivation
      1. div-inv45.3%

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

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

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

        \[\leadsto x + y \cdot \color{blue}{\frac{z}{a}} \]
    10. Applied egg-rr59.4%

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

    if 1.55e99 < t < 1.55000000000000003e100

    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. Add Preprocessing
    5. Taylor expanded in a around inf 100.0%

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

    if 1.55000000000000003e100 < t < 9.20000000000000051e125

    1. Initial program 4.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a - t}{z - t}}} \]
    9. Simplified41.6%

      \[\leadsto \color{blue}{x - \frac{x}{\frac{a - t}{z - t}}} \]
    10. Taylor expanded in t around inf 62.8%

      \[\leadsto \color{blue}{\frac{-1 \cdot \left(a \cdot x\right) - -1 \cdot \left(x \cdot z\right)}{t}} \]
    11. Step-by-step derivation
      1. distribute-lft-out--62.8%

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

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

        \[\leadsto \frac{-\left(\color{blue}{x \cdot a} - x \cdot z\right)}{t} \]
      4. distribute-lft-out--62.8%

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{z - a}{t}} \]
    15. Simplified100.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.45 \cdot 10^{+69}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -5.8 \cdot 10^{-30}:\\ \;\;\;\;z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{-115}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 1.85 \cdot 10^{-52}:\\ \;\;\;\;x \cdot \left(\frac{t - z}{a} + 1\right)\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{+39}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{+99}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{+100}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 9.2 \cdot 10^{+125}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 62.5% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ t_2 := x - y \cdot \frac{t - z}{a}\\ t_3 := z \cdot \frac{y - x}{a - t}\\ \mathbf{if}\;a \leq -7.5 \cdot 10^{-10}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -2.5 \cdot 10^{-164}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -3.1 \cdot 10^{-193}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{-285}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{-210}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-35}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.4 \cdot 10^{+100}:\\ \;\;\;\;t_3\\ \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 (* y (/ (- t z) a))))
        (t_3 (* z (/ (- y x) (- a t)))))
   (if (<= a -7.5e-10)
     t_2
     (if (<= a -2.5e-164)
       t_1
       (if (<= a -3.1e-193)
         t_3
         (if (<= a 2.6e-285)
           t_1
           (if (<= a 1.3e-210)
             t_3
             (if (<= a 1.25e-35) t_1 (if (<= a 1.4e+100) t_3 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 - (y * ((t - z) / a));
	double t_3 = z * ((y - x) / (a - t));
	double tmp;
	if (a <= -7.5e-10) {
		tmp = t_2;
	} else if (a <= -2.5e-164) {
		tmp = t_1;
	} else if (a <= -3.1e-193) {
		tmp = t_3;
	} else if (a <= 2.6e-285) {
		tmp = t_1;
	} else if (a <= 1.3e-210) {
		tmp = t_3;
	} else if (a <= 1.25e-35) {
		tmp = t_1;
	} else if (a <= 1.4e+100) {
		tmp = t_3;
	} 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) :: t_3
    real(8) :: tmp
    t_1 = y * ((z - t) / (a - t))
    t_2 = x - (y * ((t - z) / a))
    t_3 = z * ((y - x) / (a - t))
    if (a <= (-7.5d-10)) then
        tmp = t_2
    else if (a <= (-2.5d-164)) then
        tmp = t_1
    else if (a <= (-3.1d-193)) then
        tmp = t_3
    else if (a <= 2.6d-285) then
        tmp = t_1
    else if (a <= 1.3d-210) then
        tmp = t_3
    else if (a <= 1.25d-35) then
        tmp = t_1
    else if (a <= 1.4d+100) then
        tmp = t_3
    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 - (y * ((t - z) / a));
	double t_3 = z * ((y - x) / (a - t));
	double tmp;
	if (a <= -7.5e-10) {
		tmp = t_2;
	} else if (a <= -2.5e-164) {
		tmp = t_1;
	} else if (a <= -3.1e-193) {
		tmp = t_3;
	} else if (a <= 2.6e-285) {
		tmp = t_1;
	} else if (a <= 1.3e-210) {
		tmp = t_3;
	} else if (a <= 1.25e-35) {
		tmp = t_1;
	} else if (a <= 1.4e+100) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((z - t) / (a - t))
	t_2 = x - (y * ((t - z) / a))
	t_3 = z * ((y - x) / (a - t))
	tmp = 0
	if a <= -7.5e-10:
		tmp = t_2
	elif a <= -2.5e-164:
		tmp = t_1
	elif a <= -3.1e-193:
		tmp = t_3
	elif a <= 2.6e-285:
		tmp = t_1
	elif a <= 1.3e-210:
		tmp = t_3
	elif a <= 1.25e-35:
		tmp = t_1
	elif a <= 1.4e+100:
		tmp = t_3
	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(y * Float64(Float64(t - z) / a)))
	t_3 = Float64(z * Float64(Float64(y - x) / Float64(a - t)))
	tmp = 0.0
	if (a <= -7.5e-10)
		tmp = t_2;
	elseif (a <= -2.5e-164)
		tmp = t_1;
	elseif (a <= -3.1e-193)
		tmp = t_3;
	elseif (a <= 2.6e-285)
		tmp = t_1;
	elseif (a <= 1.3e-210)
		tmp = t_3;
	elseif (a <= 1.25e-35)
		tmp = t_1;
	elseif (a <= 1.4e+100)
		tmp = t_3;
	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 - (y * ((t - z) / a));
	t_3 = z * ((y - x) / (a - t));
	tmp = 0.0;
	if (a <= -7.5e-10)
		tmp = t_2;
	elseif (a <= -2.5e-164)
		tmp = t_1;
	elseif (a <= -3.1e-193)
		tmp = t_3;
	elseif (a <= 2.6e-285)
		tmp = t_1;
	elseif (a <= 1.3e-210)
		tmp = t_3;
	elseif (a <= 1.25e-35)
		tmp = t_1;
	elseif (a <= 1.4e+100)
		tmp = t_3;
	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[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -7.5e-10], t$95$2, If[LessEqual[a, -2.5e-164], t$95$1, If[LessEqual[a, -3.1e-193], t$95$3, If[LessEqual[a, 2.6e-285], t$95$1, If[LessEqual[a, 1.3e-210], t$95$3, If[LessEqual[a, 1.25e-35], t$95$1, If[LessEqual[a, 1.4e+100], t$95$3, t$95$2]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \frac{z - t}{a - t}\\
t_2 := x - y \cdot \frac{t - z}{a}\\
t_3 := z \cdot \frac{y - x}{a - t}\\
\mathbf{if}\;a \leq -7.5 \cdot 10^{-10}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq -2.5 \cdot 10^{-164}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -3.1 \cdot 10^{-193}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;a \leq 2.6 \cdot 10^{-285}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 1.3 \cdot 10^{-210}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;a \leq 1.25 \cdot 10^{-35}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 1.4 \cdot 10^{+100}:\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -7.49999999999999995e-10 or 1.3999999999999999e100 < 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/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. Add Preprocessing
    5. Taylor expanded in a around inf 63.3%

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

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

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

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

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

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

    if -7.49999999999999995e-10 < a < -2.49999999999999981e-164 or -3.1000000000000002e-193 < a < 2.6000000000000002e-285 or 1.2999999999999999e-210 < a < 1.24999999999999991e-35

    1. Initial program 65.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.49999999999999981e-164 < a < -3.1000000000000002e-193 or 2.6000000000000002e-285 < a < 1.2999999999999999e-210 or 1.24999999999999991e-35 < a < 1.3999999999999999e100

    1. Initial program 79.4%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.5 \cdot 10^{-10}:\\ \;\;\;\;x - y \cdot \frac{t - z}{a}\\ \mathbf{elif}\;a \leq -2.5 \cdot 10^{-164}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq -3.1 \cdot 10^{-193}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{-285}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{-210}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-35}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq 1.4 \cdot 10^{+100}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x - y \cdot \frac{t - z}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 47.3% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{if}\;t \leq -1.5 \cdot 10^{-11}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -2.3 \cdot 10^{-238}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.55 \cdot 10^{-298}:\\ \;\;\;\;z \cdot \frac{y}{a - t}\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{+39}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.55 \cdot 10^{+97}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{+101}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{+126}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ z a)))))
   (if (<= t -1.5e-11)
     y
     (if (<= t -2.3e-238)
       t_1
       (if (<= t -1.55e-298)
         (* z (/ y (- a t)))
         (if (<= t 2.7e+39)
           t_1
           (if (<= t 2.55e+97)
             y
             (if (<= t 7.5e+101)
               x
               (if (<= t 6.2e+126) (* x (/ (- z a) t)) y)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (z / a));
	double tmp;
	if (t <= -1.5e-11) {
		tmp = y;
	} else if (t <= -2.3e-238) {
		tmp = t_1;
	} else if (t <= -1.55e-298) {
		tmp = z * (y / (a - t));
	} else if (t <= 2.7e+39) {
		tmp = t_1;
	} else if (t <= 2.55e+97) {
		tmp = y;
	} else if (t <= 7.5e+101) {
		tmp = x;
	} else if (t <= 6.2e+126) {
		tmp = x * ((z - a) / t);
	} 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 = x * (1.0d0 - (z / a))
    if (t <= (-1.5d-11)) then
        tmp = y
    else if (t <= (-2.3d-238)) then
        tmp = t_1
    else if (t <= (-1.55d-298)) then
        tmp = z * (y / (a - t))
    else if (t <= 2.7d+39) then
        tmp = t_1
    else if (t <= 2.55d+97) then
        tmp = y
    else if (t <= 7.5d+101) then
        tmp = x
    else if (t <= 6.2d+126) then
        tmp = x * ((z - a) / t)
    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 = x * (1.0 - (z / a));
	double tmp;
	if (t <= -1.5e-11) {
		tmp = y;
	} else if (t <= -2.3e-238) {
		tmp = t_1;
	} else if (t <= -1.55e-298) {
		tmp = z * (y / (a - t));
	} else if (t <= 2.7e+39) {
		tmp = t_1;
	} else if (t <= 2.55e+97) {
		tmp = y;
	} else if (t <= 7.5e+101) {
		tmp = x;
	} else if (t <= 6.2e+126) {
		tmp = x * ((z - a) / t);
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (z / a))
	tmp = 0
	if t <= -1.5e-11:
		tmp = y
	elif t <= -2.3e-238:
		tmp = t_1
	elif t <= -1.55e-298:
		tmp = z * (y / (a - t))
	elif t <= 2.7e+39:
		tmp = t_1
	elif t <= 2.55e+97:
		tmp = y
	elif t <= 7.5e+101:
		tmp = x
	elif t <= 6.2e+126:
		tmp = x * ((z - a) / t)
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(z / a)))
	tmp = 0.0
	if (t <= -1.5e-11)
		tmp = y;
	elseif (t <= -2.3e-238)
		tmp = t_1;
	elseif (t <= -1.55e-298)
		tmp = Float64(z * Float64(y / Float64(a - t)));
	elseif (t <= 2.7e+39)
		tmp = t_1;
	elseif (t <= 2.55e+97)
		tmp = y;
	elseif (t <= 7.5e+101)
		tmp = x;
	elseif (t <= 6.2e+126)
		tmp = Float64(x * Float64(Float64(z - a) / t));
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (z / a));
	tmp = 0.0;
	if (t <= -1.5e-11)
		tmp = y;
	elseif (t <= -2.3e-238)
		tmp = t_1;
	elseif (t <= -1.55e-298)
		tmp = z * (y / (a - t));
	elseif (t <= 2.7e+39)
		tmp = t_1;
	elseif (t <= 2.55e+97)
		tmp = y;
	elseif (t <= 7.5e+101)
		tmp = x;
	elseif (t <= 6.2e+126)
		tmp = x * ((z - a) / t);
	else
		tmp = y;
	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[t, -1.5e-11], y, If[LessEqual[t, -2.3e-238], t$95$1, If[LessEqual[t, -1.55e-298], N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.7e+39], t$95$1, If[LessEqual[t, 2.55e+97], y, If[LessEqual[t, 7.5e+101], x, If[LessEqual[t, 6.2e+126], N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], y]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -2.3 \cdot 10^{-238}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -1.55 \cdot 10^{-298}:\\
\;\;\;\;z \cdot \frac{y}{a - t}\\

\mathbf{elif}\;t \leq 2.7 \cdot 10^{+39}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 2.55 \cdot 10^{+97}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq 7.5 \cdot 10^{+101}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 6.2 \cdot 10^{+126}:\\
\;\;\;\;x \cdot \frac{z - a}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -1.5e-11 or 2.70000000000000003e39 < t < 2.55000000000000017e97 or 6.2e126 < t

    1. Initial program 44.3%

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

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

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

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

    if -1.5e-11 < t < -2.30000000000000005e-238 or -1.5500000000000001e-298 < t < 2.70000000000000003e39

    1. Initial program 89.8%

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

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

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

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

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

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

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

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

    if -2.30000000000000005e-238 < t < -1.5500000000000001e-298

    1. Initial program 99.9%

      \[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. Add Preprocessing
    5. Taylor expanded in z around inf 67.7%

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

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

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

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

    if 2.55000000000000017e97 < t < 7.4999999999999995e101

    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. Add Preprocessing
    5. Taylor expanded in a around inf 100.0%

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

    if 7.4999999999999995e101 < t < 6.2e126

    1. Initial program 4.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a - t}{z - t}}} \]
    9. Simplified41.6%

      \[\leadsto \color{blue}{x - \frac{x}{\frac{a - t}{z - t}}} \]
    10. Taylor expanded in t around inf 62.8%

      \[\leadsto \color{blue}{\frac{-1 \cdot \left(a \cdot x\right) - -1 \cdot \left(x \cdot z\right)}{t}} \]
    11. Step-by-step derivation
      1. distribute-lft-out--62.8%

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

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

        \[\leadsto \frac{-\left(\color{blue}{x \cdot a} - x \cdot z\right)}{t} \]
      4. distribute-lft-out--62.8%

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{z - a}{t}} \]
    15. Simplified100.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.5 \cdot 10^{-11}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -2.3 \cdot 10^{-238}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq -1.55 \cdot 10^{-298}:\\ \;\;\;\;z \cdot \frac{y}{a - t}\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{+39}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 2.55 \cdot 10^{+97}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{+101}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{+126}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 47.4% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{if}\;t \leq -4.5 \cdot 10^{-11}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -1.75 \cdot 10^{-223}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 3.4 \cdot 10^{-276}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 2.55 \cdot 10^{+39}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{+97}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 3.4 \cdot 10^{+103}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 6 \cdot 10^{+129}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ z a)))))
   (if (<= t -4.5e-11)
     y
     (if (<= t -1.75e-223)
       t_1
       (if (<= t 3.4e-276)
         (* z (/ (- y x) a))
         (if (<= t 2.55e+39)
           t_1
           (if (<= t 1.35e+97)
             y
             (if (<= t 3.4e+103)
               x
               (if (<= t 6e+129) (* x (/ (- z a) t)) y)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (z / a));
	double tmp;
	if (t <= -4.5e-11) {
		tmp = y;
	} else if (t <= -1.75e-223) {
		tmp = t_1;
	} else if (t <= 3.4e-276) {
		tmp = z * ((y - x) / a);
	} else if (t <= 2.55e+39) {
		tmp = t_1;
	} else if (t <= 1.35e+97) {
		tmp = y;
	} else if (t <= 3.4e+103) {
		tmp = x;
	} else if (t <= 6e+129) {
		tmp = x * ((z - a) / t);
	} 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 = x * (1.0d0 - (z / a))
    if (t <= (-4.5d-11)) then
        tmp = y
    else if (t <= (-1.75d-223)) then
        tmp = t_1
    else if (t <= 3.4d-276) then
        tmp = z * ((y - x) / a)
    else if (t <= 2.55d+39) then
        tmp = t_1
    else if (t <= 1.35d+97) then
        tmp = y
    else if (t <= 3.4d+103) then
        tmp = x
    else if (t <= 6d+129) then
        tmp = x * ((z - a) / t)
    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 = x * (1.0 - (z / a));
	double tmp;
	if (t <= -4.5e-11) {
		tmp = y;
	} else if (t <= -1.75e-223) {
		tmp = t_1;
	} else if (t <= 3.4e-276) {
		tmp = z * ((y - x) / a);
	} else if (t <= 2.55e+39) {
		tmp = t_1;
	} else if (t <= 1.35e+97) {
		tmp = y;
	} else if (t <= 3.4e+103) {
		tmp = x;
	} else if (t <= 6e+129) {
		tmp = x * ((z - a) / t);
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (z / a))
	tmp = 0
	if t <= -4.5e-11:
		tmp = y
	elif t <= -1.75e-223:
		tmp = t_1
	elif t <= 3.4e-276:
		tmp = z * ((y - x) / a)
	elif t <= 2.55e+39:
		tmp = t_1
	elif t <= 1.35e+97:
		tmp = y
	elif t <= 3.4e+103:
		tmp = x
	elif t <= 6e+129:
		tmp = x * ((z - a) / t)
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(z / a)))
	tmp = 0.0
	if (t <= -4.5e-11)
		tmp = y;
	elseif (t <= -1.75e-223)
		tmp = t_1;
	elseif (t <= 3.4e-276)
		tmp = Float64(z * Float64(Float64(y - x) / a));
	elseif (t <= 2.55e+39)
		tmp = t_1;
	elseif (t <= 1.35e+97)
		tmp = y;
	elseif (t <= 3.4e+103)
		tmp = x;
	elseif (t <= 6e+129)
		tmp = Float64(x * Float64(Float64(z - a) / t));
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (z / a));
	tmp = 0.0;
	if (t <= -4.5e-11)
		tmp = y;
	elseif (t <= -1.75e-223)
		tmp = t_1;
	elseif (t <= 3.4e-276)
		tmp = z * ((y - x) / a);
	elseif (t <= 2.55e+39)
		tmp = t_1;
	elseif (t <= 1.35e+97)
		tmp = y;
	elseif (t <= 3.4e+103)
		tmp = x;
	elseif (t <= 6e+129)
		tmp = x * ((z - a) / t);
	else
		tmp = y;
	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[t, -4.5e-11], y, If[LessEqual[t, -1.75e-223], t$95$1, If[LessEqual[t, 3.4e-276], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.55e+39], t$95$1, If[LessEqual[t, 1.35e+97], y, If[LessEqual[t, 3.4e+103], x, If[LessEqual[t, 6e+129], N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], y]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -1.75 \cdot 10^{-223}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 2.55 \cdot 10^{+39}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 1.35 \cdot 10^{+97}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq 3.4 \cdot 10^{+103}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 6 \cdot 10^{+129}:\\
\;\;\;\;x \cdot \frac{z - a}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -4.5e-11 or 2.5499999999999999e39 < t < 1.34999999999999997e97 or 6.0000000000000006e129 < t

    1. Initial program 44.3%

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

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

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

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

    if -4.5e-11 < t < -1.75000000000000005e-223 or 3.39999999999999992e-276 < t < 2.5499999999999999e39

    1. Initial program 88.8%

      \[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. Add Preprocessing
    5. Taylor expanded in t around 0 61.6%

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

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

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

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

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

    if -1.75000000000000005e-223 < t < 3.39999999999999992e-276

    1. Initial program 99.8%

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

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

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

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

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

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

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

    if 1.34999999999999997e97 < t < 3.3999999999999998e103

    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. Add Preprocessing
    5. Taylor expanded in a around inf 100.0%

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

    if 3.3999999999999998e103 < t < 6.0000000000000006e129

    1. Initial program 4.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a - t}{z - t}}} \]
    9. Simplified41.6%

      \[\leadsto \color{blue}{x - \frac{x}{\frac{a - t}{z - t}}} \]
    10. Taylor expanded in t around inf 62.8%

      \[\leadsto \color{blue}{\frac{-1 \cdot \left(a \cdot x\right) - -1 \cdot \left(x \cdot z\right)}{t}} \]
    11. Step-by-step derivation
      1. distribute-lft-out--62.8%

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

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

        \[\leadsto \frac{-\left(\color{blue}{x \cdot a} - x \cdot z\right)}{t} \]
      4. distribute-lft-out--62.8%

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{z - a}{t}} \]
    15. Simplified100.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.5 \cdot 10^{-11}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -1.75 \cdot 10^{-223}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 3.4 \cdot 10^{-276}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 2.55 \cdot 10^{+39}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{+97}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 3.4 \cdot 10^{+103}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 6 \cdot 10^{+129}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 64.1% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{z}{\frac{a}{y - x}}\\ t_2 := y \cdot \frac{z - t}{a - t}\\ \mathbf{if}\;t \leq -2.8 \cdot 10^{-18}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{-137}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{-54}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{elif}\;t \leq 3.9 \cdot 10^{+38}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{+104} \lor \neg \left(t \leq 9 \cdot 10^{+125}\right):\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ z (/ a (- y x))))) (t_2 (* y (/ (- z t) (- a t)))))
   (if (<= t -2.8e-18)
     t_2
     (if (<= t 1.3e-137)
       t_1
       (if (<= t 1.7e-54)
         (* (- z t) (/ y (- a t)))
         (if (<= t 3.9e+38)
           t_1
           (if (or (<= t 1.1e+104) (not (<= t 9e+125)))
             t_2
             (* x (/ (- z a) t)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (z / (a / (y - x)));
	double t_2 = y * ((z - t) / (a - t));
	double tmp;
	if (t <= -2.8e-18) {
		tmp = t_2;
	} else if (t <= 1.3e-137) {
		tmp = t_1;
	} else if (t <= 1.7e-54) {
		tmp = (z - t) * (y / (a - t));
	} else if (t <= 3.9e+38) {
		tmp = t_1;
	} else if ((t <= 1.1e+104) || !(t <= 9e+125)) {
		tmp = t_2;
	} else {
		tmp = x * ((z - 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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x + (z / (a / (y - x)))
    t_2 = y * ((z - t) / (a - t))
    if (t <= (-2.8d-18)) then
        tmp = t_2
    else if (t <= 1.3d-137) then
        tmp = t_1
    else if (t <= 1.7d-54) then
        tmp = (z - t) * (y / (a - t))
    else if (t <= 3.9d+38) then
        tmp = t_1
    else if ((t <= 1.1d+104) .or. (.not. (t <= 9d+125))) then
        tmp = t_2
    else
        tmp = x * ((z - a) / t)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (z / (a / (y - x)));
	double t_2 = y * ((z - t) / (a - t));
	double tmp;
	if (t <= -2.8e-18) {
		tmp = t_2;
	} else if (t <= 1.3e-137) {
		tmp = t_1;
	} else if (t <= 1.7e-54) {
		tmp = (z - t) * (y / (a - t));
	} else if (t <= 3.9e+38) {
		tmp = t_1;
	} else if ((t <= 1.1e+104) || !(t <= 9e+125)) {
		tmp = t_2;
	} else {
		tmp = x * ((z - a) / t);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (z / (a / (y - x)))
	t_2 = y * ((z - t) / (a - t))
	tmp = 0
	if t <= -2.8e-18:
		tmp = t_2
	elif t <= 1.3e-137:
		tmp = t_1
	elif t <= 1.7e-54:
		tmp = (z - t) * (y / (a - t))
	elif t <= 3.9e+38:
		tmp = t_1
	elif (t <= 1.1e+104) or not (t <= 9e+125):
		tmp = t_2
	else:
		tmp = x * ((z - a) / t)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(z / Float64(a / Float64(y - x))))
	t_2 = Float64(y * Float64(Float64(z - t) / Float64(a - t)))
	tmp = 0.0
	if (t <= -2.8e-18)
		tmp = t_2;
	elseif (t <= 1.3e-137)
		tmp = t_1;
	elseif (t <= 1.7e-54)
		tmp = Float64(Float64(z - t) * Float64(y / Float64(a - t)));
	elseif (t <= 3.9e+38)
		tmp = t_1;
	elseif ((t <= 1.1e+104) || !(t <= 9e+125))
		tmp = t_2;
	else
		tmp = Float64(x * Float64(Float64(z - a) / t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (z / (a / (y - x)));
	t_2 = y * ((z - t) / (a - t));
	tmp = 0.0;
	if (t <= -2.8e-18)
		tmp = t_2;
	elseif (t <= 1.3e-137)
		tmp = t_1;
	elseif (t <= 1.7e-54)
		tmp = (z - t) * (y / (a - t));
	elseif (t <= 3.9e+38)
		tmp = t_1;
	elseif ((t <= 1.1e+104) || ~((t <= 9e+125)))
		tmp = t_2;
	else
		tmp = x * ((z - a) / t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(z / N[(a / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.8e-18], t$95$2, If[LessEqual[t, 1.3e-137], t$95$1, If[LessEqual[t, 1.7e-54], N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.9e+38], t$95$1, If[Or[LessEqual[t, 1.1e+104], N[Not[LessEqual[t, 9e+125]], $MachinePrecision]], t$95$2, N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \frac{z}{\frac{a}{y - x}}\\
t_2 := y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;t \leq -2.8 \cdot 10^{-18}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 1.3 \cdot 10^{-137}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 3.9 \cdot 10^{+38}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 1.1 \cdot 10^{+104} \lor \neg \left(t \leq 9 \cdot 10^{+125}\right):\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.80000000000000012e-18 or 3.90000000000000023e38 < t < 1.1e104 or 9.0000000000000001e125 < t

    1. Initial program 44.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.80000000000000012e-18 < t < 1.3e-137 or 1.69999999999999994e-54 < t < 3.90000000000000023e38

    1. Initial program 90.8%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z}{\frac{a}{y - x}}} \]
    7. Simplified76.8%

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

    if 1.3e-137 < t < 1.69999999999999994e-54

    1. Initial program 89.3%

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

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

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

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

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

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

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

    if 1.1e104 < t < 9.0000000000000001e125

    1. Initial program 4.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a - t}{z - t}}} \]
    9. Simplified41.6%

      \[\leadsto \color{blue}{x - \frac{x}{\frac{a - t}{z - t}}} \]
    10. Taylor expanded in t around inf 62.8%

      \[\leadsto \color{blue}{\frac{-1 \cdot \left(a \cdot x\right) - -1 \cdot \left(x \cdot z\right)}{t}} \]
    11. Step-by-step derivation
      1. distribute-lft-out--62.8%

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

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

        \[\leadsto \frac{-\left(\color{blue}{x \cdot a} - x \cdot z\right)}{t} \]
      4. distribute-lft-out--62.8%

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{z - a}{t}} \]
    15. Simplified100.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.8 \cdot 10^{-18}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{-137}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{-54}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{elif}\;t \leq 3.9 \cdot 10^{+38}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{+104} \lor \neg \left(t \leq 9 \cdot 10^{+125}\right):\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 57.0% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ \mathbf{if}\;y \leq -2.22 \cdot 10^{-131}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -5.5 \cdot 10^{-238}:\\ \;\;\;\;z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;y \leq 6 \cdot 10^{-52}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;y \leq 3 \cdot 10^{+84} \lor \neg \left(y \leq 1.95 \cdot 10^{+95}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\frac{t}{a} + 1\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- z t) (- a t)))))
   (if (<= y -2.22e-131)
     t_1
     (if (<= y -5.5e-238)
       (* z (/ (- x y) t))
       (if (<= y 6e-52)
         (* x (- 1.0 (/ z a)))
         (if (or (<= y 3e+84) (not (<= y 1.95e+95)))
           t_1
           (* x (+ (/ t a) 1.0))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((z - t) / (a - t));
	double tmp;
	if (y <= -2.22e-131) {
		tmp = t_1;
	} else if (y <= -5.5e-238) {
		tmp = z * ((x - y) / t);
	} else if (y <= 6e-52) {
		tmp = x * (1.0 - (z / a));
	} else if ((y <= 3e+84) || !(y <= 1.95e+95)) {
		tmp = t_1;
	} else {
		tmp = x * ((t / a) + 1.0);
	}
	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 - t) / (a - t))
    if (y <= (-2.22d-131)) then
        tmp = t_1
    else if (y <= (-5.5d-238)) then
        tmp = z * ((x - y) / t)
    else if (y <= 6d-52) then
        tmp = x * (1.0d0 - (z / a))
    else if ((y <= 3d+84) .or. (.not. (y <= 1.95d+95))) then
        tmp = t_1
    else
        tmp = x * ((t / a) + 1.0d0)
    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 tmp;
	if (y <= -2.22e-131) {
		tmp = t_1;
	} else if (y <= -5.5e-238) {
		tmp = z * ((x - y) / t);
	} else if (y <= 6e-52) {
		tmp = x * (1.0 - (z / a));
	} else if ((y <= 3e+84) || !(y <= 1.95e+95)) {
		tmp = t_1;
	} else {
		tmp = x * ((t / a) + 1.0);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((z - t) / (a - t))
	tmp = 0
	if y <= -2.22e-131:
		tmp = t_1
	elif y <= -5.5e-238:
		tmp = z * ((x - y) / t)
	elif y <= 6e-52:
		tmp = x * (1.0 - (z / a))
	elif (y <= 3e+84) or not (y <= 1.95e+95):
		tmp = t_1
	else:
		tmp = x * ((t / a) + 1.0)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(z - t) / Float64(a - t)))
	tmp = 0.0
	if (y <= -2.22e-131)
		tmp = t_1;
	elseif (y <= -5.5e-238)
		tmp = Float64(z * Float64(Float64(x - y) / t));
	elseif (y <= 6e-52)
		tmp = Float64(x * Float64(1.0 - Float64(z / a)));
	elseif ((y <= 3e+84) || !(y <= 1.95e+95))
		tmp = t_1;
	else
		tmp = Float64(x * Float64(Float64(t / a) + 1.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((z - t) / (a - t));
	tmp = 0.0;
	if (y <= -2.22e-131)
		tmp = t_1;
	elseif (y <= -5.5e-238)
		tmp = z * ((x - y) / t);
	elseif (y <= 6e-52)
		tmp = x * (1.0 - (z / a));
	elseif ((y <= 3e+84) || ~((y <= 1.95e+95)))
		tmp = t_1;
	else
		tmp = x * ((t / a) + 1.0);
	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]}, If[LessEqual[y, -2.22e-131], t$95$1, If[LessEqual[y, -5.5e-238], N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6e-52], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 3e+84], N[Not[LessEqual[y, 1.95e+95]], $MachinePrecision]], t$95$1, N[(x * N[(N[(t / a), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;y \leq -2.22 \cdot 10^{-131}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -5.5 \cdot 10^{-238}:\\
\;\;\;\;z \cdot \frac{x - y}{t}\\

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

\mathbf{elif}\;y \leq 3 \cdot 10^{+84} \lor \neg \left(y \leq 1.95 \cdot 10^{+95}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.2200000000000001e-131 or 6e-52 < y < 2.99999999999999996e84 or 1.9499999999999999e95 < y

    1. Initial program 72.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.2200000000000001e-131 < y < -5.49999999999999995e-238

    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.0%

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

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

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

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

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

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

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

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

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

    if -5.49999999999999995e-238 < y < 6e-52

    1. Initial program 63.5%

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

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

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

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

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

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

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

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

    if 2.99999999999999996e84 < y < 1.9499999999999999e95

    1. Initial program 84.6%

      \[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. Add Preprocessing
    5. Taylor expanded in a around inf 67.9%

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{t}{\frac{a}{y - x}}} \]
    10. Simplified88.1%

      \[\leadsto \color{blue}{x - \frac{t}{\frac{a}{y - x}}} \]
    11. Taylor expanded in x around inf 88.1%

      \[\leadsto \color{blue}{x \cdot \left(1 - -1 \cdot \frac{t}{a}\right)} \]
    12. Step-by-step derivation
      1. sub-neg88.1%

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

        \[\leadsto x \cdot \left(1 + \left(-\color{blue}{\left(-\frac{t}{a}\right)}\right)\right) \]
      3. remove-double-neg88.1%

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

        \[\leadsto x \cdot \color{blue}{\left(\frac{t}{a} + 1\right)} \]
    13. Simplified88.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.22 \cdot 10^{-131}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;y \leq -5.5 \cdot 10^{-238}:\\ \;\;\;\;z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;y \leq 6 \cdot 10^{-52}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;y \leq 3 \cdot 10^{+84} \lor \neg \left(y \leq 1.95 \cdot 10^{+95}\right):\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\frac{t}{a} + 1\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 85.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(z - t\right) \cdot \frac{y - x}{a - t}\\ t_2 := y + \frac{x - y}{\frac{t}{z - a}}\\ \mathbf{if}\;t \leq -6.4 \cdot 10^{+47}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -4 \cdot 10^{-198}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 9 \cdot 10^{-116}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\ \mathbf{elif}\;t \leq 9.8 \cdot 10^{+103}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (- z t) (/ (- y x) (- a t)))))
        (t_2 (+ y (/ (- x y) (/ t (- z a))))))
   (if (<= t -6.4e+47)
     t_2
     (if (<= t -4e-198)
       t_1
       (if (<= t 9e-116)
         (+ x (/ (* (- y x) (- z t)) (- a t)))
         (if (<= t 9.8e+103) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((z - t) * ((y - x) / (a - t)));
	double t_2 = y + ((x - y) / (t / (z - a)));
	double tmp;
	if (t <= -6.4e+47) {
		tmp = t_2;
	} else if (t <= -4e-198) {
		tmp = t_1;
	} else if (t <= 9e-116) {
		tmp = x + (((y - x) * (z - t)) / (a - t));
	} else if (t <= 9.8e+103) {
		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 = x + ((z - t) * ((y - x) / (a - t)))
    t_2 = y + ((x - y) / (t / (z - a)))
    if (t <= (-6.4d+47)) then
        tmp = t_2
    else if (t <= (-4d-198)) then
        tmp = t_1
    else if (t <= 9d-116) then
        tmp = x + (((y - x) * (z - t)) / (a - t))
    else if (t <= 9.8d+103) 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 = x + ((z - t) * ((y - x) / (a - t)));
	double t_2 = y + ((x - y) / (t / (z - a)));
	double tmp;
	if (t <= -6.4e+47) {
		tmp = t_2;
	} else if (t <= -4e-198) {
		tmp = t_1;
	} else if (t <= 9e-116) {
		tmp = x + (((y - x) * (z - t)) / (a - t));
	} else if (t <= 9.8e+103) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((z - t) * ((y - x) / (a - t)))
	t_2 = y + ((x - y) / (t / (z - a)))
	tmp = 0
	if t <= -6.4e+47:
		tmp = t_2
	elif t <= -4e-198:
		tmp = t_1
	elif t <= 9e-116:
		tmp = x + (((y - x) * (z - t)) / (a - t))
	elif t <= 9.8e+103:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(z - t) * Float64(Float64(y - x) / Float64(a - t))))
	t_2 = Float64(y + Float64(Float64(x - y) / Float64(t / Float64(z - a))))
	tmp = 0.0
	if (t <= -6.4e+47)
		tmp = t_2;
	elseif (t <= -4e-198)
		tmp = t_1;
	elseif (t <= 9e-116)
		tmp = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t)));
	elseif (t <= 9.8e+103)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((z - t) * ((y - x) / (a - t)));
	t_2 = y + ((x - y) / (t / (z - a)));
	tmp = 0.0;
	if (t <= -6.4e+47)
		tmp = t_2;
	elseif (t <= -4e-198)
		tmp = t_1;
	elseif (t <= 9e-116)
		tmp = x + (((y - x) * (z - t)) / (a - t));
	elseif (t <= 9.8e+103)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(z - t), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(N[(x - y), $MachinePrecision] / N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.4e+47], t$95$2, If[LessEqual[t, -4e-198], t$95$1, If[LessEqual[t, 9e-116], N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.8e+103], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -4 \cdot 10^{-198}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 9.8 \cdot 10^{+103}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -6.4e47 or 9.7999999999999997e103 < t

    1. Initial program 32.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.4e47 < t < -3.9999999999999996e-198 or 9.00000000000000023e-116 < t < 9.7999999999999997e103

    1. Initial program 81.2%

      \[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. Add Preprocessing

    if -3.9999999999999996e-198 < t < 9.00000000000000023e-116

    1. Initial program 98.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.4 \cdot 10^{+47}:\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\ \mathbf{elif}\;t \leq -4 \cdot 10^{-198}:\\ \;\;\;\;x + \left(z - t\right) \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;t \leq 9 \cdot 10^{-116}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\ \mathbf{elif}\;t \leq 9.8 \cdot 10^{+103}:\\ \;\;\;\;x + \left(z - t\right) \cdot \frac{y - x}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 85.9% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + \frac{x - y}{\frac{t}{z - a}}\\ \mathbf{if}\;t \leq -7.5 \cdot 10^{+45}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -3.9 \cdot 10^{-209}:\\ \;\;\;\;x + \frac{z - t}{\frac{a - t}{y - x}}\\ \mathbf{elif}\;t \leq 6 \cdot 10^{-116}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\ \mathbf{elif}\;t \leq 1.75 \cdot 10^{+102}:\\ \;\;\;\;x + \left(z - t\right) \cdot \frac{y - x}{a - t}\\ \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 -7.5e+45)
     t_1
     (if (<= t -3.9e-209)
       (+ x (/ (- z t) (/ (- a t) (- y x))))
       (if (<= t 6e-116)
         (+ x (/ (* (- y x) (- z t)) (- a t)))
         (if (<= t 1.75e+102) (+ x (* (- z t) (/ (- y x) (- a t)))) 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 <= -7.5e+45) {
		tmp = t_1;
	} else if (t <= -3.9e-209) {
		tmp = x + ((z - t) / ((a - t) / (y - x)));
	} else if (t <= 6e-116) {
		tmp = x + (((y - x) * (z - t)) / (a - t));
	} else if (t <= 1.75e+102) {
		tmp = x + ((z - t) * ((y - x) / (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 = y + ((x - y) / (t / (z - a)))
    if (t <= (-7.5d+45)) then
        tmp = t_1
    else if (t <= (-3.9d-209)) then
        tmp = x + ((z - t) / ((a - t) / (y - x)))
    else if (t <= 6d-116) then
        tmp = x + (((y - x) * (z - t)) / (a - t))
    else if (t <= 1.75d+102) then
        tmp = x + ((z - t) * ((y - x) / (a - t)))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y + ((x - y) / (t / (z - a)));
	double tmp;
	if (t <= -7.5e+45) {
		tmp = t_1;
	} else if (t <= -3.9e-209) {
		tmp = x + ((z - t) / ((a - t) / (y - x)));
	} else if (t <= 6e-116) {
		tmp = x + (((y - x) * (z - t)) / (a - t));
	} else if (t <= 1.75e+102) {
		tmp = x + ((z - t) * ((y - x) / (a - t)));
	} 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 <= -7.5e+45:
		tmp = t_1
	elif t <= -3.9e-209:
		tmp = x + ((z - t) / ((a - t) / (y - x)))
	elif t <= 6e-116:
		tmp = x + (((y - x) * (z - t)) / (a - t))
	elif t <= 1.75e+102:
		tmp = x + ((z - t) * ((y - x) / (a - t)))
	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 <= -7.5e+45)
		tmp = t_1;
	elseif (t <= -3.9e-209)
		tmp = Float64(x + Float64(Float64(z - t) / Float64(Float64(a - t) / Float64(y - x))));
	elseif (t <= 6e-116)
		tmp = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t)));
	elseif (t <= 1.75e+102)
		tmp = Float64(x + Float64(Float64(z - t) * Float64(Float64(y - x) / Float64(a - t))));
	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 <= -7.5e+45)
		tmp = t_1;
	elseif (t <= -3.9e-209)
		tmp = x + ((z - t) / ((a - t) / (y - x)));
	elseif (t <= 6e-116)
		tmp = x + (((y - x) * (z - t)) / (a - t));
	elseif (t <= 1.75e+102)
		tmp = x + ((z - t) * ((y - x) / (a - t)));
	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, -7.5e+45], t$95$1, If[LessEqual[t, -3.9e-209], N[(x + N[(N[(z - t), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6e-116], N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.75e+102], N[(x + N[(N[(z - t), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $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 -7.5 \cdot 10^{+45}:\\
\;\;\;\;t_1\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -7.50000000000000058e45 or 1.75000000000000005e102 < t

    1. Initial program 32.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.50000000000000058e45 < t < -3.9e-209

    1. Initial program 84.5%

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

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

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

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

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

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

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

    if -3.9e-209 < t < 6.00000000000000053e-116

    1. Initial program 98.1%

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

    if 6.00000000000000053e-116 < t < 1.75000000000000005e102

    1. Initial program 77.3%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.5 \cdot 10^{+45}:\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\ \mathbf{elif}\;t \leq -3.9 \cdot 10^{-209}:\\ \;\;\;\;x + \frac{z - t}{\frac{a - t}{y - x}}\\ \mathbf{elif}\;t \leq 6 \cdot 10^{-116}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\ \mathbf{elif}\;t \leq 1.75 \cdot 10^{+102}:\\ \;\;\;\;x + \left(z - t\right) \cdot \frac{y - x}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 48.7% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3 \cdot 10^{-16}:\\
\;\;\;\;y\\

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

\mathbf{elif}\;t \leq 1.5 \cdot 10^{+99}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq 5.6 \cdot 10^{+100}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 2.8 \cdot 10^{+129}:\\
\;\;\;\;x \cdot \frac{z - a}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.99999999999999994e-16 or 1.07999999999999998e39 < t < 1.50000000000000007e99 or 2.79999999999999975e129 < t

    1. Initial program 44.3%

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

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

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

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

    if -2.99999999999999994e-16 < t < 1.07999999999999998e39

    1. Initial program 90.6%

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

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

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

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

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

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

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

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

    if 1.50000000000000007e99 < t < 5.5999999999999996e100

    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. Add Preprocessing
    5. Taylor expanded in a around inf 100.0%

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

    if 5.5999999999999996e100 < t < 2.79999999999999975e129

    1. Initial program 4.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a - t}{z - t}}} \]
    9. Simplified41.6%

      \[\leadsto \color{blue}{x - \frac{x}{\frac{a - t}{z - t}}} \]
    10. Taylor expanded in t around inf 62.8%

      \[\leadsto \color{blue}{\frac{-1 \cdot \left(a \cdot x\right) - -1 \cdot \left(x \cdot z\right)}{t}} \]
    11. Step-by-step derivation
      1. distribute-lft-out--62.8%

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

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

        \[\leadsto \frac{-\left(\color{blue}{x \cdot a} - x \cdot z\right)}{t} \]
      4. distribute-lft-out--62.8%

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{z - a}{t}} \]
    15. Simplified100.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3 \cdot 10^{-16}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 1.08 \cdot 10^{+39}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{+99}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 5.6 \cdot 10^{+100}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{+129}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 37.3% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -8 \cdot 10^{-13}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 7.8 \cdot 10^{-294}:\\
\;\;\;\;y\\

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

\mathbf{elif}\;a \leq 1.42 \cdot 10^{-52}:\\
\;\;\;\;y\\

\mathbf{elif}\;a \leq 2.8 \cdot 10^{+80}:\\
\;\;\;\;\frac{-x}{\frac{a}{z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -8.0000000000000002e-13 or 2.79999999999999984e80 < a

    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/91.7%

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

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

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

    if -8.0000000000000002e-13 < a < 7.8000000000000005e-294 or 2.5500000000000001e-216 < a < 1.4200000000000001e-52

    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/69.6%

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

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

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

    if 7.8000000000000005e-294 < a < 2.5500000000000001e-216

    1. Initial program 88.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a - t}{z - t}}} \]
    9. Simplified44.5%

      \[\leadsto \color{blue}{x - \frac{x}{\frac{a - t}{z - t}}} \]
    10. Taylor expanded in t around inf 44.6%

      \[\leadsto \color{blue}{\frac{-1 \cdot \left(a \cdot x\right) - -1 \cdot \left(x \cdot z\right)}{t}} \]
    11. Step-by-step derivation
      1. distribute-lft-out--44.6%

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

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

        \[\leadsto \frac{-\left(\color{blue}{x \cdot a} - x \cdot z\right)}{t} \]
      4. distribute-lft-out--44.6%

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

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

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

    if 1.4200000000000001e-52 < a < 2.79999999999999984e80

    1. Initial program 78.1%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{a}} \]
    10. Step-by-step derivation
      1. neg-mul-140.9%

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

        \[\leadsto -\color{blue}{x \cdot \frac{z}{a}} \]
      3. *-commutative40.8%

        \[\leadsto -\color{blue}{\frac{z}{a} \cdot x} \]
      4. distribute-rgt-neg-in40.8%

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

      \[\leadsto \color{blue}{\frac{z}{a} \cdot \left(-x\right)} \]
    12. Step-by-step derivation
      1. *-commutative40.8%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{z}{a}} \]
      2. distribute-lft-neg-out40.8%

        \[\leadsto \color{blue}{-x \cdot \frac{z}{a}} \]
      3. add-sqr-sqrt31.6%

        \[\leadsto -\color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)} \cdot \frac{z}{a} \]
      4. sqrt-unprod33.4%

        \[\leadsto -\color{blue}{\sqrt{x \cdot x}} \cdot \frac{z}{a} \]
      5. sqr-neg33.4%

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

        \[\leadsto -\color{blue}{\left(\sqrt{-x} \cdot \sqrt{-x}\right)} \cdot \frac{z}{a} \]
      7. add-sqr-sqrt2.3%

        \[\leadsto -\color{blue}{\left(-x\right)} \cdot \frac{z}{a} \]
      8. clear-num2.3%

        \[\leadsto -\left(-x\right) \cdot \color{blue}{\frac{1}{\frac{a}{z}}} \]
      9. un-div-inv2.3%

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

        \[\leadsto -\frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{\frac{a}{z}} \]
      11. sqrt-unprod33.4%

        \[\leadsto -\frac{\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}}{\frac{a}{z}} \]
      12. sqr-neg33.4%

        \[\leadsto -\frac{\sqrt{\color{blue}{x \cdot x}}}{\frac{a}{z}} \]
      13. sqrt-unprod31.7%

        \[\leadsto -\frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{\frac{a}{z}} \]
      14. add-sqr-sqrt40.8%

        \[\leadsto -\frac{\color{blue}{x}}{\frac{a}{z}} \]
    13. Applied egg-rr40.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8 \cdot 10^{-13}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 7.8 \cdot 10^{-294}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 2.55 \cdot 10^{-216}:\\ \;\;\;\;\frac{x \cdot z}{t}\\ \mathbf{elif}\;a \leq 1.42 \cdot 10^{-52}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{+80}:\\ \;\;\;\;\frac{-x}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 37.3% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.5 \cdot 10^{-10}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 9.2 \cdot 10^{-293}:\\
\;\;\;\;y\\

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

\mathbf{elif}\;a \leq 1.12 \cdot 10^{-58}:\\
\;\;\;\;y\\

\mathbf{elif}\;a \leq 2.25 \cdot 10^{+80}:\\
\;\;\;\;\frac{x \cdot z}{-a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.5e-10 or 2.25000000000000003e80 < a

    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/91.7%

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

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

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

    if -1.5e-10 < a < 9.1999999999999998e-293 or 2.6999999999999999e-216 < a < 1.11999999999999992e-58

    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/69.6%

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

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

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

    if 9.1999999999999998e-293 < a < 2.6999999999999999e-216

    1. Initial program 88.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a - t}{z - t}}} \]
    9. Simplified44.5%

      \[\leadsto \color{blue}{x - \frac{x}{\frac{a - t}{z - t}}} \]
    10. Taylor expanded in t around inf 44.6%

      \[\leadsto \color{blue}{\frac{-1 \cdot \left(a \cdot x\right) - -1 \cdot \left(x \cdot z\right)}{t}} \]
    11. Step-by-step derivation
      1. distribute-lft-out--44.6%

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

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

        \[\leadsto \frac{-\left(\color{blue}{x \cdot a} - x \cdot z\right)}{t} \]
      4. distribute-lft-out--44.6%

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

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

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

    if 1.11999999999999992e-58 < a < 2.25000000000000003e80

    1. Initial program 78.1%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{a}} \]
    10. Step-by-step derivation
      1. neg-mul-140.9%

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

        \[\leadsto -\color{blue}{x \cdot \frac{z}{a}} \]
      3. *-commutative40.8%

        \[\leadsto -\color{blue}{\frac{z}{a} \cdot x} \]
      4. distribute-rgt-neg-in40.8%

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

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

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

        \[\leadsto \color{blue}{\frac{-z \cdot \left(-x\right)}{-a}} \]
      3. add-sqr-sqrt9.1%

        \[\leadsto \frac{-z \cdot \color{blue}{\left(\sqrt{-x} \cdot \sqrt{-x}\right)}}{-a} \]
      4. sqrt-unprod9.6%

        \[\leadsto \frac{-z \cdot \color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}}{-a} \]
      5. sqr-neg9.6%

        \[\leadsto \frac{-z \cdot \sqrt{\color{blue}{x \cdot x}}}{-a} \]
      6. sqrt-unprod0.5%

        \[\leadsto \frac{-z \cdot \color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)}}{-a} \]
      7. add-sqr-sqrt2.3%

        \[\leadsto \frac{-z \cdot \color{blue}{x}}{-a} \]
      8. distribute-rgt-neg-out2.3%

        \[\leadsto \frac{\color{blue}{z \cdot \left(-x\right)}}{-a} \]
      9. add-sqr-sqrt1.7%

        \[\leadsto \frac{z \cdot \color{blue}{\left(\sqrt{-x} \cdot \sqrt{-x}\right)}}{-a} \]
      10. sqrt-unprod33.5%

        \[\leadsto \frac{z \cdot \color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}}{-a} \]
      11. sqr-neg33.5%

        \[\leadsto \frac{z \cdot \sqrt{\color{blue}{x \cdot x}}}{-a} \]
      12. sqrt-unprod31.7%

        \[\leadsto \frac{z \cdot \color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)}}{-a} \]
      13. add-sqr-sqrt40.9%

        \[\leadsto \frac{z \cdot \color{blue}{x}}{-a} \]
    13. Applied egg-rr40.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.5 \cdot 10^{-10}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{-293}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{-216}:\\ \;\;\;\;\frac{x \cdot z}{t}\\ \mathbf{elif}\;a \leq 1.12 \cdot 10^{-58}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 2.25 \cdot 10^{+80}:\\ \;\;\;\;\frac{x \cdot z}{-a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 66.6% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := y - \frac{z}{\frac{t}{y - x}}\\
\mathbf{if}\;t \leq -1.4 \cdot 10^{-57}:\\
\;\;\;\;t_1\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.4e-57 or 3.90000000000000023e38 < t

    1. Initial program 45.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y - \color{blue}{\frac{z}{\frac{t}{y - x}}} \]
    10. Simplified75.4%

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

    if -1.4e-57 < t < 1.3e-137

    1. Initial program 93.1%

      \[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. Add Preprocessing
    5. Taylor expanded in t around 0 78.4%

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

        \[\leadsto x + \color{blue}{\frac{z}{\frac{a}{y - x}}} \]
    7. Simplified80.8%

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

    if 1.3e-137 < t < 3.79999999999999979e-41

    1. Initial program 87.6%

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

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

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

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

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

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

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

    if 3.79999999999999979e-41 < t < 3.90000000000000023e38

    1. Initial program 82.3%

      \[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. Add Preprocessing
    5. Taylor expanded in x around inf 77.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.4 \cdot 10^{-57}:\\ \;\;\;\;y - \frac{z}{\frac{t}{y - x}}\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{-137}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{-41}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{elif}\;t \leq 3.9 \cdot 10^{+38}:\\ \;\;\;\;x \cdot \left(\frac{t - z}{a - t} + 1\right)\\ \mathbf{else}:\\ \;\;\;\;y - \frac{z}{\frac{t}{y - x}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 70.6% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := x + \frac{y - x}{\frac{a}{z - t}}\\
t_2 := y - \frac{z}{\frac{t}{y - x}}\\
\mathbf{if}\;t \leq -7.8 \cdot 10^{-53}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 3.5 \cdot 10^{-111}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 2.3 \cdot 10^{+38}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -7.8000000000000004e-53 or 2.3000000000000001e38 < t

    1. Initial program 44.1%

      \[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. Add Preprocessing
    5. Taylor expanded in t around inf 68.2%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y - \color{blue}{\frac{y - x}{\frac{t}{z - a}}} \]
    7. Simplified83.9%

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

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

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

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

    if -7.8000000000000004e-53 < t < 3.5e-111 or 4.1999999999999999e-69 < t < 2.3000000000000001e38

    1. Initial program 91.2%

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

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

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

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

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

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

    if 3.5e-111 < t < 4.1999999999999999e-69

    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/86.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.8 \cdot 10^{-53}:\\ \;\;\;\;y - \frac{z}{\frac{t}{y - x}}\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{-111}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z - t}}\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{-69}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{+38}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z - t}}\\ \mathbf{else}:\\ \;\;\;\;y - \frac{z}{\frac{t}{y - x}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 57.1% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \frac{y - x}{a - t}\\ \mathbf{if}\;z \leq -8 \cdot 10^{+155}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{+126}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{+111}:\\ \;\;\;\;z \cdot \frac{-x}{a - t}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+79}:\\ \;\;\;\;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 (* z (/ (- y x) (- a t)))))
   (if (<= z -8e+155)
     t_1
     (if (<= z -4.5e+126)
       (* x (- 1.0 (/ z a)))
       (if (<= z -4.5e+111)
         (* z (/ (- x) (- a t)))
         (if (<= z 7e+79) (* y (/ (- z t) (- a t))) t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = z * ((y - x) / (a - t));
	double tmp;
	if (z <= -8e+155) {
		tmp = t_1;
	} else if (z <= -4.5e+126) {
		tmp = x * (1.0 - (z / a));
	} else if (z <= -4.5e+111) {
		tmp = z * (-x / (a - t));
	} else if (z <= 7e+79) {
		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 = z * ((y - x) / (a - t))
    if (z <= (-8d+155)) then
        tmp = t_1
    else if (z <= (-4.5d+126)) then
        tmp = x * (1.0d0 - (z / a))
    else if (z <= (-4.5d+111)) then
        tmp = z * (-x / (a - t))
    else if (z <= 7d+79) 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 = z * ((y - x) / (a - t));
	double tmp;
	if (z <= -8e+155) {
		tmp = t_1;
	} else if (z <= -4.5e+126) {
		tmp = x * (1.0 - (z / a));
	} else if (z <= -4.5e+111) {
		tmp = z * (-x / (a - t));
	} else if (z <= 7e+79) {
		tmp = y * ((z - t) / (a - t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = z * ((y - x) / (a - t))
	tmp = 0
	if z <= -8e+155:
		tmp = t_1
	elif z <= -4.5e+126:
		tmp = x * (1.0 - (z / a))
	elif z <= -4.5e+111:
		tmp = z * (-x / (a - t))
	elif z <= 7e+79:
		tmp = y * ((z - t) / (a - t))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(z * Float64(Float64(y - x) / Float64(a - t)))
	tmp = 0.0
	if (z <= -8e+155)
		tmp = t_1;
	elseif (z <= -4.5e+126)
		tmp = Float64(x * Float64(1.0 - Float64(z / a)));
	elseif (z <= -4.5e+111)
		tmp = Float64(z * Float64(Float64(-x) / Float64(a - t)));
	elseif (z <= 7e+79)
		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 = z * ((y - x) / (a - t));
	tmp = 0.0;
	if (z <= -8e+155)
		tmp = t_1;
	elseif (z <= -4.5e+126)
		tmp = x * (1.0 - (z / a));
	elseif (z <= -4.5e+111)
		tmp = z * (-x / (a - t));
	elseif (z <= 7e+79)
		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[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8e+155], t$95$1, If[LessEqual[z, -4.5e+126], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.5e+111], N[(z * N[((-x) / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7e+79], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -4.5 \cdot 10^{+111}:\\
\;\;\;\;z \cdot \frac{-x}{a - t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -8.00000000000000006e155 or 6.99999999999999961e79 < z

    1. Initial program 73.1%

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

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

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

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

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

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

    if -8.00000000000000006e155 < z < -4.49999999999999974e126

    1. Initial program 83.9%

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

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

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

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

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

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

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

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

    if -4.49999999999999974e126 < z < -4.50000000000000001e111

    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/34.4%

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

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

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

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

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

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

        \[\leadsto z \cdot \color{blue}{\left(-\frac{x}{a - t}\right)} \]
      2. distribute-neg-frac100.0%

        \[\leadsto z \cdot \color{blue}{\frac{-x}{a - t}} \]
    10. Simplified100.0%

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

    if -4.50000000000000001e111 < z < 6.99999999999999961e79

    1. Initial program 68.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8 \cdot 10^{+155}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{+126}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{+111}:\\ \;\;\;\;z \cdot \frac{-x}{a - t}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+79}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 66.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{z}{\frac{a}{y - x}}\\ t_2 := y - \frac{z}{\frac{t}{y - x}}\\ \mathbf{if}\;t \leq -1.45 \cdot 10^{-55}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 9.6 \cdot 10^{-138}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 9 \cdot 10^{-55}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{elif}\;t \leq 2.85 \cdot 10^{+38}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ z (/ a (- y x))))) (t_2 (- y (/ z (/ t (- y x))))))
   (if (<= t -1.45e-55)
     t_2
     (if (<= t 9.6e-138)
       t_1
       (if (<= t 9e-55)
         (* (- z t) (/ y (- a t)))
         (if (<= t 2.85e+38) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (z / (a / (y - x)));
	double t_2 = y - (z / (t / (y - x)));
	double tmp;
	if (t <= -1.45e-55) {
		tmp = t_2;
	} else if (t <= 9.6e-138) {
		tmp = t_1;
	} else if (t <= 9e-55) {
		tmp = (z - t) * (y / (a - t));
	} else if (t <= 2.85e+38) {
		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 = x + (z / (a / (y - x)))
    t_2 = y - (z / (t / (y - x)))
    if (t <= (-1.45d-55)) then
        tmp = t_2
    else if (t <= 9.6d-138) then
        tmp = t_1
    else if (t <= 9d-55) then
        tmp = (z - t) * (y / (a - t))
    else if (t <= 2.85d+38) 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 = x + (z / (a / (y - x)));
	double t_2 = y - (z / (t / (y - x)));
	double tmp;
	if (t <= -1.45e-55) {
		tmp = t_2;
	} else if (t <= 9.6e-138) {
		tmp = t_1;
	} else if (t <= 9e-55) {
		tmp = (z - t) * (y / (a - t));
	} else if (t <= 2.85e+38) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (z / (a / (y - x)))
	t_2 = y - (z / (t / (y - x)))
	tmp = 0
	if t <= -1.45e-55:
		tmp = t_2
	elif t <= 9.6e-138:
		tmp = t_1
	elif t <= 9e-55:
		tmp = (z - t) * (y / (a - t))
	elif t <= 2.85e+38:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(z / Float64(a / Float64(y - x))))
	t_2 = Float64(y - Float64(z / Float64(t / Float64(y - x))))
	tmp = 0.0
	if (t <= -1.45e-55)
		tmp = t_2;
	elseif (t <= 9.6e-138)
		tmp = t_1;
	elseif (t <= 9e-55)
		tmp = Float64(Float64(z - t) * Float64(y / Float64(a - t)));
	elseif (t <= 2.85e+38)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (z / (a / (y - x)));
	t_2 = y - (z / (t / (y - x)));
	tmp = 0.0;
	if (t <= -1.45e-55)
		tmp = t_2;
	elseif (t <= 9.6e-138)
		tmp = t_1;
	elseif (t <= 9e-55)
		tmp = (z - t) * (y / (a - t));
	elseif (t <= 2.85e+38)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(z / N[(a / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y - N[(z / N[(t / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.45e-55], t$95$2, If[LessEqual[t, 9.6e-138], t$95$1, If[LessEqual[t, 9e-55], N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.85e+38], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \frac{z}{\frac{a}{y - x}}\\
t_2 := y - \frac{z}{\frac{t}{y - x}}\\
\mathbf{if}\;t \leq -1.45 \cdot 10^{-55}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 9.6 \cdot 10^{-138}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 2.85 \cdot 10^{+38}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.45e-55 or 2.8499999999999999e38 < t

    1. Initial program 45.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y - \color{blue}{\frac{z}{\frac{t}{y - x}}} \]
    10. Simplified75.4%

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

    if -1.45e-55 < t < 9.5999999999999997e-138 or 8.99999999999999941e-55 < t < 2.8499999999999999e38

    1. Initial program 91.2%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z}{\frac{a}{y - x}}} \]
    7. Simplified78.9%

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

    if 9.5999999999999997e-138 < t < 8.99999999999999941e-55

    1. Initial program 89.3%

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

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

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

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

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

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

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

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

Alternative 20: 39.0% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t \leq 9.4 \cdot 10^{-119}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 10^{+39}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.4000000000000002e66 or 9.9999999999999994e38 < t

    1. Initial program 37.0%

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

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

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

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

    if -2.4000000000000002e66 < t < 9.40000000000000004e-119 or 1.09999999999999992e-30 < t < 9.9999999999999994e38

    1. Initial program 89.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{t}{\frac{a}{y - x}}} \]
    10. Simplified44.5%

      \[\leadsto \color{blue}{x - \frac{t}{\frac{a}{y - x}}} \]
    11. Taylor expanded in x around inf 36.1%

      \[\leadsto \color{blue}{x \cdot \left(1 - -1 \cdot \frac{t}{a}\right)} \]
    12. Step-by-step derivation
      1. sub-neg36.1%

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

        \[\leadsto x \cdot \left(1 + \left(-\color{blue}{\left(-\frac{t}{a}\right)}\right)\right) \]
      3. remove-double-neg36.1%

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

        \[\leadsto x \cdot \color{blue}{\left(\frac{t}{a} + 1\right)} \]
    13. Simplified36.1%

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

    if 9.40000000000000004e-119 < t < 1.09999999999999992e-30

    1. Initial program 81.8%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{a}} \]
    10. Step-by-step derivation
      1. neg-mul-122.7%

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

        \[\leadsto -\color{blue}{x \cdot \frac{z}{a}} \]
      3. *-commutative35.8%

        \[\leadsto -\color{blue}{\frac{z}{a} \cdot x} \]
      4. distribute-rgt-neg-in35.8%

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

      \[\leadsto \color{blue}{\frac{z}{a} \cdot \left(-x\right)} \]
    12. Step-by-step derivation
      1. *-commutative35.8%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{z}{a}} \]
      2. distribute-lft-neg-out35.8%

        \[\leadsto \color{blue}{-x \cdot \frac{z}{a}} \]
      3. add-sqr-sqrt16.2%

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

        \[\leadsto -\color{blue}{\sqrt{x \cdot x}} \cdot \frac{z}{a} \]
      5. sqr-neg16.7%

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

        \[\leadsto -\color{blue}{\left(\sqrt{-x} \cdot \sqrt{-x}\right)} \cdot \frac{z}{a} \]
      7. add-sqr-sqrt2.3%

        \[\leadsto -\color{blue}{\left(-x\right)} \cdot \frac{z}{a} \]
      8. clear-num2.3%

        \[\leadsto -\left(-x\right) \cdot \color{blue}{\frac{1}{\frac{a}{z}}} \]
      9. un-div-inv2.3%

        \[\leadsto -\color{blue}{\frac{-x}{\frac{a}{z}}} \]
      10. add-sqr-sqrt0.8%

        \[\leadsto -\frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{\frac{a}{z}} \]
      11. sqrt-unprod16.7%

        \[\leadsto -\frac{\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}}{\frac{a}{z}} \]
      12. sqr-neg16.7%

        \[\leadsto -\frac{\sqrt{\color{blue}{x \cdot x}}}{\frac{a}{z}} \]
      13. sqrt-unprod16.2%

        \[\leadsto -\frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{\frac{a}{z}} \]
      14. add-sqr-sqrt35.8%

        \[\leadsto -\frac{\color{blue}{x}}{\frac{a}{z}} \]
    13. Applied egg-rr35.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.4 \cdot 10^{+66}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 9.4 \cdot 10^{-119}:\\ \;\;\;\;x \cdot \left(\frac{t}{a} + 1\right)\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{-30}:\\ \;\;\;\;\frac{-x}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 10^{+39}:\\ \;\;\;\;x \cdot \left(\frac{t}{a} + 1\right)\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 85.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -6.4 \cdot 10^{+47} \lor \neg \left(t \leq 2.45 \cdot 10^{+101}\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 -6.4e+47) (not (<= t 2.45e+101)))
   (+ 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 <= -6.4e+47) || !(t <= 2.45e+101)) {
		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 <= (-6.4d+47)) .or. (.not. (t <= 2.45d+101))) 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 <= -6.4e+47) || !(t <= 2.45e+101)) {
		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 <= -6.4e+47) or not (t <= 2.45e+101):
		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 <= -6.4e+47) || !(t <= 2.45e+101))
		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 <= -6.4e+47) || ~((t <= 2.45e+101)))
		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, -6.4e+47], N[Not[LessEqual[t, 2.45e+101]], $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 -6.4 \cdot 10^{+47} \lor \neg \left(t \leq 2.45 \cdot 10^{+101}\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 < -6.4e47 or 2.44999999999999991e101 < t

    1. Initial program 32.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.4e47 < t < 2.44999999999999991e101

    1. Initial program 88.2%

      \[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. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification89.7%

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

Alternative 22: 87.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -5.1 \cdot 10^{+44} \lor \neg \left(t \leq 5.9 \cdot 10^{+103}\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 -5.1e+44) (not (<= t 5.9e+103)))
   (+ 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 <= -5.1e+44) || !(t <= 5.9e+103)) {
		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 <= (-5.1d+44)) .or. (.not. (t <= 5.9d+103))) 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 <= -5.1e+44) || !(t <= 5.9e+103)) {
		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 <= -5.1e+44) or not (t <= 5.9e+103):
		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 <= -5.1e+44) || !(t <= 5.9e+103))
		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 <= -5.1e+44) || ~((t <= 5.9e+103)))
		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, -5.1e+44], N[Not[LessEqual[t, 5.9e+103]], $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 -5.1 \cdot 10^{+44} \lor \neg \left(t \leq 5.9 \cdot 10^{+103}\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 < -5.1e44 or 5.8999999999999999e103 < t

    1. Initial program 32.4%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y - \frac{\color{blue}{\left(y - x\right) \cdot \left(z - a\right)}}{t} \]
      10. associate-/l*87.4%

        \[\leadsto y - \color{blue}{\frac{y - x}{\frac{t}{z - a}}} \]
    7. Simplified87.4%

      \[\leadsto \color{blue}{y - \frac{y - x}{\frac{t}{z - a}}} \]

    if -5.1e44 < t < 5.8999999999999999e103

    1. Initial program 88.2%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative88.2%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-*l/90.7%

        \[\leadsto \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} + x \]
      3. fma-def90.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    3. Simplified90.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-udef90.7%

        \[\leadsto \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right) + x} \]
      2. associate-/r/94.4%

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv94.3%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{1}{\frac{a - t}{z - t}}} + x \]
      4. clear-num94.4%

        \[\leadsto \left(y - x\right) \cdot \color{blue}{\frac{z - t}{a - t}} + x \]
    6. Applied egg-rr94.4%

      \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t} + x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification92.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.1 \cdot 10^{+44} \lor \neg \left(t \leq 5.9 \cdot 10^{+103}\right):\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\ \mathbf{else}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z - t}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 76.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -0.00022 \lor \neg \left(t \leq 4.1 \cdot 10^{+38}\right):\\ \;\;\;\;y - \frac{z}{\frac{t}{y - x}}\\ \mathbf{else}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a - t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= t -0.00022) (not (<= t 4.1e+38)))
   (- y (/ z (/ t (- y x))))
   (+ x (* (- y x) (/ z (- a t))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -0.00022) || !(t <= 4.1e+38)) {
		tmp = y - (z / (t / (y - x)));
	} else {
		tmp = x + ((y - x) * (z / (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 <= (-0.00022d0)) .or. (.not. (t <= 4.1d+38))) then
        tmp = y - (z / (t / (y - x)))
    else
        tmp = x + ((y - x) * (z / (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 <= -0.00022) || !(t <= 4.1e+38)) {
		tmp = y - (z / (t / (y - x)));
	} else {
		tmp = x + ((y - x) * (z / (a - t)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (t <= -0.00022) or not (t <= 4.1e+38):
		tmp = y - (z / (t / (y - x)))
	else:
		tmp = x + ((y - x) * (z / (a - t)))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((t <= -0.00022) || !(t <= 4.1e+38))
		tmp = Float64(y - Float64(z / Float64(t / Float64(y - x))));
	else
		tmp = Float64(x + Float64(Float64(y - x) * Float64(z / Float64(a - t))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((t <= -0.00022) || ~((t <= 4.1e+38)))
		tmp = y - (z / (t / (y - x)));
	else
		tmp = x + ((y - x) * (z / (a - t)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -0.00022], N[Not[LessEqual[t, 4.1e+38]], $MachinePrecision]], N[(y - N[(z / N[(t / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - x), $MachinePrecision] * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.00022 \lor \neg \left(t \leq 4.1 \cdot 10^{+38}\right):\\
\;\;\;\;y - \frac{z}{\frac{t}{y - x}}\\

\mathbf{else}:\\
\;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a - t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.20000000000000008e-4 or 4.1000000000000003e38 < t

    1. Initial program 42.4%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/66.1%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified66.1%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 67.6%

      \[\leadsto \color{blue}{\left(y + -1 \cdot \frac{z \cdot \left(y - x\right)}{t}\right) - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}} \]
    6. Step-by-step derivation
      1. associate--l+67.6%

        \[\leadsto \color{blue}{y + \left(-1 \cdot \frac{z \cdot \left(y - x\right)}{t} - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      2. associate-*r/67.6%

        \[\leadsto y + \left(\color{blue}{\frac{-1 \cdot \left(z \cdot \left(y - x\right)\right)}{t}} - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}\right) \]
      3. associate-*r/67.6%

        \[\leadsto y + \left(\frac{-1 \cdot \left(z \cdot \left(y - x\right)\right)}{t} - \color{blue}{\frac{-1 \cdot \left(a \cdot \left(y - x\right)\right)}{t}}\right) \]
      4. div-sub67.6%

        \[\leadsto y + \color{blue}{\frac{-1 \cdot \left(z \cdot \left(y - x\right)\right) - -1 \cdot \left(a \cdot \left(y - x\right)\right)}{t}} \]
      5. distribute-lft-out--67.6%

        \[\leadsto y + \frac{\color{blue}{-1 \cdot \left(z \cdot \left(y - x\right) - a \cdot \left(y - x\right)\right)}}{t} \]
      6. associate-*r/67.6%

        \[\leadsto y + \color{blue}{-1 \cdot \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      7. mul-1-neg67.6%

        \[\leadsto y + \color{blue}{\left(-\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}\right)} \]
      8. unsub-neg67.6%

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      9. distribute-rgt-out--67.7%

        \[\leadsto y - \frac{\color{blue}{\left(y - x\right) \cdot \left(z - a\right)}}{t} \]
      10. associate-/l*84.0%

        \[\leadsto y - \color{blue}{\frac{y - x}{\frac{t}{z - a}}} \]
    7. Simplified84.0%

      \[\leadsto \color{blue}{y - \frac{y - x}{\frac{t}{z - a}}} \]
    8. Taylor expanded in z around inf 64.3%

      \[\leadsto y - \color{blue}{\frac{z \cdot \left(y - x\right)}{t}} \]
    9. Step-by-step derivation
      1. associate-/l*76.5%

        \[\leadsto y - \color{blue}{\frac{z}{\frac{t}{y - x}}} \]
    10. Simplified76.5%

      \[\leadsto y - \color{blue}{\frac{z}{\frac{t}{y - x}}} \]

    if -2.20000000000000008e-4 < t < 4.1000000000000003e38

    1. Initial program 90.7%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative90.7%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-*l/92.3%

        \[\leadsto \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} + x \]
      3. fma-def92.3%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    3. Simplified92.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-udef92.3%

        \[\leadsto \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right) + x} \]
      2. associate-/r/96.0%

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv95.9%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{1}{\frac{a - t}{z - t}}} + x \]
      4. clear-num96.0%

        \[\leadsto \left(y - x\right) \cdot \color{blue}{\frac{z - t}{a - t}} + x \]
    6. Applied egg-rr96.0%

      \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t} + x} \]
    7. Taylor expanded in z around inf 85.1%

      \[\leadsto \left(y - x\right) \cdot \color{blue}{\frac{z}{a - t}} + x \]
  3. Recombined 2 regimes into one program.
  4. Final simplification81.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -0.00022 \lor \neg \left(t \leq 4.1 \cdot 10^{+38}\right):\\ \;\;\;\;y - \frac{z}{\frac{t}{y - x}}\\ \mathbf{else}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 80.0% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -7.2 \cdot 10^{-41} \lor \neg \left(t \leq 6 \cdot 10^{+38}\right):\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\ \mathbf{else}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a - t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= t -7.2e-41) (not (<= t 6e+38)))
   (+ y (/ (- x y) (/ t (- z a))))
   (+ x (* (- y x) (/ z (- a t))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -7.2e-41) || !(t <= 6e+38)) {
		tmp = y + ((x - y) / (t / (z - a)));
	} else {
		tmp = x + ((y - x) * (z / (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 <= (-7.2d-41)) .or. (.not. (t <= 6d+38))) then
        tmp = y + ((x - y) / (t / (z - a)))
    else
        tmp = x + ((y - x) * (z / (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 <= -7.2e-41) || !(t <= 6e+38)) {
		tmp = y + ((x - y) / (t / (z - a)));
	} else {
		tmp = x + ((y - x) * (z / (a - t)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (t <= -7.2e-41) or not (t <= 6e+38):
		tmp = y + ((x - y) / (t / (z - a)))
	else:
		tmp = x + ((y - x) * (z / (a - t)))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((t <= -7.2e-41) || !(t <= 6e+38))
		tmp = Float64(y + Float64(Float64(x - y) / Float64(t / Float64(z - a))));
	else
		tmp = Float64(x + Float64(Float64(y - x) * Float64(z / Float64(a - t))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((t <= -7.2e-41) || ~((t <= 6e+38)))
		tmp = y + ((x - y) / (t / (z - a)));
	else
		tmp = x + ((y - x) * (z / (a - t)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -7.2e-41], N[Not[LessEqual[t, 6e+38]], $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[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.2 \cdot 10^{-41} \lor \neg \left(t \leq 6 \cdot 10^{+38}\right):\\
\;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\

\mathbf{else}:\\
\;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a - t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -7.2e-41 or 6.0000000000000002e38 < t

    1. Initial program 43.1%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/66.2%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified66.2%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 68.5%

      \[\leadsto \color{blue}{\left(y + -1 \cdot \frac{z \cdot \left(y - x\right)}{t}\right) - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}} \]
    6. Step-by-step derivation
      1. associate--l+68.5%

        \[\leadsto \color{blue}{y + \left(-1 \cdot \frac{z \cdot \left(y - x\right)}{t} - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      2. associate-*r/68.5%

        \[\leadsto y + \left(\color{blue}{\frac{-1 \cdot \left(z \cdot \left(y - x\right)\right)}{t}} - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}\right) \]
      3. associate-*r/68.5%

        \[\leadsto y + \left(\frac{-1 \cdot \left(z \cdot \left(y - x\right)\right)}{t} - \color{blue}{\frac{-1 \cdot \left(a \cdot \left(y - x\right)\right)}{t}}\right) \]
      4. div-sub68.5%

        \[\leadsto y + \color{blue}{\frac{-1 \cdot \left(z \cdot \left(y - x\right)\right) - -1 \cdot \left(a \cdot \left(y - x\right)\right)}{t}} \]
      5. distribute-lft-out--68.5%

        \[\leadsto y + \frac{\color{blue}{-1 \cdot \left(z \cdot \left(y - x\right) - a \cdot \left(y - x\right)\right)}}{t} \]
      6. associate-*r/68.5%

        \[\leadsto y + \color{blue}{-1 \cdot \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      7. mul-1-neg68.5%

        \[\leadsto y + \color{blue}{\left(-\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}\right)} \]
      8. unsub-neg68.5%

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      9. distribute-rgt-out--68.6%

        \[\leadsto y - \frac{\color{blue}{\left(y - x\right) \cdot \left(z - a\right)}}{t} \]
      10. associate-/l*84.5%

        \[\leadsto y - \color{blue}{\frac{y - x}{\frac{t}{z - a}}} \]
    7. Simplified84.5%

      \[\leadsto \color{blue}{y - \frac{y - x}{\frac{t}{z - a}}} \]

    if -7.2e-41 < t < 6.0000000000000002e38

    1. Initial program 91.1%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative91.1%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-*l/92.7%

        \[\leadsto \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} + x \]
      3. fma-def92.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    3. Simplified92.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-udef92.7%

        \[\leadsto \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right) + x} \]
      2. associate-/r/96.6%

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv96.5%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{1}{\frac{a - t}{z - t}}} + x \]
      4. clear-num96.6%

        \[\leadsto \left(y - x\right) \cdot \color{blue}{\frac{z - t}{a - t}} + x \]
    6. Applied egg-rr96.6%

      \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t} + x} \]
    7. Taylor expanded in z around inf 85.4%

      \[\leadsto \left(y - x\right) \cdot \color{blue}{\frac{z}{a - t}} + x \]
  3. Recombined 2 regimes into one program.
  4. Final simplification85.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.2 \cdot 10^{-41} \lor \neg \left(t \leq 6 \cdot 10^{+38}\right):\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\ \mathbf{else}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 25: 48.9% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -5.5 \cdot 10^{-12}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 4.9 \cdot 10^{+38}:\\ \;\;\;\;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 -5.5e-12) y (if (<= t 4.9e+38) (* x (- 1.0 (/ z a))) y)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -5.5e-12) {
		tmp = y;
	} else if (t <= 4.9e+38) {
		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 <= (-5.5d-12)) then
        tmp = y
    else if (t <= 4.9d+38) 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 <= -5.5e-12) {
		tmp = y;
	} else if (t <= 4.9e+38) {
		tmp = x * (1.0 - (z / a));
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -5.5e-12:
		tmp = y
	elif t <= 4.9e+38:
		tmp = x * (1.0 - (z / a))
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -5.5e-12)
		tmp = y;
	elseif (t <= 4.9e+38)
		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 <= -5.5e-12)
		tmp = y;
	elseif (t <= 4.9e+38)
		tmp = x * (1.0 - (z / a));
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -5.5e-12], y, If[LessEqual[t, 4.9e+38], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.5 \cdot 10^{-12}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq 4.9 \cdot 10^{+38}:\\
\;\;\;\;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 < -5.5000000000000004e-12 or 4.90000000000000002e38 < t

    1. Initial program 43.0%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/66.4%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified66.4%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 49.0%

      \[\leadsto \color{blue}{y} \]

    if -5.5000000000000004e-12 < t < 4.90000000000000002e38

    1. Initial program 90.6%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/92.2%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified92.2%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 67.2%

      \[\leadsto \color{blue}{x + \frac{z \cdot \left(y - x\right)}{a}} \]
    6. Taylor expanded in x around inf 50.9%

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z}{a}\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg50.9%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{z}{a}\right)}\right) \]
      2. unsub-neg50.9%

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{z}{a}\right)} \]
    8. Simplified50.9%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{z}{a}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification50.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.5 \cdot 10^{-12}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 4.9 \cdot 10^{+38}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 26: 39.2% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.5 \cdot 10^{-10}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{+38}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -1.5e-10) y (if (<= t 1.9e+38) x y)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -1.5e-10) {
		tmp = y;
	} else if (t <= 1.9e+38) {
		tmp = x;
	} else {
		tmp = y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (t <= (-1.5d-10)) then
        tmp = y
    else if (t <= 1.9d+38) then
        tmp = x
    else
        tmp = y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -1.5e-10) {
		tmp = y;
	} else if (t <= 1.9e+38) {
		tmp = x;
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -1.5e-10:
		tmp = y
	elif t <= 1.9e+38:
		tmp = x
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -1.5e-10)
		tmp = y;
	elseif (t <= 1.9e+38)
		tmp = x;
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -1.5e-10)
		tmp = y;
	elseif (t <= 1.9e+38)
		tmp = x;
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.5e-10], y, If[LessEqual[t, 1.9e+38], x, y]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.5 \cdot 10^{-10}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq 1.9 \cdot 10^{+38}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.5e-10 or 1.8999999999999999e38 < t

    1. Initial program 42.4%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/66.1%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified66.1%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 49.5%

      \[\leadsto \color{blue}{y} \]

    if -1.5e-10 < t < 1.8999999999999999e38

    1. Initial program 90.7%

      \[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. Add Preprocessing
    5. Taylor expanded in a around inf 31.4%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification39.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.5 \cdot 10^{-10}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{+38}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 27: 26.7% 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 70.3%

    \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
  2. Step-by-step derivation
    1. associate-*l/81.2%

      \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
  3. Simplified81.2%

    \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in a around inf 22.4%

    \[\leadsto \color{blue}{x} \]
  6. Final simplification22.4%

    \[\leadsto x \]
  7. Add Preprocessing

Developer target: 86.1% accurate, 0.5× 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 2024020 
(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))))