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

Percentage Accurate: 67.9% → 89.9%
Time: 25.2s
Alternatives: 24
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 24 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.9% accurate, 1.0× speedup?

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

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

Alternative 1: 89.9% accurate, 0.3× 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\_1 \leq -1 \cdot 10^{-249} \lor \neg \left(t\_1 \leq 0\right):\\ \;\;\;\;x + \frac{x - y}{\frac{a - t}{t - z}}\\ \mathbf{else}:\\ \;\;\;\;y + \left(y - x\right) \cdot \frac{a - z}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ (* (- y x) (- z t)) (- a t)))))
   (if (or (<= t_1 -1e-249) (not (<= t_1 0.0)))
     (+ x (/ (- x y) (/ (- a t) (- t z))))
     (+ y (* (- y x) (/ (- a z) t))))))
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_1 <= -1e-249) || !(t_1 <= 0.0)) {
		tmp = x + ((x - y) / ((a - t) / (t - z)));
	} else {
		tmp = y + ((y - x) * ((a - z) / t));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x + (((y - x) * (z - t)) / (a - t))
    if ((t_1 <= (-1d-249)) .or. (.not. (t_1 <= 0.0d0))) then
        tmp = x + ((x - y) / ((a - t) / (t - z)))
    else
        tmp = y + ((y - x) * ((a - z) / t))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (((y - x) * (z - t)) / (a - t));
	double tmp;
	if ((t_1 <= -1e-249) || !(t_1 <= 0.0)) {
		tmp = x + ((x - y) / ((a - t) / (t - z)));
	} else {
		tmp = y + ((y - x) * ((a - z) / t));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (((y - x) * (z - t)) / (a - t))
	tmp = 0
	if (t_1 <= -1e-249) or not (t_1 <= 0.0):
		tmp = x + ((x - y) / ((a - t) / (t - z)))
	else:
		tmp = y + ((y - x) * ((a - z) / t))
	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_1 <= -1e-249) || !(t_1 <= 0.0))
		tmp = Float64(x + Float64(Float64(x - y) / Float64(Float64(a - t) / Float64(t - z))));
	else
		tmp = Float64(y + Float64(Float64(y - x) * Float64(Float64(a - z) / t)));
	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_1 <= -1e-249) || ~((t_1 <= 0.0)))
		tmp = x + ((x - y) / ((a - t) / (t - z)));
	else
		tmp = y + ((y - x) * ((a - z) / t));
	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[Or[LessEqual[t$95$1, -1e-249], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(N[(x - y), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(N[(y - x), $MachinePrecision] * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $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\_1 \leq -1 \cdot 10^{-249} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;x + \frac{x - y}{\frac{a - t}{t - z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -1.00000000000000005e-249 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 76.8%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - t}{z - t}}{y - x}}} \]
      2. clear-num91.9%

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

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

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

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

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

    if -1.00000000000000005e-249 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0

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

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

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

        \[\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/99.7%

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

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

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

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

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

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

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

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

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

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

Alternative 2: 86.2% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + \left(z - a\right) \cdot \frac{x - y}{t}\\ t_2 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-249}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-263}:\\ \;\;\;\;y + \left(y - x\right) \cdot \frac{a - z}{t}\\ \mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+298}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ y (* (- z a) (/ (- x y) t))))
        (t_2 (+ x (/ (* (- y x) (- z t)) (- a t)))))
   (if (<= t_2 (- INFINITY))
     t_1
     (if (<= t_2 -1e-249)
       t_2
       (if (<= t_2 5e-263)
         (+ y (* (- y x) (/ (- a z) t)))
         (if (<= t_2 4e+298) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y + ((z - a) * ((x - y) / t));
	double t_2 = x + (((y - x) * (z - t)) / (a - t));
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = t_1;
	} else if (t_2 <= -1e-249) {
		tmp = t_2;
	} else if (t_2 <= 5e-263) {
		tmp = y + ((y - x) * ((a - z) / t));
	} else if (t_2 <= 4e+298) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y + ((z - a) * ((x - y) / t));
	double t_2 = x + (((y - x) * (z - t)) / (a - t));
	double tmp;
	if (t_2 <= -Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else if (t_2 <= -1e-249) {
		tmp = t_2;
	} else if (t_2 <= 5e-263) {
		tmp = y + ((y - x) * ((a - z) / t));
	} else if (t_2 <= 4e+298) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y + ((z - a) * ((x - y) / t))
	t_2 = x + (((y - x) * (z - t)) / (a - t))
	tmp = 0
	if t_2 <= -math.inf:
		tmp = t_1
	elif t_2 <= -1e-249:
		tmp = t_2
	elif t_2 <= 5e-263:
		tmp = y + ((y - x) * ((a - z) / t))
	elif t_2 <= 4e+298:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y + Float64(Float64(z - a) * Float64(Float64(x - y) / t)))
	t_2 = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t)))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = t_1;
	elseif (t_2 <= -1e-249)
		tmp = t_2;
	elseif (t_2 <= 5e-263)
		tmp = Float64(y + Float64(Float64(y - x) * Float64(Float64(a - z) / t)));
	elseif (t_2 <= 4e+298)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y + ((z - a) * ((x - y) / t));
	t_2 = x + (((y - x) * (z - t)) / (a - t));
	tmp = 0.0;
	if (t_2 <= -Inf)
		tmp = t_1;
	elseif (t_2 <= -1e-249)
		tmp = t_2;
	elseif (t_2 <= 5e-263)
		tmp = y + ((y - x) * ((a - z) / t));
	elseif (t_2 <= 4e+298)
		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 - a), $MachinePrecision] * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -1e-249], t$95$2, If[LessEqual[t$95$2, 5e-263], N[(y + N[(N[(y - x), $MachinePrecision] * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 4e+298], t$95$2, t$95$1]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-249}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+298}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 41.1%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - t}{z - t}}{y - x}}} \]
      2. clear-num80.1%

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} \]
    9. Taylor expanded in t around inf 49.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}} \]
    10. Step-by-step derivation
      1. associate--l+49.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/49.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/49.5%

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -1.00000000000000005e-249 or 5.00000000000000006e-263 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 3.9999999999999998e298

    1. Initial program 98.7%

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

    if -1.00000000000000005e-249 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 5.00000000000000006e-263

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

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

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

        \[\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/99.7%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \leq -\infty:\\ \;\;\;\;y + \left(z - a\right) \cdot \frac{x - y}{t}\\ \mathbf{elif}\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \leq -1 \cdot 10^{-249}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\ \mathbf{elif}\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \leq 5 \cdot 10^{-263}:\\ \;\;\;\;y + \left(y - x\right) \cdot \frac{a - z}{t}\\ \mathbf{elif}\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \leq 4 \cdot 10^{+298}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y + \left(z - a\right) \cdot \frac{x - y}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 51.7% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot \frac{z}{a}\\ t_2 := x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{if}\;t \leq -7.5 \cdot 10^{+80}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -4000000000:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -42000:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -1.95 \cdot 10^{-150}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -2.5 \cdot 10^{-248}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 5.8 \cdot 10^{-285}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 10^{-235}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{+128}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* y (/ z a)))) (t_2 (* x (- 1.0 (/ z a)))))
   (if (<= t -7.5e+80)
     y
     (if (<= t -4000000000.0)
       t_2
       (if (<= t -42000.0)
         y
         (if (<= t -1.95e-150)
           t_1
           (if (<= t -2.5e-248)
             t_2
             (if (<= t 5.8e-285)
               t_1
               (if (<= t 1e-235) t_2 (if (<= t 3.2e+128) t_1 y))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * (z / a));
	double t_2 = x * (1.0 - (z / a));
	double tmp;
	if (t <= -7.5e+80) {
		tmp = y;
	} else if (t <= -4000000000.0) {
		tmp = t_2;
	} else if (t <= -42000.0) {
		tmp = y;
	} else if (t <= -1.95e-150) {
		tmp = t_1;
	} else if (t <= -2.5e-248) {
		tmp = t_2;
	} else if (t <= 5.8e-285) {
		tmp = t_1;
	} else if (t <= 1e-235) {
		tmp = t_2;
	} else if (t <= 3.2e+128) {
		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) :: t_2
    real(8) :: tmp
    t_1 = x + (y * (z / a))
    t_2 = x * (1.0d0 - (z / a))
    if (t <= (-7.5d+80)) then
        tmp = y
    else if (t <= (-4000000000.0d0)) then
        tmp = t_2
    else if (t <= (-42000.0d0)) then
        tmp = y
    else if (t <= (-1.95d-150)) then
        tmp = t_1
    else if (t <= (-2.5d-248)) then
        tmp = t_2
    else if (t <= 5.8d-285) then
        tmp = t_1
    else if (t <= 1d-235) then
        tmp = t_2
    else if (t <= 3.2d+128) 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 t_2 = x * (1.0 - (z / a));
	double tmp;
	if (t <= -7.5e+80) {
		tmp = y;
	} else if (t <= -4000000000.0) {
		tmp = t_2;
	} else if (t <= -42000.0) {
		tmp = y;
	} else if (t <= -1.95e-150) {
		tmp = t_1;
	} else if (t <= -2.5e-248) {
		tmp = t_2;
	} else if (t <= 5.8e-285) {
		tmp = t_1;
	} else if (t <= 1e-235) {
		tmp = t_2;
	} else if (t <= 3.2e+128) {
		tmp = t_1;
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (y * (z / a))
	t_2 = x * (1.0 - (z / a))
	tmp = 0
	if t <= -7.5e+80:
		tmp = y
	elif t <= -4000000000.0:
		tmp = t_2
	elif t <= -42000.0:
		tmp = y
	elif t <= -1.95e-150:
		tmp = t_1
	elif t <= -2.5e-248:
		tmp = t_2
	elif t <= 5.8e-285:
		tmp = t_1
	elif t <= 1e-235:
		tmp = t_2
	elif t <= 3.2e+128:
		tmp = t_1
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(y * Float64(z / a)))
	t_2 = Float64(x * Float64(1.0 - Float64(z / a)))
	tmp = 0.0
	if (t <= -7.5e+80)
		tmp = y;
	elseif (t <= -4000000000.0)
		tmp = t_2;
	elseif (t <= -42000.0)
		tmp = y;
	elseif (t <= -1.95e-150)
		tmp = t_1;
	elseif (t <= -2.5e-248)
		tmp = t_2;
	elseif (t <= 5.8e-285)
		tmp = t_1;
	elseif (t <= 1e-235)
		tmp = t_2;
	elseif (t <= 3.2e+128)
		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));
	t_2 = x * (1.0 - (z / a));
	tmp = 0.0;
	if (t <= -7.5e+80)
		tmp = y;
	elseif (t <= -4000000000.0)
		tmp = t_2;
	elseif (t <= -42000.0)
		tmp = y;
	elseif (t <= -1.95e-150)
		tmp = t_1;
	elseif (t <= -2.5e-248)
		tmp = t_2;
	elseif (t <= 5.8e-285)
		tmp = t_1;
	elseif (t <= 1e-235)
		tmp = t_2;
	elseif (t <= 3.2e+128)
		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]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.5e+80], y, If[LessEqual[t, -4000000000.0], t$95$2, If[LessEqual[t, -42000.0], y, If[LessEqual[t, -1.95e-150], t$95$1, If[LessEqual[t, -2.5e-248], t$95$2, If[LessEqual[t, 5.8e-285], t$95$1, If[LessEqual[t, 1e-235], t$95$2, If[LessEqual[t, 3.2e+128], t$95$1, y]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -4000000000:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t \leq -1.95 \cdot 10^{-150}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -2.5 \cdot 10^{-248}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t \leq 10^{-235}:\\
\;\;\;\;t\_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -7.49999999999999994e80 or -4e9 < t < -42000 or 3.19999999999999986e128 < t

    1. Initial program 43.5%

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

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

    if -7.49999999999999994e80 < t < -4e9 or -1.9500000000000001e-150 < t < -2.5e-248 or 5.7999999999999999e-285 < t < 9.9999999999999996e-236

    1. Initial program 82.7%

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

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

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

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

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

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

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

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

    if -42000 < t < -1.9500000000000001e-150 or -2.5e-248 < t < 5.7999999999999999e-285 or 9.9999999999999996e-236 < t < 3.19999999999999986e128

    1. Initial program 83.3%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.5 \cdot 10^{+80}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -4000000000:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq -42000:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -1.95 \cdot 10^{-150}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq -2.5 \cdot 10^{-248}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 5.8 \cdot 10^{-285}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 10^{-235}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{+128}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 65.1% accurate, 0.3× speedup?

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

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

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

\mathbf{elif}\;t \leq -3.7 \cdot 10^{-41}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq -3.4 \cdot 10^{-76}:\\
\;\;\;\;x \cdot \left(1 - t\_1\right)\\

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

\mathbf{elif}\;t \leq 1.1 \cdot 10^{+48}:\\
\;\;\;\;x + z \cdot \frac{x - y}{t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -2.4999999999999998e80 or -1.55e10 < t < -3.7000000000000002e-41 or 8.9999999999999999e78 < t

    1. Initial program 47.3%

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

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

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

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

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

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

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

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

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

    if -2.4999999999999998e80 < t < -1.55e10

    1. Initial program 72.9%

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

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

    if -3.7000000000000002e-41 < t < -3.3999999999999999e-76

    1. Initial program 100.0%

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

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

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

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

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

    if -3.3999999999999999e-76 < t < 6.9999999999999993e-24

    1. Initial program 89.5%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - t}{z - t}}{y - x}}} \]
      2. clear-num96.7%

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

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

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

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

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

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

    if 6.9999999999999993e-24 < t < 1.1e48

    1. Initial program 91.9%

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

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

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

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

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

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

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

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

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

    if 1.1e48 < t < 8.9999999999999999e78

    1. Initial program 42.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.5 \cdot 10^{+80}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;t \leq -15500000000:\\ \;\;\;\;x - \frac{z \cdot \left(x - y\right)}{a}\\ \mathbf{elif}\;t \leq -3.7 \cdot 10^{-41}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;t \leq -3.4 \cdot 10^{-76}:\\ \;\;\;\;x \cdot \left(1 - \frac{z - t}{a - t}\right)\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-24}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{+48}:\\ \;\;\;\;x + z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq 9 \cdot 10^{+78}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 56.4% 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 -5.5 \cdot 10^{+87}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -6.5 \cdot 10^{+47}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -3.6 \cdot 10^{-48}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -3.9 \cdot 10^{-232}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 7.6 \cdot 10^{-259}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{-63}:\\ \;\;\;\;t\_1\\ \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 -5.5e+87)
     t_2
     (if (<= y -6.5e+47)
       t_1
       (if (<= y -3.6e-48)
         t_2
         (if (<= y -3.9e-232)
           t_1
           (if (<= y 7.6e-259) (* x (/ z t)) (if (<= y 8.5e-63) t_1 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 <= -5.5e+87) {
		tmp = t_2;
	} else if (y <= -6.5e+47) {
		tmp = t_1;
	} else if (y <= -3.6e-48) {
		tmp = t_2;
	} else if (y <= -3.9e-232) {
		tmp = t_1;
	} else if (y <= 7.6e-259) {
		tmp = x * (z / t);
	} else if (y <= 8.5e-63) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x * (1.0d0 - (z / a))
    t_2 = y * ((z - t) / (a - t))
    if (y <= (-5.5d+87)) then
        tmp = t_2
    else if (y <= (-6.5d+47)) then
        tmp = t_1
    else if (y <= (-3.6d-48)) then
        tmp = t_2
    else if (y <= (-3.9d-232)) then
        tmp = t_1
    else if (y <= 7.6d-259) then
        tmp = x * (z / t)
    else if (y <= 8.5d-63) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (z / a));
	double t_2 = y * ((z - t) / (a - t));
	double tmp;
	if (y <= -5.5e+87) {
		tmp = t_2;
	} else if (y <= -6.5e+47) {
		tmp = t_1;
	} else if (y <= -3.6e-48) {
		tmp = t_2;
	} else if (y <= -3.9e-232) {
		tmp = t_1;
	} else if (y <= 7.6e-259) {
		tmp = x * (z / t);
	} else if (y <= 8.5e-63) {
		tmp = t_1;
	} 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 <= -5.5e+87:
		tmp = t_2
	elif y <= -6.5e+47:
		tmp = t_1
	elif y <= -3.6e-48:
		tmp = t_2
	elif y <= -3.9e-232:
		tmp = t_1
	elif y <= 7.6e-259:
		tmp = x * (z / t)
	elif y <= 8.5e-63:
		tmp = t_1
	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 <= -5.5e+87)
		tmp = t_2;
	elseif (y <= -6.5e+47)
		tmp = t_1;
	elseif (y <= -3.6e-48)
		tmp = t_2;
	elseif (y <= -3.9e-232)
		tmp = t_1;
	elseif (y <= 7.6e-259)
		tmp = Float64(x * Float64(z / t));
	elseif (y <= 8.5e-63)
		tmp = t_1;
	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 <= -5.5e+87)
		tmp = t_2;
	elseif (y <= -6.5e+47)
		tmp = t_1;
	elseif (y <= -3.6e-48)
		tmp = t_2;
	elseif (y <= -3.9e-232)
		tmp = t_1;
	elseif (y <= 7.6e-259)
		tmp = x * (z / t);
	elseif (y <= 8.5e-63)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(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, -5.5e+87], t$95$2, If[LessEqual[y, -6.5e+47], t$95$1, If[LessEqual[y, -3.6e-48], t$95$2, If[LessEqual[y, -3.9e-232], t$95$1, If[LessEqual[y, 7.6e-259], N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.5e-63], t$95$1, 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 -5.5 \cdot 10^{+87}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq -6.5 \cdot 10^{+47}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -3.6 \cdot 10^{-48}:\\
\;\;\;\;t\_2\\

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

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

\mathbf{elif}\;y \leq 8.5 \cdot 10^{-63}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -5.50000000000000022e87 or -6.49999999999999988e47 < y < -3.6000000000000002e-48 or 8.49999999999999969e-63 < y

    1. Initial program 71.4%

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

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

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

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

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

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

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

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

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

    if -5.50000000000000022e87 < y < -6.49999999999999988e47 or -3.6000000000000002e-48 < y < -3.8999999999999998e-232 or 7.6000000000000001e-259 < y < 8.49999999999999969e-63

    1. Initial program 75.8%

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

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

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

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

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

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

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

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

    if -3.8999999999999998e-232 < y < 7.6000000000000001e-259

    1. Initial program 41.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-\color{blue}{z \cdot x}}{a - t} \]
      3. distribute-lft-neg-in50.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.5 \cdot 10^{+87}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;y \leq -6.5 \cdot 10^{+47}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;y \leq -3.6 \cdot 10^{-48}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;y \leq -3.9 \cdot 10^{-232}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;y \leq 7.6 \cdot 10^{-259}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{-63}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 56.4% 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 -5.5 \cdot 10^{+87}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -6.4 \cdot 10^{+47}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -1.46 \cdot 10^{-46}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{elif}\;y \leq -3.4 \cdot 10^{-232}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 10^{-258}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{-61}:\\ \;\;\;\;t\_1\\ \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 -5.5e+87)
     t_2
     (if (<= y -6.4e+47)
       t_1
       (if (<= y -1.46e-46)
         (* (- z t) (/ y (- a t)))
         (if (<= y -3.4e-232)
           t_1
           (if (<= y 1e-258) (* x (/ z t)) (if (<= y 3.5e-61) t_1 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 <= -5.5e+87) {
		tmp = t_2;
	} else if (y <= -6.4e+47) {
		tmp = t_1;
	} else if (y <= -1.46e-46) {
		tmp = (z - t) * (y / (a - t));
	} else if (y <= -3.4e-232) {
		tmp = t_1;
	} else if (y <= 1e-258) {
		tmp = x * (z / t);
	} else if (y <= 3.5e-61) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x * (1.0d0 - (z / a))
    t_2 = y * ((z - t) / (a - t))
    if (y <= (-5.5d+87)) then
        tmp = t_2
    else if (y <= (-6.4d+47)) then
        tmp = t_1
    else if (y <= (-1.46d-46)) then
        tmp = (z - t) * (y / (a - t))
    else if (y <= (-3.4d-232)) then
        tmp = t_1
    else if (y <= 1d-258) then
        tmp = x * (z / t)
    else if (y <= 3.5d-61) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (z / a));
	double t_2 = y * ((z - t) / (a - t));
	double tmp;
	if (y <= -5.5e+87) {
		tmp = t_2;
	} else if (y <= -6.4e+47) {
		tmp = t_1;
	} else if (y <= -1.46e-46) {
		tmp = (z - t) * (y / (a - t));
	} else if (y <= -3.4e-232) {
		tmp = t_1;
	} else if (y <= 1e-258) {
		tmp = x * (z / t);
	} else if (y <= 3.5e-61) {
		tmp = t_1;
	} 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 <= -5.5e+87:
		tmp = t_2
	elif y <= -6.4e+47:
		tmp = t_1
	elif y <= -1.46e-46:
		tmp = (z - t) * (y / (a - t))
	elif y <= -3.4e-232:
		tmp = t_1
	elif y <= 1e-258:
		tmp = x * (z / t)
	elif y <= 3.5e-61:
		tmp = t_1
	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 <= -5.5e+87)
		tmp = t_2;
	elseif (y <= -6.4e+47)
		tmp = t_1;
	elseif (y <= -1.46e-46)
		tmp = Float64(Float64(z - t) * Float64(y / Float64(a - t)));
	elseif (y <= -3.4e-232)
		tmp = t_1;
	elseif (y <= 1e-258)
		tmp = Float64(x * Float64(z / t));
	elseif (y <= 3.5e-61)
		tmp = t_1;
	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 <= -5.5e+87)
		tmp = t_2;
	elseif (y <= -6.4e+47)
		tmp = t_1;
	elseif (y <= -1.46e-46)
		tmp = (z - t) * (y / (a - t));
	elseif (y <= -3.4e-232)
		tmp = t_1;
	elseif (y <= 1e-258)
		tmp = x * (z / t);
	elseif (y <= 3.5e-61)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(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, -5.5e+87], t$95$2, If[LessEqual[y, -6.4e+47], t$95$1, If[LessEqual[y, -1.46e-46], N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.4e-232], t$95$1, If[LessEqual[y, 1e-258], N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.5e-61], t$95$1, 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 -5.5 \cdot 10^{+87}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq -6.4 \cdot 10^{+47}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq -3.4 \cdot 10^{-232}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 3.5 \cdot 10^{-61}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -5.50000000000000022e87 or 3.5000000000000003e-61 < y

    1. Initial program 69.5%

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

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

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

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

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

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

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

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

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

    if -5.50000000000000022e87 < y < -6.4e47 or -1.46000000000000008e-46 < y < -3.4000000000000002e-232 or 9.99999999999999954e-259 < y < 3.5000000000000003e-61

    1. Initial program 75.8%

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

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

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

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

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

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

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

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

    if -6.4e47 < y < -1.46000000000000008e-46

    1. Initial program 82.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.4000000000000002e-232 < y < 9.99999999999999954e-259

    1. Initial program 41.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-\color{blue}{z \cdot x}}{a - t} \]
      3. distribute-lft-neg-in50.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.5 \cdot 10^{+87}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;y \leq -6.4 \cdot 10^{+47}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;y \leq -1.46 \cdot 10^{-46}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{elif}\;y \leq -3.4 \cdot 10^{-232}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;y \leq 10^{-258}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{-61}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 57.4% accurate, 0.4× 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 -6 \cdot 10^{+87}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -6.4 \cdot 10^{+47}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -2.5 \cdot 10^{-39}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{elif}\;y \leq -1.9 \cdot 10^{-231}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 4.4 \cdot 10^{-64}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{a - t}\\ \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 -6e+87)
     t_2
     (if (<= y -6.4e+47)
       t_1
       (if (<= y -2.5e-39)
         (* (- z t) (/ y (- a t)))
         (if (<= y -1.9e-231)
           t_1
           (if (<= y 4.4e-64) (* (- y x) (/ z (- a t))) 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 <= -6e+87) {
		tmp = t_2;
	} else if (y <= -6.4e+47) {
		tmp = t_1;
	} else if (y <= -2.5e-39) {
		tmp = (z - t) * (y / (a - t));
	} else if (y <= -1.9e-231) {
		tmp = t_1;
	} else if (y <= 4.4e-64) {
		tmp = (y - x) * (z / (a - t));
	} 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 <= (-6d+87)) then
        tmp = t_2
    else if (y <= (-6.4d+47)) then
        tmp = t_1
    else if (y <= (-2.5d-39)) then
        tmp = (z - t) * (y / (a - t))
    else if (y <= (-1.9d-231)) then
        tmp = t_1
    else if (y <= 4.4d-64) then
        tmp = (y - x) * (z / (a - t))
    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 <= -6e+87) {
		tmp = t_2;
	} else if (y <= -6.4e+47) {
		tmp = t_1;
	} else if (y <= -2.5e-39) {
		tmp = (z - t) * (y / (a - t));
	} else if (y <= -1.9e-231) {
		tmp = t_1;
	} else if (y <= 4.4e-64) {
		tmp = (y - x) * (z / (a - t));
	} 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 <= -6e+87:
		tmp = t_2
	elif y <= -6.4e+47:
		tmp = t_1
	elif y <= -2.5e-39:
		tmp = (z - t) * (y / (a - t))
	elif y <= -1.9e-231:
		tmp = t_1
	elif y <= 4.4e-64:
		tmp = (y - x) * (z / (a - t))
	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 <= -6e+87)
		tmp = t_2;
	elseif (y <= -6.4e+47)
		tmp = t_1;
	elseif (y <= -2.5e-39)
		tmp = Float64(Float64(z - t) * Float64(y / Float64(a - t)));
	elseif (y <= -1.9e-231)
		tmp = t_1;
	elseif (y <= 4.4e-64)
		tmp = Float64(Float64(y - x) * Float64(z / Float64(a - t)));
	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 <= -6e+87)
		tmp = t_2;
	elseif (y <= -6.4e+47)
		tmp = t_1;
	elseif (y <= -2.5e-39)
		tmp = (z - t) * (y / (a - t));
	elseif (y <= -1.9e-231)
		tmp = t_1;
	elseif (y <= 4.4e-64)
		tmp = (y - x) * (z / (a - t));
	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, -6e+87], t$95$2, If[LessEqual[y, -6.4e+47], t$95$1, If[LessEqual[y, -2.5e-39], N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.9e-231], t$95$1, If[LessEqual[y, 4.4e-64], N[(N[(y - x), $MachinePrecision] * N[(z / N[(a - t), $MachinePrecision]), $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 -6 \cdot 10^{+87}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq -6.4 \cdot 10^{+47}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq -1.9 \cdot 10^{-231}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -5.9999999999999998e87 or 4.3999999999999999e-64 < y

    1. Initial program 69.8%

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

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

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

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

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

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

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

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

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

    if -5.9999999999999998e87 < y < -6.4e47 or -2.4999999999999999e-39 < y < -1.90000000000000007e-231

    1. Initial program 70.9%

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

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

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

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

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

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

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

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

    if -6.4e47 < y < -2.4999999999999999e-39

    1. Initial program 82.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.90000000000000007e-231 < y < 4.3999999999999999e-64

    1. Initial program 67.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6 \cdot 10^{+87}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;y \leq -6.4 \cdot 10^{+47}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;y \leq -2.5 \cdot 10^{-39}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{elif}\;y \leq -1.9 \cdot 10^{-231}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;y \leq 4.4 \cdot 10^{-64}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 37.4% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{y}{\frac{a}{z}}\\
\mathbf{if}\;t \leq -6600:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq -1.05 \cdot 10^{-248}:\\
\;\;\;\;x\\

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

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

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

\mathbf{elif}\;t \leq 9 \cdot 10^{+122}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -6600 or 8.99999999999999995e122 < t

    1. Initial program 48.5%

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

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

    if -6600 < t < -1.05e-248 or 2.90000000000000013e-151 < t < 8.99999999999999995e122

    1. Initial program 81.1%

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

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

    if -1.05e-248 < t < 1.8000000000000001e-287 or 1.09999999999999996e-236 < t < 2.90000000000000013e-151

    1. Initial program 89.1%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
    10. Step-by-step derivation
      1. clear-num58.8%

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{a}{z}}} \]
      2. div-inv58.9%

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{z}}} \]
    11. Applied egg-rr58.9%

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

    if 1.8000000000000001e-287 < t < 1.09999999999999996e-236

    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 t around 0 86.2%

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

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

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

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

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

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

        \[\leadsto -\color{blue}{x \cdot \frac{z}{a}} \]
      3. distribute-rgt-neg-in50.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6600:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -1.05 \cdot 10^{-248}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{-287}:\\ \;\;\;\;\frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{-236}:\\ \;\;\;\;x \cdot \left(-\frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{-151}:\\ \;\;\;\;\frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 9 \cdot 10^{+122}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 65.5% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;t \leq -1.05 \cdot 10^{-18} \lor \neg \left(t \leq 6.6 \cdot 10^{+16}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.4999999999999998e80 or -2.65e10 < t < -1.05e-18 or 6.6e16 < t

    1. Initial program 47.8%

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

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

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

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

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

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

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

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

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

    if -2.4999999999999998e80 < t < -2.65e10

    1. Initial program 72.9%

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

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

    if -1.05e-18 < t < 6.6e16

    1. Initial program 89.1%

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

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

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

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

        \[\leadsto x + z \cdot \color{blue}{\frac{1}{\frac{a}{y - x}}} \]
      2. un-div-inv75.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.5 \cdot 10^{+80}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;t \leq -26500000000:\\ \;\;\;\;x - \frac{z \cdot \left(x - y\right)}{a}\\ \mathbf{elif}\;t \leq -1.05 \cdot 10^{-18} \lor \neg \left(t \leq 6.6 \cdot 10^{+16}\right):\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{z}{\frac{a}{x - y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 66.3% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;t \leq 1.4 \cdot 10^{+48}:\\
\;\;\;\;x + z \cdot \frac{x - y}{t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.4999999999999998e80 or 1.35000000000000002e78 < t

    1. Initial program 42.9%

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

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

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

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

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

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

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

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

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

    if -2.4999999999999998e80 < t < 1.19999999999999996e-20

    1. Initial program 86.6%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - t}{z - t}}{y - x}}} \]
      2. clear-num93.1%

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

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

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

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

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

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

    if 1.19999999999999996e-20 < t < 1.40000000000000006e48

    1. Initial program 91.9%

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

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

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

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

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

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

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

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

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

    if 1.40000000000000006e48 < t < 1.35000000000000002e78

    1. Initial program 42.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.5 \cdot 10^{+80}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{-20}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{+48}:\\ \;\;\;\;x + z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{+78}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 48.1% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{if}\;t \leq -7.4 \cdot 10^{+80}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -2.45 \cdot 10^{-248}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.5 \cdot 10^{-277}:\\ \;\;\;\;\frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 6.6 \cdot 10^{+128}:\\ \;\;\;\;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 -7.4e+80)
     y
     (if (<= t -2.45e-248)
       t_1
       (if (<= t -1.5e-277) (/ y (/ a z)) (if (<= t 6.6e+128) 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 <= -7.4e+80) {
		tmp = y;
	} else if (t <= -2.45e-248) {
		tmp = t_1;
	} else if (t <= -1.5e-277) {
		tmp = y / (a / z);
	} else if (t <= 6.6e+128) {
		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 <= (-7.4d+80)) then
        tmp = y
    else if (t <= (-2.45d-248)) then
        tmp = t_1
    else if (t <= (-1.5d-277)) then
        tmp = y / (a / z)
    else if (t <= 6.6d+128) 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 <= -7.4e+80) {
		tmp = y;
	} else if (t <= -2.45e-248) {
		tmp = t_1;
	} else if (t <= -1.5e-277) {
		tmp = y / (a / z);
	} else if (t <= 6.6e+128) {
		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 <= -7.4e+80:
		tmp = y
	elif t <= -2.45e-248:
		tmp = t_1
	elif t <= -1.5e-277:
		tmp = y / (a / z)
	elif t <= 6.6e+128:
		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 <= -7.4e+80)
		tmp = y;
	elseif (t <= -2.45e-248)
		tmp = t_1;
	elseif (t <= -1.5e-277)
		tmp = Float64(y / Float64(a / z));
	elseif (t <= 6.6e+128)
		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 <= -7.4e+80)
		tmp = y;
	elseif (t <= -2.45e-248)
		tmp = t_1;
	elseif (t <= -1.5e-277)
		tmp = y / (a / z);
	elseif (t <= 6.6e+128)
		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, -7.4e+80], y, If[LessEqual[t, -2.45e-248], t$95$1, If[LessEqual[t, -1.5e-277], N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.6e+128], t$95$1, y]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;t \leq 6.6 \cdot 10^{+128}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -7.39999999999999992e80 or 6.6000000000000001e128 < t

    1. Initial program 41.4%

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

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

    if -7.39999999999999992e80 < t < -2.4499999999999998e-248 or -1.49999999999999989e-277 < t < 6.6000000000000001e128

    1. Initial program 82.9%

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

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

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

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

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

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

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

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

    if -2.4499999999999998e-248 < t < -1.49999999999999989e-277

    1. Initial program 91.2%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
    10. Step-by-step derivation
      1. clear-num82.9%

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{a}{z}}} \]
      2. div-inv82.9%

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{z}}} \]
    11. Applied egg-rr82.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.4 \cdot 10^{+80}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -2.45 \cdot 10^{-248}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq -1.5 \cdot 10^{-277}:\\ \;\;\;\;\frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 6.6 \cdot 10^{+128}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 41.0% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.8 \cdot 10^{-56}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\

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

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

\mathbf{elif}\;x \leq 2.6 \cdot 10^{+129}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -5.79999999999999982e-56

    1. Initial program 63.1%

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

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

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

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

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

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

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

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

    if -5.79999999999999982e-56 < x < 3.09999999999999969e-73

    1. Initial program 84.3%

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

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

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

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

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

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

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

    if 3.09999999999999969e-73 < x < 5.00000000000000031e-10

    1. Initial program 80.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-\color{blue}{z \cdot x}}{a - t} \]
      3. distribute-lft-neg-in67.5%

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

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

    if 5.00000000000000031e-10 < x < 2.60000000000000012e129

    1. Initial program 48.8%

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

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

    if 2.60000000000000012e129 < x

    1. Initial program 55.3%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.8 \cdot 10^{-56}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;x \leq 3.1 \cdot 10^{-73}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;x \leq 5 \cdot 10^{-10}:\\ \;\;\;\;\frac{x \cdot z}{t - a}\\ \mathbf{elif}\;x \leq 2.6 \cdot 10^{+129}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x - x \cdot \frac{z}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 81.4% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.8e34 or 2.49999999999999981e125 < t

    1. Initial program 43.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.8e34 < t < 1.0799999999999999e24

    1. Initial program 88.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.0799999999999999e24 < t < 2.49999999999999981e125

    1. Initial program 55.1%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.8 \cdot 10^{+34}:\\ \;\;\;\;y + \left(y - x\right) \cdot \frac{a - z}{t}\\ \mathbf{elif}\;t \leq 1.08 \cdot 10^{+24}:\\ \;\;\;\;x - \frac{x - y}{\frac{a - t}{z}}\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{+125}:\\ \;\;\;\;x - \frac{y}{a - t} \cdot \left(t - z\right)\\ \mathbf{else}:\\ \;\;\;\;y + \left(y - x\right) \cdot \frac{a - z}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 81.2% accurate, 0.5× speedup?

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

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

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

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

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


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

    1. Initial program 49.0%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - t}{z - t}}{y - x}}} \]
      2. clear-num67.0%

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

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

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

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

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

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

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

        \[\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/70.1%

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

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

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

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

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

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

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

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

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

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

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

    if -2.80000000000000008e34 < t < 6.39999999999999965e35

    1. Initial program 88.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.39999999999999965e35 < t < 3.00000000000000008e123

    1. Initial program 55.1%

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

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

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

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

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

    if 3.00000000000000008e123 < t

    1. Initial program 36.9%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.8 \cdot 10^{+34}:\\ \;\;\;\;y + \left(z - a\right) \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq 6.4 \cdot 10^{+35}:\\ \;\;\;\;x - \frac{x - y}{\frac{a - t}{z}}\\ \mathbf{elif}\;t \leq 3 \cdot 10^{+123}:\\ \;\;\;\;x - \frac{y}{a - t} \cdot \left(t - z\right)\\ \mathbf{else}:\\ \;\;\;\;y + \left(y - x\right) \cdot \frac{a - z}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 37.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3200:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq -8.8 \cdot 10^{-246}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;t \leq 8.6 \cdot 10^{+122}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3200 or 8.59999999999999943e122 < t

    1. Initial program 48.5%

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

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

    if -3200 < t < -8.79999999999999992e-246 or 1.90000000000000011e-153 < t < 8.59999999999999943e122

    1. Initial program 81.1%

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

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

    if -8.79999999999999992e-246 < t < 1.90000000000000011e-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 t around 0 88.3%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3200:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -8.8 \cdot 10^{-246}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{-153}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 8.6 \cdot 10^{+122}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 37.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -245:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq -7 \cdot 10^{-248}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;t \leq 1.05 \cdot 10^{+123}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -245 or 1.04999999999999997e123 < t

    1. Initial program 48.5%

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

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

    if -245 < t < -6.99999999999999966e-248 or 5.60000000000000025e-154 < t < 1.04999999999999997e123

    1. Initial program 81.1%

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

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

    if -6.99999999999999966e-248 < t < 5.60000000000000025e-154

    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 t around 0 88.3%

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
    10. Step-by-step derivation
      1. clear-num45.3%

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{a}{z}}} \]
      2. div-inv45.4%

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{z}}} \]
    11. Applied egg-rr45.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -245:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -7 \cdot 10^{-248}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 5.6 \cdot 10^{-154}:\\ \;\;\;\;\frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 1.05 \cdot 10^{+123}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 72.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.6 \cdot 10^{+34} \lor \neg \left(t \leq 5.8 \cdot 10^{+65}\right):\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.59999999999999976e34 or 5.8000000000000001e65 < t

    1. Initial program 44.5%

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

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

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

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

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

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

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

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

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

    if -6.59999999999999976e34 < t < 5.8000000000000001e65

    1. Initial program 87.6%

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

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

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

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

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

Alternative 18: 73.1% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.5 \cdot 10^{+34} \lor \neg \left(t \leq 6.5 \cdot 10^{+72}\right):\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.5e34 or 6.5000000000000001e72 < t

    1. Initial program 44.5%

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

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

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

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

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

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

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

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

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

    if -4.5e34 < t < 6.5000000000000001e72

    1. Initial program 87.6%

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

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

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

      \[\leadsto x + \color{blue}{z \cdot \frac{y - x}{a - t}} \]
    6. Step-by-step derivation
      1. clear-num82.3%

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

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

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

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

Alternative 19: 74.2% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -8 \cdot 10^{+80} \lor \neg \left(t \leq 1.62 \cdot 10^{+67}\right):\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -8e80 or 1.6199999999999999e67 < t

    1. Initial program 42.5%

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

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

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

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

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

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

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

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

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

    if -8e80 < t < 1.6199999999999999e67

    1. Initial program 86.1%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - t}{z - t}}{y - x}}} \]
      2. clear-num93.1%

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

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

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

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

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

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

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

Alternative 20: 66.1% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.6 \cdot 10^{-19} \lor \neg \left(t \leq 7 \cdot 10^{+16}\right):\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.5999999999999996e-19 or 7e16 < t

    1. Initial program 51.2%

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

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

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

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

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

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

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

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

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

    if -4.5999999999999996e-19 < t < 7e16

    1. Initial program 89.1%

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

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

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

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

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

Alternative 21: 66.4% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.2 \cdot 10^{+31} \lor \neg \left(t \leq 1.45 \cdot 10^{+17}\right):\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.2000000000000001e31 or 1.45e17 < t

    1. Initial program 46.4%

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

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

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

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

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

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

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

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

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

    if -2.2000000000000001e31 < t < 1.45e17

    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 t around 0 71.1%

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

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

      \[\leadsto x + \color{blue}{z \cdot \frac{y - x}{a}} \]
    6. Step-by-step derivation
      1. clear-num71.1%

        \[\leadsto x + z \cdot \color{blue}{\frac{1}{\frac{a}{y - x}}} \]
      2. un-div-inv72.3%

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

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

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

Alternative 22: 66.8% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.5 \cdot 10^{+80} \lor \neg \left(t \leq 8 \cdot 10^{+16}\right):\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.4999999999999998e80 or 8e16 < t

    1. Initial program 44.7%

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

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

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

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

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

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

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

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

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

    if -2.4999999999999998e80 < t < 8e16

    1. Initial program 87.2%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - t}{z - t}}{y - x}}} \]
      2. clear-num93.4%

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

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

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

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

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

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

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

Alternative 23: 37.6% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -3500:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{+122}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -3500.0) y (if (<= t 9.5e+122) x y)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -3500.0) {
		tmp = y;
	} else if (t <= 9.5e+122) {
		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 <= (-3500.0d0)) then
        tmp = y
    else if (t <= 9.5d+122) 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 <= -3500.0) {
		tmp = y;
	} else if (t <= 9.5e+122) {
		tmp = x;
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -3500.0:
		tmp = y
	elif t <= 9.5e+122:
		tmp = x
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -3500.0)
		tmp = y;
	elseif (t <= 9.5e+122)
		tmp = x;
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -3500.0)
		tmp = y;
	elseif (t <= 9.5e+122)
		tmp = x;
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3500.0], y, If[LessEqual[t, 9.5e+122], x, y]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3500:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq 9.5 \cdot 10^{+122}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3500 or 9.49999999999999986e122 < t

    1. Initial program 48.5%

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

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

    if -3500 < t < 9.49999999999999986e122

    1. Initial program 84.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3500:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{+122}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 25.0% accurate, 13.0× speedup?

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

\\
x
\end{array}
Derivation
  1. Initial program 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.8%

    \[\leadsto \color{blue}{x} \]
  4. Final simplification24.8%

    \[\leadsto x \]
  5. Add Preprocessing

Developer target: 86.5% 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 2024043 
(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))))