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

Percentage Accurate: 67.5% → 90.9%
Time: 19.3s
Alternatives: 20
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 20 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.5% accurate, 1.0× speedup?

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

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

Alternative 1: 90.9% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{\left(y - x\right) \cdot \left(t - z\right)}{t - a}\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{-306} \lor \neg \left(t\_1 \leq 0\right):\\ \;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)\\ \mathbf{else}:\\ \;\;\;\;y + \frac{\left(y - x\right) \cdot \left(a - z\right)}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ (* (- y x) (- t z)) (- t a)))))
   (if (or (<= t_1 -5e-306) (not (<= t_1 0.0)))
     (fma (- y x) (/ (- z t) (- a t)) x)
     (+ y (/ (* (- y x) (- a z)) t)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (((y - x) * (t - z)) / (t - a));
	double tmp;
	if ((t_1 <= -5e-306) || !(t_1 <= 0.0)) {
		tmp = fma((y - x), ((z - t) / (a - t)), x);
	} 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(t - z)) / Float64(t - a)))
	tmp = 0.0
	if ((t_1 <= -5e-306) || !(t_1 <= 0.0))
		tmp = fma(Float64(y - x), Float64(Float64(z - t) / Float64(a - t)), x);
	else
		tmp = Float64(y + Float64(Float64(Float64(y - x) * Float64(a - z)) / t));
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e-306], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(y - x), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(y + N[(N[(N[(y - x), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \frac{\left(y - x\right) \cdot \left(t - z\right)}{t - a}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-306} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)\\

\mathbf{else}:\\
\;\;\;\;y + \frac{\left(y - x\right) \cdot \left(a - z\right)}{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))) < -4.99999999999999998e-306 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 74.8%

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

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

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

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

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

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

    1. Initial program 4.7%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - t}{z - t}}{y - x}}} \]
      2. associate-/l/4.3%

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

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

      \[\leadsto x + \color{blue}{\frac{1}{\frac{a - t}{\left(z - t\right) \cdot \left(y - x\right)}}} \]
    7. Taylor expanded in t around inf 99.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}} \]
    8. Step-by-step derivation
      1. associate--l+99.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/99.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/99.5%

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 55.4% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot \frac{z}{a}\\ t_2 := y \cdot \frac{t - z}{t}\\ t_3 := z \cdot \frac{y - x}{a - t}\\ \mathbf{if}\;t \leq -4.8 \cdot 10^{+217}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -5 \cdot 10^{+171}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq -1.75 \cdot 10^{+92}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -3.4 \cdot 10^{-91}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t \leq 6.8 \cdot 10^{-106}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{-29}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{+72}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* y (/ z a))))
        (t_2 (* y (/ (- t z) t)))
        (t_3 (* z (/ (- y x) (- a t)))))
   (if (<= t -4.8e+217)
     t_2
     (if (<= t -5e+171)
       (* x (/ (- z a) t))
       (if (<= t -1.75e+92)
         t_2
         (if (<= t -3.4e-91)
           t_3
           (if (<= t 6.8e-106)
             t_1
             (if (<= t 1.9e-29) t_3 (if (<= t 5.2e+72) t_1 t_2)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * (z / a));
	double t_2 = y * ((t - z) / t);
	double t_3 = z * ((y - x) / (a - t));
	double tmp;
	if (t <= -4.8e+217) {
		tmp = t_2;
	} else if (t <= -5e+171) {
		tmp = x * ((z - a) / t);
	} else if (t <= -1.75e+92) {
		tmp = t_2;
	} else if (t <= -3.4e-91) {
		tmp = t_3;
	} else if (t <= 6.8e-106) {
		tmp = t_1;
	} else if (t <= 1.9e-29) {
		tmp = t_3;
	} else if (t <= 5.2e+72) {
		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) :: t_3
    real(8) :: tmp
    t_1 = x + (y * (z / a))
    t_2 = y * ((t - z) / t)
    t_3 = z * ((y - x) / (a - t))
    if (t <= (-4.8d+217)) then
        tmp = t_2
    else if (t <= (-5d+171)) then
        tmp = x * ((z - a) / t)
    else if (t <= (-1.75d+92)) then
        tmp = t_2
    else if (t <= (-3.4d-91)) then
        tmp = t_3
    else if (t <= 6.8d-106) then
        tmp = t_1
    else if (t <= 1.9d-29) then
        tmp = t_3
    else if (t <= 5.2d+72) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * (z / a));
	double t_2 = y * ((t - z) / t);
	double t_3 = z * ((y - x) / (a - t));
	double tmp;
	if (t <= -4.8e+217) {
		tmp = t_2;
	} else if (t <= -5e+171) {
		tmp = x * ((z - a) / t);
	} else if (t <= -1.75e+92) {
		tmp = t_2;
	} else if (t <= -3.4e-91) {
		tmp = t_3;
	} else if (t <= 6.8e-106) {
		tmp = t_1;
	} else if (t <= 1.9e-29) {
		tmp = t_3;
	} else if (t <= 5.2e+72) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (y * (z / a))
	t_2 = y * ((t - z) / t)
	t_3 = z * ((y - x) / (a - t))
	tmp = 0
	if t <= -4.8e+217:
		tmp = t_2
	elif t <= -5e+171:
		tmp = x * ((z - a) / t)
	elif t <= -1.75e+92:
		tmp = t_2
	elif t <= -3.4e-91:
		tmp = t_3
	elif t <= 6.8e-106:
		tmp = t_1
	elif t <= 1.9e-29:
		tmp = t_3
	elif t <= 5.2e+72:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(y * Float64(z / a)))
	t_2 = Float64(y * Float64(Float64(t - z) / t))
	t_3 = Float64(z * Float64(Float64(y - x) / Float64(a - t)))
	tmp = 0.0
	if (t <= -4.8e+217)
		tmp = t_2;
	elseif (t <= -5e+171)
		tmp = Float64(x * Float64(Float64(z - a) / t));
	elseif (t <= -1.75e+92)
		tmp = t_2;
	elseif (t <= -3.4e-91)
		tmp = t_3;
	elseif (t <= 6.8e-106)
		tmp = t_1;
	elseif (t <= 1.9e-29)
		tmp = t_3;
	elseif (t <= 5.2e+72)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (y * (z / a));
	t_2 = y * ((t - z) / t);
	t_3 = z * ((y - x) / (a - t));
	tmp = 0.0;
	if (t <= -4.8e+217)
		tmp = t_2;
	elseif (t <= -5e+171)
		tmp = x * ((z - a) / t);
	elseif (t <= -1.75e+92)
		tmp = t_2;
	elseif (t <= -3.4e-91)
		tmp = t_3;
	elseif (t <= 6.8e-106)
		tmp = t_1;
	elseif (t <= 1.9e-29)
		tmp = t_3;
	elseif (t <= 5.2e+72)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(N[(t - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.8e+217], t$95$2, If[LessEqual[t, -5e+171], N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.75e+92], t$95$2, If[LessEqual[t, -3.4e-91], t$95$3, If[LessEqual[t, 6.8e-106], t$95$1, If[LessEqual[t, 1.9e-29], t$95$3, If[LessEqual[t, 5.2e+72], t$95$1, t$95$2]]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t \leq -1.75 \cdot 10^{+92}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq -3.4 \cdot 10^{-91}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t \leq 6.8 \cdot 10^{-106}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 1.9 \cdot 10^{-29}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t \leq 5.2 \cdot 10^{+72}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -4.7999999999999996e217 or -5.0000000000000004e171 < t < -1.74999999999999993e92 or 5.19999999999999963e72 < t

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-\frac{y \cdot \left(z - t\right)}{t}} \]
      2. distribute-frac-neg250.1%

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

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{-t}} \]
    13. Simplified67.1%

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

    if -4.7999999999999996e217 < t < -5.0000000000000004e171

    1. Initial program 3.0%

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

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

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

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

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

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

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

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

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

    if -1.74999999999999993e92 < t < -3.40000000000000027e-91 or 6.79999999999999965e-106 < t < 1.89999999999999988e-29

    1. Initial program 75.2%

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

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

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

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

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

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

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

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

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

    if -3.40000000000000027e-91 < t < 6.79999999999999965e-106 or 1.89999999999999988e-29 < t < 5.19999999999999963e72

    1. Initial program 85.6%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.8 \cdot 10^{+217}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{elif}\;t \leq -5 \cdot 10^{+171}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq -1.75 \cdot 10^{+92}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{elif}\;t \leq -3.4 \cdot 10^{-91}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;t \leq 6.8 \cdot 10^{-106}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{-29}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{+72}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 62.1% accurate, 0.3× speedup?

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

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

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

\mathbf{elif}\;t \leq -3 \cdot 10^{+101}:\\
\;\;\;\;t\_1\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -4.7999999999999996e217 or -3.1500000000000002e171 < t < -2.99999999999999993e101 or 1.54999999999999993e193 < t

    1. Initial program 36.2%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(z - t\right) \cdot \color{blue}{\left(-1 \cdot \frac{y}{t}\right)} \]
    9. Step-by-step derivation
      1. mul-1-neg43.5%

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

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

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

        \[\leadsto \color{blue}{-\frac{y \cdot \left(z - t\right)}{t}} \]
      2. distribute-frac-neg253.1%

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

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

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

    if -4.7999999999999996e217 < t < -3.1500000000000002e171

    1. Initial program 3.0%

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

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

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

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

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

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

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

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

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

    if -2.99999999999999993e101 < t < -2.00000000000000004e-91

    1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

    if -2.00000000000000004e-91 < t < 4.8000000000000004e-28

    1. Initial program 85.8%

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

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

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

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

    if 4.8000000000000004e-28 < t < 1.54999999999999993e193

    1. Initial program 63.4%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.8 \cdot 10^{+217}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{elif}\;t \leq -3.15 \cdot 10^{+171}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq -3 \cdot 10^{+101}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{elif}\;t \leq -2 \cdot 10^{-91}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-28}:\\ \;\;\;\;x - z \cdot \frac{x - y}{a}\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{+193}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 38.2% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{z - a}{t}\\ \mathbf{if}\;a \leq -5.8 \cdot 10^{+39}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.45 \cdot 10^{-269}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{-84}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{-21}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 8.5 \cdot 10^{+18}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{+64}:\\ \;\;\;\;y \cdot \frac{z - t}{a}\\ \mathbf{elif}\;a \leq 4.2 \cdot 10^{+79}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (/ (- z a) t))))
   (if (<= a -5.8e+39)
     x
     (if (<= a 3.45e-269)
       t_1
       (if (<= a 1.8e-84)
         y
         (if (<= a 1.45e-21)
           t_1
           (if (<= a 8.5e+18)
             y
             (if (<= a 1.55e+64)
               (* y (/ (- z t) a))
               (if (<= a 4.2e+79) y x)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * ((z - a) / t);
	double tmp;
	if (a <= -5.8e+39) {
		tmp = x;
	} else if (a <= 3.45e-269) {
		tmp = t_1;
	} else if (a <= 1.8e-84) {
		tmp = y;
	} else if (a <= 1.45e-21) {
		tmp = t_1;
	} else if (a <= 8.5e+18) {
		tmp = y;
	} else if (a <= 1.55e+64) {
		tmp = y * ((z - t) / a);
	} else if (a <= 4.2e+79) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * ((z - a) / t)
    if (a <= (-5.8d+39)) then
        tmp = x
    else if (a <= 3.45d-269) then
        tmp = t_1
    else if (a <= 1.8d-84) then
        tmp = y
    else if (a <= 1.45d-21) then
        tmp = t_1
    else if (a <= 8.5d+18) then
        tmp = y
    else if (a <= 1.55d+64) then
        tmp = y * ((z - t) / a)
    else if (a <= 4.2d+79) then
        tmp = y
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * ((z - a) / t);
	double tmp;
	if (a <= -5.8e+39) {
		tmp = x;
	} else if (a <= 3.45e-269) {
		tmp = t_1;
	} else if (a <= 1.8e-84) {
		tmp = y;
	} else if (a <= 1.45e-21) {
		tmp = t_1;
	} else if (a <= 8.5e+18) {
		tmp = y;
	} else if (a <= 1.55e+64) {
		tmp = y * ((z - t) / a);
	} else if (a <= 4.2e+79) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * ((z - a) / t)
	tmp = 0
	if a <= -5.8e+39:
		tmp = x
	elif a <= 3.45e-269:
		tmp = t_1
	elif a <= 1.8e-84:
		tmp = y
	elif a <= 1.45e-21:
		tmp = t_1
	elif a <= 8.5e+18:
		tmp = y
	elif a <= 1.55e+64:
		tmp = y * ((z - t) / a)
	elif a <= 4.2e+79:
		tmp = y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(Float64(z - a) / t))
	tmp = 0.0
	if (a <= -5.8e+39)
		tmp = x;
	elseif (a <= 3.45e-269)
		tmp = t_1;
	elseif (a <= 1.8e-84)
		tmp = y;
	elseif (a <= 1.45e-21)
		tmp = t_1;
	elseif (a <= 8.5e+18)
		tmp = y;
	elseif (a <= 1.55e+64)
		tmp = Float64(y * Float64(Float64(z - t) / a));
	elseif (a <= 4.2e+79)
		tmp = y;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * ((z - a) / t);
	tmp = 0.0;
	if (a <= -5.8e+39)
		tmp = x;
	elseif (a <= 3.45e-269)
		tmp = t_1;
	elseif (a <= 1.8e-84)
		tmp = y;
	elseif (a <= 1.45e-21)
		tmp = t_1;
	elseif (a <= 8.5e+18)
		tmp = y;
	elseif (a <= 1.55e+64)
		tmp = y * ((z - t) / a);
	elseif (a <= 4.2e+79)
		tmp = y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.8e+39], x, If[LessEqual[a, 3.45e-269], t$95$1, If[LessEqual[a, 1.8e-84], y, If[LessEqual[a, 1.45e-21], t$95$1, If[LessEqual[a, 8.5e+18], y, If[LessEqual[a, 1.55e+64], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.2e+79], y, x]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq 3.45 \cdot 10^{-269}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 1.8 \cdot 10^{-84}:\\
\;\;\;\;y\\

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

\mathbf{elif}\;a \leq 8.5 \cdot 10^{+18}:\\
\;\;\;\;y\\

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

\mathbf{elif}\;a \leq 4.2 \cdot 10^{+79}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -5.80000000000000059e39 or 4.20000000000000016e79 < a

    1. Initial program 69.6%

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

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

    if -5.80000000000000059e39 < a < 3.45e-269 or 1.80000000000000002e-84 < a < 1.45e-21

    1. Initial program 65.7%

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

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

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

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

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

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

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

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

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

    if 3.45e-269 < a < 1.80000000000000002e-84 or 1.45e-21 < a < 8.5e18 or 1.55e64 < a < 4.20000000000000016e79

    1. Initial program 64.4%

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

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

    if 8.5e18 < a < 1.55e64

    1. Initial program 72.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.8 \cdot 10^{+39}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.45 \cdot 10^{-269}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{-84}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{-21}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;a \leq 8.5 \cdot 10^{+18}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{+64}:\\ \;\;\;\;y \cdot \frac{z - t}{a}\\ \mathbf{elif}\;a \leq 4.2 \cdot 10^{+79}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 38.2% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{z - a}{t}\\ \mathbf{if}\;a \leq -8.5 \cdot 10^{+39}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 6.1 \cdot 10^{-271}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{-85}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{-23}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{+19}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{+66}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{+79}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (/ (- z a) t))))
   (if (<= a -8.5e+39)
     x
     (if (<= a 6.1e-271)
       t_1
       (if (<= a 4.5e-85)
         y
         (if (<= a 1.55e-23)
           t_1
           (if (<= a 5.5e+19)
             y
             (if (<= a 1.25e+66)
               (* (- z t) (/ y a))
               (if (<= a 3.2e+79) y x)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * ((z - a) / t);
	double tmp;
	if (a <= -8.5e+39) {
		tmp = x;
	} else if (a <= 6.1e-271) {
		tmp = t_1;
	} else if (a <= 4.5e-85) {
		tmp = y;
	} else if (a <= 1.55e-23) {
		tmp = t_1;
	} else if (a <= 5.5e+19) {
		tmp = y;
	} else if (a <= 1.25e+66) {
		tmp = (z - t) * (y / a);
	} else if (a <= 3.2e+79) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * ((z - a) / t)
    if (a <= (-8.5d+39)) then
        tmp = x
    else if (a <= 6.1d-271) then
        tmp = t_1
    else if (a <= 4.5d-85) then
        tmp = y
    else if (a <= 1.55d-23) then
        tmp = t_1
    else if (a <= 5.5d+19) then
        tmp = y
    else if (a <= 1.25d+66) then
        tmp = (z - t) * (y / a)
    else if (a <= 3.2d+79) then
        tmp = y
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * ((z - a) / t);
	double tmp;
	if (a <= -8.5e+39) {
		tmp = x;
	} else if (a <= 6.1e-271) {
		tmp = t_1;
	} else if (a <= 4.5e-85) {
		tmp = y;
	} else if (a <= 1.55e-23) {
		tmp = t_1;
	} else if (a <= 5.5e+19) {
		tmp = y;
	} else if (a <= 1.25e+66) {
		tmp = (z - t) * (y / a);
	} else if (a <= 3.2e+79) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * ((z - a) / t)
	tmp = 0
	if a <= -8.5e+39:
		tmp = x
	elif a <= 6.1e-271:
		tmp = t_1
	elif a <= 4.5e-85:
		tmp = y
	elif a <= 1.55e-23:
		tmp = t_1
	elif a <= 5.5e+19:
		tmp = y
	elif a <= 1.25e+66:
		tmp = (z - t) * (y / a)
	elif a <= 3.2e+79:
		tmp = y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(Float64(z - a) / t))
	tmp = 0.0
	if (a <= -8.5e+39)
		tmp = x;
	elseif (a <= 6.1e-271)
		tmp = t_1;
	elseif (a <= 4.5e-85)
		tmp = y;
	elseif (a <= 1.55e-23)
		tmp = t_1;
	elseif (a <= 5.5e+19)
		tmp = y;
	elseif (a <= 1.25e+66)
		tmp = Float64(Float64(z - t) * Float64(y / a));
	elseif (a <= 3.2e+79)
		tmp = y;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * ((z - a) / t);
	tmp = 0.0;
	if (a <= -8.5e+39)
		tmp = x;
	elseif (a <= 6.1e-271)
		tmp = t_1;
	elseif (a <= 4.5e-85)
		tmp = y;
	elseif (a <= 1.55e-23)
		tmp = t_1;
	elseif (a <= 5.5e+19)
		tmp = y;
	elseif (a <= 1.25e+66)
		tmp = (z - t) * (y / a);
	elseif (a <= 3.2e+79)
		tmp = y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -8.5e+39], x, If[LessEqual[a, 6.1e-271], t$95$1, If[LessEqual[a, 4.5e-85], y, If[LessEqual[a, 1.55e-23], t$95$1, If[LessEqual[a, 5.5e+19], y, If[LessEqual[a, 1.25e+66], N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.2e+79], y, x]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq 6.1 \cdot 10^{-271}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 4.5 \cdot 10^{-85}:\\
\;\;\;\;y\\

\mathbf{elif}\;a \leq 1.55 \cdot 10^{-23}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 5.5 \cdot 10^{+19}:\\
\;\;\;\;y\\

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

\mathbf{elif}\;a \leq 3.2 \cdot 10^{+79}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -8.49999999999999971e39 or 3.20000000000000003e79 < a

    1. Initial program 69.6%

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

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

    if -8.49999999999999971e39 < a < 6.09999999999999992e-271 or 4.50000000000000004e-85 < a < 1.5499999999999999e-23

    1. Initial program 65.7%

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

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

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

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

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

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

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

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

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

    if 6.09999999999999992e-271 < a < 4.50000000000000004e-85 or 1.5499999999999999e-23 < a < 5.5e19 or 1.24999999999999998e66 < a < 3.20000000000000003e79

    1. Initial program 64.4%

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

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

    if 5.5e19 < a < 1.24999999999999998e66

    1. Initial program 72.7%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8.5 \cdot 10^{+39}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 6.1 \cdot 10^{-271}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{-85}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{-23}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{+19}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{+66}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{+79}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 82.7% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t \leq -1.45 \cdot 10^{-230}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 2.5 \cdot 10^{+44}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.0000000000000002e46 or 2.4999999999999998e44 < t

    1. Initial program 40.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.0000000000000002e46 < t < -1.45000000000000003e-230 or 1.90000000000000002e-210 < t < 2.4999999999999998e44

    1. Initial program 87.5%

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

    if -1.45000000000000003e-230 < t < 1.90000000000000002e-210

    1. Initial program 83.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{+46}:\\ \;\;\;\;y + \left(z - a\right) \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq -1.45 \cdot 10^{-230}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot \left(t - z\right)}{t - a}\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{-210}:\\ \;\;\;\;x - z \cdot \frac{x - y}{a}\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{+44}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot \left(t - z\right)}{t - a}\\ \mathbf{else}:\\ \;\;\;\;y + \left(z - a\right) \cdot \frac{x - y}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 60.8% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -3.5 \cdot 10^{-60}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 2.9 \cdot 10^{+79}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.99999999999999997e140 or 2.89999999999999992e79 < a

    1. Initial program 71.4%

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

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

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

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

    if -2.99999999999999997e140 < a < -3.49999999999999976e-60 or 5.7000000000000002e-270 < a < 2.89999999999999992e79

    1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.49999999999999976e-60 < a < 5.7000000000000002e-270

    1. Initial program 61.8%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3 \cdot 10^{+140}:\\ \;\;\;\;x - z \cdot \frac{x - y}{a}\\ \mathbf{elif}\;a \leq -3.5 \cdot 10^{-60}:\\ \;\;\;\;\frac{y}{\frac{a - t}{z - t}}\\ \mathbf{elif}\;a \leq 5.7 \cdot 10^{-270}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;a \leq 2.9 \cdot 10^{+79}:\\ \;\;\;\;\frac{y}{\frac{a - t}{z - t}}\\ \mathbf{else}:\\ \;\;\;\;x - z \cdot \frac{x - y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 55.6% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;t \leq -2 \cdot 10^{+48} \lor \neg \left(t \leq 1.15 \cdot 10^{+72}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.7999999999999996e217 or -5.5000000000000003e171 < t < -2.00000000000000009e48 or 1.15e72 < t

    1. Initial program 42.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y + -1 \cdot \frac{y \cdot z}{t}} \]
    12. Step-by-step derivation
      1. mul-1-neg59.9%

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

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

        \[\leadsto \color{blue}{y - \frac{y}{t} \cdot z} \]
      4. *-commutative63.4%

        \[\leadsto y - \color{blue}{z \cdot \frac{y}{t}} \]
    13. Simplified63.4%

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

    if -4.7999999999999996e217 < t < -5.5000000000000003e171

    1. Initial program 3.0%

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

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

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

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

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

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

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

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

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

    if -2.00000000000000009e48 < t < 1.15e72

    1. Initial program 84.1%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.8 \cdot 10^{+217}:\\ \;\;\;\;y - z \cdot \frac{y}{t}\\ \mathbf{elif}\;t \leq -5.5 \cdot 10^{+171}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq -2 \cdot 10^{+48} \lor \neg \left(t \leq 1.15 \cdot 10^{+72}\right):\\ \;\;\;\;y - z \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 55.7% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;t \leq -4.6 \cdot 10^{+48} \lor \neg \left(t \leq 1.9 \cdot 10^{+74}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.7999999999999996e217 or -1.0500000000000001e171 < t < -4.6e48 or 1.8999999999999999e74 < t

    1. Initial program 42.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{-t}} \]
    13. Simplified65.1%

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

    if -4.7999999999999996e217 < t < -1.0500000000000001e171

    1. Initial program 3.0%

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

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

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

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

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

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

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

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

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

    if -4.6e48 < t < 1.8999999999999999e74

    1. Initial program 84.1%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.8 \cdot 10^{+217}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{elif}\;t \leq -1.05 \cdot 10^{+171}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq -4.6 \cdot 10^{+48} \lor \neg \left(t \leq 1.9 \cdot 10^{+74}\right):\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 37.9% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq 6.5 \cdot 10^{-271}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 1.15 \cdot 10^{-84}:\\
\;\;\;\;y\\

\mathbf{elif}\;a \leq 1.22 \cdot 10^{-26}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 2.4 \cdot 10^{+79}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.14999999999999997e40 or 2.39999999999999986e79 < a

    1. Initial program 69.6%

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

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

    if -1.14999999999999997e40 < a < 6.5000000000000005e-271 or 1.1499999999999999e-84 < a < 1.22e-26

    1. Initial program 65.7%

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

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

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

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

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

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

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

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

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

    if 6.5000000000000005e-271 < a < 1.1499999999999999e-84 or 1.22e-26 < a < 2.39999999999999986e79

    1. Initial program 66.2%

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

      \[\leadsto \color{blue}{y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification51.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.15 \cdot 10^{+40}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{-271}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{-84}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 1.22 \cdot 10^{-26}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{+79}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 53.2% accurate, 0.5× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.5500000000000001e218 or -5.0000000000000004e171 < t < -4.39999999999999997e83 or 2.89999999999999992e79 < t

    1. Initial program 42.6%

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

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

    if -1.5500000000000001e218 < t < -5.0000000000000004e171

    1. Initial program 3.0%

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

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

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

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

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

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

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

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

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

    if -4.39999999999999997e83 < t < 2.89999999999999992e79

    1. Initial program 82.8%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.55 \cdot 10^{+218}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -5 \cdot 10^{+171}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq -4.4 \cdot 10^{+83}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{+79}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 80.9% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + \left(z - a\right) \cdot \frac{x - y}{t}\\ \mathbf{if}\;t \leq -6.5 \cdot 10^{+50}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 3.4 \cdot 10^{-30}:\\ \;\;\;\;x + \frac{-1}{\frac{\frac{a - t}{z}}{x - y}}\\ \mathbf{elif}\;t \leq 1.22 \cdot 10^{+42}:\\ \;\;\;\;x - \frac{y \cdot \left(t - z\right)}{a - t}\\ \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)))))
   (if (<= t -6.5e+50)
     t_1
     (if (<= t 3.4e-30)
       (+ x (/ -1.0 (/ (/ (- a t) z) (- x y))))
       (if (<= t 1.22e+42) (- x (/ (* y (- t z)) (- a t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y + ((z - a) * ((x - y) / t));
	double tmp;
	if (t <= -6.5e+50) {
		tmp = t_1;
	} else if (t <= 3.4e-30) {
		tmp = x + (-1.0 / (((a - t) / z) / (x - y)));
	} else if (t <= 1.22e+42) {
		tmp = x - ((y * (t - 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 - a) * ((x - y) / t))
    if (t <= (-6.5d+50)) then
        tmp = t_1
    else if (t <= 3.4d-30) then
        tmp = x + ((-1.0d0) / (((a - t) / z) / (x - y)))
    else if (t <= 1.22d+42) then
        tmp = x - ((y * (t - 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 - a) * ((x - y) / t));
	double tmp;
	if (t <= -6.5e+50) {
		tmp = t_1;
	} else if (t <= 3.4e-30) {
		tmp = x + (-1.0 / (((a - t) / z) / (x - y)));
	} else if (t <= 1.22e+42) {
		tmp = x - ((y * (t - z)) / (a - t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y + ((z - a) * ((x - y) / t))
	tmp = 0
	if t <= -6.5e+50:
		tmp = t_1
	elif t <= 3.4e-30:
		tmp = x + (-1.0 / (((a - t) / z) / (x - y)))
	elif t <= 1.22e+42:
		tmp = x - ((y * (t - z)) / (a - t))
	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)))
	tmp = 0.0
	if (t <= -6.5e+50)
		tmp = t_1;
	elseif (t <= 3.4e-30)
		tmp = Float64(x + Float64(-1.0 / Float64(Float64(Float64(a - t) / z) / Float64(x - y))));
	elseif (t <= 1.22e+42)
		tmp = Float64(x - Float64(Float64(y * Float64(t - 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 - a) * ((x - y) / t));
	tmp = 0.0;
	if (t <= -6.5e+50)
		tmp = t_1;
	elseif (t <= 3.4e-30)
		tmp = x + (-1.0 / (((a - t) / z) / (x - y)));
	elseif (t <= 1.22e+42)
		tmp = x - ((y * (t - 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 - a), $MachinePrecision] * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.5e+50], t$95$1, If[LessEqual[t, 3.4e-30], N[(x + N[(-1.0 / N[(N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.22e+42], N[(x - N[(N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -6.5000000000000003e50 or 1.22e42 < t

    1. Initial program 40.4%

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

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

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

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

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

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

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

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

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

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

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

    if -6.5000000000000003e50 < t < 3.4000000000000003e-30

    1. Initial program 85.6%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - t}{z - t}}{y - x}}} \]
      2. associate-/l/85.1%

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

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

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

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

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

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

    if 3.4000000000000003e-30 < t < 1.22e42

    1. Initial program 88.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.5 \cdot 10^{+50}:\\ \;\;\;\;y + \left(z - a\right) \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq 3.4 \cdot 10^{-30}:\\ \;\;\;\;x + \frac{-1}{\frac{\frac{a - t}{z}}{x - y}}\\ \mathbf{elif}\;t \leq 1.22 \cdot 10^{+42}:\\ \;\;\;\;x - \frac{y \cdot \left(t - z\right)}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y + \left(z - a\right) \cdot \frac{x - y}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 56.7% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.7999999999999998e39 or 2.3e79 < a

    1. Initial program 69.6%

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

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

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

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

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

    if -3.7999999999999998e39 < a < 6.2000000000000002e-267

    1. Initial program 63.1%

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

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

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

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

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

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

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

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

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

    if 6.2000000000000002e-267 < a < 2.3e79

    1. Initial program 68.6%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.8 \cdot 10^{+39}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{-267}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{+79}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 60.9% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -8.2999999999999997e96

    1. Initial program 56.8%

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

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

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

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

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

    if -8.2999999999999997e96 < x < 2.8000000000000001e-36

    1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.8000000000000001e-36 < x < 4.1999999999999999e199

    1. Initial program 65.2%

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

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

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

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

    if 4.1999999999999999e199 < x

    1. Initial program 42.1%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -8.3 \cdot 10^{+96}:\\ \;\;\;\;x \cdot \left(\frac{z - t}{t - a} + 1\right)\\ \mathbf{elif}\;x \leq 2.8 \cdot 10^{-36}:\\ \;\;\;\;\frac{y}{\frac{a - t}{z - t}}\\ \mathbf{elif}\;x \leq 4.2 \cdot 10^{+199}:\\ \;\;\;\;x - z \cdot \frac{x - y}{a}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 72.2% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.2 \cdot 10^{+120} \lor \neg \left(x \leq 1.7 \cdot 10^{+127}\right):\\
\;\;\;\;x \cdot \left(\frac{z - t}{t - a} + 1\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.2000000000000001e120 or 1.69999999999999989e127 < x

    1. Initial program 51.1%

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

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

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

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

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

    if -4.2000000000000001e120 < x < 1.69999999999999989e127

    1. Initial program 74.7%

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

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

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

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

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

Alternative 16: 76.9% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.5e10 or 2.14999999999999995e-32 < a

    1. Initial program 71.7%

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

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

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

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

    if -3.5e10 < a < 2.14999999999999995e-32

    1. Initial program 61.9%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 17: 36.8% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;a \leq 4.8 \cdot 10^{+79}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.2500000000000001e39 or 4.79999999999999971e79 < a

    1. Initial program 69.6%

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

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

    if -3.2500000000000001e39 < a < 8.2000000000000005e-271

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

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

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

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

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

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

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

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

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

    if 8.2000000000000005e-271 < a < 4.79999999999999971e79

    1. Initial program 68.6%

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

      \[\leadsto \color{blue}{y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification47.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.25 \cdot 10^{+39}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{-271}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{elif}\;a \leq 4.8 \cdot 10^{+79}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 36.8% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;a \leq 4.4 \cdot 10^{+79}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -7.19999999999999969e39 or 4.3999999999999998e79 < a

    1. Initial program 69.6%

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

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

    if -7.19999999999999969e39 < a < 8.1999999999999993e-270

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.1999999999999993e-270 < a < 4.3999999999999998e79

    1. Initial program 68.6%

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

      \[\leadsto \color{blue}{y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification47.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.2 \cdot 10^{+39}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{-270}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 4.4 \cdot 10^{+79}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 38.6% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.6 \cdot 10^{-24}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 9.8 \cdot 10^{-23}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -1.6e-24) y (if (<= t 9.8e-23) x y)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -1.6e-24) {
		tmp = y;
	} else if (t <= 9.8e-23) {
		tmp = x;
	} else {
		tmp = y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (t <= (-1.6d-24)) then
        tmp = y
    else if (t <= 9.8d-23) then
        tmp = x
    else
        tmp = y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -1.6e-24) {
		tmp = y;
	} else if (t <= 9.8e-23) {
		tmp = x;
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -1.6e-24:
		tmp = y
	elif t <= 9.8e-23:
		tmp = x
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -1.6e-24)
		tmp = y;
	elseif (t <= 9.8e-23)
		tmp = x;
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -1.6e-24)
		tmp = y;
	elseif (t <= 9.8e-23)
		tmp = x;
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.6e-24], y, If[LessEqual[t, 9.8e-23], x, y]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq 9.8 \cdot 10^{-23}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.60000000000000006e-24 or 9.7999999999999996e-23 < t

    1. Initial program 49.5%

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

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

    if -1.60000000000000006e-24 < t < 9.7999999999999996e-23

    1. Initial program 86.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.6 \cdot 10^{-24}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 9.8 \cdot 10^{-23}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 25.2% 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 67.4%

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

    \[\leadsto \color{blue}{x} \]
  4. Final simplification26.0%

    \[\leadsto x \]
  5. Add Preprocessing

Developer target: 86.3% 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 2024055 
(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))))