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

Percentage Accurate: 68.6% → 88.6%
Time: 16.5s
Alternatives: 25
Speedup: 0.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 25 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.6% 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.6% accurate, 0.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.15000000000000024e127 or 1.9999999999999999e105 < t

    1. Initial program 29.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 68.2%

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

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

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

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

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

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

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

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

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

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

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

    if -3.15000000000000024e127 < t < 1.9999999999999999e105

    1. Initial program 84.3%

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

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

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

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

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

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

Alternative 2: 49.2% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - x \cdot \frac{z}{a}\\ t_2 := y \cdot \frac{z}{a - t}\\ \mathbf{if}\;t \leq -5.1 \cdot 10^{+230}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -4.9 \cdot 10^{+115}:\\ \;\;\;\;\left(z - a\right) \cdot \frac{x}{t}\\ \mathbf{elif}\;t \leq -3.9 \cdot 10^{+87}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -2.6 \cdot 10^{+80}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -1.1:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -3.9 \cdot 10^{-98}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.04 \cdot 10^{-147}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{+61}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (* x (/ z a)))) (t_2 (* y (/ z (- a t)))))
   (if (<= t -5.1e+230)
     y
     (if (<= t -4.9e+115)
       (* (- z a) (/ x t))
       (if (<= t -3.9e+87)
         t_1
         (if (<= t -2.6e+80)
           t_2
           (if (<= t -1.1)
             y
             (if (<= t -3.9e-98)
               t_1
               (if (<= t -1.04e-147)
                 t_2
                 (if (<= t 3.2e+61) (+ x (* y (/ z a))) y))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (x * (z / a));
	double t_2 = y * (z / (a - t));
	double tmp;
	if (t <= -5.1e+230) {
		tmp = y;
	} else if (t <= -4.9e+115) {
		tmp = (z - a) * (x / t);
	} else if (t <= -3.9e+87) {
		tmp = t_1;
	} else if (t <= -2.6e+80) {
		tmp = t_2;
	} else if (t <= -1.1) {
		tmp = y;
	} else if (t <= -3.9e-98) {
		tmp = t_1;
	} else if (t <= -1.04e-147) {
		tmp = t_2;
	} else if (t <= 3.2e+61) {
		tmp = x + (y * (z / a));
	} else {
		tmp = y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x - (x * (z / a))
    t_2 = y * (z / (a - t))
    if (t <= (-5.1d+230)) then
        tmp = y
    else if (t <= (-4.9d+115)) then
        tmp = (z - a) * (x / t)
    else if (t <= (-3.9d+87)) then
        tmp = t_1
    else if (t <= (-2.6d+80)) then
        tmp = t_2
    else if (t <= (-1.1d0)) then
        tmp = y
    else if (t <= (-3.9d-98)) then
        tmp = t_1
    else if (t <= (-1.04d-147)) then
        tmp = t_2
    else if (t <= 3.2d+61) then
        tmp = x + (y * (z / a))
    else
        tmp = y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (x * (z / a));
	double t_2 = y * (z / (a - t));
	double tmp;
	if (t <= -5.1e+230) {
		tmp = y;
	} else if (t <= -4.9e+115) {
		tmp = (z - a) * (x / t);
	} else if (t <= -3.9e+87) {
		tmp = t_1;
	} else if (t <= -2.6e+80) {
		tmp = t_2;
	} else if (t <= -1.1) {
		tmp = y;
	} else if (t <= -3.9e-98) {
		tmp = t_1;
	} else if (t <= -1.04e-147) {
		tmp = t_2;
	} else if (t <= 3.2e+61) {
		tmp = x + (y * (z / a));
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (x * (z / a))
	t_2 = y * (z / (a - t))
	tmp = 0
	if t <= -5.1e+230:
		tmp = y
	elif t <= -4.9e+115:
		tmp = (z - a) * (x / t)
	elif t <= -3.9e+87:
		tmp = t_1
	elif t <= -2.6e+80:
		tmp = t_2
	elif t <= -1.1:
		tmp = y
	elif t <= -3.9e-98:
		tmp = t_1
	elif t <= -1.04e-147:
		tmp = t_2
	elif t <= 3.2e+61:
		tmp = x + (y * (z / a))
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(x * Float64(z / a)))
	t_2 = Float64(y * Float64(z / Float64(a - t)))
	tmp = 0.0
	if (t <= -5.1e+230)
		tmp = y;
	elseif (t <= -4.9e+115)
		tmp = Float64(Float64(z - a) * Float64(x / t));
	elseif (t <= -3.9e+87)
		tmp = t_1;
	elseif (t <= -2.6e+80)
		tmp = t_2;
	elseif (t <= -1.1)
		tmp = y;
	elseif (t <= -3.9e-98)
		tmp = t_1;
	elseif (t <= -1.04e-147)
		tmp = t_2;
	elseif (t <= 3.2e+61)
		tmp = Float64(x + Float64(y * Float64(z / a)));
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (x * (z / a));
	t_2 = y * (z / (a - t));
	tmp = 0.0;
	if (t <= -5.1e+230)
		tmp = y;
	elseif (t <= -4.9e+115)
		tmp = (z - a) * (x / t);
	elseif (t <= -3.9e+87)
		tmp = t_1;
	elseif (t <= -2.6e+80)
		tmp = t_2;
	elseif (t <= -1.1)
		tmp = y;
	elseif (t <= -3.9e-98)
		tmp = t_1;
	elseif (t <= -1.04e-147)
		tmp = t_2;
	elseif (t <= 3.2e+61)
		tmp = x + (y * (z / a));
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(x * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.1e+230], y, If[LessEqual[t, -4.9e+115], N[(N[(z - a), $MachinePrecision] * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.9e+87], t$95$1, If[LessEqual[t, -2.6e+80], t$95$2, If[LessEqual[t, -1.1], y, If[LessEqual[t, -3.9e-98], t$95$1, If[LessEqual[t, -1.04e-147], t$95$2, If[LessEqual[t, 3.2e+61], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t \leq -3.9 \cdot 10^{+87}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -2.6 \cdot 10^{+80}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq -1.1:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq -3.9 \cdot 10^{-98}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -1.04 \cdot 10^{-147}:\\
\;\;\;\;t\_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -5.1e230 or -2.59999999999999982e80 < t < -1.1000000000000001 or 3.1999999999999998e61 < t

    1. Initial program 38.3%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 50.9%

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

    if -5.1e230 < t < -4.89999999999999964e115

    1. Initial program 37.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 42.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.89999999999999964e115 < t < -3.9000000000000002e87 or -1.1000000000000001 < t < -3.89999999999999971e-98

    1. Initial program 64.3%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 42.1%

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

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

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

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

        \[\leadsto x - \color{blue}{x \cdot \frac{z}{a}} \]
    6. Simplified64.0%

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

    if -3.9000000000000002e87 < t < -2.59999999999999982e80 or -3.89999999999999971e-98 < t < -1.04000000000000003e-147

    1. Initial program 86.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.04000000000000003e-147 < t < 3.1999999999999998e61

    1. Initial program 92.3%

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
    6. Simplified69.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.1 \cdot 10^{+230}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -4.9 \cdot 10^{+115}:\\ \;\;\;\;\left(z - a\right) \cdot \frac{x}{t}\\ \mathbf{elif}\;t \leq -3.9 \cdot 10^{+87}:\\ \;\;\;\;x - x \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq -2.6 \cdot 10^{+80}:\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \mathbf{elif}\;t \leq -1.1:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -3.9 \cdot 10^{-98}:\\ \;\;\;\;x - x \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq -1.04 \cdot 10^{-147}:\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{+61}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 29.9% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{z - a}{t}\\ \mathbf{if}\;x \leq -1.4 \cdot 10^{+222}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -1.82 \cdot 10^{+149}:\\ \;\;\;\;z \cdot \frac{x}{-a}\\ \mathbf{elif}\;x \leq -1.2 \cdot 10^{+68}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -4200000000000:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{-190}:\\ \;\;\;\;y\\ \mathbf{elif}\;x \leq 1.85 \cdot 10^{-107}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;x \leq 3.8 \cdot 10^{-67}:\\ \;\;\;\;y\\ \mathbf{elif}\;x \leq 10^{+102}:\\ \;\;\;\;\frac{x \cdot z}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (/ (- z a) t))))
   (if (<= x -1.4e+222)
     t_1
     (if (<= x -1.82e+149)
       (* z (/ x (- a)))
       (if (<= x -1.2e+68)
         t_1
         (if (<= x -4200000000000.0)
           x
           (if (<= x 9.5e-190)
             y
             (if (<= x 1.85e-107)
               (* y (/ z a))
               (if (<= x 3.8e-67) y (if (<= x 1e+102) (/ (* x z) t) x))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * ((z - a) / t);
	double tmp;
	if (x <= -1.4e+222) {
		tmp = t_1;
	} else if (x <= -1.82e+149) {
		tmp = z * (x / -a);
	} else if (x <= -1.2e+68) {
		tmp = t_1;
	} else if (x <= -4200000000000.0) {
		tmp = x;
	} else if (x <= 9.5e-190) {
		tmp = y;
	} else if (x <= 1.85e-107) {
		tmp = y * (z / a);
	} else if (x <= 3.8e-67) {
		tmp = y;
	} else if (x <= 1e+102) {
		tmp = (x * z) / t;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * ((z - a) / t)
    if (x <= (-1.4d+222)) then
        tmp = t_1
    else if (x <= (-1.82d+149)) then
        tmp = z * (x / -a)
    else if (x <= (-1.2d+68)) then
        tmp = t_1
    else if (x <= (-4200000000000.0d0)) then
        tmp = x
    else if (x <= 9.5d-190) then
        tmp = y
    else if (x <= 1.85d-107) then
        tmp = y * (z / a)
    else if (x <= 3.8d-67) then
        tmp = y
    else if (x <= 1d+102) then
        tmp = (x * z) / t
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * ((z - a) / t);
	double tmp;
	if (x <= -1.4e+222) {
		tmp = t_1;
	} else if (x <= -1.82e+149) {
		tmp = z * (x / -a);
	} else if (x <= -1.2e+68) {
		tmp = t_1;
	} else if (x <= -4200000000000.0) {
		tmp = x;
	} else if (x <= 9.5e-190) {
		tmp = y;
	} else if (x <= 1.85e-107) {
		tmp = y * (z / a);
	} else if (x <= 3.8e-67) {
		tmp = y;
	} else if (x <= 1e+102) {
		tmp = (x * z) / t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * ((z - a) / t)
	tmp = 0
	if x <= -1.4e+222:
		tmp = t_1
	elif x <= -1.82e+149:
		tmp = z * (x / -a)
	elif x <= -1.2e+68:
		tmp = t_1
	elif x <= -4200000000000.0:
		tmp = x
	elif x <= 9.5e-190:
		tmp = y
	elif x <= 1.85e-107:
		tmp = y * (z / a)
	elif x <= 3.8e-67:
		tmp = y
	elif x <= 1e+102:
		tmp = (x * z) / t
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(Float64(z - a) / t))
	tmp = 0.0
	if (x <= -1.4e+222)
		tmp = t_1;
	elseif (x <= -1.82e+149)
		tmp = Float64(z * Float64(x / Float64(-a)));
	elseif (x <= -1.2e+68)
		tmp = t_1;
	elseif (x <= -4200000000000.0)
		tmp = x;
	elseif (x <= 9.5e-190)
		tmp = y;
	elseif (x <= 1.85e-107)
		tmp = Float64(y * Float64(z / a));
	elseif (x <= 3.8e-67)
		tmp = y;
	elseif (x <= 1e+102)
		tmp = Float64(Float64(x * z) / t);
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * ((z - a) / t);
	tmp = 0.0;
	if (x <= -1.4e+222)
		tmp = t_1;
	elseif (x <= -1.82e+149)
		tmp = z * (x / -a);
	elseif (x <= -1.2e+68)
		tmp = t_1;
	elseif (x <= -4200000000000.0)
		tmp = x;
	elseif (x <= 9.5e-190)
		tmp = y;
	elseif (x <= 1.85e-107)
		tmp = y * (z / a);
	elseif (x <= 3.8e-67)
		tmp = y;
	elseif (x <= 1e+102)
		tmp = (x * z) / t;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.4e+222], t$95$1, If[LessEqual[x, -1.82e+149], N[(z * N[(x / (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.2e+68], t$95$1, If[LessEqual[x, -4200000000000.0], x, If[LessEqual[x, 9.5e-190], y, If[LessEqual[x, 1.85e-107], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.8e-67], y, If[LessEqual[x, 1e+102], N[(N[(x * z), $MachinePrecision] / t), $MachinePrecision], x]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;x \leq -1.2 \cdot 10^{+68}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -4200000000000:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 9.5 \cdot 10^{-190}:\\
\;\;\;\;y\\

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

\mathbf{elif}\;x \leq 3.8 \cdot 10^{-67}:\\
\;\;\;\;y\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if x < -1.4000000000000001e222 or -1.8199999999999999e149 < x < -1.20000000000000004e68

    1. Initial program 51.7%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in x around -inf 59.8%

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

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

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

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

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

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

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

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

    if -1.4000000000000001e222 < x < -1.8199999999999999e149

    1. Initial program 76.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 76.1%

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

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

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

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

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

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

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

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

    if -1.20000000000000004e68 < x < -4.2e12 or 9.99999999999999977e101 < x

    1. Initial program 62.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 47.1%

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

    if -4.2e12 < x < 9.50000000000000055e-190 or 1.8500000000000001e-107 < x < 3.79999999999999988e-67

    1. Initial program 74.1%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 44.5%

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

    if 9.50000000000000055e-190 < x < 1.8500000000000001e-107

    1. Initial program 79.6%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 58.5%

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
    7. Simplified58.8%

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

    if 3.79999999999999988e-67 < x < 9.99999999999999977e101

    1. Initial program 73.2%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in x around -inf 53.2%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.4 \cdot 10^{+222}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;x \leq -1.82 \cdot 10^{+149}:\\ \;\;\;\;z \cdot \frac{x}{-a}\\ \mathbf{elif}\;x \leq -1.2 \cdot 10^{+68}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;x \leq -4200000000000:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{-190}:\\ \;\;\;\;y\\ \mathbf{elif}\;x \leq 1.85 \cdot 10^{-107}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;x \leq 3.8 \cdot 10^{-67}:\\ \;\;\;\;y\\ \mathbf{elif}\;x \leq 10^{+102}:\\ \;\;\;\;\frac{x \cdot z}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 60.2% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z - t\right) \cdot \frac{y}{a - t}\\ t_2 := x + z \cdot \frac{y - x}{a}\\ \mathbf{if}\;a \leq -1.55 \cdot 10^{-12}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -2 \cdot 10^{-82}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -1.42 \cdot 10^{-98}:\\ \;\;\;\;x - x \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq -6.2 \cdot 10^{-196}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -1 \cdot 10^{-211}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{-231}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{+50}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* (- z t) (/ y (- a t)))) (t_2 (+ x (* z (/ (- y x) a)))))
   (if (<= a -1.55e-12)
     t_2
     (if (<= a -2e-82)
       t_1
       (if (<= a -1.42e-98)
         (- x (* x (/ z a)))
         (if (<= a -6.2e-196)
           t_1
           (if (<= a -1e-211)
             (* x (/ (- z a) t))
             (if (<= a 5.5e-231)
               (* z (/ (- y x) (- a t)))
               (if (<= a 1.35e+50) t_1 t_2)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (z - t) * (y / (a - t));
	double t_2 = x + (z * ((y - x) / a));
	double tmp;
	if (a <= -1.55e-12) {
		tmp = t_2;
	} else if (a <= -2e-82) {
		tmp = t_1;
	} else if (a <= -1.42e-98) {
		tmp = x - (x * (z / a));
	} else if (a <= -6.2e-196) {
		tmp = t_1;
	} else if (a <= -1e-211) {
		tmp = x * ((z - a) / t);
	} else if (a <= 5.5e-231) {
		tmp = z * ((y - x) / (a - t));
	} else if (a <= 1.35e+50) {
		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 = (z - t) * (y / (a - t))
    t_2 = x + (z * ((y - x) / a))
    if (a <= (-1.55d-12)) then
        tmp = t_2
    else if (a <= (-2d-82)) then
        tmp = t_1
    else if (a <= (-1.42d-98)) then
        tmp = x - (x * (z / a))
    else if (a <= (-6.2d-196)) then
        tmp = t_1
    else if (a <= (-1d-211)) then
        tmp = x * ((z - a) / t)
    else if (a <= 5.5d-231) then
        tmp = z * ((y - x) / (a - t))
    else if (a <= 1.35d+50) 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 = (z - t) * (y / (a - t));
	double t_2 = x + (z * ((y - x) / a));
	double tmp;
	if (a <= -1.55e-12) {
		tmp = t_2;
	} else if (a <= -2e-82) {
		tmp = t_1;
	} else if (a <= -1.42e-98) {
		tmp = x - (x * (z / a));
	} else if (a <= -6.2e-196) {
		tmp = t_1;
	} else if (a <= -1e-211) {
		tmp = x * ((z - a) / t);
	} else if (a <= 5.5e-231) {
		tmp = z * ((y - x) / (a - t));
	} else if (a <= 1.35e+50) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (z - t) * (y / (a - t))
	t_2 = x + (z * ((y - x) / a))
	tmp = 0
	if a <= -1.55e-12:
		tmp = t_2
	elif a <= -2e-82:
		tmp = t_1
	elif a <= -1.42e-98:
		tmp = x - (x * (z / a))
	elif a <= -6.2e-196:
		tmp = t_1
	elif a <= -1e-211:
		tmp = x * ((z - a) / t)
	elif a <= 5.5e-231:
		tmp = z * ((y - x) / (a - t))
	elif a <= 1.35e+50:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(z - t) * Float64(y / Float64(a - t)))
	t_2 = Float64(x + Float64(z * Float64(Float64(y - x) / a)))
	tmp = 0.0
	if (a <= -1.55e-12)
		tmp = t_2;
	elseif (a <= -2e-82)
		tmp = t_1;
	elseif (a <= -1.42e-98)
		tmp = Float64(x - Float64(x * Float64(z / a)));
	elseif (a <= -6.2e-196)
		tmp = t_1;
	elseif (a <= -1e-211)
		tmp = Float64(x * Float64(Float64(z - a) / t));
	elseif (a <= 5.5e-231)
		tmp = Float64(z * Float64(Float64(y - x) / Float64(a - t)));
	elseif (a <= 1.35e+50)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (z - t) * (y / (a - t));
	t_2 = x + (z * ((y - x) / a));
	tmp = 0.0;
	if (a <= -1.55e-12)
		tmp = t_2;
	elseif (a <= -2e-82)
		tmp = t_1;
	elseif (a <= -1.42e-98)
		tmp = x - (x * (z / a));
	elseif (a <= -6.2e-196)
		tmp = t_1;
	elseif (a <= -1e-211)
		tmp = x * ((z - a) / t);
	elseif (a <= 5.5e-231)
		tmp = z * ((y - x) / (a - t));
	elseif (a <= 1.35e+50)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.55e-12], t$95$2, If[LessEqual[a, -2e-82], t$95$1, If[LessEqual[a, -1.42e-98], N[(x - N[(x * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -6.2e-196], t$95$1, If[LessEqual[a, -1e-211], N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.5e-231], N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.35e+50], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -2 \cdot 10^{-82}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq -6.2 \cdot 10^{-196}:\\
\;\;\;\;t\_1\\

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

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

\mathbf{elif}\;a \leq 1.35 \cdot 10^{+50}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -1.5500000000000001e-12 or 1.35e50 < a

    1. Initial program 66.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 59.7%

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

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

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

    if -1.5500000000000001e-12 < a < -2e-82 or -1.41999999999999999e-98 < a < -6.19999999999999986e-196 or 5.49999999999999951e-231 < a < 1.35e50

    1. Initial program 68.4%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. associate-/r/80.5%

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

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

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

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

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

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

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

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

    if -2e-82 < a < -1.41999999999999999e-98

    1. Initial program 99.7%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 99.7%

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

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

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

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

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

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

    if -6.19999999999999986e-196 < a < -1.00000000000000009e-211

    1. Initial program 72.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in x around -inf 99.8%

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

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

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

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

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

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

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

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

    if -1.00000000000000009e-211 < a < 5.49999999999999951e-231

    1. Initial program 70.9%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. associate-/r/75.2%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.55 \cdot 10^{-12}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;a \leq -2 \cdot 10^{-82}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{elif}\;a \leq -1.42 \cdot 10^{-98}:\\ \;\;\;\;x - x \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq -6.2 \cdot 10^{-196}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{elif}\;a \leq -1 \cdot 10^{-211}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{-231}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{+50}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 60.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z - t\right) \cdot \frac{y}{a - t}\\ t_2 := x + z \cdot \frac{y - x}{a}\\ \mathbf{if}\;a \leq -9 \cdot 10^{-14}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -1.8 \cdot 10^{-69}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -1.4 \cdot 10^{-98}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot z}{a}\\ \mathbf{elif}\;a \leq -7.2 \cdot 10^{-196}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -1 \cdot 10^{-211}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{-218}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;a \leq 4.8 \cdot 10^{+50}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* (- z t) (/ y (- a t)))) (t_2 (+ x (* z (/ (- y x) a)))))
   (if (<= a -9e-14)
     t_2
     (if (<= a -1.8e-69)
       t_1
       (if (<= a -1.4e-98)
         (+ x (/ (* (- y x) z) a))
         (if (<= a -7.2e-196)
           t_1
           (if (<= a -1e-211)
             (* x (/ (- z a) t))
             (if (<= a 1.2e-218)
               (* z (/ (- y x) (- a t)))
               (if (<= a 4.8e+50) t_1 t_2)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (z - t) * (y / (a - t));
	double t_2 = x + (z * ((y - x) / a));
	double tmp;
	if (a <= -9e-14) {
		tmp = t_2;
	} else if (a <= -1.8e-69) {
		tmp = t_1;
	} else if (a <= -1.4e-98) {
		tmp = x + (((y - x) * z) / a);
	} else if (a <= -7.2e-196) {
		tmp = t_1;
	} else if (a <= -1e-211) {
		tmp = x * ((z - a) / t);
	} else if (a <= 1.2e-218) {
		tmp = z * ((y - x) / (a - t));
	} else if (a <= 4.8e+50) {
		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 = (z - t) * (y / (a - t))
    t_2 = x + (z * ((y - x) / a))
    if (a <= (-9d-14)) then
        tmp = t_2
    else if (a <= (-1.8d-69)) then
        tmp = t_1
    else if (a <= (-1.4d-98)) then
        tmp = x + (((y - x) * z) / a)
    else if (a <= (-7.2d-196)) then
        tmp = t_1
    else if (a <= (-1d-211)) then
        tmp = x * ((z - a) / t)
    else if (a <= 1.2d-218) then
        tmp = z * ((y - x) / (a - t))
    else if (a <= 4.8d+50) 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 = (z - t) * (y / (a - t));
	double t_2 = x + (z * ((y - x) / a));
	double tmp;
	if (a <= -9e-14) {
		tmp = t_2;
	} else if (a <= -1.8e-69) {
		tmp = t_1;
	} else if (a <= -1.4e-98) {
		tmp = x + (((y - x) * z) / a);
	} else if (a <= -7.2e-196) {
		tmp = t_1;
	} else if (a <= -1e-211) {
		tmp = x * ((z - a) / t);
	} else if (a <= 1.2e-218) {
		tmp = z * ((y - x) / (a - t));
	} else if (a <= 4.8e+50) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (z - t) * (y / (a - t))
	t_2 = x + (z * ((y - x) / a))
	tmp = 0
	if a <= -9e-14:
		tmp = t_2
	elif a <= -1.8e-69:
		tmp = t_1
	elif a <= -1.4e-98:
		tmp = x + (((y - x) * z) / a)
	elif a <= -7.2e-196:
		tmp = t_1
	elif a <= -1e-211:
		tmp = x * ((z - a) / t)
	elif a <= 1.2e-218:
		tmp = z * ((y - x) / (a - t))
	elif a <= 4.8e+50:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(z - t) * Float64(y / Float64(a - t)))
	t_2 = Float64(x + Float64(z * Float64(Float64(y - x) / a)))
	tmp = 0.0
	if (a <= -9e-14)
		tmp = t_2;
	elseif (a <= -1.8e-69)
		tmp = t_1;
	elseif (a <= -1.4e-98)
		tmp = Float64(x + Float64(Float64(Float64(y - x) * z) / a));
	elseif (a <= -7.2e-196)
		tmp = t_1;
	elseif (a <= -1e-211)
		tmp = Float64(x * Float64(Float64(z - a) / t));
	elseif (a <= 1.2e-218)
		tmp = Float64(z * Float64(Float64(y - x) / Float64(a - t)));
	elseif (a <= 4.8e+50)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (z - t) * (y / (a - t));
	t_2 = x + (z * ((y - x) / a));
	tmp = 0.0;
	if (a <= -9e-14)
		tmp = t_2;
	elseif (a <= -1.8e-69)
		tmp = t_1;
	elseif (a <= -1.4e-98)
		tmp = x + (((y - x) * z) / a);
	elseif (a <= -7.2e-196)
		tmp = t_1;
	elseif (a <= -1e-211)
		tmp = x * ((z - a) / t);
	elseif (a <= 1.2e-218)
		tmp = z * ((y - x) / (a - t));
	elseif (a <= 4.8e+50)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -9e-14], t$95$2, If[LessEqual[a, -1.8e-69], t$95$1, If[LessEqual[a, -1.4e-98], N[(x + N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -7.2e-196], t$95$1, If[LessEqual[a, -1e-211], N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.2e-218], N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.8e+50], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1.8 \cdot 10^{-69}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq -7.2 \cdot 10^{-196}:\\
\;\;\;\;t\_1\\

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

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

\mathbf{elif}\;a \leq 4.8 \cdot 10^{+50}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -8.9999999999999995e-14 or 4.8000000000000004e50 < a

    1. Initial program 66.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 59.7%

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

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

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

    if -8.9999999999999995e-14 < a < -1.80000000000000009e-69 or -1.3999999999999999e-98 < a < -7.2000000000000001e-196 or 1.2e-218 < a < 4.8000000000000004e50

    1. Initial program 68.0%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. associate-/r/80.2%

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

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

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

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

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

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

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

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

    if -1.80000000000000009e-69 < a < -1.3999999999999999e-98

    1. Initial program 99.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 99.8%

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

    if -7.2000000000000001e-196 < a < -1.00000000000000009e-211

    1. Initial program 72.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in x around -inf 99.8%

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

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

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

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

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

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

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

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

    if -1.00000000000000009e-211 < a < 1.2e-218

    1. Initial program 70.9%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. associate-/r/75.2%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9 \cdot 10^{-14}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;a \leq -1.8 \cdot 10^{-69}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{elif}\;a \leq -1.4 \cdot 10^{-98}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot z}{a}\\ \mathbf{elif}\;a \leq -7.2 \cdot 10^{-196}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{elif}\;a \leq -1 \cdot 10^{-211}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{-218}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;a \leq 4.8 \cdot 10^{+50}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 56.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z - t\right) \cdot \frac{y}{a - t}\\ t_2 := z \cdot \frac{y - x}{a - t}\\ \mathbf{if}\;z \leq -5.8 \cdot 10^{+64}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -1.16 \cdot 10^{-145}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.02 \cdot 10^{-156}:\\ \;\;\;\;x - y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 9.9 \cdot 10^{-141}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{+17}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* (- z t) (/ y (- a t)))) (t_2 (* z (/ (- y x) (- a t)))))
   (if (<= z -5.8e+64)
     t_2
     (if (<= z -1.16e-145)
       t_1
       (if (<= z 1.02e-156)
         (- x (* y (/ t a)))
         (if (<= z 9.9e-141)
           t_1
           (if (<= z 7.5e+17) (+ x (* y (/ z a))) t_2)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (z - t) * (y / (a - t));
	double t_2 = z * ((y - x) / (a - t));
	double tmp;
	if (z <= -5.8e+64) {
		tmp = t_2;
	} else if (z <= -1.16e-145) {
		tmp = t_1;
	} else if (z <= 1.02e-156) {
		tmp = x - (y * (t / a));
	} else if (z <= 9.9e-141) {
		tmp = t_1;
	} else if (z <= 7.5e+17) {
		tmp = x + (y * (z / a));
	} 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 = (z - t) * (y / (a - t))
    t_2 = z * ((y - x) / (a - t))
    if (z <= (-5.8d+64)) then
        tmp = t_2
    else if (z <= (-1.16d-145)) then
        tmp = t_1
    else if (z <= 1.02d-156) then
        tmp = x - (y * (t / a))
    else if (z <= 9.9d-141) then
        tmp = t_1
    else if (z <= 7.5d+17) then
        tmp = x + (y * (z / a))
    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 = (z - t) * (y / (a - t));
	double t_2 = z * ((y - x) / (a - t));
	double tmp;
	if (z <= -5.8e+64) {
		tmp = t_2;
	} else if (z <= -1.16e-145) {
		tmp = t_1;
	} else if (z <= 1.02e-156) {
		tmp = x - (y * (t / a));
	} else if (z <= 9.9e-141) {
		tmp = t_1;
	} else if (z <= 7.5e+17) {
		tmp = x + (y * (z / a));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (z - t) * (y / (a - t))
	t_2 = z * ((y - x) / (a - t))
	tmp = 0
	if z <= -5.8e+64:
		tmp = t_2
	elif z <= -1.16e-145:
		tmp = t_1
	elif z <= 1.02e-156:
		tmp = x - (y * (t / a))
	elif z <= 9.9e-141:
		tmp = t_1
	elif z <= 7.5e+17:
		tmp = x + (y * (z / a))
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(z - t) * Float64(y / Float64(a - t)))
	t_2 = Float64(z * Float64(Float64(y - x) / Float64(a - t)))
	tmp = 0.0
	if (z <= -5.8e+64)
		tmp = t_2;
	elseif (z <= -1.16e-145)
		tmp = t_1;
	elseif (z <= 1.02e-156)
		tmp = Float64(x - Float64(y * Float64(t / a)));
	elseif (z <= 9.9e-141)
		tmp = t_1;
	elseif (z <= 7.5e+17)
		tmp = Float64(x + Float64(y * Float64(z / a)));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (z - t) * (y / (a - t));
	t_2 = z * ((y - x) / (a - t));
	tmp = 0.0;
	if (z <= -5.8e+64)
		tmp = t_2;
	elseif (z <= -1.16e-145)
		tmp = t_1;
	elseif (z <= 1.02e-156)
		tmp = x - (y * (t / a));
	elseif (z <= 9.9e-141)
		tmp = t_1;
	elseif (z <= 7.5e+17)
		tmp = x + (y * (z / a));
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.8e+64], t$95$2, If[LessEqual[z, -1.16e-145], t$95$1, If[LessEqual[z, 1.02e-156], N[(x - N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.9e-141], t$95$1, If[LessEqual[z, 7.5e+17], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -1.16 \cdot 10^{-145}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 9.9 \cdot 10^{-141}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 7.5 \cdot 10^{+17}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -5.79999999999999986e64 or 7.5e17 < z

    1. Initial program 71.2%

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

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

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

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

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

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

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

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

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

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

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

    if -5.79999999999999986e64 < z < -1.16000000000000004e-145 or 1.02e-156 < z < 9.9000000000000006e-141

    1. Initial program 66.4%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. associate-/r/79.6%

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

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

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

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

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

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

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

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

    if -1.16000000000000004e-145 < z < 1.02e-156

    1. Initial program 65.3%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 63.9%

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

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

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

        \[\leadsto x - \color{blue}{t \cdot \frac{y - x}{a - t}} \]
    5. Simplified60.9%

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

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

      \[\leadsto x - \color{blue}{\frac{t \cdot y}{a}} \]
    8. Step-by-step derivation
      1. *-commutative52.0%

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

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

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

    if 9.9000000000000006e-141 < z < 7.5e17

    1. Initial program 70.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 44.8%

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
    6. Simplified45.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{+64}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;z \leq -1.16 \cdot 10^{-145}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{elif}\;z \leq 1.02 \cdot 10^{-156}:\\ \;\;\;\;x - y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 9.9 \cdot 10^{-141}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{+17}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 67.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + z \cdot \frac{y - x}{a}\\ \mathbf{if}\;a \leq -6.2 \cdot 10^{-12}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -1.62 \cdot 10^{-69}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{elif}\;a \leq -1.42 \cdot 10^{-98}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot z}{a}\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-161}:\\ \;\;\;\;y + \frac{z \cdot \left(x - y\right)}{t}\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{+88}:\\ \;\;\;\;y + x \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 (* z (/ (- y x) a)))))
   (if (<= a -6.2e-12)
     t_1
     (if (<= a -1.62e-69)
       (* (- z t) (/ y (- a t)))
       (if (<= a -1.42e-98)
         (+ x (/ (* (- y x) z) a))
         (if (<= a 1.25e-161)
           (+ y (/ (* z (- x y)) t))
           (if (<= a 2.7e+88) (+ y (* x (/ (- z a) t))) t_1)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (z * ((y - x) / a));
	double tmp;
	if (a <= -6.2e-12) {
		tmp = t_1;
	} else if (a <= -1.62e-69) {
		tmp = (z - t) * (y / (a - t));
	} else if (a <= -1.42e-98) {
		tmp = x + (((y - x) * z) / a);
	} else if (a <= 1.25e-161) {
		tmp = y + ((z * (x - y)) / t);
	} else if (a <= 2.7e+88) {
		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 + (z * ((y - x) / a))
    if (a <= (-6.2d-12)) then
        tmp = t_1
    else if (a <= (-1.62d-69)) then
        tmp = (z - t) * (y / (a - t))
    else if (a <= (-1.42d-98)) then
        tmp = x + (((y - x) * z) / a)
    else if (a <= 1.25d-161) then
        tmp = y + ((z * (x - y)) / t)
    else if (a <= 2.7d+88) 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 + (z * ((y - x) / a));
	double tmp;
	if (a <= -6.2e-12) {
		tmp = t_1;
	} else if (a <= -1.62e-69) {
		tmp = (z - t) * (y / (a - t));
	} else if (a <= -1.42e-98) {
		tmp = x + (((y - x) * z) / a);
	} else if (a <= 1.25e-161) {
		tmp = y + ((z * (x - y)) / t);
	} else if (a <= 2.7e+88) {
		tmp = y + (x * ((z - a) / t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (z * ((y - x) / a))
	tmp = 0
	if a <= -6.2e-12:
		tmp = t_1
	elif a <= -1.62e-69:
		tmp = (z - t) * (y / (a - t))
	elif a <= -1.42e-98:
		tmp = x + (((y - x) * z) / a)
	elif a <= 1.25e-161:
		tmp = y + ((z * (x - y)) / t)
	elif a <= 2.7e+88:
		tmp = y + (x * ((z - a) / t))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(z * Float64(Float64(y - x) / a)))
	tmp = 0.0
	if (a <= -6.2e-12)
		tmp = t_1;
	elseif (a <= -1.62e-69)
		tmp = Float64(Float64(z - t) * Float64(y / Float64(a - t)));
	elseif (a <= -1.42e-98)
		tmp = Float64(x + Float64(Float64(Float64(y - x) * z) / a));
	elseif (a <= 1.25e-161)
		tmp = Float64(y + Float64(Float64(z * Float64(x - y)) / t));
	elseif (a <= 2.7e+88)
		tmp = Float64(y + Float64(x * Float64(Float64(z - a) / t)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (z * ((y - x) / a));
	tmp = 0.0;
	if (a <= -6.2e-12)
		tmp = t_1;
	elseif (a <= -1.62e-69)
		tmp = (z - t) * (y / (a - t));
	elseif (a <= -1.42e-98)
		tmp = x + (((y - x) * z) / a);
	elseif (a <= 1.25e-161)
		tmp = y + ((z * (x - y)) / t);
	elseif (a <= 2.7e+88)
		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[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -6.2e-12], t$95$1, If[LessEqual[a, -1.62e-69], N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.42e-98], N[(x + N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.25e-161], N[(y + N[(N[(z * N[(x - y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.7e+88], N[(y + N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -6.2000000000000002e-12 or 2.70000000000000016e88 < a

    1. Initial program 69.3%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 61.8%

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

        \[\leadsto x + \color{blue}{z \cdot \frac{y - x}{a}} \]
    5. Simplified73.0%

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

    if -6.2000000000000002e-12 < a < -1.62e-69

    1. Initial program 82.5%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. associate-/r/99.7%

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

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

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

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

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

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

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

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

    if -1.62e-69 < a < -1.41999999999999999e-98

    1. Initial program 99.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 99.8%

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

    if -1.41999999999999999e-98 < a < 1.25e-161

    1. Initial program 68.2%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 85.3%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.25e-161 < a < 2.70000000000000016e88

    1. Initial program 61.0%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 56.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.2 \cdot 10^{-12}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;a \leq -1.62 \cdot 10^{-69}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{elif}\;a \leq -1.42 \cdot 10^{-98}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot z}{a}\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-161}:\\ \;\;\;\;y + \frac{z \cdot \left(x - y\right)}{t}\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{+88}:\\ \;\;\;\;y + x \cdot \frac{z - a}{t}\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 67.3% accurate, 0.4× speedup?

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -5.99999999999999968e-13 or 4.99999999999999997e88 < a

    1. Initial program 69.3%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 61.8%

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

        \[\leadsto x + \color{blue}{z \cdot \frac{y - x}{a}} \]
    5. Simplified73.0%

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

    if -5.99999999999999968e-13 < a < -1.70000000000000004e-69

    1. Initial program 82.5%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. associate-/r/99.7%

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

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

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

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

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

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

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

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

    if -1.70000000000000004e-69 < a < -1.41999999999999999e-98

    1. Initial program 99.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 99.8%

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

    if -1.41999999999999999e-98 < a < 1.18000000000000003e-147

    1. Initial program 69.0%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 85.7%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.18000000000000003e-147 < a < 4.99999999999999997e88

    1. Initial program 59.3%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 54.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6 \cdot 10^{-13}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;a \leq -1.7 \cdot 10^{-69}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{elif}\;a \leq -1.42 \cdot 10^{-98}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot z}{a}\\ \mathbf{elif}\;a \leq 1.18 \cdot 10^{-147}:\\ \;\;\;\;y + \frac{z \cdot \left(x - y\right)}{t}\\ \mathbf{elif}\;a \leq 5 \cdot 10^{+88}:\\ \;\;\;\;y + \left(z - a\right) \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 67.2% accurate, 0.4× speedup?

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -1.29999999999999991e-12 or 4.7999999999999998e88 < a

    1. Initial program 69.3%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 61.8%

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

        \[\leadsto x + \color{blue}{z \cdot \frac{y - x}{a}} \]
    5. Simplified73.0%

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

    if -1.29999999999999991e-12 < a < -3.7000000000000001e-82

    1. Initial program 83.9%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. associate-/r/99.7%

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

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

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

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

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

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

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

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

    if -3.7000000000000001e-82 < a < -5.0999999999999999e-99

    1. Initial program 86.3%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 86.9%

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

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

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

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

    if -5.0999999999999999e-99 < a < 9.50000000000000069e-148

    1. Initial program 69.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 86.7%

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.50000000000000069e-148 < a < 4.7999999999999998e88

    1. Initial program 59.3%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 54.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.3 \cdot 10^{-12}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;a \leq -3.7 \cdot 10^{-82}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{elif}\;a \leq -5.1 \cdot 10^{-99}:\\ \;\;\;\;x \cdot \left(\frac{z - t}{t - a} + 1\right)\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{-148}:\\ \;\;\;\;y + \frac{z \cdot \left(x - y\right)}{t}\\ \mathbf{elif}\;a \leq 4.8 \cdot 10^{+88}:\\ \;\;\;\;y + \left(z - a\right) \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 39.0% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{z}{t}\\ \mathbf{if}\;a \leq -3.7 \cdot 10^{+27}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.26 \cdot 10^{-194}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq -2.9 \cdot 10^{-242}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -2.85 \cdot 10^{-269}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 2.55 \cdot 10^{-248}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 6 \cdot 10^{+52}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (/ z t))))
   (if (<= a -3.7e+27)
     x
     (if (<= a -1.26e-194)
       y
       (if (<= a -2.9e-242)
         t_1
         (if (<= a -2.85e-269)
           y
           (if (<= a 2.55e-248) t_1 (if (<= a 6e+52) y x))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (z / t);
	double tmp;
	if (a <= -3.7e+27) {
		tmp = x;
	} else if (a <= -1.26e-194) {
		tmp = y;
	} else if (a <= -2.9e-242) {
		tmp = t_1;
	} else if (a <= -2.85e-269) {
		tmp = y;
	} else if (a <= 2.55e-248) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = x * (z / t)
    if (a <= (-3.7d+27)) then
        tmp = x
    else if (a <= (-1.26d-194)) then
        tmp = y
    else if (a <= (-2.9d-242)) then
        tmp = t_1
    else if (a <= (-2.85d-269)) then
        tmp = y
    else if (a <= 2.55d-248) then
        tmp = t_1
    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 t_1 = x * (z / t);
	double tmp;
	if (a <= -3.7e+27) {
		tmp = x;
	} else if (a <= -1.26e-194) {
		tmp = y;
	} else if (a <= -2.9e-242) {
		tmp = t_1;
	} else if (a <= -2.85e-269) {
		tmp = y;
	} else if (a <= 2.55e-248) {
		tmp = t_1;
	} else if (a <= 6e+52) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (z / t)
	tmp = 0
	if a <= -3.7e+27:
		tmp = x
	elif a <= -1.26e-194:
		tmp = y
	elif a <= -2.9e-242:
		tmp = t_1
	elif a <= -2.85e-269:
		tmp = y
	elif a <= 2.55e-248:
		tmp = t_1
	elif a <= 6e+52:
		tmp = y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(z / t))
	tmp = 0.0
	if (a <= -3.7e+27)
		tmp = x;
	elseif (a <= -1.26e-194)
		tmp = y;
	elseif (a <= -2.9e-242)
		tmp = t_1;
	elseif (a <= -2.85e-269)
		tmp = y;
	elseif (a <= 2.55e-248)
		tmp = t_1;
	elseif (a <= 6e+52)
		tmp = y;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (z / t);
	tmp = 0.0;
	if (a <= -3.7e+27)
		tmp = x;
	elseif (a <= -1.26e-194)
		tmp = y;
	elseif (a <= -2.9e-242)
		tmp = t_1;
	elseif (a <= -2.85e-269)
		tmp = y;
	elseif (a <= 2.55e-248)
		tmp = t_1;
	elseif (a <= 6e+52)
		tmp = y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.7e+27], x, If[LessEqual[a, -1.26e-194], y, If[LessEqual[a, -2.9e-242], t$95$1, If[LessEqual[a, -2.85e-269], y, If[LessEqual[a, 2.55e-248], t$95$1, If[LessEqual[a, 6e+52], y, x]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1.26 \cdot 10^{-194}:\\
\;\;\;\;y\\

\mathbf{elif}\;a \leq -2.9 \cdot 10^{-242}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -2.85 \cdot 10^{-269}:\\
\;\;\;\;y\\

\mathbf{elif}\;a \leq 2.55 \cdot 10^{-248}:\\
\;\;\;\;t\_1\\

\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 < -3.70000000000000002e27 or 6e52 < a

    1. Initial program 65.3%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 43.7%

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

    if -3.70000000000000002e27 < a < -1.26e-194 or -2.9000000000000001e-242 < a < -2.84999999999999985e-269 or 2.54999999999999986e-248 < a < 6e52

    1. Initial program 71.2%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 40.3%

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

    if -1.26e-194 < a < -2.9000000000000001e-242 or -2.84999999999999985e-269 < a < 2.54999999999999986e-248

    1. Initial program 71.9%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in x around -inf 72.7%

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{z}{t}} \]
    8. Simplified61.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.7 \cdot 10^{+27}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.26 \cdot 10^{-194}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq -2.9 \cdot 10^{-242}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{elif}\;a \leq -2.85 \cdot 10^{-269}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 2.55 \cdot 10^{-248}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{elif}\;a \leq 6 \cdot 10^{+52}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 38.5% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;a \leq -4.2 \cdot 10^{+27}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -2.8 \cdot 10^{-142}:\\
\;\;\;\;y\\

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

\mathbf{elif}\;a \leq 1.65 \cdot 10^{+53}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -3.4000000000000001e110 or -4.7000000000000002e51 < a < -4.19999999999999989e27 or 1.6500000000000001e53 < a

    1. Initial program 65.9%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 50.2%

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

    if -3.4000000000000001e110 < a < -4.7000000000000002e51

    1. Initial program 61.7%

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
    7. Simplified48.4%

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

    if -4.19999999999999989e27 < a < -2.80000000000000004e-142 or 8.9999999999999992e-248 < a < 1.6500000000000001e53

    1. Initial program 70.0%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 38.0%

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

    if -2.80000000000000004e-142 < a < 8.9999999999999992e-248

    1. Initial program 73.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in x around -inf 55.9%

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{z}{t}} \]
    8. Simplified48.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.4 \cdot 10^{+110}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -4.7 \cdot 10^{+51}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq -4.2 \cdot 10^{+27}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -2.8 \cdot 10^{-142}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 9 \cdot 10^{-248}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{+53}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 38.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.2 \cdot 10^{+111}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.65 \cdot 10^{+52}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq -9 \cdot 10^{+27}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.4 \cdot 10^{-142}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 1.75 \cdot 10^{-248}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{+55}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -1.2e+111)
   x
   (if (<= a -1.65e+52)
     (* y (/ z a))
     (if (<= a -9e+27)
       x
       (if (<= a -1.4e-142)
         y
         (if (<= a 1.75e-248) (/ x (/ t z)) (if (<= a 5.2e+55) y x)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1.2e+111) {
		tmp = x;
	} else if (a <= -1.65e+52) {
		tmp = y * (z / a);
	} else if (a <= -9e+27) {
		tmp = x;
	} else if (a <= -1.4e-142) {
		tmp = y;
	} else if (a <= 1.75e-248) {
		tmp = x / (t / z);
	} else if (a <= 5.2e+55) {
		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.2d+111)) then
        tmp = x
    else if (a <= (-1.65d+52)) then
        tmp = y * (z / a)
    else if (a <= (-9d+27)) then
        tmp = x
    else if (a <= (-1.4d-142)) then
        tmp = y
    else if (a <= 1.75d-248) then
        tmp = x / (t / z)
    else if (a <= 5.2d+55) 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.2e+111) {
		tmp = x;
	} else if (a <= -1.65e+52) {
		tmp = y * (z / a);
	} else if (a <= -9e+27) {
		tmp = x;
	} else if (a <= -1.4e-142) {
		tmp = y;
	} else if (a <= 1.75e-248) {
		tmp = x / (t / z);
	} else if (a <= 5.2e+55) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -1.2e+111:
		tmp = x
	elif a <= -1.65e+52:
		tmp = y * (z / a)
	elif a <= -9e+27:
		tmp = x
	elif a <= -1.4e-142:
		tmp = y
	elif a <= 1.75e-248:
		tmp = x / (t / z)
	elif a <= 5.2e+55:
		tmp = y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -1.2e+111)
		tmp = x;
	elseif (a <= -1.65e+52)
		tmp = Float64(y * Float64(z / a));
	elseif (a <= -9e+27)
		tmp = x;
	elseif (a <= -1.4e-142)
		tmp = y;
	elseif (a <= 1.75e-248)
		tmp = Float64(x / Float64(t / z));
	elseif (a <= 5.2e+55)
		tmp = y;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -1.2e+111)
		tmp = x;
	elseif (a <= -1.65e+52)
		tmp = y * (z / a);
	elseif (a <= -9e+27)
		tmp = x;
	elseif (a <= -1.4e-142)
		tmp = y;
	elseif (a <= 1.75e-248)
		tmp = x / (t / z);
	elseif (a <= 5.2e+55)
		tmp = y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.2e+111], x, If[LessEqual[a, -1.65e+52], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -9e+27], x, If[LessEqual[a, -1.4e-142], y, If[LessEqual[a, 1.75e-248], N[(x / N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.2e+55], y, x]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;a \leq -9 \cdot 10^{+27}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -1.4 \cdot 10^{-142}:\\
\;\;\;\;y\\

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

\mathbf{elif}\;a \leq 5.2 \cdot 10^{+55}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.20000000000000003e111 or -1.65e52 < a < -8.9999999999999998e27 or 5.2e55 < a

    1. Initial program 65.9%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 50.2%

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

    if -1.20000000000000003e111 < a < -1.65e52

    1. Initial program 61.7%

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
    7. Simplified48.4%

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

    if -8.9999999999999998e27 < a < -1.40000000000000002e-142 or 1.74999999999999991e-248 < a < 5.2e55

    1. Initial program 70.0%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 38.0%

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

    if -1.40000000000000002e-142 < a < 1.74999999999999991e-248

    1. Initial program 73.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in x around -inf 55.9%

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{z}{t}} \]
    8. Simplified48.4%

      \[\leadsto \color{blue}{x \cdot \frac{z}{t}} \]
    9. Step-by-step derivation
      1. clear-num48.5%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{t}{z}}} \]
      2. un-div-inv48.6%

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{z}}} \]
    10. Applied egg-rr48.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.2 \cdot 10^{+111}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.65 \cdot 10^{+52}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq -9 \cdot 10^{+27}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.4 \cdot 10^{-142}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 1.75 \cdot 10^{-248}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{+55}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 74.7% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t \leq -1.25 \cdot 10^{-194}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 5.6 \cdot 10^{+98}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -7.00000000000000033e118

    1. Initial program 28.4%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.00000000000000033e118 < t < -1.2500000000000001e-194 or 1.1599999999999999e-252 < t < 5.6000000000000001e98

    1. Initial program 82.6%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 72.0%

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

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

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

    if -1.2500000000000001e-194 < t < 1.1599999999999999e-252

    1. Initial program 99.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 96.0%

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

    if 5.6000000000000001e98 < t

    1. Initial program 32.4%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 82.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7 \cdot 10^{+118}:\\ \;\;\;\;y + x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq -1.25 \cdot 10^{-194}:\\ \;\;\;\;x - y \cdot \frac{z - t}{t - a}\\ \mathbf{elif}\;t \leq 1.16 \cdot 10^{-252}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot z}{a}\\ \mathbf{elif}\;t \leq 5.6 \cdot 10^{+98}:\\ \;\;\;\;x - y \cdot \frac{z - t}{t - a}\\ \mathbf{else}:\\ \;\;\;\;y + \left(z - a\right) \cdot \frac{x}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 77.2% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t \leq -9.5 \cdot 10^{-140}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 5.8 \cdot 10^{+102}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -8.00000000000000012e116

    1. Initial program 28.4%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.00000000000000012e116 < t < -9.50000000000000019e-140 or 8.4999999999999995e-116 < t < 5.8000000000000005e102

    1. Initial program 78.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 70.9%

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

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

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

    if -9.50000000000000019e-140 < t < 8.4999999999999995e-116

    1. Initial program 94.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 92.4%

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

    if 5.8000000000000005e102 < t

    1. Initial program 32.4%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 82.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 78.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - y \cdot \frac{z - t}{t - a}\\ t_2 := y + \left(z - a\right) \cdot \frac{x - y}{t}\\ \mathbf{if}\;t \leq -1.7 \cdot 10^{+117}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -3.3 \cdot 10^{-139}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{-115}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot z}{a - t}\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{+97}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (* y (/ (- z t) (- t a)))))
        (t_2 (+ y (* (- z a) (/ (- x y) t)))))
   (if (<= t -1.7e+117)
     t_2
     (if (<= t -3.3e-139)
       t_1
       (if (<= t 1.35e-115)
         (+ x (/ (* (- y x) z) (- a t)))
         (if (<= t 3.2e+97) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (y * ((z - t) / (t - a)));
	double t_2 = y + ((z - a) * ((x - y) / t));
	double tmp;
	if (t <= -1.7e+117) {
		tmp = t_2;
	} else if (t <= -3.3e-139) {
		tmp = t_1;
	} else if (t <= 1.35e-115) {
		tmp = x + (((y - x) * z) / (a - t));
	} else if (t <= 3.2e+97) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x - (y * ((z - t) / (t - a)))
    t_2 = y + ((z - a) * ((x - y) / t))
    if (t <= (-1.7d+117)) then
        tmp = t_2
    else if (t <= (-3.3d-139)) then
        tmp = t_1
    else if (t <= 1.35d-115) then
        tmp = x + (((y - x) * z) / (a - t))
    else if (t <= 3.2d+97) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (y * ((z - t) / (t - a)));
	double t_2 = y + ((z - a) * ((x - y) / t));
	double tmp;
	if (t <= -1.7e+117) {
		tmp = t_2;
	} else if (t <= -3.3e-139) {
		tmp = t_1;
	} else if (t <= 1.35e-115) {
		tmp = x + (((y - x) * z) / (a - t));
	} else if (t <= 3.2e+97) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (y * ((z - t) / (t - a)))
	t_2 = y + ((z - a) * ((x - y) / t))
	tmp = 0
	if t <= -1.7e+117:
		tmp = t_2
	elif t <= -3.3e-139:
		tmp = t_1
	elif t <= 1.35e-115:
		tmp = x + (((y - x) * z) / (a - t))
	elif t <= 3.2e+97:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(y * Float64(Float64(z - t) / Float64(t - a))))
	t_2 = Float64(y + Float64(Float64(z - a) * Float64(Float64(x - y) / t)))
	tmp = 0.0
	if (t <= -1.7e+117)
		tmp = t_2;
	elseif (t <= -3.3e-139)
		tmp = t_1;
	elseif (t <= 1.35e-115)
		tmp = Float64(x + Float64(Float64(Float64(y - x) * z) / Float64(a - t)));
	elseif (t <= 3.2e+97)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (y * ((z - t) / (t - a)));
	t_2 = y + ((z - a) * ((x - y) / t));
	tmp = 0.0;
	if (t <= -1.7e+117)
		tmp = t_2;
	elseif (t <= -3.3e-139)
		tmp = t_1;
	elseif (t <= 1.35e-115)
		tmp = x + (((y - x) * z) / (a - t));
	elseif (t <= 3.2e+97)
		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[(y * N[(N[(z - t), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(N[(z - a), $MachinePrecision] * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.7e+117], t$95$2, If[LessEqual[t, -3.3e-139], t$95$1, If[LessEqual[t, 1.35e-115], N[(x + N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.2e+97], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -3.3 \cdot 10^{-139}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 3.2 \cdot 10^{+97}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.7e117 or 3.20000000000000016e97 < t

    1. Initial program 30.2%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 67.0%

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

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

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

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

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

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

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

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

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

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

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

    if -1.7e117 < t < -3.3e-139 or 1.35e-115 < t < 3.20000000000000016e97

    1. Initial program 78.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 70.9%

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

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

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

    if -3.3e-139 < t < 1.35e-115

    1. Initial program 94.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 92.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.7 \cdot 10^{+117}:\\ \;\;\;\;y + \left(z - a\right) \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq -3.3 \cdot 10^{-139}:\\ \;\;\;\;x - y \cdot \frac{z - t}{t - a}\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{-115}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot z}{a - t}\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{+97}:\\ \;\;\;\;x - y \cdot \frac{z - t}{t - a}\\ \mathbf{else}:\\ \;\;\;\;y + \left(z - a\right) \cdot \frac{x - y}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 68.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + z \cdot \frac{y - x}{a}\\ \mathbf{if}\;a \leq -8 \cdot 10^{-14}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -2 \cdot 10^{-69}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{elif}\;a \leq -8.5 \cdot 10^{-99}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot z}{a}\\ \mathbf{elif}\;a \leq 2.55 \cdot 10^{-21}:\\ \;\;\;\;y + \frac{z \cdot \left(x - y\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* z (/ (- y x) a)))))
   (if (<= a -8e-14)
     t_1
     (if (<= a -2e-69)
       (* (- z t) (/ y (- a t)))
       (if (<= a -8.5e-99)
         (+ x (/ (* (- y x) z) a))
         (if (<= a 2.55e-21) (+ y (/ (* z (- x y)) t)) t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (z * ((y - x) / a));
	double tmp;
	if (a <= -8e-14) {
		tmp = t_1;
	} else if (a <= -2e-69) {
		tmp = (z - t) * (y / (a - t));
	} else if (a <= -8.5e-99) {
		tmp = x + (((y - x) * z) / a);
	} else if (a <= 2.55e-21) {
		tmp = y + ((z * (x - y)) / 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 * ((y - x) / a))
    if (a <= (-8d-14)) then
        tmp = t_1
    else if (a <= (-2d-69)) then
        tmp = (z - t) * (y / (a - t))
    else if (a <= (-8.5d-99)) then
        tmp = x + (((y - x) * z) / a)
    else if (a <= 2.55d-21) then
        tmp = y + ((z * (x - y)) / 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 * ((y - x) / a));
	double tmp;
	if (a <= -8e-14) {
		tmp = t_1;
	} else if (a <= -2e-69) {
		tmp = (z - t) * (y / (a - t));
	} else if (a <= -8.5e-99) {
		tmp = x + (((y - x) * z) / a);
	} else if (a <= 2.55e-21) {
		tmp = y + ((z * (x - y)) / t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (z * ((y - x) / a))
	tmp = 0
	if a <= -8e-14:
		tmp = t_1
	elif a <= -2e-69:
		tmp = (z - t) * (y / (a - t))
	elif a <= -8.5e-99:
		tmp = x + (((y - x) * z) / a)
	elif a <= 2.55e-21:
		tmp = y + ((z * (x - y)) / t)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(z * Float64(Float64(y - x) / a)))
	tmp = 0.0
	if (a <= -8e-14)
		tmp = t_1;
	elseif (a <= -2e-69)
		tmp = Float64(Float64(z - t) * Float64(y / Float64(a - t)));
	elseif (a <= -8.5e-99)
		tmp = Float64(x + Float64(Float64(Float64(y - x) * z) / a));
	elseif (a <= 2.55e-21)
		tmp = Float64(y + Float64(Float64(z * Float64(x - y)) / t));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (z * ((y - x) / a));
	tmp = 0.0;
	if (a <= -8e-14)
		tmp = t_1;
	elseif (a <= -2e-69)
		tmp = (z - t) * (y / (a - t));
	elseif (a <= -8.5e-99)
		tmp = x + (((y - x) * z) / a);
	elseif (a <= 2.55e-21)
		tmp = y + ((z * (x - y)) / 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[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -8e-14], t$95$1, If[LessEqual[a, -2e-69], N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -8.5e-99], N[(x + N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.55e-21], N[(y + N[(N[(z * N[(x - y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -7.99999999999999999e-14 or 2.55000000000000002e-21 < a

    1. Initial program 66.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 57.5%

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

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

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

    if -7.99999999999999999e-14 < a < -1.9999999999999999e-69

    1. Initial program 82.5%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. associate-/r/99.7%

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

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

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

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

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

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

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

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

    if -1.9999999999999999e-69 < a < -8.5000000000000004e-99

    1. Initial program 99.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 99.8%

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

    if -8.5000000000000004e-99 < a < 2.55000000000000002e-21

    1. Initial program 68.1%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 81.7%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8 \cdot 10^{-14}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;a \leq -2 \cdot 10^{-69}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{elif}\;a \leq -8.5 \cdot 10^{-99}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot z}{a}\\ \mathbf{elif}\;a \leq 2.55 \cdot 10^{-21}:\\ \;\;\;\;y + \frac{z \cdot \left(x - y\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 34.9% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;z \leq -1.75 \cdot 10^{-125} \lor \neg \left(z \leq 1.5 \cdot 10^{+21}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.7999999999999997e149 or -2.3499999999999998e115 < z < -1.74999999999999999e-125 or 1.5e21 < z

    1. Initial program 71.6%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. associate-/r/91.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a - t}} \]
    12. Simplified46.4%

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

    if -6.7999999999999997e149 < z < -2.3499999999999998e115

    1. Initial program 52.2%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in x around -inf 75.4%

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{z}{t}} \]
    8. Simplified60.1%

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

    if -1.74999999999999999e-125 < z < 1.5e21

    1. Initial program 67.2%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 41.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.8 \cdot 10^{+149}:\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \mathbf{elif}\;z \leq -2.35 \cdot 10^{+115}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{elif}\;z \leq -1.75 \cdot 10^{-125} \lor \neg \left(z \leq 1.5 \cdot 10^{+21}\right):\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 52.5% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq -6.2 \cdot 10^{-196}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 9 \cdot 10^{-83}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.41999999999999999e-98

    1. Initial program 74.3%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 61.7%

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

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

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

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

    if -1.41999999999999999e-98 < a < -6.19999999999999986e-196 or -9.2000000000000007e-233 < a < 8.99999999999999995e-83

    1. Initial program 66.6%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. associate-/r/74.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.19999999999999986e-196 < a < -9.2000000000000007e-233

    1. Initial program 77.7%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in x around -inf 99.8%

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

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

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

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

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

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

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

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

    if 8.99999999999999995e-83 < a

    1. Initial program 63.4%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 53.6%

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
    6. Simplified53.4%

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

        \[\leadsto x + y \cdot \color{blue}{\frac{1}{\frac{a}{z}}} \]
      2. un-div-inv53.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.42 \cdot 10^{-98}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq -6.2 \cdot 10^{-196}:\\ \;\;\;\;\frac{y}{t} \cdot \left(t - z\right)\\ \mathbf{elif}\;a \leq -9.2 \cdot 10^{-233}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;a \leq 9 \cdot 10^{-83}:\\ \;\;\;\;\frac{y}{t} \cdot \left(t - z\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 64.2% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.8000000000000001e65 or 2.8e19 < z

    1. Initial program 71.2%

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

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

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

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

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

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

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

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

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

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

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

    if -5.8000000000000001e65 < z < -5.49999999999999987e-126

    1. Initial program 66.9%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. associate-/r/80.4%

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

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

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

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

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

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

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

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

    if -5.49999999999999987e-126 < z < 2.8e19

    1. Initial program 66.9%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 64.7%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{+65}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;z \leq -5.5 \cdot 10^{-126}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{+19}:\\ \;\;\;\;x + t \cdot \frac{y}{t - a}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 83.5% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.2000000000000001e115 or 2.04999999999999986e61 < t

    1. Initial program 33.7%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 66.7%

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

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

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

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

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

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

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

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

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

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

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

    if -6.2000000000000001e115 < t < 2.04999999999999986e61

    1. Initial program 86.9%

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

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

Alternative 21: 37.6% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq -4.8 \cdot 10^{-145}:\\
\;\;\;\;y\\

\mathbf{elif}\;z \leq 1.4 \cdot 10^{+22}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.6e19

    1. Initial program 69.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 50.7%

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

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

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

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

    if -3.6e19 < z < -4.8000000000000003e-145

    1. Initial program 72.7%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 36.9%

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

    if -4.8000000000000003e-145 < z < 1.4e22

    1. Initial program 67.2%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 41.9%

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

    if 1.4e22 < z

    1. Initial program 68.5%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. associate-/r/93.2%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.6 \cdot 10^{+19}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;z \leq -4.8 \cdot 10^{-145}:\\ \;\;\;\;y\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+22}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 52.4% accurate, 0.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.5999999999999996e230 or 4.8e60 < t

    1. Initial program 31.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 52.0%

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

    if -4.5999999999999996e230 < t < -6.0000000000000001e115

    1. Initial program 37.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 42.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.0000000000000001e115 < t < 4.8e60

    1. Initial program 86.9%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 61.3%

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
    6. Simplified60.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.6 \cdot 10^{+230}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -6 \cdot 10^{+115}:\\ \;\;\;\;\left(z - a\right) \cdot \frac{x}{t}\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{+60}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 55.2% accurate, 0.6× speedup?

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

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

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

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

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


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

    1. Initial program 68.0%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 60.0%

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
    6. Simplified69.1%

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

    if -7.8000000000000001e23 < a < 1.2e-218

    1. Initial program 74.5%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. associate-/r/82.6%

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

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

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

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

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

    if 1.2e-218 < a < 2.1999999999999999e-81

    1. Initial program 66.4%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. associate-/r/74.4%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.1999999999999999e-81 < a

    1. Initial program 63.4%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 53.6%

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
    6. Simplified53.4%

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

        \[\leadsto x + y \cdot \color{blue}{\frac{1}{\frac{a}{z}}} \]
      2. un-div-inv53.5%

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

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

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

Alternative 24: 39.0% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq 1.86 \cdot 10^{+56}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.20000000000000015e27 or 1.86000000000000007e56 < a

    1. Initial program 65.3%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 43.7%

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

    if -3.20000000000000015e27 < a < 1.86000000000000007e56

    1. Initial program 71.4%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 33.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.2 \cdot 10^{+27}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.86 \cdot 10^{+56}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 25: 26.0% 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 68.8%

    \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
  2. Add Preprocessing
  3. Taylor expanded in a around inf 24.4%

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

    \[\leadsto x \]
  5. Add Preprocessing

Developer target: 87.4% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;a < -1.6153062845442575 \cdot 10^{-142}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024115 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
  :precision binary64

  :alt
  (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))))