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

Percentage Accurate: 68.2% → 88.3%
Time: 21.5s
Alternatives: 26
Speedup: 0.8×

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 26 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.2% 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: 88.3% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -3.5 \cdot 10^{+205} \lor \neg \left(t \leq 4 \cdot 10^{+207}\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 -3.5e+205) (not (<= t 4e+207)))
   (+ 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 <= -3.5e+205) || !(t <= 4e+207)) {
		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 <= -3.5e+205) || !(t <= 4e+207))
		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, -3.5e+205], N[Not[LessEqual[t, 4e+207]], $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 -3.5 \cdot 10^{+205} \lor \neg \left(t \leq 4 \cdot 10^{+207}\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 < -3.4999999999999998e205 or 4.0000000000000002e207 < t

    1. Initial program 21.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.4999999999999998e205 < t < 4.0000000000000002e207

    1. Initial program 73.6%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.5 \cdot 10^{+205} \lor \neg \left(t \leq 4 \cdot 10^{+207}\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} \]

Alternative 2: 84.9% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t_1 \leq -1 \cdot 10^{-258} \lor \neg \left(t_1 \leq 0\right) \land t_1 \leq 2 \cdot 10^{+299}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 31.4%

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

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

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -9.99999999999999954e-259 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 2.0000000000000001e299

    1. Initial program 98.5%

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

    if -9.99999999999999954e-259 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0 or 2.0000000000000001e299 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 22.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 74.4% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{z}{\frac{a}{y - x}}\\ t_2 := x - \frac{t - z}{\frac{a - t}{y}}\\ t_3 := y - \frac{y - x}{\frac{t}{z - a}}\\ \mathbf{if}\;a \leq -6 \cdot 10^{+132}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -1.45 \cdot 10^{-21}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -4.4 \cdot 10^{-81}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -1.65 \cdot 10^{-101}:\\ \;\;\;\;\frac{y - x}{\frac{a - t}{z}}\\ \mathbf{elif}\;a \leq -8.6 \cdot 10^{-138}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq 1.02 \cdot 10^{+18}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{+45}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.1 \cdot 10^{+54}:\\ \;\;\;\;t_3\\ \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 (- x (/ (- t z) (/ (- a t) y))))
        (t_3 (- y (/ (- y x) (/ t (- z a))))))
   (if (<= a -6e+132)
     t_2
     (if (<= a -1.45e-21)
       t_1
       (if (<= a -4.4e-81)
         t_3
         (if (<= a -1.65e-101)
           (/ (- y x) (/ (- a t) z))
           (if (<= a -8.6e-138)
             (* y (/ (- z t) (- a t)))
             (if (<= a 1.02e+18)
               t_3
               (if (<= a 1.8e+45) t_1 (if (<= a 2.1e+54) t_3 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 = x - ((t - z) / ((a - t) / y));
	double t_3 = y - ((y - x) / (t / (z - a)));
	double tmp;
	if (a <= -6e+132) {
		tmp = t_2;
	} else if (a <= -1.45e-21) {
		tmp = t_1;
	} else if (a <= -4.4e-81) {
		tmp = t_3;
	} else if (a <= -1.65e-101) {
		tmp = (y - x) / ((a - t) / z);
	} else if (a <= -8.6e-138) {
		tmp = y * ((z - t) / (a - t));
	} else if (a <= 1.02e+18) {
		tmp = t_3;
	} else if (a <= 1.8e+45) {
		tmp = t_1;
	} else if (a <= 2.1e+54) {
		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 = x + (z / (a / (y - x)))
    t_2 = x - ((t - z) / ((a - t) / y))
    t_3 = y - ((y - x) / (t / (z - a)))
    if (a <= (-6d+132)) then
        tmp = t_2
    else if (a <= (-1.45d-21)) then
        tmp = t_1
    else if (a <= (-4.4d-81)) then
        tmp = t_3
    else if (a <= (-1.65d-101)) then
        tmp = (y - x) / ((a - t) / z)
    else if (a <= (-8.6d-138)) then
        tmp = y * ((z - t) / (a - t))
    else if (a <= 1.02d+18) then
        tmp = t_3
    else if (a <= 1.8d+45) then
        tmp = t_1
    else if (a <= 2.1d+54) 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 = x + (z / (a / (y - x)));
	double t_2 = x - ((t - z) / ((a - t) / y));
	double t_3 = y - ((y - x) / (t / (z - a)));
	double tmp;
	if (a <= -6e+132) {
		tmp = t_2;
	} else if (a <= -1.45e-21) {
		tmp = t_1;
	} else if (a <= -4.4e-81) {
		tmp = t_3;
	} else if (a <= -1.65e-101) {
		tmp = (y - x) / ((a - t) / z);
	} else if (a <= -8.6e-138) {
		tmp = y * ((z - t) / (a - t));
	} else if (a <= 1.02e+18) {
		tmp = t_3;
	} else if (a <= 1.8e+45) {
		tmp = t_1;
	} else if (a <= 2.1e+54) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (z / (a / (y - x)))
	t_2 = x - ((t - z) / ((a - t) / y))
	t_3 = y - ((y - x) / (t / (z - a)))
	tmp = 0
	if a <= -6e+132:
		tmp = t_2
	elif a <= -1.45e-21:
		tmp = t_1
	elif a <= -4.4e-81:
		tmp = t_3
	elif a <= -1.65e-101:
		tmp = (y - x) / ((a - t) / z)
	elif a <= -8.6e-138:
		tmp = y * ((z - t) / (a - t))
	elif a <= 1.02e+18:
		tmp = t_3
	elif a <= 1.8e+45:
		tmp = t_1
	elif a <= 2.1e+54:
		tmp = t_3
	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(x - Float64(Float64(t - z) / Float64(Float64(a - t) / y)))
	t_3 = Float64(y - Float64(Float64(y - x) / Float64(t / Float64(z - a))))
	tmp = 0.0
	if (a <= -6e+132)
		tmp = t_2;
	elseif (a <= -1.45e-21)
		tmp = t_1;
	elseif (a <= -4.4e-81)
		tmp = t_3;
	elseif (a <= -1.65e-101)
		tmp = Float64(Float64(y - x) / Float64(Float64(a - t) / z));
	elseif (a <= -8.6e-138)
		tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t)));
	elseif (a <= 1.02e+18)
		tmp = t_3;
	elseif (a <= 1.8e+45)
		tmp = t_1;
	elseif (a <= 2.1e+54)
		tmp = t_3;
	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 = x - ((t - z) / ((a - t) / y));
	t_3 = y - ((y - x) / (t / (z - a)));
	tmp = 0.0;
	if (a <= -6e+132)
		tmp = t_2;
	elseif (a <= -1.45e-21)
		tmp = t_1;
	elseif (a <= -4.4e-81)
		tmp = t_3;
	elseif (a <= -1.65e-101)
		tmp = (y - x) / ((a - t) / z);
	elseif (a <= -8.6e-138)
		tmp = y * ((z - t) / (a - t));
	elseif (a <= 1.02e+18)
		tmp = t_3;
	elseif (a <= 1.8e+45)
		tmp = t_1;
	elseif (a <= 2.1e+54)
		tmp = t_3;
	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[(x - N[(N[(t - z), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y - N[(N[(y - x), $MachinePrecision] / N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -6e+132], t$95$2, If[LessEqual[a, -1.45e-21], t$95$1, If[LessEqual[a, -4.4e-81], t$95$3, If[LessEqual[a, -1.65e-101], N[(N[(y - x), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -8.6e-138], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.02e+18], t$95$3, If[LessEqual[a, 1.8e+45], t$95$1, If[LessEqual[a, 2.1e+54], t$95$3, t$95$2]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1.45 \cdot 10^{-21}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -4.4 \cdot 10^{-81}:\\
\;\;\;\;t_3\\

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

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

\mathbf{elif}\;a \leq 1.02 \cdot 10^{+18}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;a \leq 1.8 \cdot 10^{+45}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 2.1 \cdot 10^{+54}:\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -5.9999999999999996e132 or 2.09999999999999986e54 < a

    1. Initial program 63.3%

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

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

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

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

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

    if -5.9999999999999996e132 < a < -1.45e-21 or 1.02e18 < a < 1.8e45

    1. Initial program 79.2%

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

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

      \[\leadsto \color{blue}{x + \frac{y - x}{\frac{a - t}{z - t}}} \]
    4. Step-by-step derivation
      1. div-inv96.6%

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

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

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

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

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

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

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

    if -1.45e-21 < a < -4.3999999999999998e-81 or -8.6000000000000001e-138 < a < 1.02e18 or 1.8e45 < a < 2.09999999999999986e54

    1. Initial program 60.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.3999999999999998e-81 < a < -1.64999999999999992e-101

    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-*r/96.2%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z}}} \]
    6. Simplified91.1%

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

    if -1.64999999999999992e-101 < a < -8.6000000000000001e-138

    1. Initial program 62.1%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{a - t}} \cdot y \]
      2. *-commutative72.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6 \cdot 10^{+132}:\\ \;\;\;\;x - \frac{t - z}{\frac{a - t}{y}}\\ \mathbf{elif}\;a \leq -1.45 \cdot 10^{-21}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \mathbf{elif}\;a \leq -4.4 \cdot 10^{-81}:\\ \;\;\;\;y - \frac{y - x}{\frac{t}{z - a}}\\ \mathbf{elif}\;a \leq -1.65 \cdot 10^{-101}:\\ \;\;\;\;\frac{y - x}{\frac{a - t}{z}}\\ \mathbf{elif}\;a \leq -8.6 \cdot 10^{-138}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq 1.02 \cdot 10^{+18}:\\ \;\;\;\;y - \frac{y - x}{\frac{t}{z - a}}\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{+45}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \mathbf{elif}\;a \leq 2.1 \cdot 10^{+54}:\\ \;\;\;\;y - \frac{y - x}{\frac{t}{z - a}}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{t - z}{\frac{a - t}{y}}\\ \end{array} \]

Alternative 4: 53.0% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(1 - \frac{z}{t}\right)\\ t_2 := x + \frac{z}{\frac{a}{y}}\\ \mathbf{if}\;a \leq -4.1 \cdot 10^{+98}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -1.5 \cdot 10^{-21}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;a \leq -1.04 \cdot 10^{-162}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -2.8 \cdot 10^{-190}:\\ \;\;\;\;\frac{-x}{\frac{t}{a - z}}\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{-237}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.35 \cdot 10^{-157}:\\ \;\;\;\;\frac{z}{\frac{t}{x - y}}\\ \mathbf{elif}\;a \leq 10^{+18}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (- 1.0 (/ z t)))) (t_2 (+ x (/ z (/ a y)))))
   (if (<= a -4.1e+98)
     t_2
     (if (<= a -1.5e-21)
       (* z (/ (- y x) a))
       (if (<= a -1.04e-162)
         t_1
         (if (<= a -2.8e-190)
           (/ (- x) (/ t (- a z)))
           (if (<= a 9.2e-237)
             t_1
             (if (<= a 2.35e-157)
               (/ z (/ t (- x y)))
               (if (<= a 1e+18) t_1 t_2)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (1.0 - (z / t));
	double t_2 = x + (z / (a / y));
	double tmp;
	if (a <= -4.1e+98) {
		tmp = t_2;
	} else if (a <= -1.5e-21) {
		tmp = z * ((y - x) / a);
	} else if (a <= -1.04e-162) {
		tmp = t_1;
	} else if (a <= -2.8e-190) {
		tmp = -x / (t / (a - z));
	} else if (a <= 9.2e-237) {
		tmp = t_1;
	} else if (a <= 2.35e-157) {
		tmp = z / (t / (x - y));
	} else if (a <= 1e+18) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = y * (1.0d0 - (z / t))
    t_2 = x + (z / (a / y))
    if (a <= (-4.1d+98)) then
        tmp = t_2
    else if (a <= (-1.5d-21)) then
        tmp = z * ((y - x) / a)
    else if (a <= (-1.04d-162)) then
        tmp = t_1
    else if (a <= (-2.8d-190)) then
        tmp = -x / (t / (a - z))
    else if (a <= 9.2d-237) then
        tmp = t_1
    else if (a <= 2.35d-157) then
        tmp = z / (t / (x - y))
    else if (a <= 1d+18) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (1.0 - (z / t));
	double t_2 = x + (z / (a / y));
	double tmp;
	if (a <= -4.1e+98) {
		tmp = t_2;
	} else if (a <= -1.5e-21) {
		tmp = z * ((y - x) / a);
	} else if (a <= -1.04e-162) {
		tmp = t_1;
	} else if (a <= -2.8e-190) {
		tmp = -x / (t / (a - z));
	} else if (a <= 9.2e-237) {
		tmp = t_1;
	} else if (a <= 2.35e-157) {
		tmp = z / (t / (x - y));
	} else if (a <= 1e+18) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * (1.0 - (z / t))
	t_2 = x + (z / (a / y))
	tmp = 0
	if a <= -4.1e+98:
		tmp = t_2
	elif a <= -1.5e-21:
		tmp = z * ((y - x) / a)
	elif a <= -1.04e-162:
		tmp = t_1
	elif a <= -2.8e-190:
		tmp = -x / (t / (a - z))
	elif a <= 9.2e-237:
		tmp = t_1
	elif a <= 2.35e-157:
		tmp = z / (t / (x - y))
	elif a <= 1e+18:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(1.0 - Float64(z / t)))
	t_2 = Float64(x + Float64(z / Float64(a / y)))
	tmp = 0.0
	if (a <= -4.1e+98)
		tmp = t_2;
	elseif (a <= -1.5e-21)
		tmp = Float64(z * Float64(Float64(y - x) / a));
	elseif (a <= -1.04e-162)
		tmp = t_1;
	elseif (a <= -2.8e-190)
		tmp = Float64(Float64(-x) / Float64(t / Float64(a - z)));
	elseif (a <= 9.2e-237)
		tmp = t_1;
	elseif (a <= 2.35e-157)
		tmp = Float64(z / Float64(t / Float64(x - y)));
	elseif (a <= 1e+18)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * (1.0 - (z / t));
	t_2 = x + (z / (a / y));
	tmp = 0.0;
	if (a <= -4.1e+98)
		tmp = t_2;
	elseif (a <= -1.5e-21)
		tmp = z * ((y - x) / a);
	elseif (a <= -1.04e-162)
		tmp = t_1;
	elseif (a <= -2.8e-190)
		tmp = -x / (t / (a - z));
	elseif (a <= 9.2e-237)
		tmp = t_1;
	elseif (a <= 2.35e-157)
		tmp = z / (t / (x - y));
	elseif (a <= 1e+18)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4.1e+98], t$95$2, If[LessEqual[a, -1.5e-21], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.04e-162], t$95$1, If[LessEqual[a, -2.8e-190], N[((-x) / N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9.2e-237], t$95$1, If[LessEqual[a, 2.35e-157], N[(z / N[(t / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1e+18], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1.5 \cdot 10^{-21}:\\
\;\;\;\;z \cdot \frac{y - x}{a}\\

\mathbf{elif}\;a \leq -1.04 \cdot 10^{-162}:\\
\;\;\;\;t_1\\

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

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

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

\mathbf{elif}\;a \leq 10^{+18}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -4.1e98 or 1e18 < a

    1. Initial program 65.3%

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

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

      \[\leadsto \color{blue}{x + \frac{y - x}{\frac{a - t}{z - t}}} \]
    4. Step-by-step derivation
      1. div-inv93.5%

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

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

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

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

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

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

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

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

    if -4.1e98 < a < -1.49999999999999996e-21

    1. Initial program 75.0%

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

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

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

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

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

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

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

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

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

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

    if -1.49999999999999996e-21 < a < -1.04000000000000001e-162 or -2.80000000000000005e-190 < a < 9.20000000000000046e-237 or 2.3500000000000001e-157 < a < 1e18

    1. Initial program 63.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{z - t}{\frac{t}{y - x}}} \]
    6. Simplified55.3%

      \[\leadsto \color{blue}{x - \frac{z - t}{\frac{t}{y - x}}} \]
    7. Taylor expanded in y around inf 60.6%

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

    if -1.04000000000000001e-162 < a < -2.80000000000000005e-190

    1. Initial program 59.9%

      \[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}{\frac{a - t}{z - t}}} \]
    3. Simplified61.1%

      \[\leadsto \color{blue}{x + \frac{y - x}{\frac{a - t}{z - t}}} \]
    4. Step-by-step derivation
      1. div-inv60.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.20000000000000046e-237 < a < 2.3500000000000001e-157

    1. Initial program 57.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z}{\frac{t}{x - y}}} \]
    10. Simplified62.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.1 \cdot 10^{+98}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq -1.5 \cdot 10^{-21}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;a \leq -1.04 \cdot 10^{-162}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{elif}\;a \leq -2.8 \cdot 10^{-190}:\\ \;\;\;\;\frac{-x}{\frac{t}{a - z}}\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{-237}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{elif}\;a \leq 2.35 \cdot 10^{-157}:\\ \;\;\;\;\frac{z}{\frac{t}{x - y}}\\ \mathbf{elif}\;a \leq 10^{+18}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y}}\\ \end{array} \]

Alternative 5: 52.9% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(1 - \frac{z}{t}\right)\\ t_2 := x + \frac{z}{\frac{a}{y}}\\ \mathbf{if}\;a \leq -1.1 \cdot 10^{+103}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -5 \cdot 10^{-22}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;a \leq -4.1 \cdot 10^{-156}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -2.8 \cdot 10^{-190}:\\ \;\;\;\;\frac{-x}{\frac{t}{a - z}}\\ \mathbf{elif}\;a \leq 1.42 \cdot 10^{-236}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{-158}:\\ \;\;\;\;z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;a \leq 8.8 \cdot 10^{+17}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (- 1.0 (/ z t)))) (t_2 (+ x (/ z (/ a y)))))
   (if (<= a -1.1e+103)
     t_2
     (if (<= a -5e-22)
       (* z (/ (- y x) a))
       (if (<= a -4.1e-156)
         t_1
         (if (<= a -2.8e-190)
           (/ (- x) (/ t (- a z)))
           (if (<= a 1.42e-236)
             t_1
             (if (<= a 3.6e-158)
               (* z (/ (- x y) t))
               (if (<= a 8.8e+17) t_1 t_2)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (1.0 - (z / t));
	double t_2 = x + (z / (a / y));
	double tmp;
	if (a <= -1.1e+103) {
		tmp = t_2;
	} else if (a <= -5e-22) {
		tmp = z * ((y - x) / a);
	} else if (a <= -4.1e-156) {
		tmp = t_1;
	} else if (a <= -2.8e-190) {
		tmp = -x / (t / (a - z));
	} else if (a <= 1.42e-236) {
		tmp = t_1;
	} else if (a <= 3.6e-158) {
		tmp = z * ((x - y) / t);
	} else if (a <= 8.8e+17) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = y * (1.0d0 - (z / t))
    t_2 = x + (z / (a / y))
    if (a <= (-1.1d+103)) then
        tmp = t_2
    else if (a <= (-5d-22)) then
        tmp = z * ((y - x) / a)
    else if (a <= (-4.1d-156)) then
        tmp = t_1
    else if (a <= (-2.8d-190)) then
        tmp = -x / (t / (a - z))
    else if (a <= 1.42d-236) then
        tmp = t_1
    else if (a <= 3.6d-158) then
        tmp = z * ((x - y) / t)
    else if (a <= 8.8d+17) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (1.0 - (z / t));
	double t_2 = x + (z / (a / y));
	double tmp;
	if (a <= -1.1e+103) {
		tmp = t_2;
	} else if (a <= -5e-22) {
		tmp = z * ((y - x) / a);
	} else if (a <= -4.1e-156) {
		tmp = t_1;
	} else if (a <= -2.8e-190) {
		tmp = -x / (t / (a - z));
	} else if (a <= 1.42e-236) {
		tmp = t_1;
	} else if (a <= 3.6e-158) {
		tmp = z * ((x - y) / t);
	} else if (a <= 8.8e+17) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * (1.0 - (z / t))
	t_2 = x + (z / (a / y))
	tmp = 0
	if a <= -1.1e+103:
		tmp = t_2
	elif a <= -5e-22:
		tmp = z * ((y - x) / a)
	elif a <= -4.1e-156:
		tmp = t_1
	elif a <= -2.8e-190:
		tmp = -x / (t / (a - z))
	elif a <= 1.42e-236:
		tmp = t_1
	elif a <= 3.6e-158:
		tmp = z * ((x - y) / t)
	elif a <= 8.8e+17:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(1.0 - Float64(z / t)))
	t_2 = Float64(x + Float64(z / Float64(a / y)))
	tmp = 0.0
	if (a <= -1.1e+103)
		tmp = t_2;
	elseif (a <= -5e-22)
		tmp = Float64(z * Float64(Float64(y - x) / a));
	elseif (a <= -4.1e-156)
		tmp = t_1;
	elseif (a <= -2.8e-190)
		tmp = Float64(Float64(-x) / Float64(t / Float64(a - z)));
	elseif (a <= 1.42e-236)
		tmp = t_1;
	elseif (a <= 3.6e-158)
		tmp = Float64(z * Float64(Float64(x - y) / t));
	elseif (a <= 8.8e+17)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * (1.0 - (z / t));
	t_2 = x + (z / (a / y));
	tmp = 0.0;
	if (a <= -1.1e+103)
		tmp = t_2;
	elseif (a <= -5e-22)
		tmp = z * ((y - x) / a);
	elseif (a <= -4.1e-156)
		tmp = t_1;
	elseif (a <= -2.8e-190)
		tmp = -x / (t / (a - z));
	elseif (a <= 1.42e-236)
		tmp = t_1;
	elseif (a <= 3.6e-158)
		tmp = z * ((x - y) / t);
	elseif (a <= 8.8e+17)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.1e+103], t$95$2, If[LessEqual[a, -5e-22], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -4.1e-156], t$95$1, If[LessEqual[a, -2.8e-190], N[((-x) / N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.42e-236], t$95$1, If[LessEqual[a, 3.6e-158], N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8.8e+17], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -5 \cdot 10^{-22}:\\
\;\;\;\;z \cdot \frac{y - x}{a}\\

\mathbf{elif}\;a \leq -4.1 \cdot 10^{-156}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 1.42 \cdot 10^{-236}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 8.8 \cdot 10^{+17}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -1.09999999999999996e103 or 8.8e17 < a

    1. Initial program 65.3%

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

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

      \[\leadsto \color{blue}{x + \frac{y - x}{\frac{a - t}{z - t}}} \]
    4. Step-by-step derivation
      1. div-inv93.5%

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

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

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

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

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

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

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

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

    if -1.09999999999999996e103 < a < -4.99999999999999954e-22

    1. Initial program 75.0%

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

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

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

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

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

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

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

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

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

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

    if -4.99999999999999954e-22 < a < -4.1000000000000002e-156 or -2.80000000000000005e-190 < a < 1.41999999999999996e-236 or 3.59999999999999991e-158 < a < 8.8e17

    1. Initial program 63.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{z - t}{\frac{t}{y - x}}} \]
    6. Simplified55.3%

      \[\leadsto \color{blue}{x - \frac{z - t}{\frac{t}{y - x}}} \]
    7. Taylor expanded in y around inf 60.6%

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

    if -4.1000000000000002e-156 < a < -2.80000000000000005e-190

    1. Initial program 59.9%

      \[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}{\frac{a - t}{z - t}}} \]
    3. Simplified61.1%

      \[\leadsto \color{blue}{x + \frac{y - x}{\frac{a - t}{z - t}}} \]
    4. Step-by-step derivation
      1. div-inv60.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.41999999999999996e-236 < a < 3.59999999999999991e-158

    1. Initial program 57.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.1 \cdot 10^{+103}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq -5 \cdot 10^{-22}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;a \leq -4.1 \cdot 10^{-156}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{elif}\;a \leq -2.8 \cdot 10^{-190}:\\ \;\;\;\;\frac{-x}{\frac{t}{a - z}}\\ \mathbf{elif}\;a \leq 1.42 \cdot 10^{-236}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{-158}:\\ \;\;\;\;z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;a \leq 8.8 \cdot 10^{+17}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y}}\\ \end{array} \]

Alternative 6: 72.5% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;a \leq -3 \cdot 10^{-68}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.7e132 or -2.49999999999999977e-22 < a < -3e-68 or 9.5e17 < a

    1. Initial program 63.8%

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

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

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

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

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

    if -2.7e132 < a < -2.49999999999999977e-22

    1. Initial program 77.1%

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

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

      \[\leadsto \color{blue}{x + \frac{y - x}{\frac{a - t}{z - t}}} \]
    4. Step-by-step derivation
      1. div-inv95.7%

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

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

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

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

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

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

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

    if -3e-68 < a < -5.5000000000000001e-106

    1. Initial program 58.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z}}} \]
    6. Simplified81.5%

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

    if -5.5000000000000001e-106 < a < 9.5e17

    1. Initial program 62.5%

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

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

      \[\leadsto \color{blue}{x + \frac{y - x}{\frac{a - t}{z - t}}} \]
    4. Step-by-step derivation
      1. div-inv73.6%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.7 \cdot 10^{+132}:\\ \;\;\;\;x - \frac{t - z}{\frac{a - t}{y}}\\ \mathbf{elif}\;a \leq -2.5 \cdot 10^{-22}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \mathbf{elif}\;a \leq -3 \cdot 10^{-68}:\\ \;\;\;\;x - \frac{t - z}{\frac{a - t}{y}}\\ \mathbf{elif}\;a \leq -5.5 \cdot 10^{-106}:\\ \;\;\;\;\frac{y - x}{\frac{a - t}{z}}\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{+17}:\\ \;\;\;\;y + \frac{\left(y - x\right) \cdot \left(a - z\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{t - z}{\frac{a - t}{y}}\\ \end{array} \]

Alternative 7: 63.4% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(\frac{t - z}{a - t} + 1\right)\\ \mathbf{if}\;x \leq -12:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 1.05 \cdot 10^{-27}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;x \leq 1.6 \cdot 10^{+70} \lor \neg \left(x \leq 3.9 \cdot 10^{+123}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (+ (/ (- t z) (- a t)) 1.0))))
   (if (<= x -12.0)
     t_1
     (if (<= x 1.05e-27)
       (* y (/ (- z t) (- a t)))
       (if (or (<= x 1.6e+70) (not (<= x 3.9e+123)))
         t_1
         (* (- z t) (/ y (- a t))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (((t - z) / (a - t)) + 1.0);
	double tmp;
	if (x <= -12.0) {
		tmp = t_1;
	} else if (x <= 1.05e-27) {
		tmp = y * ((z - t) / (a - t));
	} else if ((x <= 1.6e+70) || !(x <= 3.9e+123)) {
		tmp = t_1;
	} else {
		tmp = (z - t) * (y / (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) :: tmp
    t_1 = x * (((t - z) / (a - t)) + 1.0d0)
    if (x <= (-12.0d0)) then
        tmp = t_1
    else if (x <= 1.05d-27) then
        tmp = y * ((z - t) / (a - t))
    else if ((x <= 1.6d+70) .or. (.not. (x <= 3.9d+123))) then
        tmp = t_1
    else
        tmp = (z - t) * (y / (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 * (((t - z) / (a - t)) + 1.0);
	double tmp;
	if (x <= -12.0) {
		tmp = t_1;
	} else if (x <= 1.05e-27) {
		tmp = y * ((z - t) / (a - t));
	} else if ((x <= 1.6e+70) || !(x <= 3.9e+123)) {
		tmp = t_1;
	} else {
		tmp = (z - t) * (y / (a - t));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (((t - z) / (a - t)) + 1.0)
	tmp = 0
	if x <= -12.0:
		tmp = t_1
	elif x <= 1.05e-27:
		tmp = y * ((z - t) / (a - t))
	elif (x <= 1.6e+70) or not (x <= 3.9e+123):
		tmp = t_1
	else:
		tmp = (z - t) * (y / (a - t))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(Float64(Float64(t - z) / Float64(a - t)) + 1.0))
	tmp = 0.0
	if (x <= -12.0)
		tmp = t_1;
	elseif (x <= 1.05e-27)
		tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t)));
	elseif ((x <= 1.6e+70) || !(x <= 3.9e+123))
		tmp = t_1;
	else
		tmp = Float64(Float64(z - t) * Float64(y / Float64(a - t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (((t - z) / (a - t)) + 1.0);
	tmp = 0.0;
	if (x <= -12.0)
		tmp = t_1;
	elseif (x <= 1.05e-27)
		tmp = y * ((z - t) / (a - t));
	elseif ((x <= 1.6e+70) || ~((x <= 3.9e+123)))
		tmp = t_1;
	else
		tmp = (z - t) * (y / (a - t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(N[(N[(t - z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -12.0], t$95$1, If[LessEqual[x, 1.05e-27], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, 1.6e+70], N[Not[LessEqual[x, 3.9e+123]], $MachinePrecision]], t$95$1, N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;x \leq 1.6 \cdot 10^{+70} \lor \neg \left(x \leq 3.9 \cdot 10^{+123}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -12 or 1.05000000000000008e-27 < x < 1.6000000000000001e70 or 3.89999999999999993e123 < x

    1. Initial program 60.3%

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

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

      \[\leadsto \color{blue}{x + \frac{y - x}{\frac{a - t}{z - t}}} \]
    4. Step-by-step derivation
      1. div-inv82.2%

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

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

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

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

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

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

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

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

    if -12 < x < 1.05000000000000008e-27

    1. Initial program 70.2%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{a - t}} \cdot y \]
      2. *-commutative75.7%

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

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

    if 1.6000000000000001e70 < x < 3.89999999999999993e123

    1. Initial program 39.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -12:\\ \;\;\;\;x \cdot \left(\frac{t - z}{a - t} + 1\right)\\ \mathbf{elif}\;x \leq 1.05 \cdot 10^{-27}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;x \leq 1.6 \cdot 10^{+70} \lor \neg \left(x \leq 3.9 \cdot 10^{+123}\right):\\ \;\;\;\;x \cdot \left(\frac{t - z}{a - t} + 1\right)\\ \mathbf{else}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \end{array} \]

Alternative 8: 36.5% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.5 \cdot 10^{+99}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.65 \cdot 10^{-21}:\\ \;\;\;\;z \cdot \frac{-x}{a}\\ \mathbf{elif}\;a \leq -1.55 \cdot 10^{-49}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq -1.8 \cdot 10^{-117}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{elif}\;a \leq 1.75 \cdot 10^{-244}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 4.4 \cdot 10^{-158}:\\ \;\;\;\;\frac{z}{\frac{t}{x}}\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{+51}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -1.5e+99)
   x
   (if (<= a -1.65e-21)
     (* z (/ (- x) a))
     (if (<= a -1.55e-49)
       y
       (if (<= a -1.8e-117)
         (* x (/ z t))
         (if (<= a 1.75e-244)
           y
           (if (<= a 4.4e-158) (/ z (/ t x)) (if (<= a 2.6e+51) y x))))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1.5e+99) {
		tmp = x;
	} else if (a <= -1.65e-21) {
		tmp = z * (-x / a);
	} else if (a <= -1.55e-49) {
		tmp = y;
	} else if (a <= -1.8e-117) {
		tmp = x * (z / t);
	} else if (a <= 1.75e-244) {
		tmp = y;
	} else if (a <= 4.4e-158) {
		tmp = z / (t / x);
	} else if (a <= 2.6e+51) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (a <= (-1.5d+99)) then
        tmp = x
    else if (a <= (-1.65d-21)) then
        tmp = z * (-x / a)
    else if (a <= (-1.55d-49)) then
        tmp = y
    else if (a <= (-1.8d-117)) then
        tmp = x * (z / t)
    else if (a <= 1.75d-244) then
        tmp = y
    else if (a <= 4.4d-158) then
        tmp = z / (t / x)
    else if (a <= 2.6d+51) then
        tmp = y
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1.5e+99) {
		tmp = x;
	} else if (a <= -1.65e-21) {
		tmp = z * (-x / a);
	} else if (a <= -1.55e-49) {
		tmp = y;
	} else if (a <= -1.8e-117) {
		tmp = x * (z / t);
	} else if (a <= 1.75e-244) {
		tmp = y;
	} else if (a <= 4.4e-158) {
		tmp = z / (t / x);
	} else if (a <= 2.6e+51) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -1.5e+99:
		tmp = x
	elif a <= -1.65e-21:
		tmp = z * (-x / a)
	elif a <= -1.55e-49:
		tmp = y
	elif a <= -1.8e-117:
		tmp = x * (z / t)
	elif a <= 1.75e-244:
		tmp = y
	elif a <= 4.4e-158:
		tmp = z / (t / x)
	elif a <= 2.6e+51:
		tmp = y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -1.5e+99)
		tmp = x;
	elseif (a <= -1.65e-21)
		tmp = Float64(z * Float64(Float64(-x) / a));
	elseif (a <= -1.55e-49)
		tmp = y;
	elseif (a <= -1.8e-117)
		tmp = Float64(x * Float64(z / t));
	elseif (a <= 1.75e-244)
		tmp = y;
	elseif (a <= 4.4e-158)
		tmp = Float64(z / Float64(t / x));
	elseif (a <= 2.6e+51)
		tmp = y;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -1.5e+99)
		tmp = x;
	elseif (a <= -1.65e-21)
		tmp = z * (-x / a);
	elseif (a <= -1.55e-49)
		tmp = y;
	elseif (a <= -1.8e-117)
		tmp = x * (z / t);
	elseif (a <= 1.75e-244)
		tmp = y;
	elseif (a <= 4.4e-158)
		tmp = z / (t / x);
	elseif (a <= 2.6e+51)
		tmp = y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.5e+99], x, If[LessEqual[a, -1.65e-21], N[(z * N[((-x) / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.55e-49], y, If[LessEqual[a, -1.8e-117], N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.75e-244], y, If[LessEqual[a, 4.4e-158], N[(z / N[(t / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.6e+51], y, x]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.5 \cdot 10^{+99}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;a \leq -1.55 \cdot 10^{-49}:\\
\;\;\;\;y\\

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

\mathbf{elif}\;a \leq 1.75 \cdot 10^{-244}:\\
\;\;\;\;y\\

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

\mathbf{elif}\;a \leq 2.6 \cdot 10^{+51}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -1.50000000000000007e99 or 2.6000000000000001e51 < a

    1. Initial program 64.3%

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

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

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

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

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

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

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

    if -1.50000000000000007e99 < a < -1.65000000000000004e-21

    1. Initial program 75.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \color{blue}{\frac{-x}{a}} \]
    10. Simplified48.8%

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

    if -1.65000000000000004e-21 < a < -1.55e-49 or -1.8e-117 < a < 1.74999999999999996e-244 or 4.4000000000000002e-158 < a < 2.6000000000000001e51

    1. Initial program 64.1%

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

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

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

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

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

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

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

    if -1.55e-49 < a < -1.8e-117

    1. Initial program 62.9%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x - \frac{z - t}{\frac{t}{y - x}}} \]
    7. Taylor expanded in x around -inf 26.1%

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

        \[\leadsto \color{blue}{\frac{z}{\frac{t}{x}}} \]
    9. Simplified38.0%

      \[\leadsto \color{blue}{\frac{z}{\frac{t}{x}}} \]
    10. Step-by-step derivation
      1. associate-/r/38.0%

        \[\leadsto \color{blue}{\frac{z}{t} \cdot x} \]
    11. Applied egg-rr38.0%

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

    if 1.74999999999999996e-244 < a < 4.4000000000000002e-158

    1. Initial program 57.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{z - t}{\frac{t}{y - x}}} \]
    6. Simplified45.6%

      \[\leadsto \color{blue}{x - \frac{z - t}{\frac{t}{y - x}}} \]
    7. Taylor expanded in x around -inf 36.4%

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

        \[\leadsto \color{blue}{\frac{z}{\frac{t}{x}}} \]
    9. Simplified46.7%

      \[\leadsto \color{blue}{\frac{z}{\frac{t}{x}}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification47.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.5 \cdot 10^{+99}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.65 \cdot 10^{-21}:\\ \;\;\;\;z \cdot \frac{-x}{a}\\ \mathbf{elif}\;a \leq -1.55 \cdot 10^{-49}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq -1.8 \cdot 10^{-117}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{elif}\;a \leq 1.75 \cdot 10^{-244}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 4.4 \cdot 10^{-158}:\\ \;\;\;\;\frac{z}{\frac{t}{x}}\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{+51}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 9: 41.1% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{z}{t}\\ \mathbf{if}\;t \leq -4.6 \cdot 10^{+136}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -1.7 \cdot 10^{-5}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -4.2 \cdot 10^{-52}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq -1.18 \cdot 10^{-60}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-120}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{+103}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (/ z t))))
   (if (<= t -4.6e+136)
     y
     (if (<= t -1.7e-5)
       t_1
       (if (<= t -4.2e-52)
         x
         (if (<= t -1.18e-60)
           t_1
           (if (<= t 2.2e-120)
             (* z (/ (- y x) a))
             (if (<= t 8.5e+103) x y))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (z / t);
	double tmp;
	if (t <= -4.6e+136) {
		tmp = y;
	} else if (t <= -1.7e-5) {
		tmp = t_1;
	} else if (t <= -4.2e-52) {
		tmp = x;
	} else if (t <= -1.18e-60) {
		tmp = t_1;
	} else if (t <= 2.2e-120) {
		tmp = z * ((y - x) / a);
	} else if (t <= 8.5e+103) {
		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) :: t_1
    real(8) :: tmp
    t_1 = x * (z / t)
    if (t <= (-4.6d+136)) then
        tmp = y
    else if (t <= (-1.7d-5)) then
        tmp = t_1
    else if (t <= (-4.2d-52)) then
        tmp = x
    else if (t <= (-1.18d-60)) then
        tmp = t_1
    else if (t <= 2.2d-120) then
        tmp = z * ((y - x) / a)
    else if (t <= 8.5d+103) 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 t_1 = x * (z / t);
	double tmp;
	if (t <= -4.6e+136) {
		tmp = y;
	} else if (t <= -1.7e-5) {
		tmp = t_1;
	} else if (t <= -4.2e-52) {
		tmp = x;
	} else if (t <= -1.18e-60) {
		tmp = t_1;
	} else if (t <= 2.2e-120) {
		tmp = z * ((y - x) / a);
	} else if (t <= 8.5e+103) {
		tmp = x;
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (z / t)
	tmp = 0
	if t <= -4.6e+136:
		tmp = y
	elif t <= -1.7e-5:
		tmp = t_1
	elif t <= -4.2e-52:
		tmp = x
	elif t <= -1.18e-60:
		tmp = t_1
	elif t <= 2.2e-120:
		tmp = z * ((y - x) / a)
	elif t <= 8.5e+103:
		tmp = x
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(z / t))
	tmp = 0.0
	if (t <= -4.6e+136)
		tmp = y;
	elseif (t <= -1.7e-5)
		tmp = t_1;
	elseif (t <= -4.2e-52)
		tmp = x;
	elseif (t <= -1.18e-60)
		tmp = t_1;
	elseif (t <= 2.2e-120)
		tmp = Float64(z * Float64(Float64(y - x) / a));
	elseif (t <= 8.5e+103)
		tmp = x;
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (z / t);
	tmp = 0.0;
	if (t <= -4.6e+136)
		tmp = y;
	elseif (t <= -1.7e-5)
		tmp = t_1;
	elseif (t <= -4.2e-52)
		tmp = x;
	elseif (t <= -1.18e-60)
		tmp = t_1;
	elseif (t <= 2.2e-120)
		tmp = z * ((y - x) / a);
	elseif (t <= 8.5e+103)
		tmp = x;
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.6e+136], y, If[LessEqual[t, -1.7e-5], t$95$1, If[LessEqual[t, -4.2e-52], x, If[LessEqual[t, -1.18e-60], t$95$1, If[LessEqual[t, 2.2e-120], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.5e+103], x, y]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -1.7 \cdot 10^{-5}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -4.2 \cdot 10^{-52}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq -1.18 \cdot 10^{-60}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -4.6e136 or 8.4999999999999992e103 < t

    1. Initial program 23.1%

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

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

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

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

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

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

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

    if -4.6e136 < t < -1.7e-5 or -4.1999999999999997e-52 < t < -1.17999999999999994e-60

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{z - t}{\frac{t}{y - x}}} \]
    6. Simplified53.1%

      \[\leadsto \color{blue}{x - \frac{z - t}{\frac{t}{y - x}}} \]
    7. Taylor expanded in x around -inf 39.3%

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

        \[\leadsto \color{blue}{\frac{z}{\frac{t}{x}}} \]
    9. Simplified42.2%

      \[\leadsto \color{blue}{\frac{z}{\frac{t}{x}}} \]
    10. Step-by-step derivation
      1. associate-/r/44.9%

        \[\leadsto \color{blue}{\frac{z}{t} \cdot x} \]
    11. Applied egg-rr44.9%

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

    if -1.7e-5 < t < -4.1999999999999997e-52 or 2.20000000000000012e-120 < t < 8.4999999999999992e103

    1. Initial program 84.8%

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

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

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

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

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

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

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

    if -1.17999999999999994e-60 < t < 2.20000000000000012e-120

    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-*r/97.6%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.6 \cdot 10^{+136}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -1.7 \cdot 10^{-5}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{elif}\;t \leq -4.2 \cdot 10^{-52}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq -1.18 \cdot 10^{-60}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-120}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{+103}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 10: 53.4% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \leq -1 \cdot 10^{-21}:\\
\;\;\;\;z \cdot \frac{y - x}{a}\\

\mathbf{elif}\;a \leq 2.32 \cdot 10^{-237}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 1.02 \cdot 10^{+18}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.12e98 or 1.02e18 < a

    1. Initial program 65.3%

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

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

      \[\leadsto \color{blue}{x + \frac{y - x}{\frac{a - t}{z - t}}} \]
    4. Step-by-step derivation
      1. div-inv93.5%

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

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

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

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

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

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

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

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

    if -1.12e98 < a < -9.99999999999999908e-22

    1. Initial program 75.0%

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

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

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

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

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

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

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

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

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

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

    if -9.99999999999999908e-22 < a < 2.3199999999999999e-237 or 3.8000000000000001e-154 < a < 1.02e18

    1. Initial program 62.8%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{z - t}{\frac{t}{y - x}}} \]
    6. Simplified55.5%

      \[\leadsto \color{blue}{x - \frac{z - t}{\frac{t}{y - x}}} \]
    7. Taylor expanded in y around inf 58.0%

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

    if 2.3199999999999999e-237 < a < 3.8000000000000001e-154

    1. Initial program 57.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z}{\frac{t}{x - y}}} \]
    10. Simplified62.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.12 \cdot 10^{+98}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq -1 \cdot 10^{-21}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;a \leq 2.32 \cdot 10^{-237}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{-154}:\\ \;\;\;\;\frac{z}{\frac{t}{x - y}}\\ \mathbf{elif}\;a \leq 1.02 \cdot 10^{+18}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y}}\\ \end{array} \]

Alternative 11: 63.8% accurate, 0.8× 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.55 \cdot 10^{+143}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -2.65 \cdot 10^{+114}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.15 \cdot 10^{-5}:\\ \;\;\;\;\frac{z}{\frac{t}{x - y}}\\ \mathbf{elif}\;t \leq 2 \cdot 10^{+69}:\\ \;\;\;\;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) (- a t)))))
   (if (<= t -2.55e+143)
     t_2
     (if (<= t -2.65e+114)
       t_1
       (if (<= t -1.15e-5) (/ z (/ t (- x y))) (if (<= t 2e+69) 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) / (a - t));
	double tmp;
	if (t <= -2.55e+143) {
		tmp = t_2;
	} else if (t <= -2.65e+114) {
		tmp = t_1;
	} else if (t <= -1.15e-5) {
		tmp = z / (t / (x - y));
	} else if (t <= 2e+69) {
		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) / (a - t))
    if (t <= (-2.55d+143)) then
        tmp = t_2
    else if (t <= (-2.65d+114)) then
        tmp = t_1
    else if (t <= (-1.15d-5)) then
        tmp = z / (t / (x - y))
    else if (t <= 2d+69) 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) / (a - t));
	double tmp;
	if (t <= -2.55e+143) {
		tmp = t_2;
	} else if (t <= -2.65e+114) {
		tmp = t_1;
	} else if (t <= -1.15e-5) {
		tmp = z / (t / (x - y));
	} else if (t <= 2e+69) {
		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) / (a - t))
	tmp = 0
	if t <= -2.55e+143:
		tmp = t_2
	elif t <= -2.65e+114:
		tmp = t_1
	elif t <= -1.15e-5:
		tmp = z / (t / (x - y))
	elif t <= 2e+69:
		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(Float64(z - t) / Float64(a - t)))
	tmp = 0.0
	if (t <= -2.55e+143)
		tmp = t_2;
	elseif (t <= -2.65e+114)
		tmp = t_1;
	elseif (t <= -1.15e-5)
		tmp = Float64(z / Float64(t / Float64(x - y)));
	elseif (t <= 2e+69)
		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) / (a - t));
	tmp = 0.0;
	if (t <= -2.55e+143)
		tmp = t_2;
	elseif (t <= -2.65e+114)
		tmp = t_1;
	elseif (t <= -1.15e-5)
		tmp = z / (t / (x - y));
	elseif (t <= 2e+69)
		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[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.55e+143], t$95$2, If[LessEqual[t, -2.65e+114], t$95$1, If[LessEqual[t, -1.15e-5], N[(z / N[(t / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2e+69], t$95$1, t$95$2]]]]]]
\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.55 \cdot 10^{+143}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq -2.65 \cdot 10^{+114}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 2 \cdot 10^{+69}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.55000000000000019e143 or 2.0000000000000001e69 < t

    1. Initial program 27.3%

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

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

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

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

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

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

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

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

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

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

    if -2.55000000000000019e143 < t < -2.65e114 or -1.15e-5 < t < 2.0000000000000001e69

    1. Initial program 87.8%

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

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

      \[\leadsto \color{blue}{x + \frac{y - x}{\frac{a - t}{z - t}}} \]
    4. Step-by-step derivation
      1. div-inv96.8%

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

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

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

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

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

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

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

    if -2.65e114 < t < -1.15e-5

    1. Initial program 63.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.55 \cdot 10^{+143}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;t \leq -2.65 \cdot 10^{+114}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \mathbf{elif}\;t \leq -1.15 \cdot 10^{-5}:\\ \;\;\;\;\frac{z}{\frac{t}{x - y}}\\ \mathbf{elif}\;t \leq 2 \cdot 10^{+69}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \end{array} \]

Alternative 12: 64.0% accurate, 0.8× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.55000000000000019e143 or 2.30000000000000013e98 < t

    1. Initial program 24.2%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{a - t}} \cdot y \]
      2. *-commutative68.6%

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

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

    if -2.55000000000000019e143 < t < -8.6000000000000007e113

    1. Initial program 61.7%

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

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

      \[\leadsto \color{blue}{x + \frac{y - x}{\frac{a - t}{z - t}}} \]
    4. Step-by-step derivation
      1. div-inv90.1%

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

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

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

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

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

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

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

    if -8.6000000000000007e113 < t < -2.9000000000000002e-6

    1. Initial program 63.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.9000000000000002e-6 < t < 2.30000000000000013e98

    1. Initial program 89.5%

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a}{z}}} \]
    6. Simplified73.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.55 \cdot 10^{+143}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;t \leq -8.6 \cdot 10^{+113}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \mathbf{elif}\;t \leq -2.9 \cdot 10^{-6}:\\ \;\;\;\;\frac{z}{\frac{t}{x - y}}\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{+98}:\\ \;\;\;\;x - \frac{x - y}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \end{array} \]

Alternative 13: 64.0% accurate, 0.8× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -2.55000000000000019e143

    1. Initial program 30.1%

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

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

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

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

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

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

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

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

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

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

    if -2.55000000000000019e143 < t < -8.5000000000000001e113

    1. Initial program 61.7%

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

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

      \[\leadsto \color{blue}{x + \frac{y - x}{\frac{a - t}{z - t}}} \]
    4. Step-by-step derivation
      1. div-inv90.1%

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

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

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

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

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

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

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

    if -8.5000000000000001e113 < t < -4.89999999999999967e-6

    1. Initial program 63.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.89999999999999967e-6 < t < 2e98

    1. Initial program 89.5%

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a}{z}}} \]
    6. Simplified73.1%

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

    if 2e98 < t

    1. Initial program 20.0%

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

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

      \[\leadsto \color{blue}{x + \frac{y - x}{\frac{a - t}{z - t}}} \]
    4. Step-by-step derivation
      1. div-inv71.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.55 \cdot 10^{+143}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;t \leq -8.5 \cdot 10^{+113}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \mathbf{elif}\;t \leq -4.9 \cdot 10^{-6}:\\ \;\;\;\;\frac{z}{\frac{t}{x - y}}\\ \mathbf{elif}\;t \leq 2 \cdot 10^{+98}:\\ \;\;\;\;x - \frac{x - y}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\frac{a - t}{z - t}}\\ \end{array} \]

Alternative 14: 69.7% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.7e-44 or 2.70000000000000007e-24 < y

    1. Initial program 61.5%

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

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

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

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

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

    if -3.7e-44 < y < 2.49999999999999983e-125

    1. Initial program 68.1%

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

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

      \[\leadsto \color{blue}{x + \frac{y - x}{\frac{a - t}{z - t}}} \]
    4. Step-by-step derivation
      1. div-inv74.5%

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

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

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

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

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

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

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

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

    if 2.49999999999999983e-125 < y < 2.70000000000000007e-24

    1. Initial program 70.5%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{1} \cdot \frac{z}{a - t}} \]
    8. Applied egg-rr79.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.7 \cdot 10^{-44}:\\ \;\;\;\;x - \frac{t - z}{\frac{a - t}{y}}\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{-125}:\\ \;\;\;\;x \cdot \left(\frac{t - z}{a - t} + 1\right)\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{-24}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{t - z}{\frac{a - t}{y}}\\ \end{array} \]

Alternative 15: 88.3% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.15000000000000008e206 or 4.59999999999999989e207 < t

    1. Initial program 21.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.15000000000000008e206 < t < 4.59999999999999989e207

    1. Initial program 73.6%

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

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

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

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

Alternative 16: 48.1% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{if}\;t \leq -2.55 \cdot 10^{+143}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -1.7 \cdot 10^{-235}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-260}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{+100}:\\ \;\;\;\;t_1\\ \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 -2.55e+143)
     y
     (if (<= t -1.7e-235)
       t_1
       (if (<= t 7e-260) (* z (/ (- y x) a)) (if (<= t 4.2e+100) t_1 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 <= -2.55e+143) {
		tmp = y;
	} else if (t <= -1.7e-235) {
		tmp = t_1;
	} else if (t <= 7e-260) {
		tmp = z * ((y - x) / a);
	} else if (t <= 4.2e+100) {
		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 * (1.0d0 - (z / a))
    if (t <= (-2.55d+143)) then
        tmp = y
    else if (t <= (-1.7d-235)) then
        tmp = t_1
    else if (t <= 7d-260) then
        tmp = z * ((y - x) / a)
    else if (t <= 4.2d+100) 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 * (1.0 - (z / a));
	double tmp;
	if (t <= -2.55e+143) {
		tmp = y;
	} else if (t <= -1.7e-235) {
		tmp = t_1;
	} else if (t <= 7e-260) {
		tmp = z * ((y - x) / a);
	} else if (t <= 4.2e+100) {
		tmp = t_1;
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (z / a))
	tmp = 0
	if t <= -2.55e+143:
		tmp = y
	elif t <= -1.7e-235:
		tmp = t_1
	elif t <= 7e-260:
		tmp = z * ((y - x) / a)
	elif t <= 4.2e+100:
		tmp = t_1
	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 <= -2.55e+143)
		tmp = y;
	elseif (t <= -1.7e-235)
		tmp = t_1;
	elseif (t <= 7e-260)
		tmp = Float64(z * Float64(Float64(y - x) / a));
	elseif (t <= 4.2e+100)
		tmp = t_1;
	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 <= -2.55e+143)
		tmp = y;
	elseif (t <= -1.7e-235)
		tmp = t_1;
	elseif (t <= 7e-260)
		tmp = z * ((y - x) / a);
	elseif (t <= 4.2e+100)
		tmp = t_1;
	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, -2.55e+143], y, If[LessEqual[t, -1.7e-235], t$95$1, If[LessEqual[t, 7e-260], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.2e+100], t$95$1, y]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -1.7 \cdot 10^{-235}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 4.2 \cdot 10^{+100}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.55000000000000019e143 or 4.1999999999999997e100 < t

    1. Initial program 24.2%

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

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

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

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

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

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

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

    if -2.55000000000000019e143 < t < -1.69999999999999986e-235 or 6.9999999999999999e-260 < t < 4.1999999999999997e100

    1. Initial program 84.2%

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

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

      \[\leadsto \color{blue}{x + \frac{y - x}{\frac{a - t}{z - t}}} \]
    4. Step-by-step derivation
      1. div-inv94.7%

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

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

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

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

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

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

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

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

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

    if -1.69999999999999986e-235 < t < 6.9999999999999999e-260

    1. Initial program 86.8%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.55 \cdot 10^{+143}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -1.7 \cdot 10^{-235}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-260}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{+100}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 17: 65.1% accurate, 0.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -8.1000000000000001e145

    1. Initial program 30.1%

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

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

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

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

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

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

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

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

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

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

    if -8.1000000000000001e145 < t < -8.99999999999999959e-7

    1. Initial program 63.0%

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

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

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

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

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

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

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

        \[\leadsto z \cdot \color{blue}{\frac{y - x}{a - t}} \]
      2. *-commutative54.9%

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

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z}}} \]
    6. Simplified58.0%

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

    if -8.99999999999999959e-7 < t < 1.4e98

    1. Initial program 89.5%

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a}{z}}} \]
    6. Simplified73.1%

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

    if 1.4e98 < t

    1. Initial program 20.0%

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

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

      \[\leadsto \color{blue}{x + \frac{y - x}{\frac{a - t}{z - t}}} \]
    4. Step-by-step derivation
      1. div-inv71.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8.1 \cdot 10^{+145}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;t \leq -9 \cdot 10^{-7}:\\ \;\;\;\;\frac{y - x}{\frac{a - t}{z}}\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{+98}:\\ \;\;\;\;x - \frac{x - y}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\frac{a - t}{z - t}}\\ \end{array} \]

Alternative 18: 37.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.1 \cdot 10^{+115}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;a \leq 3.35 \cdot 10^{-196}:\\
\;\;\;\;y\\

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

\mathbf{elif}\;a \leq 1.6 \cdot 10^{+52}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.1e115 or 1.6e52 < a

    1. Initial program 62.9%

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

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

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

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

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

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

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

    if -1.1e115 < a < -1.02000000000000004e-21

    1. Initial program 80.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.02000000000000004e-21 < a < 3.3499999999999998e-196 or 3.39999999999999984e-152 < a < 1.6e52

    1. Initial program 62.4%

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

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

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

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

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

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

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

    if 3.3499999999999998e-196 < a < 3.39999999999999984e-152

    1. Initial program 70.8%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x + -1 \cdot \frac{\left(z - t\right) \cdot \left(y - x\right)}{t}} \]
      2. mul-1-neg60.0%

        \[\leadsto x + \color{blue}{\left(-\frac{\left(z - t\right) \cdot \left(y - x\right)}{t}\right)} \]
      3. unsub-neg60.0%

        \[\leadsto \color{blue}{x - \frac{\left(z - t\right) \cdot \left(y - x\right)}{t}} \]
      4. associate-/l*50.6%

        \[\leadsto x - \color{blue}{\frac{z - t}{\frac{t}{y - x}}} \]
    6. Simplified50.6%

      \[\leadsto \color{blue}{x - \frac{z - t}{\frac{t}{y - x}}} \]
    7. Taylor expanded in x around -inf 31.8%

      \[\leadsto \color{blue}{\frac{z \cdot x}{t}} \]
    8. Step-by-step derivation
      1. associate-/l*50.6%

        \[\leadsto \color{blue}{\frac{z}{\frac{t}{x}}} \]
    9. Simplified50.6%

      \[\leadsto \color{blue}{\frac{z}{\frac{t}{x}}} \]
    10. Step-by-step derivation
      1. associate-/r/50.8%

        \[\leadsto \color{blue}{\frac{z}{t} \cdot x} \]
    11. Applied egg-rr50.8%

      \[\leadsto \color{blue}{\frac{z}{t} \cdot x} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification45.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.1 \cdot 10^{+115}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.02 \cdot 10^{-21}:\\ \;\;\;\;z \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 3.35 \cdot 10^{-196}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 3.4 \cdot 10^{-152}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{elif}\;a \leq 1.6 \cdot 10^{+52}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 19: 37.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2.4 \cdot 10^{+115}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -8 \cdot 10^{-22}:\\ \;\;\;\;z \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 4.2 \cdot 10^{-237}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{-157}:\\ \;\;\;\;\frac{z}{\frac{t}{x}}\\ \mathbf{elif}\;a \leq 4.6 \cdot 10^{+52}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -2.4e+115)
   x
   (if (<= a -8e-22)
     (* z (/ y a))
     (if (<= a 4.2e-237)
       y
       (if (<= a 1.15e-157) (/ z (/ t x)) (if (<= a 4.6e+52) y x))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -2.4e+115) {
		tmp = x;
	} else if (a <= -8e-22) {
		tmp = z * (y / a);
	} else if (a <= 4.2e-237) {
		tmp = y;
	} else if (a <= 1.15e-157) {
		tmp = z / (t / x);
	} else if (a <= 4.6e+52) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (a <= (-2.4d+115)) then
        tmp = x
    else if (a <= (-8d-22)) then
        tmp = z * (y / a)
    else if (a <= 4.2d-237) then
        tmp = y
    else if (a <= 1.15d-157) then
        tmp = z / (t / x)
    else if (a <= 4.6d+52) then
        tmp = y
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -2.4e+115) {
		tmp = x;
	} else if (a <= -8e-22) {
		tmp = z * (y / a);
	} else if (a <= 4.2e-237) {
		tmp = y;
	} else if (a <= 1.15e-157) {
		tmp = z / (t / x);
	} else if (a <= 4.6e+52) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -2.4e+115:
		tmp = x
	elif a <= -8e-22:
		tmp = z * (y / a)
	elif a <= 4.2e-237:
		tmp = y
	elif a <= 1.15e-157:
		tmp = z / (t / x)
	elif a <= 4.6e+52:
		tmp = y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -2.4e+115)
		tmp = x;
	elseif (a <= -8e-22)
		tmp = Float64(z * Float64(y / a));
	elseif (a <= 4.2e-237)
		tmp = y;
	elseif (a <= 1.15e-157)
		tmp = Float64(z / Float64(t / x));
	elseif (a <= 4.6e+52)
		tmp = y;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -2.4e+115)
		tmp = x;
	elseif (a <= -8e-22)
		tmp = z * (y / a);
	elseif (a <= 4.2e-237)
		tmp = y;
	elseif (a <= 1.15e-157)
		tmp = z / (t / x);
	elseif (a <= 4.6e+52)
		tmp = y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.4e+115], x, If[LessEqual[a, -8e-22], N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.2e-237], y, If[LessEqual[a, 1.15e-157], N[(z / N[(t / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.6e+52], y, x]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.4 \cdot 10^{+115}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -8 \cdot 10^{-22}:\\
\;\;\;\;z \cdot \frac{y}{a}\\

\mathbf{elif}\;a \leq 4.2 \cdot 10^{-237}:\\
\;\;\;\;y\\

\mathbf{elif}\;a \leq 1.15 \cdot 10^{-157}:\\
\;\;\;\;\frac{z}{\frac{t}{x}}\\

\mathbf{elif}\;a \leq 4.6 \cdot 10^{+52}:\\
\;\;\;\;y\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.4e115 or 4.6e52 < a

    1. Initial program 62.9%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative62.9%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-*r/93.6%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} + x \]
      3. *-commutative93.6%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      4. fma-def93.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    3. Simplified93.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in a around inf 54.5%

      \[\leadsto \color{blue}{x} \]

    if -2.4e115 < a < -8.0000000000000004e-22

    1. Initial program 80.1%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative80.1%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-*r/99.5%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} + x \]
      3. *-commutative99.5%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      4. fma-def99.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    3. Simplified99.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in z around inf 79.2%

      \[\leadsto \color{blue}{z \cdot \left(\frac{y}{a - t} - \frac{x}{a - t}\right)} \]
    5. Step-by-step derivation
      1. div-sub79.2%

        \[\leadsto z \cdot \color{blue}{\frac{y - x}{a - t}} \]
      2. *-commutative79.2%

        \[\leadsto \color{blue}{\frac{y - x}{a - t} \cdot z} \]
      3. associate-*l/59.5%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{a - t}} \]
    6. Simplified59.5%

      \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{a - t}} \]
    7. Taylor expanded in a around inf 59.5%

      \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{a}} \]
    8. Taylor expanded in y around inf 29.8%

      \[\leadsto \color{blue}{\frac{y \cdot z}{a}} \]
    9. Step-by-step derivation
      1. associate-/l*39.2%

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{z}}} \]
      2. associate-/r/39.4%

        \[\leadsto \color{blue}{\frac{y}{a} \cdot z} \]
    10. Simplified39.4%

      \[\leadsto \color{blue}{\frac{y}{a} \cdot z} \]

    if -8.0000000000000004e-22 < a < 4.2000000000000002e-237 or 1.14999999999999994e-157 < a < 4.6e52

    1. Initial program 63.9%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative63.9%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-*r/81.5%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} + x \]
      3. *-commutative81.5%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      4. fma-def81.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    3. Simplified81.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in t around inf 39.6%

      \[\leadsto \color{blue}{y} \]

    if 4.2000000000000002e-237 < a < 1.14999999999999994e-157

    1. Initial program 57.1%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative57.1%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-*r/62.5%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} + x \]
      3. *-commutative62.5%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      4. fma-def62.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    3. Simplified62.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in a around 0 51.0%

      \[\leadsto \color{blue}{-1 \cdot \frac{\left(z - t\right) \cdot \left(y - x\right)}{t} + x} \]
    5. Step-by-step derivation
      1. +-commutative51.0%

        \[\leadsto \color{blue}{x + -1 \cdot \frac{\left(z - t\right) \cdot \left(y - x\right)}{t}} \]
      2. mul-1-neg51.0%

        \[\leadsto x + \color{blue}{\left(-\frac{\left(z - t\right) \cdot \left(y - x\right)}{t}\right)} \]
      3. unsub-neg51.0%

        \[\leadsto \color{blue}{x - \frac{\left(z - t\right) \cdot \left(y - x\right)}{t}} \]
      4. associate-/l*45.6%

        \[\leadsto x - \color{blue}{\frac{z - t}{\frac{t}{y - x}}} \]
    6. Simplified45.6%

      \[\leadsto \color{blue}{x - \frac{z - t}{\frac{t}{y - x}}} \]
    7. Taylor expanded in x around -inf 36.4%

      \[\leadsto \color{blue}{\frac{z \cdot x}{t}} \]
    8. Step-by-step derivation
      1. associate-/l*46.7%

        \[\leadsto \color{blue}{\frac{z}{\frac{t}{x}}} \]
    9. Simplified46.7%

      \[\leadsto \color{blue}{\frac{z}{\frac{t}{x}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification45.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.4 \cdot 10^{+115}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -8 \cdot 10^{-22}:\\ \;\;\;\;z \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 4.2 \cdot 10^{-237}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{-157}:\\ \;\;\;\;\frac{z}{\frac{t}{x}}\\ \mathbf{elif}\;a \leq 4.6 \cdot 10^{+52}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 20: 37.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.6 \cdot 10^{+111}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -5 \cdot 10^{-23}:\\ \;\;\;\;y \cdot \frac{z - t}{a}\\ \mathbf{elif}\;a \leq 7.6 \cdot 10^{-237}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{-158}:\\ \;\;\;\;\frac{z}{\frac{t}{x}}\\ \mathbf{elif}\;a \leq 2.15 \cdot 10^{+51}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -1.6e+111)
   x
   (if (<= a -5e-23)
     (* y (/ (- z t) a))
     (if (<= a 7.6e-237)
       y
       (if (<= a 2.8e-158) (/ z (/ t x)) (if (<= a 2.15e+51) y x))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1.6e+111) {
		tmp = x;
	} else if (a <= -5e-23) {
		tmp = y * ((z - t) / a);
	} else if (a <= 7.6e-237) {
		tmp = y;
	} else if (a <= 2.8e-158) {
		tmp = z / (t / x);
	} else if (a <= 2.15e+51) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (a <= (-1.6d+111)) then
        tmp = x
    else if (a <= (-5d-23)) then
        tmp = y * ((z - t) / a)
    else if (a <= 7.6d-237) then
        tmp = y
    else if (a <= 2.8d-158) then
        tmp = z / (t / x)
    else if (a <= 2.15d+51) then
        tmp = y
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1.6e+111) {
		tmp = x;
	} else if (a <= -5e-23) {
		tmp = y * ((z - t) / a);
	} else if (a <= 7.6e-237) {
		tmp = y;
	} else if (a <= 2.8e-158) {
		tmp = z / (t / x);
	} else if (a <= 2.15e+51) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -1.6e+111:
		tmp = x
	elif a <= -5e-23:
		tmp = y * ((z - t) / a)
	elif a <= 7.6e-237:
		tmp = y
	elif a <= 2.8e-158:
		tmp = z / (t / x)
	elif a <= 2.15e+51:
		tmp = y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -1.6e+111)
		tmp = x;
	elseif (a <= -5e-23)
		tmp = Float64(y * Float64(Float64(z - t) / a));
	elseif (a <= 7.6e-237)
		tmp = y;
	elseif (a <= 2.8e-158)
		tmp = Float64(z / Float64(t / x));
	elseif (a <= 2.15e+51)
		tmp = y;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -1.6e+111)
		tmp = x;
	elseif (a <= -5e-23)
		tmp = y * ((z - t) / a);
	elseif (a <= 7.6e-237)
		tmp = y;
	elseif (a <= 2.8e-158)
		tmp = z / (t / x);
	elseif (a <= 2.15e+51)
		tmp = y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.6e+111], x, If[LessEqual[a, -5e-23], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.6e-237], y, If[LessEqual[a, 2.8e-158], N[(z / N[(t / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.15e+51], y, x]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.6 \cdot 10^{+111}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -5 \cdot 10^{-23}:\\
\;\;\;\;y \cdot \frac{z - t}{a}\\

\mathbf{elif}\;a \leq 7.6 \cdot 10^{-237}:\\
\;\;\;\;y\\

\mathbf{elif}\;a \leq 2.8 \cdot 10^{-158}:\\
\;\;\;\;\frac{z}{\frac{t}{x}}\\

\mathbf{elif}\;a \leq 2.15 \cdot 10^{+51}:\\
\;\;\;\;y\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.6e111 or 2.1499999999999999e51 < a

    1. Initial program 63.6%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative63.6%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-*r/93.8%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} + x \]
      3. *-commutative93.8%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      4. fma-def93.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    3. Simplified93.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in a around inf 54.4%

      \[\leadsto \color{blue}{x} \]

    if -1.6e111 < a < -5.0000000000000002e-23

    1. Initial program 77.9%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative77.9%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-*r/99.4%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} + x \]
      3. *-commutative99.4%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      4. fma-def99.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    3. Simplified99.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in y around inf 54.6%

      \[\leadsto \color{blue}{\left(\frac{z}{a - t} - \frac{t}{a - t}\right) \cdot y} \]
    5. Step-by-step derivation
      1. div-sub54.6%

        \[\leadsto \color{blue}{\frac{z - t}{a - t}} \cdot y \]
      2. *-commutative54.6%

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t}} \]
    6. Simplified54.6%

      \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t}} \]
    7. Taylor expanded in a around inf 49.0%

      \[\leadsto y \cdot \color{blue}{\frac{z - t}{a}} \]

    if -5.0000000000000002e-23 < a < 7.60000000000000047e-237 or 2.80000000000000002e-158 < a < 2.1499999999999999e51

    1. Initial program 63.9%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative63.9%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-*r/81.5%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} + x \]
      3. *-commutative81.5%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      4. fma-def81.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    3. Simplified81.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in t around inf 39.6%

      \[\leadsto \color{blue}{y} \]

    if 7.60000000000000047e-237 < a < 2.80000000000000002e-158

    1. Initial program 57.1%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative57.1%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-*r/62.5%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} + x \]
      3. *-commutative62.5%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      4. fma-def62.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    3. Simplified62.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in a around 0 51.0%

      \[\leadsto \color{blue}{-1 \cdot \frac{\left(z - t\right) \cdot \left(y - x\right)}{t} + x} \]
    5. Step-by-step derivation
      1. +-commutative51.0%

        \[\leadsto \color{blue}{x + -1 \cdot \frac{\left(z - t\right) \cdot \left(y - x\right)}{t}} \]
      2. mul-1-neg51.0%

        \[\leadsto x + \color{blue}{\left(-\frac{\left(z - t\right) \cdot \left(y - x\right)}{t}\right)} \]
      3. unsub-neg51.0%

        \[\leadsto \color{blue}{x - \frac{\left(z - t\right) \cdot \left(y - x\right)}{t}} \]
      4. associate-/l*45.6%

        \[\leadsto x - \color{blue}{\frac{z - t}{\frac{t}{y - x}}} \]
    6. Simplified45.6%

      \[\leadsto \color{blue}{x - \frac{z - t}{\frac{t}{y - x}}} \]
    7. Taylor expanded in x around -inf 36.4%

      \[\leadsto \color{blue}{\frac{z \cdot x}{t}} \]
    8. Step-by-step derivation
      1. associate-/l*46.7%

        \[\leadsto \color{blue}{\frac{z}{\frac{t}{x}}} \]
    9. Simplified46.7%

      \[\leadsto \color{blue}{\frac{z}{\frac{t}{x}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification46.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.6 \cdot 10^{+111}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -5 \cdot 10^{-23}:\\ \;\;\;\;y \cdot \frac{z - t}{a}\\ \mathbf{elif}\;a \leq 7.6 \cdot 10^{-237}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{-158}:\\ \;\;\;\;\frac{z}{\frac{t}{x}}\\ \mathbf{elif}\;a \leq 2.15 \cdot 10^{+51}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 21: 51.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{if}\;a \leq -1.2 \cdot 10^{+111}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.95 \cdot 10^{-22}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;a \leq 1.02 \cdot 10^{+18}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ z a)))))
   (if (<= a -1.2e+111)
     t_1
     (if (<= a -1.95e-22)
       (* z (/ (- y x) a))
       (if (<= a 1.02e+18) (* y (- 1.0 (/ z t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (z / a));
	double tmp;
	if (a <= -1.2e+111) {
		tmp = t_1;
	} else if (a <= -1.95e-22) {
		tmp = z * ((y - x) / a);
	} else if (a <= 1.02e+18) {
		tmp = y * (1.0 - (z / t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * (1.0d0 - (z / a))
    if (a <= (-1.2d+111)) then
        tmp = t_1
    else if (a <= (-1.95d-22)) then
        tmp = z * ((y - x) / a)
    else if (a <= 1.02d+18) then
        tmp = y * (1.0d0 - (z / t))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (z / a));
	double tmp;
	if (a <= -1.2e+111) {
		tmp = t_1;
	} else if (a <= -1.95e-22) {
		tmp = z * ((y - x) / a);
	} else if (a <= 1.02e+18) {
		tmp = y * (1.0 - (z / t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (z / a))
	tmp = 0
	if a <= -1.2e+111:
		tmp = t_1
	elif a <= -1.95e-22:
		tmp = z * ((y - x) / a)
	elif a <= 1.02e+18:
		tmp = y * (1.0 - (z / t))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(z / a)))
	tmp = 0.0
	if (a <= -1.2e+111)
		tmp = t_1;
	elseif (a <= -1.95e-22)
		tmp = Float64(z * Float64(Float64(y - x) / a));
	elseif (a <= 1.02e+18)
		tmp = Float64(y * Float64(1.0 - Float64(z / t)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (z / a));
	tmp = 0.0;
	if (a <= -1.2e+111)
		tmp = t_1;
	elseif (a <= -1.95e-22)
		tmp = z * ((y - x) / a);
	elseif (a <= 1.02e+18)
		tmp = y * (1.0 - (z / t));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.2e+111], t$95$1, If[LessEqual[a, -1.95e-22], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.02e+18], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{if}\;a \leq -1.2 \cdot 10^{+111}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -1.95 \cdot 10^{-22}:\\
\;\;\;\;z \cdot \frac{y - x}{a}\\

\mathbf{elif}\;a \leq 1.02 \cdot 10^{+18}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.20000000000000003e111 or 1.02e18 < a

    1. Initial program 64.7%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-/l*93.5%

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} \]
    3. Simplified93.5%

      \[\leadsto \color{blue}{x + \frac{y - x}{\frac{a - t}{z - t}}} \]
    4. Step-by-step derivation
      1. div-inv93.4%

        \[\leadsto x + \frac{y - x}{\color{blue}{\left(a - t\right) \cdot \frac{1}{z - t}}} \]
    5. Applied egg-rr93.4%

      \[\leadsto x + \frac{y - x}{\color{blue}{\left(a - t\right) \cdot \frac{1}{z - t}}} \]
    6. Taylor expanded in x around inf 58.1%

      \[\leadsto \color{blue}{\left(1 + -1 \cdot \frac{z - t}{a - t}\right) \cdot x} \]
    7. Step-by-step derivation
      1. div-sub58.1%

        \[\leadsto \left(1 + -1 \cdot \color{blue}{\left(\frac{z}{a - t} - \frac{t}{a - t}\right)}\right) \cdot x \]
      2. mul-1-neg58.1%

        \[\leadsto \left(1 + \color{blue}{\left(-\left(\frac{z}{a - t} - \frac{t}{a - t}\right)\right)}\right) \cdot x \]
      3. unsub-neg58.1%

        \[\leadsto \color{blue}{\left(1 - \left(\frac{z}{a - t} - \frac{t}{a - t}\right)\right)} \cdot x \]
      4. div-sub58.1%

        \[\leadsto \left(1 - \color{blue}{\frac{z - t}{a - t}}\right) \cdot x \]
    8. Simplified58.1%

      \[\leadsto \color{blue}{\left(1 - \frac{z - t}{a - t}\right) \cdot x} \]
    9. Taylor expanded in t around 0 56.4%

      \[\leadsto \color{blue}{\left(1 - \frac{z}{a}\right)} \cdot x \]

    if -1.20000000000000003e111 < a < -1.94999999999999999e-22

    1. Initial program 77.9%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative77.9%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-*r/99.4%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} + x \]
      3. *-commutative99.4%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      4. fma-def99.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    3. Simplified99.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in z around inf 82.5%

      \[\leadsto \color{blue}{z \cdot \left(\frac{y}{a - t} - \frac{x}{a - t}\right)} \]
    5. Taylor expanded in t around 0 77.0%

      \[\leadsto \color{blue}{z \cdot \left(\frac{y}{a} - \frac{x}{a}\right)} \]
    6. Step-by-step derivation
      1. div-sub77.0%

        \[\leadsto z \cdot \color{blue}{\frac{y - x}{a}} \]
    7. Simplified77.0%

      \[\leadsto \color{blue}{z \cdot \frac{y - x}{a}} \]

    if -1.94999999999999999e-22 < a < 1.02e18

    1. Initial program 62.0%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative62.0%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-*r/78.0%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} + x \]
      3. *-commutative78.0%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      4. fma-def78.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    3. Simplified78.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in a around 0 45.3%

      \[\leadsto \color{blue}{-1 \cdot \frac{\left(z - t\right) \cdot \left(y - x\right)}{t} + x} \]
    5. Step-by-step derivation
      1. +-commutative45.3%

        \[\leadsto \color{blue}{x + -1 \cdot \frac{\left(z - t\right) \cdot \left(y - x\right)}{t}} \]
      2. mul-1-neg45.3%

        \[\leadsto x + \color{blue}{\left(-\frac{\left(z - t\right) \cdot \left(y - x\right)}{t}\right)} \]
      3. unsub-neg45.3%

        \[\leadsto \color{blue}{x - \frac{\left(z - t\right) \cdot \left(y - x\right)}{t}} \]
      4. associate-/l*54.1%

        \[\leadsto x - \color{blue}{\frac{z - t}{\frac{t}{y - x}}} \]
    6. Simplified54.1%

      \[\leadsto \color{blue}{x - \frac{z - t}{\frac{t}{y - x}}} \]
    7. Taylor expanded in y around inf 55.5%

      \[\leadsto \color{blue}{\left(1 - \frac{z}{t}\right) \cdot y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification57.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.2 \cdot 10^{+111}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;a \leq -1.95 \cdot 10^{-22}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;a \leq 1.02 \cdot 10^{+18}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \end{array} \]

Alternative 22: 54.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{z}{\frac{a}{y}}\\ \mathbf{if}\;a \leq -9.5 \cdot 10^{+97}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -9.5 \cdot 10^{-23}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;a \leq 8.5 \cdot 10^{+17}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ z (/ a y)))))
   (if (<= a -9.5e+97)
     t_1
     (if (<= a -9.5e-23)
       (* z (/ (- y x) a))
       (if (<= a 8.5e+17) (* y (- 1.0 (/ z t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (z / (a / y));
	double tmp;
	if (a <= -9.5e+97) {
		tmp = t_1;
	} else if (a <= -9.5e-23) {
		tmp = z * ((y - x) / a);
	} else if (a <= 8.5e+17) {
		tmp = y * (1.0 - (z / t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x + (z / (a / y))
    if (a <= (-9.5d+97)) then
        tmp = t_1
    else if (a <= (-9.5d-23)) then
        tmp = z * ((y - x) / a)
    else if (a <= 8.5d+17) then
        tmp = y * (1.0d0 - (z / t))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (z / (a / y));
	double tmp;
	if (a <= -9.5e+97) {
		tmp = t_1;
	} else if (a <= -9.5e-23) {
		tmp = z * ((y - x) / a);
	} else if (a <= 8.5e+17) {
		tmp = y * (1.0 - (z / t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (z / (a / y))
	tmp = 0
	if a <= -9.5e+97:
		tmp = t_1
	elif a <= -9.5e-23:
		tmp = z * ((y - x) / a)
	elif a <= 8.5e+17:
		tmp = y * (1.0 - (z / t))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(z / Float64(a / y)))
	tmp = 0.0
	if (a <= -9.5e+97)
		tmp = t_1;
	elseif (a <= -9.5e-23)
		tmp = Float64(z * Float64(Float64(y - x) / a));
	elseif (a <= 8.5e+17)
		tmp = Float64(y * Float64(1.0 - Float64(z / t)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (z / (a / y));
	tmp = 0.0;
	if (a <= -9.5e+97)
		tmp = t_1;
	elseif (a <= -9.5e-23)
		tmp = z * ((y - x) / a);
	elseif (a <= 8.5e+17)
		tmp = y * (1.0 - (z / t));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -9.5e+97], t$95$1, If[LessEqual[a, -9.5e-23], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8.5e+17], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \frac{z}{\frac{a}{y}}\\
\mathbf{if}\;a \leq -9.5 \cdot 10^{+97}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -9.5 \cdot 10^{-23}:\\
\;\;\;\;z \cdot \frac{y - x}{a}\\

\mathbf{elif}\;a \leq 8.5 \cdot 10^{+17}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -9.49999999999999975e97 or 8.5e17 < a

    1. Initial program 65.3%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-/l*93.6%

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} \]
    3. Simplified93.6%

      \[\leadsto \color{blue}{x + \frac{y - x}{\frac{a - t}{z - t}}} \]
    4. Step-by-step derivation
      1. div-inv93.5%

        \[\leadsto x + \frac{y - x}{\color{blue}{\left(a - t\right) \cdot \frac{1}{z - t}}} \]
    5. Applied egg-rr93.5%

      \[\leadsto x + \frac{y - x}{\color{blue}{\left(a - t\right) \cdot \frac{1}{z - t}}} \]
    6. Taylor expanded in t around 0 60.1%

      \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{a} + x} \]
    7. Step-by-step derivation
      1. +-commutative60.1%

        \[\leadsto \color{blue}{x + \frac{\left(y - x\right) \cdot z}{a}} \]
      2. *-commutative60.1%

        \[\leadsto x + \frac{\color{blue}{z \cdot \left(y - x\right)}}{a} \]
      3. associate-/l*69.9%

        \[\leadsto x + \color{blue}{\frac{z}{\frac{a}{y - x}}} \]
    8. Simplified69.9%

      \[\leadsto \color{blue}{x + \frac{z}{\frac{a}{y - x}}} \]
    9. Taylor expanded in y around inf 65.1%

      \[\leadsto x + \frac{z}{\color{blue}{\frac{a}{y}}} \]

    if -9.49999999999999975e97 < a < -9.50000000000000058e-23

    1. Initial program 75.0%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative75.0%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-*r/99.5%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} + x \]
      3. *-commutative99.5%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      4. fma-def99.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    3. Simplified99.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in z around inf 86.9%

      \[\leadsto \color{blue}{z \cdot \left(\frac{y}{a - t} - \frac{x}{a - t}\right)} \]
    5. Taylor expanded in t around 0 80.6%

      \[\leadsto \color{blue}{z \cdot \left(\frac{y}{a} - \frac{x}{a}\right)} \]
    6. Step-by-step derivation
      1. div-sub80.6%

        \[\leadsto z \cdot \color{blue}{\frac{y - x}{a}} \]
    7. Simplified80.6%

      \[\leadsto \color{blue}{z \cdot \frac{y - x}{a}} \]

    if -9.50000000000000058e-23 < a < 8.5e17

    1. Initial program 62.0%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative62.0%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-*r/78.0%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} + x \]
      3. *-commutative78.0%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      4. fma-def78.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    3. Simplified78.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in a around 0 45.3%

      \[\leadsto \color{blue}{-1 \cdot \frac{\left(z - t\right) \cdot \left(y - x\right)}{t} + x} \]
    5. Step-by-step derivation
      1. +-commutative45.3%

        \[\leadsto \color{blue}{x + -1 \cdot \frac{\left(z - t\right) \cdot \left(y - x\right)}{t}} \]
      2. mul-1-neg45.3%

        \[\leadsto x + \color{blue}{\left(-\frac{\left(z - t\right) \cdot \left(y - x\right)}{t}\right)} \]
      3. unsub-neg45.3%

        \[\leadsto \color{blue}{x - \frac{\left(z - t\right) \cdot \left(y - x\right)}{t}} \]
      4. associate-/l*54.1%

        \[\leadsto x - \color{blue}{\frac{z - t}{\frac{t}{y - x}}} \]
    6. Simplified54.1%

      \[\leadsto \color{blue}{x - \frac{z - t}{\frac{t}{y - x}}} \]
    7. Taylor expanded in y around inf 55.5%

      \[\leadsto \color{blue}{\left(1 - \frac{z}{t}\right) \cdot y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification61.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.5 \cdot 10^{+97}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq -9.5 \cdot 10^{-23}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;a \leq 8.5 \cdot 10^{+17}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y}}\\ \end{array} \]

Alternative 23: 59.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1600 \lor \neg \left(x \leq 1.1 \cdot 10^{+136}\right):\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= x -1600.0) (not (<= x 1.1e+136)))
   (* x (- 1.0 (/ z a)))
   (* y (/ (- z t) (- a t)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((x <= -1600.0) || !(x <= 1.1e+136)) {
		tmp = x * (1.0 - (z / a));
	} else {
		tmp = y * ((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 ((x <= (-1600.0d0)) .or. (.not. (x <= 1.1d+136))) then
        tmp = x * (1.0d0 - (z / a))
    else
        tmp = y * ((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 ((x <= -1600.0) || !(x <= 1.1e+136)) {
		tmp = x * (1.0 - (z / a));
	} else {
		tmp = y * ((z - t) / (a - t));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (x <= -1600.0) or not (x <= 1.1e+136):
		tmp = x * (1.0 - (z / a))
	else:
		tmp = y * ((z - t) / (a - t))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((x <= -1600.0) || !(x <= 1.1e+136))
		tmp = Float64(x * Float64(1.0 - Float64(z / a)));
	else
		tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((x <= -1600.0) || ~((x <= 1.1e+136)))
		tmp = x * (1.0 - (z / a));
	else
		tmp = y * ((z - t) / (a - t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -1600.0], N[Not[LessEqual[x, 1.1e+136]], $MachinePrecision]], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1600 \lor \neg \left(x \leq 1.1 \cdot 10^{+136}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\

\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1600 or 1.1e136 < x

    1. Initial program 60.3%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-/l*81.8%

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} \]
    3. Simplified81.8%

      \[\leadsto \color{blue}{x + \frac{y - x}{\frac{a - t}{z - t}}} \]
    4. Step-by-step derivation
      1. div-inv81.7%

        \[\leadsto x + \frac{y - x}{\color{blue}{\left(a - t\right) \cdot \frac{1}{z - t}}} \]
    5. Applied egg-rr81.7%

      \[\leadsto x + \frac{y - x}{\color{blue}{\left(a - t\right) \cdot \frac{1}{z - t}}} \]
    6. Taylor expanded in x around inf 68.1%

      \[\leadsto \color{blue}{\left(1 + -1 \cdot \frac{z - t}{a - t}\right) \cdot x} \]
    7. Step-by-step derivation
      1. div-sub68.1%

        \[\leadsto \left(1 + -1 \cdot \color{blue}{\left(\frac{z}{a - t} - \frac{t}{a - t}\right)}\right) \cdot x \]
      2. mul-1-neg68.1%

        \[\leadsto \left(1 + \color{blue}{\left(-\left(\frac{z}{a - t} - \frac{t}{a - t}\right)\right)}\right) \cdot x \]
      3. unsub-neg68.1%

        \[\leadsto \color{blue}{\left(1 - \left(\frac{z}{a - t} - \frac{t}{a - t}\right)\right)} \cdot x \]
      4. div-sub68.1%

        \[\leadsto \left(1 - \color{blue}{\frac{z - t}{a - t}}\right) \cdot x \]
    8. Simplified68.1%

      \[\leadsto \color{blue}{\left(1 - \frac{z - t}{a - t}\right) \cdot x} \]
    9. Taylor expanded in t around 0 56.1%

      \[\leadsto \color{blue}{\left(1 - \frac{z}{a}\right)} \cdot x \]

    if -1600 < x < 1.1e136

    1. Initial program 66.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative66.8%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-*r/89.0%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} + x \]
      3. *-commutative89.0%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      4. fma-def89.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    3. Simplified89.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in y around inf 69.3%

      \[\leadsto \color{blue}{\left(\frac{z}{a - t} - \frac{t}{a - t}\right) \cdot y} \]
    5. Step-by-step derivation
      1. div-sub69.3%

        \[\leadsto \color{blue}{\frac{z - t}{a - t}} \cdot y \]
      2. *-commutative69.3%

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t}} \]
    6. Simplified69.3%

      \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification64.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1600 \lor \neg \left(x \leq 1.1 \cdot 10^{+136}\right):\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \end{array} \]

Alternative 24: 37.5% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2.3 \cdot 10^{+115}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.05 \cdot 10^{-21}:\\ \;\;\;\;z \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 6 \cdot 10^{+52}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -2.3e+115)
   x
   (if (<= a -1.05e-21) (* z (/ y a)) (if (<= a 6e+52) y x))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -2.3e+115) {
		tmp = x;
	} else if (a <= -1.05e-21) {
		tmp = z * (y / a);
	} else if (a <= 6e+52) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (a <= (-2.3d+115)) then
        tmp = x
    else if (a <= (-1.05d-21)) then
        tmp = z * (y / a)
    else if (a <= 6d+52) then
        tmp = y
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -2.3e+115) {
		tmp = x;
	} else if (a <= -1.05e-21) {
		tmp = z * (y / a);
	} else if (a <= 6e+52) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -2.3e+115:
		tmp = x
	elif a <= -1.05e-21:
		tmp = z * (y / a)
	elif a <= 6e+52:
		tmp = y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -2.3e+115)
		tmp = x;
	elseif (a <= -1.05e-21)
		tmp = Float64(z * Float64(y / a));
	elseif (a <= 6e+52)
		tmp = y;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -2.3e+115)
		tmp = x;
	elseif (a <= -1.05e-21)
		tmp = z * (y / a);
	elseif (a <= 6e+52)
		tmp = y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.3e+115], x, If[LessEqual[a, -1.05e-21], N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6e+52], y, x]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.3 \cdot 10^{+115}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -1.05 \cdot 10^{-21}:\\
\;\;\;\;z \cdot \frac{y}{a}\\

\mathbf{elif}\;a \leq 6 \cdot 10^{+52}:\\
\;\;\;\;y\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.30000000000000004e115 or 6e52 < a

    1. Initial program 62.9%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative62.9%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-*r/93.6%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} + x \]
      3. *-commutative93.6%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      4. fma-def93.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    3. Simplified93.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in a around inf 54.5%

      \[\leadsto \color{blue}{x} \]

    if -2.30000000000000004e115 < a < -1.05000000000000006e-21

    1. Initial program 80.1%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative80.1%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-*r/99.5%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} + x \]
      3. *-commutative99.5%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      4. fma-def99.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    3. Simplified99.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in z around inf 79.2%

      \[\leadsto \color{blue}{z \cdot \left(\frac{y}{a - t} - \frac{x}{a - t}\right)} \]
    5. Step-by-step derivation
      1. div-sub79.2%

        \[\leadsto z \cdot \color{blue}{\frac{y - x}{a - t}} \]
      2. *-commutative79.2%

        \[\leadsto \color{blue}{\frac{y - x}{a - t} \cdot z} \]
      3. associate-*l/59.5%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{a - t}} \]
    6. Simplified59.5%

      \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{a - t}} \]
    7. Taylor expanded in a around inf 59.5%

      \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{a}} \]
    8. Taylor expanded in y around inf 29.8%

      \[\leadsto \color{blue}{\frac{y \cdot z}{a}} \]
    9. Step-by-step derivation
      1. associate-/l*39.2%

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{z}}} \]
      2. associate-/r/39.4%

        \[\leadsto \color{blue}{\frac{y}{a} \cdot z} \]
    10. Simplified39.4%

      \[\leadsto \color{blue}{\frac{y}{a} \cdot z} \]

    if -1.05000000000000006e-21 < a < 6e52

    1. Initial program 63.0%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative63.0%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-*r/79.0%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} + x \]
      3. *-commutative79.0%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      4. fma-def79.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    3. Simplified79.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in t around inf 37.0%

      \[\leadsto \color{blue}{y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification43.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.3 \cdot 10^{+115}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.05 \cdot 10^{-21}:\\ \;\;\;\;z \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 6 \cdot 10^{+52}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 25: 38.0% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.95 \cdot 10^{-22}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{+52}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -1.95e-22) x (if (<= a 1.3e+52) y x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1.95e-22) {
		tmp = x;
	} else if (a <= 1.3e+52) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (a <= (-1.95d-22)) then
        tmp = x
    else if (a <= 1.3d+52) then
        tmp = y
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1.95e-22) {
		tmp = x;
	} else if (a <= 1.3e+52) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -1.95e-22:
		tmp = x
	elif a <= 1.3e+52:
		tmp = y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -1.95e-22)
		tmp = x;
	elseif (a <= 1.3e+52)
		tmp = y;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -1.95e-22)
		tmp = x;
	elseif (a <= 1.3e+52)
		tmp = y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.95e-22], x, If[LessEqual[a, 1.3e+52], y, x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.95 \cdot 10^{-22}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 1.3 \cdot 10^{+52}:\\
\;\;\;\;y\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.94999999999999999e-22 or 1.3e52 < a

    1. Initial program 65.7%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative65.7%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-*r/94.6%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} + x \]
      3. *-commutative94.6%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      4. fma-def94.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    3. Simplified94.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in a around inf 48.0%

      \[\leadsto \color{blue}{x} \]

    if -1.94999999999999999e-22 < a < 1.3e52

    1. Initial program 63.0%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative63.0%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-*r/79.0%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} + x \]
      3. *-commutative79.0%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      4. fma-def79.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    3. Simplified79.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in t around inf 37.0%

      \[\leadsto \color{blue}{y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification42.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.95 \cdot 10^{-22}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{+52}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 26: 24.9% 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 64.2%

    \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
  2. Step-by-step derivation
    1. +-commutative64.2%

      \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
    2. associate-*r/86.2%

      \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} + x \]
    3. *-commutative86.2%

      \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
    4. fma-def86.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
  3. Simplified86.1%

    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
  4. Taylor expanded in a around inf 25.4%

    \[\leadsto \color{blue}{x} \]
  5. Final simplification25.4%

    \[\leadsto x \]

Developer target: 86.3% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\ \mathbf{if}\;a < -1.6153062845442575 \cdot 10^{-142}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a < 3.774403170083174 \cdot 10^{-182}:\\ \;\;\;\;y - \frac{z}{t} \cdot \left(y - x\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))
   (if (< a -1.6153062845442575e-142)
     t_1
     (if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
	double tmp;
	if (a < -1.6153062845442575e-142) {
		tmp = t_1;
	} else if (a < 3.774403170083174e-182) {
		tmp = y - ((z / t) * (y - x));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x + (((y - x) / 1.0d0) * ((z - t) / (a - t)))
    if (a < (-1.6153062845442575d-142)) then
        tmp = t_1
    else if (a < 3.774403170083174d-182) then
        tmp = y - ((z / t) * (y - x))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
	double tmp;
	if (a < -1.6153062845442575e-142) {
		tmp = t_1;
	} else if (a < 3.774403170083174e-182) {
		tmp = y - ((z / t) * (y - x));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)))
	tmp = 0
	if a < -1.6153062845442575e-142:
		tmp = t_1
	elif a < 3.774403170083174e-182:
		tmp = y - ((z / t) * (y - x))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(Float64(y - x) / 1.0) * Float64(Float64(z - t) / Float64(a - t))))
	tmp = 0.0
	if (a < -1.6153062845442575e-142)
		tmp = t_1;
	elseif (a < 3.774403170083174e-182)
		tmp = Float64(y - Float64(Float64(z / t) * Float64(y - x)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
	tmp = 0.0;
	if (a < -1.6153062845442575e-142)
		tmp = t_1;
	elseif (a < 3.774403170083174e-182)
		tmp = y - ((z / t) * (y - x));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - x), $MachinePrecision] / 1.0), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[a, -1.6153062845442575e-142], t$95$1, If[Less[a, 3.774403170083174e-182], N[(y - N[(N[(z / t), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;a < -1.6153062845442575 \cdot 10^{-142}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a < 3.774403170083174 \cdot 10^{-182}:\\
\;\;\;\;y - \frac{z}{t} \cdot \left(y - x\right)\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023185 
(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))))