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

Percentage Accurate: 67.4% → 85.9%
Time: 14.1s
Alternatives: 19
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 19 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: 67.4% 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: 85.9% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.6 \cdot 10^{+178}:\\ \;\;\;\;y + z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{+274}:\\ \;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)\\ \mathbf{else}:\\ \;\;\;\;y + \frac{y - x}{t} \cdot a\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -2.6e+178)
   (+ y (* z (/ (- x y) t)))
   (if (<= t 3.8e+274)
     (fma (- y x) (/ (- z t) (- a t)) x)
     (+ y (* (/ (- y x) t) a)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -2.6e+178) {
		tmp = y + (z * ((x - y) / t));
	} else if (t <= 3.8e+274) {
		tmp = fma((y - x), ((z - t) / (a - t)), x);
	} else {
		tmp = y + (((y - x) / t) * a);
	}
	return tmp;
}
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -2.6e+178)
		tmp = Float64(y + Float64(z * Float64(Float64(x - y) / t)));
	elseif (t <= 3.8e+274)
		tmp = fma(Float64(y - x), Float64(Float64(z - t) / Float64(a - t)), x);
	else
		tmp = Float64(y + Float64(Float64(Float64(y - x) / t) * a));
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.6e+178], N[(y + N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.8e+274], N[(N[(y - x), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(y + N[(N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq 3.8 \cdot 10^{+274}:\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)\\

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


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

    1. Initial program 20.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 64.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+64.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. associate-*r/64.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.6000000000000001e178 < t < 3.7999999999999998e274

    1. Initial program 80.2%

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

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

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

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

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

    if 3.7999999999999998e274 < t

    1. Initial program 4.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.6 \cdot 10^{+178}:\\ \;\;\;\;y + z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{+274}:\\ \;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)\\ \mathbf{else}:\\ \;\;\;\;y + \frac{y - x}{t} \cdot a\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 60.9% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ \mathbf{if}\;t \leq -3.25 \cdot 10^{+181}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -2.45 \cdot 10^{+42}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{-298}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 0.00036:\\ \;\;\;\;x + y \cdot \frac{z}{a - t}\\ \mathbf{elif}\;t \leq 3 \cdot 10^{+75}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;t \leq 1.05 \cdot 10^{+110}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- z t) (- a t)))))
   (if (<= t -3.25e+181)
     t_1
     (if (<= t -2.45e+42)
       (* x (/ (- z a) t))
       (if (<= t 1.5e-298)
         (+ x (* z (/ (- y x) a)))
         (if (<= t 0.00036)
           (+ x (* y (/ z (- a t))))
           (if (<= t 3e+75)
             (* z (/ (- y x) (- a t)))
             (if (<= t 1.05e+110) (* x (- 1.0 (/ z a))) t_1))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((z - t) / (a - t));
	double tmp;
	if (t <= -3.25e+181) {
		tmp = t_1;
	} else if (t <= -2.45e+42) {
		tmp = x * ((z - a) / t);
	} else if (t <= 1.5e-298) {
		tmp = x + (z * ((y - x) / a));
	} else if (t <= 0.00036) {
		tmp = x + (y * (z / (a - t)));
	} else if (t <= 3e+75) {
		tmp = z * ((y - x) / (a - t));
	} else if (t <= 1.05e+110) {
		tmp = x * (1.0 - (z / 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 = y * ((z - t) / (a - t))
    if (t <= (-3.25d+181)) then
        tmp = t_1
    else if (t <= (-2.45d+42)) then
        tmp = x * ((z - a) / t)
    else if (t <= 1.5d-298) then
        tmp = x + (z * ((y - x) / a))
    else if (t <= 0.00036d0) then
        tmp = x + (y * (z / (a - t)))
    else if (t <= 3d+75) then
        tmp = z * ((y - x) / (a - t))
    else if (t <= 1.05d+110) then
        tmp = x * (1.0d0 - (z / 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 = y * ((z - t) / (a - t));
	double tmp;
	if (t <= -3.25e+181) {
		tmp = t_1;
	} else if (t <= -2.45e+42) {
		tmp = x * ((z - a) / t);
	} else if (t <= 1.5e-298) {
		tmp = x + (z * ((y - x) / a));
	} else if (t <= 0.00036) {
		tmp = x + (y * (z / (a - t)));
	} else if (t <= 3e+75) {
		tmp = z * ((y - x) / (a - t));
	} else if (t <= 1.05e+110) {
		tmp = x * (1.0 - (z / a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((z - t) / (a - t))
	tmp = 0
	if t <= -3.25e+181:
		tmp = t_1
	elif t <= -2.45e+42:
		tmp = x * ((z - a) / t)
	elif t <= 1.5e-298:
		tmp = x + (z * ((y - x) / a))
	elif t <= 0.00036:
		tmp = x + (y * (z / (a - t)))
	elif t <= 3e+75:
		tmp = z * ((y - x) / (a - t))
	elif t <= 1.05e+110:
		tmp = x * (1.0 - (z / a))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(z - t) / Float64(a - t)))
	tmp = 0.0
	if (t <= -3.25e+181)
		tmp = t_1;
	elseif (t <= -2.45e+42)
		tmp = Float64(x * Float64(Float64(z - a) / t));
	elseif (t <= 1.5e-298)
		tmp = Float64(x + Float64(z * Float64(Float64(y - x) / a)));
	elseif (t <= 0.00036)
		tmp = Float64(x + Float64(y * Float64(z / Float64(a - t))));
	elseif (t <= 3e+75)
		tmp = Float64(z * Float64(Float64(y - x) / Float64(a - t)));
	elseif (t <= 1.05e+110)
		tmp = Float64(x * Float64(1.0 - Float64(z / a)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((z - t) / (a - t));
	tmp = 0.0;
	if (t <= -3.25e+181)
		tmp = t_1;
	elseif (t <= -2.45e+42)
		tmp = x * ((z - a) / t);
	elseif (t <= 1.5e-298)
		tmp = x + (z * ((y - x) / a));
	elseif (t <= 0.00036)
		tmp = x + (y * (z / (a - t)));
	elseif (t <= 3e+75)
		tmp = z * ((y - x) / (a - t));
	elseif (t <= 1.05e+110)
		tmp = x * (1.0 - (z / a));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.25e+181], t$95$1, If[LessEqual[t, -2.45e+42], N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.5e-298], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.00036], N[(x + N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3e+75], N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.05e+110], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -3.25e181 or 1.05000000000000007e110 < t

    1. Initial program 27.7%

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

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

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

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

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

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

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

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

    if -3.25e181 < t < -2.4500000000000001e42

    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 x around -inf 59.0%

      \[\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. mul-1-neg59.0%

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

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

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

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

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

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

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

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

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

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

    if -2.4500000000000001e42 < t < 1.5e-298

    1. Initial program 89.9%

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

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

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

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

    if 1.5e-298 < t < 3.60000000000000023e-4

    1. Initial program 90.9%

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

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

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

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

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

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

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

    if 3.60000000000000023e-4 < t < 3e75

    1. Initial program 99.0%

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

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

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

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} \]
    4. Applied egg-rr99.0%

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

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

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

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

    if 3e75 < t < 1.05000000000000007e110

    1. Initial program 84.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.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. mul-1-neg55.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.25 \cdot 10^{+181}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;t \leq -2.45 \cdot 10^{+42}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{-298}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 0.00036:\\ \;\;\;\;x + y \cdot \frac{z}{a - t}\\ \mathbf{elif}\;t \leq 3 \cdot 10^{+75}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;t \leq 1.05 \cdot 10^{+110}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 54.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{z}{a}\right)\\ t_2 := y \cdot \frac{z - t}{a - t}\\ \mathbf{if}\;y \leq -3.5 \cdot 10^{-39}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -1.65 \cdot 10^{-102}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -1.52 \cdot 10^{-146}:\\ \;\;\;\;\frac{x \cdot \left(z - a\right)}{t}\\ \mathbf{elif}\;y \leq 5.8 \cdot 10^{-224}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 3.6 \cdot 10^{-152}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;y \leq 8 \cdot 10^{+130}:\\ \;\;\;\;x + \frac{y \cdot z}{a}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ z a)))) (t_2 (* y (/ (- z t) (- a t)))))
   (if (<= y -3.5e-39)
     t_2
     (if (<= y -1.65e-102)
       t_1
       (if (<= y -1.52e-146)
         (/ (* x (- z a)) t)
         (if (<= y 5.8e-224)
           t_1
           (if (<= y 3.6e-152)
             (* x (/ (- z a) t))
             (if (<= y 8e+130) (+ x (/ (* y z) a)) t_2))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (z / a));
	double t_2 = y * ((z - t) / (a - t));
	double tmp;
	if (y <= -3.5e-39) {
		tmp = t_2;
	} else if (y <= -1.65e-102) {
		tmp = t_1;
	} else if (y <= -1.52e-146) {
		tmp = (x * (z - a)) / t;
	} else if (y <= 5.8e-224) {
		tmp = t_1;
	} else if (y <= 3.6e-152) {
		tmp = x * ((z - a) / t);
	} else if (y <= 8e+130) {
		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 = x * (1.0d0 - (z / a))
    t_2 = y * ((z - t) / (a - t))
    if (y <= (-3.5d-39)) then
        tmp = t_2
    else if (y <= (-1.65d-102)) then
        tmp = t_1
    else if (y <= (-1.52d-146)) then
        tmp = (x * (z - a)) / t
    else if (y <= 5.8d-224) then
        tmp = t_1
    else if (y <= 3.6d-152) then
        tmp = x * ((z - a) / t)
    else if (y <= 8d+130) 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 = x * (1.0 - (z / a));
	double t_2 = y * ((z - t) / (a - t));
	double tmp;
	if (y <= -3.5e-39) {
		tmp = t_2;
	} else if (y <= -1.65e-102) {
		tmp = t_1;
	} else if (y <= -1.52e-146) {
		tmp = (x * (z - a)) / t;
	} else if (y <= 5.8e-224) {
		tmp = t_1;
	} else if (y <= 3.6e-152) {
		tmp = x * ((z - a) / t);
	} else if (y <= 8e+130) {
		tmp = x + ((y * z) / a);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (z / a))
	t_2 = y * ((z - t) / (a - t))
	tmp = 0
	if y <= -3.5e-39:
		tmp = t_2
	elif y <= -1.65e-102:
		tmp = t_1
	elif y <= -1.52e-146:
		tmp = (x * (z - a)) / t
	elif y <= 5.8e-224:
		tmp = t_1
	elif y <= 3.6e-152:
		tmp = x * ((z - a) / t)
	elif y <= 8e+130:
		tmp = x + ((y * z) / a)
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(z / a)))
	t_2 = Float64(y * Float64(Float64(z - t) / Float64(a - t)))
	tmp = 0.0
	if (y <= -3.5e-39)
		tmp = t_2;
	elseif (y <= -1.65e-102)
		tmp = t_1;
	elseif (y <= -1.52e-146)
		tmp = Float64(Float64(x * Float64(z - a)) / t);
	elseif (y <= 5.8e-224)
		tmp = t_1;
	elseif (y <= 3.6e-152)
		tmp = Float64(x * Float64(Float64(z - a) / t));
	elseif (y <= 8e+130)
		tmp = Float64(x + Float64(Float64(y * z) / a));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (z / a));
	t_2 = y * ((z - t) / (a - t));
	tmp = 0.0;
	if (y <= -3.5e-39)
		tmp = t_2;
	elseif (y <= -1.65e-102)
		tmp = t_1;
	elseif (y <= -1.52e-146)
		tmp = (x * (z - a)) / t;
	elseif (y <= 5.8e-224)
		tmp = t_1;
	elseif (y <= 3.6e-152)
		tmp = x * ((z - a) / t);
	elseif (y <= 8e+130)
		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[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.5e-39], t$95$2, If[LessEqual[y, -1.65e-102], t$95$1, If[LessEqual[y, -1.52e-146], N[(N[(x * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[y, 5.8e-224], t$95$1, If[LessEqual[y, 3.6e-152], N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8e+130], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -1.65 \cdot 10^{-102}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 5.8 \cdot 10^{-224}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -3.5e-39 or 8.0000000000000005e130 < y

    1. Initial program 61.0%

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

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

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

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

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

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

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

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

    if -3.5e-39 < y < -1.65e-102 or -1.52000000000000011e-146 < y < 5.8000000000000001e-224

    1. Initial program 81.5%

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

      \[\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. mul-1-neg78.1%

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

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

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

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

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

    if -1.65e-102 < y < -1.52000000000000011e-146

    1. Initial program 61.1%

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

      \[\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. mul-1-neg43.1%

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

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

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

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

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

    if 5.8000000000000001e-224 < y < 3.6e-152

    1. Initial program 59.4%

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

      \[\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. mul-1-neg64.1%

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

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

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

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

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

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

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

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

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

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

    if 3.6e-152 < y < 8.0000000000000005e130

    1. Initial program 80.1%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.5 \cdot 10^{-39}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;y \leq -1.65 \cdot 10^{-102}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;y \leq -1.52 \cdot 10^{-146}:\\ \;\;\;\;\frac{x \cdot \left(z - a\right)}{t}\\ \mathbf{elif}\;y \leq 5.8 \cdot 10^{-224}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;y \leq 3.6 \cdot 10^{-152}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;y \leq 8 \cdot 10^{+130}:\\ \;\;\;\;x + \frac{y \cdot z}{a}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 77.9% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t \leq -4.4 \cdot 10^{-110}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 1.7 \cdot 10^{+110}:\\
\;\;\;\;t\_1\\

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

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


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

    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 63.4%

      \[\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+63.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.10000000000000037e102 < t < -4.3999999999999999e-110 or 7.8000000000000004e-153 < t < 1.7000000000000001e110

    1. Initial program 90.1%

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

    if -4.3999999999999999e-110 < t < 7.8000000000000004e-153

    1. Initial program 91.0%

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

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

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

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

    if 1.7000000000000001e110 < t < 3.30000000000000014e274

    1. Initial program 39.6%

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

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

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

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

    if 3.30000000000000014e274 < t

    1. Initial program 4.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8.1 \cdot 10^{+102}:\\ \;\;\;\;y + z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq -4.4 \cdot 10^{-110}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{-153}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{+110}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{+274}:\\ \;\;\;\;x - y \cdot \frac{z - t}{t - a}\\ \mathbf{else}:\\ \;\;\;\;y + \frac{y - x}{t} \cdot a\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 57.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ t_2 := x + y \cdot \frac{z}{a - t}\\ \mathbf{if}\;t \leq -1.4 \cdot 10^{+182}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.05 \cdot 10^{+42}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq -1.32 \cdot 10^{-166}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -4 \cdot 10^{-301}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;t \leq 8 \cdot 10^{+114}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- z t) (- a t)))) (t_2 (+ x (* y (/ z (- a t))))))
   (if (<= t -1.4e+182)
     t_1
     (if (<= t -1.05e+42)
       (* x (/ (- z a) t))
       (if (<= t -1.32e-166)
         t_2
         (if (<= t -4e-301)
           (* z (/ (- y x) (- a t)))
           (if (<= t 8e+114) t_2 t_1)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((z - t) / (a - t));
	double t_2 = x + (y * (z / (a - t)));
	double tmp;
	if (t <= -1.4e+182) {
		tmp = t_1;
	} else if (t <= -1.05e+42) {
		tmp = x * ((z - a) / t);
	} else if (t <= -1.32e-166) {
		tmp = t_2;
	} else if (t <= -4e-301) {
		tmp = z * ((y - x) / (a - t));
	} else if (t <= 8e+114) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = y * ((z - t) / (a - t))
    t_2 = x + (y * (z / (a - t)))
    if (t <= (-1.4d+182)) then
        tmp = t_1
    else if (t <= (-1.05d+42)) then
        tmp = x * ((z - a) / t)
    else if (t <= (-1.32d-166)) then
        tmp = t_2
    else if (t <= (-4d-301)) then
        tmp = z * ((y - x) / (a - t))
    else if (t <= 8d+114) then
        tmp = t_2
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((z - t) / (a - t));
	double t_2 = x + (y * (z / (a - t)));
	double tmp;
	if (t <= -1.4e+182) {
		tmp = t_1;
	} else if (t <= -1.05e+42) {
		tmp = x * ((z - a) / t);
	} else if (t <= -1.32e-166) {
		tmp = t_2;
	} else if (t <= -4e-301) {
		tmp = z * ((y - x) / (a - t));
	} else if (t <= 8e+114) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((z - t) / (a - t))
	t_2 = x + (y * (z / (a - t)))
	tmp = 0
	if t <= -1.4e+182:
		tmp = t_1
	elif t <= -1.05e+42:
		tmp = x * ((z - a) / t)
	elif t <= -1.32e-166:
		tmp = t_2
	elif t <= -4e-301:
		tmp = z * ((y - x) / (a - t))
	elif t <= 8e+114:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(z - t) / Float64(a - t)))
	t_2 = Float64(x + Float64(y * Float64(z / Float64(a - t))))
	tmp = 0.0
	if (t <= -1.4e+182)
		tmp = t_1;
	elseif (t <= -1.05e+42)
		tmp = Float64(x * Float64(Float64(z - a) / t));
	elseif (t <= -1.32e-166)
		tmp = t_2;
	elseif (t <= -4e-301)
		tmp = Float64(z * Float64(Float64(y - x) / Float64(a - t)));
	elseif (t <= 8e+114)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((z - t) / (a - t));
	t_2 = x + (y * (z / (a - t)));
	tmp = 0.0;
	if (t <= -1.4e+182)
		tmp = t_1;
	elseif (t <= -1.05e+42)
		tmp = x * ((z - a) / t);
	elseif (t <= -1.32e-166)
		tmp = t_2;
	elseif (t <= -4e-301)
		tmp = z * ((y - x) / (a - t));
	elseif (t <= 8e+114)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.4e+182], t$95$1, If[LessEqual[t, -1.05e+42], N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.32e-166], t$95$2, If[LessEqual[t, -4e-301], N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8e+114], t$95$2, t$95$1]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t \leq -1.32 \cdot 10^{-166}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t \leq 8 \cdot 10^{+114}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.40000000000000003e182 or 8e114 < t

    1. Initial program 27.0%

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

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

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

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

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

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

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

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

    if -1.40000000000000003e182 < t < -1.04999999999999998e42

    1. Initial program 69.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in x around -inf 60.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. mul-1-neg60.8%

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

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

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

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

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

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

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

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

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

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

    if -1.04999999999999998e42 < t < -1.31999999999999998e-166 or -4.00000000000000027e-301 < t < 8e114

    1. Initial program 89.9%

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

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

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

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

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

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

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

    if -1.31999999999999998e-166 < t < -4.00000000000000027e-301

    1. Initial program 90.1%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.4 \cdot 10^{+182}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;t \leq -1.05 \cdot 10^{+42}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq -1.32 \cdot 10^{-166}:\\ \;\;\;\;x + y \cdot \frac{z}{a - t}\\ \mathbf{elif}\;t \leq -4 \cdot 10^{-301}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;t \leq 8 \cdot 10^{+114}:\\ \;\;\;\;x + y \cdot \frac{z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 52.9% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;t \leq -5.6 \cdot 10^{-255}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 6.2 \cdot 10^{+115}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.75000000000000004e181 or 6.2000000000000001e115 < t

    1. Initial program 27.0%

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

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

    if -1.75000000000000004e181 < t < -1.8999999999999999e42

    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 x around -inf 59.0%

      \[\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. mul-1-neg59.0%

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

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

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

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

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

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

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

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

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

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

    if -1.8999999999999999e42 < t < -5.60000000000000023e-255 or -2.6000000000000002e-305 < t < 6.2000000000000001e115

    1. Initial program 89.9%

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

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

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

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

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

    if -5.60000000000000023e-255 < t < -2.6000000000000002e-305

    1. Initial program 92.0%

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

      \[\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. mul-1-neg84.6%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.75 \cdot 10^{+181}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{+42}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq -5.6 \cdot 10^{-255}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq -2.6 \cdot 10^{-305}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{+115}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 52.3% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;t \leq -5.5 \cdot 10^{-255}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 6.2 \cdot 10^{+115}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -5.7999999999999999e172 or 6.2000000000000001e115 < t

    1. Initial program 26.7%

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

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

    if -5.7999999999999999e172 < t < -2.3999999999999999e42

    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 x around -inf 61.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. mul-1-neg61.8%

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

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

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

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

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

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

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

    if -2.3999999999999999e42 < t < -5.5000000000000003e-255 or -1.2000000000000001e-305 < t < 6.2000000000000001e115

    1. Initial program 89.9%

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

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

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

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

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

    if -5.5000000000000003e-255 < t < -1.2000000000000001e-305

    1. Initial program 92.0%

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

      \[\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. mul-1-neg84.6%

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{z}{a}\right)} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 8: 45.8% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;t \leq 2.6 \cdot 10^{-280}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 4.6 \cdot 10^{+114}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.6999999999999999e172 or 4.6000000000000001e114 < t

    1. Initial program 26.7%

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

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

    if -1.6999999999999999e172 < t < -2.9999999999999999e87

    1. Initial program 65.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in x around -inf 66.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. mul-1-neg66.4%

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

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

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

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

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

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

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

    if -2.9999999999999999e87 < t < 2.6e-280 or 3.6499999999999998e-159 < t < 4.6000000000000001e114

    1. Initial program 88.8%

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

      \[\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. mul-1-neg60.0%

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

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

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

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

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

    if 2.6e-280 < t < 3.6499999999999998e-159

    1. Initial program 95.9%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \frac{z}{a - t}} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 9: 45.1% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;t \leq 1.75 \cdot 10^{-273}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 4.5 \cdot 10^{+114}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -3.09999999999999988e172 or 4.5000000000000001e114 < t

    1. Initial program 26.7%

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

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

    if -3.09999999999999988e172 < t < -9.50000000000000028e86

    1. Initial program 65.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in x around -inf 66.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. mul-1-neg66.4%

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

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

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

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

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

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

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

    if -9.50000000000000028e86 < t < 1.74999999999999996e-273 or 3.5999999999999999e-134 < t < 4.5000000000000001e114

    1. Initial program 88.5%

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

      \[\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. mul-1-neg59.5%

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

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

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

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

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

    if 1.74999999999999996e-273 < t < 3.5999999999999999e-134

    1. Initial program 96.5%

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

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

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

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

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

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

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

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

Alternative 10: 74.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - y \cdot \frac{z - t}{t - a}\\ \mathbf{if}\;t \leq -1.15 \cdot 10^{+42}:\\ \;\;\;\;y + z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq -5.2 \cdot 10^{-110}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 8 \cdot 10^{+68}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{+274}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;y + \frac{y - x}{t} \cdot a\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (* y (/ (- z t) (- t a))))))
   (if (<= t -1.15e+42)
     (+ y (* z (/ (- x y) t)))
     (if (<= t -5.2e-110)
       t_1
       (if (<= t 8e+68)
         (+ x (* z (/ (- y x) (- a t))))
         (if (<= t 3.3e+274) t_1 (+ y (* (/ (- y x) t) a))))))))
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 <= -1.15e+42) {
		tmp = y + (z * ((x - y) / t));
	} else if (t <= -5.2e-110) {
		tmp = t_1;
	} else if (t <= 8e+68) {
		tmp = x + (z * ((y - x) / (a - t)));
	} else if (t <= 3.3e+274) {
		tmp = t_1;
	} else {
		tmp = y + (((y - x) / t) * a);
	}
	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 <= (-1.15d+42)) then
        tmp = y + (z * ((x - y) / t))
    else if (t <= (-5.2d-110)) then
        tmp = t_1
    else if (t <= 8d+68) then
        tmp = x + (z * ((y - x) / (a - t)))
    else if (t <= 3.3d+274) then
        tmp = t_1
    else
        tmp = y + (((y - x) / t) * a)
    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 <= -1.15e+42) {
		tmp = y + (z * ((x - y) / t));
	} else if (t <= -5.2e-110) {
		tmp = t_1;
	} else if (t <= 8e+68) {
		tmp = x + (z * ((y - x) / (a - t)));
	} else if (t <= 3.3e+274) {
		tmp = t_1;
	} else {
		tmp = y + (((y - x) / t) * a);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (y * ((z - t) / (t - a)))
	tmp = 0
	if t <= -1.15e+42:
		tmp = y + (z * ((x - y) / t))
	elif t <= -5.2e-110:
		tmp = t_1
	elif t <= 8e+68:
		tmp = x + (z * ((y - x) / (a - t)))
	elif t <= 3.3e+274:
		tmp = t_1
	else:
		tmp = y + (((y - x) / t) * a)
	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 <= -1.15e+42)
		tmp = Float64(y + Float64(z * Float64(Float64(x - y) / t)));
	elseif (t <= -5.2e-110)
		tmp = t_1;
	elseif (t <= 8e+68)
		tmp = Float64(x + Float64(z * Float64(Float64(y - x) / Float64(a - t))));
	elseif (t <= 3.3e+274)
		tmp = t_1;
	else
		tmp = Float64(y + Float64(Float64(Float64(y - x) / t) * a));
	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 <= -1.15e+42)
		tmp = y + (z * ((x - y) / t));
	elseif (t <= -5.2e-110)
		tmp = t_1;
	elseif (t <= 8e+68)
		tmp = x + (z * ((y - x) / (a - t)));
	elseif (t <= 3.3e+274)
		tmp = t_1;
	else
		tmp = y + (((y - x) / t) * a);
	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, -1.15e+42], N[(y + N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.2e-110], t$95$1, If[LessEqual[t, 8e+68], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.3e+274], t$95$1, N[(y + N[(N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -5.2 \cdot 10^{-110}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 3.3 \cdot 10^{+274}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 41.9%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 69.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+69.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.15e42 < t < -5.19999999999999979e-110 or 7.99999999999999962e68 < t < 3.30000000000000014e274

    1. Initial program 64.6%

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

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

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

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

    if -5.19999999999999979e-110 < t < 7.99999999999999962e68

    1. Initial program 90.7%

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

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

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

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

    if 3.30000000000000014e274 < t

    1. Initial program 4.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.15 \cdot 10^{+42}:\\ \;\;\;\;y + z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq -5.2 \cdot 10^{-110}:\\ \;\;\;\;x - y \cdot \frac{z - t}{t - a}\\ \mathbf{elif}\;t \leq 8 \cdot 10^{+68}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{+274}:\\ \;\;\;\;x - y \cdot \frac{z - t}{t - a}\\ \mathbf{else}:\\ \;\;\;\;y + \frac{y - x}{t} \cdot a\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 70.0% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq 4.4 \cdot 10^{-105}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 10^{+38}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 62.0%

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

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

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

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

    if -1.19999999999999996 < a < 4.40000000000000008e-105 or 6.2e-49 < a < 9.99999999999999977e37

    1. Initial program 71.3%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 77.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+77.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.40000000000000008e-105 < a < 6.2e-49

    1. Initial program 85.4%

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

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

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

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

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

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

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

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

    if 9.99999999999999977e37 < a

    1. Initial program 73.4%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.2:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;a \leq 4.4 \cdot 10^{-105}:\\ \;\;\;\;y + z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{-49}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq 10^{+38}:\\ \;\;\;\;y + z \cdot \frac{x - y}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z - t}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 57.4% 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^{-7}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{-154}:\\ \;\;\;\;x - t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 54000000000000:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* z (/ (- y x) (- a t)))))
   (if (<= z -5.8e-7)
     t_1
     (if (<= z 3.5e-154)
       (- x (* t (/ y a)))
       (if (<= z 54000000000000.0) (* y (/ (- z t) (- a t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = z * ((y - x) / (a - t));
	double tmp;
	if (z <= -5.8e-7) {
		tmp = t_1;
	} else if (z <= 3.5e-154) {
		tmp = x - (t * (y / a));
	} else if (z <= 54000000000000.0) {
		tmp = y * ((z - t) / (a - t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = z * ((y - x) / (a - t))
    if (z <= (-5.8d-7)) then
        tmp = t_1
    else if (z <= 3.5d-154) then
        tmp = x - (t * (y / a))
    else if (z <= 54000000000000.0d0) then
        tmp = y * ((z - t) / (a - t))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = z * ((y - x) / (a - t));
	double tmp;
	if (z <= -5.8e-7) {
		tmp = t_1;
	} else if (z <= 3.5e-154) {
		tmp = x - (t * (y / a));
	} else if (z <= 54000000000000.0) {
		tmp = y * ((z - t) / (a - t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = z * ((y - x) / (a - t))
	tmp = 0
	if z <= -5.8e-7:
		tmp = t_1
	elif z <= 3.5e-154:
		tmp = x - (t * (y / a))
	elif z <= 54000000000000.0:
		tmp = y * ((z - t) / (a - t))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(z * Float64(Float64(y - x) / Float64(a - t)))
	tmp = 0.0
	if (z <= -5.8e-7)
		tmp = t_1;
	elseif (z <= 3.5e-154)
		tmp = Float64(x - Float64(t * Float64(y / a)));
	elseif (z <= 54000000000000.0)
		tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = z * ((y - x) / (a - t));
	tmp = 0.0;
	if (z <= -5.8e-7)
		tmp = t_1;
	elseif (z <= 3.5e-154)
		tmp = x - (t * (y / a));
	elseif (z <= 54000000000000.0)
		tmp = y * ((z - t) / (a - t));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.8e-7], t$95$1, If[LessEqual[z, 3.5e-154], N[(x - N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 54000000000000.0], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq 54000000000000:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.7999999999999995e-7 or 5.4e13 < z

    1. Initial program 74.0%

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

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

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

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

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

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

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

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

    if -5.7999999999999995e-7 < z < 3.5000000000000001e-154

    1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{t \cdot \frac{y}{a}} \]
    11. Simplified54.2%

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

    if 3.5000000000000001e-154 < z < 5.4e13

    1. Initial program 60.4%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 13: 85.9% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 20.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 64.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+64.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. associate-*r/64.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.40000000000000014e176 < t < 4.1e274

    1. Initial program 80.2%

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

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

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

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

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

    if 4.1e274 < t

    1. Initial program 4.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.4 \cdot 10^{+176}:\\ \;\;\;\;y + z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq 4.1 \cdot 10^{+274}:\\ \;\;\;\;x + \frac{y - x}{\frac{a - t}{z - t}}\\ \mathbf{else}:\\ \;\;\;\;y + \frac{y - x}{t} \cdot a\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 38.3% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;t \leq -3.5 \cdot 10^{-84}:\\
\;\;\;\;y + x\\

\mathbf{elif}\;t \leq 2.05 \cdot 10^{+114}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.74999999999999989e172 or 2.05e114 < t

    1. Initial program 26.7%

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

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

    if -1.74999999999999989e172 < t < -1.50000000000000014e42

    1. Initial program 72.6%

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

      \[\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. mul-1-neg63.6%

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

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

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

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

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

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

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

    if -1.50000000000000014e42 < t < -3.5000000000000001e-84

    1. Initial program 88.0%

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

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

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

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

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

        \[\leadsto \color{blue}{y + x} \]
    8. Simplified49.7%

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

    if -3.5000000000000001e-84 < t < 2.05e114

    1. Initial program 90.3%

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 15: 76.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.6 \cdot 10^{-57} \lor \neg \left(a \leq 1.3 \cdot 10^{-100}\right):\\
\;\;\;\;x - y \cdot \frac{z - t}{t - a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -7.5999999999999995e-57 or 1.2999999999999999e-100 < 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 y around inf 62.8%

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

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

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

    if -7.5999999999999995e-57 < a < 1.2999999999999999e-100

    1. Initial program 72.1%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 84.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+84.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.6 \cdot 10^{-57} \lor \neg \left(a \leq 1.3 \cdot 10^{-100}\right):\\ \;\;\;\;x - y \cdot \frac{z - t}{t - a}\\ \mathbf{else}:\\ \;\;\;\;y + z \cdot \frac{x - y}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 39.7% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t \leq -1.5 \cdot 10^{-83}:\\
\;\;\;\;y + x\\

\mathbf{elif}\;t \leq 2 \cdot 10^{+114}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.4000000000000001e174 or 2e114 < t

    1. Initial program 26.7%

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

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

    if -3.4000000000000001e174 < t < -1.50000000000000005e-83

    1. Initial program 80.8%

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

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

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

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

      \[\leadsto \color{blue}{x + y} \]
    7. Step-by-step derivation
      1. +-commutative32.9%

        \[\leadsto \color{blue}{y + x} \]
    8. Simplified32.9%

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

    if -1.50000000000000005e-83 < t < 2e114

    1. Initial program 90.3%

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 17: 38.1% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+81}:\\
\;\;\;\;x \cdot \frac{z}{t}\\

\mathbf{elif}\;z \leq 3.5 \cdot 10^{+25}:\\
\;\;\;\;y + x\\

\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -9.99999999999999921e80

    1. Initial program 71.8%

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

      \[\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. mul-1-neg56.3%

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

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

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

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

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

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

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

    if -9.99999999999999921e80 < z < 3.49999999999999999e25

    1. Initial program 67.4%

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

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

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

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

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

        \[\leadsto \color{blue}{y + x} \]
    8. Simplified43.7%

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

    if 3.49999999999999999e25 < z

    1. Initial program 76.0%

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

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

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

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

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

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

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

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

Alternative 18: 37.5% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.7 \cdot 10^{+172} \lor \neg \left(t \leq 2 \cdot 10^{+114}\right):\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.6999999999999999e172 or 2e114 < t

    1. Initial program 26.7%

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

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

    if -1.6999999999999999e172 < t < 2e114

    1. Initial program 88.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.7 \cdot 10^{+172} \lor \neg \left(t \leq 2 \cdot 10^{+114}\right):\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 24.8% accurate, 13.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
	return x;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x
end function
public static double code(double x, double y, double z, double t, double a) {
	return x;
}
def code(x, y, z, t, a):
	return x
function code(x, y, z, t, a)
	return x
end
function tmp = code(x, y, z, t, a)
	tmp = x;
end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 70.3%

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

    \[\leadsto \color{blue}{x} \]
  4. Add Preprocessing

Developer target: 86.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 2024096 
(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))))