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

Percentage Accurate: 67.7% → 90.8%
Time: 29.6s
Alternatives: 27
Speedup: 0.5×

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 27 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.7% 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.8% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{\left(x - y\right) \cdot \left(t - z\right)}{a - t}\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{-290}:\\ \;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;y + \frac{z \cdot \left(x - y\right) - a \cdot \left(x - y\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;x + {\left(\frac{\frac{a - t}{z - t}}{y - x}\right)}^{-1}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ (* (- x y) (- t z)) (- a t)))))
   (if (<= t_1 -5e-290)
     (fma (- y x) (/ (- z t) (- a t)) x)
     (if (<= t_1 0.0)
       (+ y (/ (- (* z (- x y)) (* a (- x y))) t))
       (+ x (pow (/ (/ (- a t) (- z t)) (- y x)) -1.0))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (((x - y) * (t - z)) / (a - t));
	double tmp;
	if (t_1 <= -5e-290) {
		tmp = fma((y - x), ((z - t) / (a - t)), x);
	} else if (t_1 <= 0.0) {
		tmp = y + (((z * (x - y)) - (a * (x - y))) / t);
	} else {
		tmp = x + pow((((a - t) / (z - t)) / (y - x)), -1.0);
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(Float64(x - y) * Float64(t - z)) / Float64(a - t)))
	tmp = 0.0
	if (t_1 <= -5e-290)
		tmp = fma(Float64(y - x), Float64(Float64(z - t) / Float64(a - t)), x);
	elseif (t_1 <= 0.0)
		tmp = Float64(y + Float64(Float64(Float64(z * Float64(x - y)) - Float64(a * Float64(x - y))) / t));
	else
		tmp = Float64(x + (Float64(Float64(Float64(a - t) / Float64(z - t)) / Float64(y - x)) ^ -1.0));
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(x - y), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e-290], N[(N[(y - x), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(y + N[(N[(N[(z * N[(x - y), $MachinePrecision]), $MachinePrecision] - N[(a * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(x + N[Power[N[(N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(y - x), $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

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

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


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

    1. Initial program 73.7%

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

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

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

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

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

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

    1. Initial program 5.0%

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

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

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

    1. Initial program 73.1%

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

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

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

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

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

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

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

Alternative 2: 90.8% accurate, 0.1× speedup?

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

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

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

    1. Initial program 73.4%

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

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

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

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

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

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

    1. Initial program 5.0%

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

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

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

Alternative 3: 53.1% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{t - z}{t}\\ t_2 := x + y \cdot \frac{z}{a}\\ \mathbf{if}\;a \leq -2.15 \cdot 10^{+151}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq -4.1 \cdot 10^{+145}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -1.6 \cdot 10^{+64}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;a \leq -70:\\ \;\;\;\;t \cdot \frac{y}{t - a}\\ \mathbf{elif}\;a \leq -5.7 \cdot 10^{-11}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -5.6 \cdot 10^{-228}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 6.8 \cdot 10^{-203}:\\ \;\;\;\;z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;a \leq 3 \cdot 10^{-36}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 7 \cdot 10^{+64}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- t z) t))) (t_2 (+ x (* y (/ z a)))))
   (if (<= a -2.15e+151)
     (+ x (/ y (/ a z)))
     (if (<= a -4.1e+145)
       t_1
       (if (<= a -1.6e+64)
         (* x (- 1.0 (/ z a)))
         (if (<= a -70.0)
           (* t (/ y (- t a)))
           (if (<= a -5.7e-11)
             t_2
             (if (<= a -5.6e-228)
               t_1
               (if (<= a 6.8e-203)
                 (* z (/ (- x y) t))
                 (if (<= a 3e-36)
                   t_1
                   (if (<= a 7e+64) (* z (/ (- y x) a)) t_2)))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((t - z) / t);
	double t_2 = x + (y * (z / a));
	double tmp;
	if (a <= -2.15e+151) {
		tmp = x + (y / (a / z));
	} else if (a <= -4.1e+145) {
		tmp = t_1;
	} else if (a <= -1.6e+64) {
		tmp = x * (1.0 - (z / a));
	} else if (a <= -70.0) {
		tmp = t * (y / (t - a));
	} else if (a <= -5.7e-11) {
		tmp = t_2;
	} else if (a <= -5.6e-228) {
		tmp = t_1;
	} else if (a <= 6.8e-203) {
		tmp = z * ((x - y) / t);
	} else if (a <= 3e-36) {
		tmp = t_1;
	} else if (a <= 7e+64) {
		tmp = z * ((y - x) / a);
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = y * ((t - z) / t)
    t_2 = x + (y * (z / a))
    if (a <= (-2.15d+151)) then
        tmp = x + (y / (a / z))
    else if (a <= (-4.1d+145)) then
        tmp = t_1
    else if (a <= (-1.6d+64)) then
        tmp = x * (1.0d0 - (z / a))
    else if (a <= (-70.0d0)) then
        tmp = t * (y / (t - a))
    else if (a <= (-5.7d-11)) then
        tmp = t_2
    else if (a <= (-5.6d-228)) then
        tmp = t_1
    else if (a <= 6.8d-203) then
        tmp = z * ((x - y) / t)
    else if (a <= 3d-36) then
        tmp = t_1
    else if (a <= 7d+64) then
        tmp = z * ((y - x) / a)
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((t - z) / t);
	double t_2 = x + (y * (z / a));
	double tmp;
	if (a <= -2.15e+151) {
		tmp = x + (y / (a / z));
	} else if (a <= -4.1e+145) {
		tmp = t_1;
	} else if (a <= -1.6e+64) {
		tmp = x * (1.0 - (z / a));
	} else if (a <= -70.0) {
		tmp = t * (y / (t - a));
	} else if (a <= -5.7e-11) {
		tmp = t_2;
	} else if (a <= -5.6e-228) {
		tmp = t_1;
	} else if (a <= 6.8e-203) {
		tmp = z * ((x - y) / t);
	} else if (a <= 3e-36) {
		tmp = t_1;
	} else if (a <= 7e+64) {
		tmp = z * ((y - x) / a);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((t - z) / t)
	t_2 = x + (y * (z / a))
	tmp = 0
	if a <= -2.15e+151:
		tmp = x + (y / (a / z))
	elif a <= -4.1e+145:
		tmp = t_1
	elif a <= -1.6e+64:
		tmp = x * (1.0 - (z / a))
	elif a <= -70.0:
		tmp = t * (y / (t - a))
	elif a <= -5.7e-11:
		tmp = t_2
	elif a <= -5.6e-228:
		tmp = t_1
	elif a <= 6.8e-203:
		tmp = z * ((x - y) / t)
	elif a <= 3e-36:
		tmp = t_1
	elif a <= 7e+64:
		tmp = z * ((y - x) / a)
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(t - z) / t))
	t_2 = Float64(x + Float64(y * Float64(z / a)))
	tmp = 0.0
	if (a <= -2.15e+151)
		tmp = Float64(x + Float64(y / Float64(a / z)));
	elseif (a <= -4.1e+145)
		tmp = t_1;
	elseif (a <= -1.6e+64)
		tmp = Float64(x * Float64(1.0 - Float64(z / a)));
	elseif (a <= -70.0)
		tmp = Float64(t * Float64(y / Float64(t - a)));
	elseif (a <= -5.7e-11)
		tmp = t_2;
	elseif (a <= -5.6e-228)
		tmp = t_1;
	elseif (a <= 6.8e-203)
		tmp = Float64(z * Float64(Float64(x - y) / t));
	elseif (a <= 3e-36)
		tmp = t_1;
	elseif (a <= 7e+64)
		tmp = Float64(z * Float64(Float64(y - x) / a));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((t - z) / t);
	t_2 = x + (y * (z / a));
	tmp = 0.0;
	if (a <= -2.15e+151)
		tmp = x + (y / (a / z));
	elseif (a <= -4.1e+145)
		tmp = t_1;
	elseif (a <= -1.6e+64)
		tmp = x * (1.0 - (z / a));
	elseif (a <= -70.0)
		tmp = t * (y / (t - a));
	elseif (a <= -5.7e-11)
		tmp = t_2;
	elseif (a <= -5.6e-228)
		tmp = t_1;
	elseif (a <= 6.8e-203)
		tmp = z * ((x - y) / t);
	elseif (a <= 3e-36)
		tmp = t_1;
	elseif (a <= 7e+64)
		tmp = z * ((y - x) / a);
	else
		tmp = t_2;
	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]}, Block[{t$95$2 = N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.15e+151], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -4.1e+145], t$95$1, If[LessEqual[a, -1.6e+64], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -70.0], N[(t * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -5.7e-11], t$95$2, If[LessEqual[a, -5.6e-228], t$95$1, If[LessEqual[a, 6.8e-203], N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3e-36], t$95$1, If[LessEqual[a, 7e+64], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -4.1 \cdot 10^{+145}:\\
\;\;\;\;t\_1\\

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

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

\mathbf{elif}\;a \leq -5.7 \cdot 10^{-11}:\\
\;\;\;\;t\_2\\

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

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

\mathbf{elif}\;a \leq 3 \cdot 10^{-36}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if a < -2.14999999999999991e151

    1. Initial program 68.1%

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{z}}} \]
    10. Applied egg-rr73.1%

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

    if -2.14999999999999991e151 < a < -4.1000000000000001e145 or -5.6999999999999997e-11 < a < -5.6000000000000005e-228 or 6.7999999999999998e-203 < a < 3.0000000000000002e-36

    1. Initial program 72.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{y \cdot \frac{z - t}{t}} \]
      3. distribute-rgt-neg-in60.4%

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

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

    if -4.1000000000000001e145 < a < -1.60000000000000009e64

    1. Initial program 77.9%

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

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

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

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

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

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

    if -1.60000000000000009e64 < a < -70

    1. Initial program 56.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot y}{a - t}} \]
    13. Step-by-step derivation
      1. mul-1-neg46.7%

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

        \[\leadsto -\color{blue}{t \cdot \frac{y}{a - t}} \]
      3. distribute-lft-neg-out51.8%

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

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

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

    if -70 < a < -5.6999999999999997e-11 or 6.9999999999999997e64 < a

    1. Initial program 70.5%

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

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

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

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

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

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

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

    if -5.6000000000000005e-228 < a < 6.7999999999999998e-203

    1. Initial program 64.2%

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

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

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

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

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

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

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

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

    if 3.0000000000000002e-36 < a < 6.9999999999999997e64

    1. Initial program 70.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.15 \cdot 10^{+151}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq -4.1 \cdot 10^{+145}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{elif}\;a \leq -1.6 \cdot 10^{+64}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;a \leq -70:\\ \;\;\;\;t \cdot \frac{y}{t - a}\\ \mathbf{elif}\;a \leq -5.7 \cdot 10^{-11}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq -5.6 \cdot 10^{-228}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{elif}\;a \leq 6.8 \cdot 10^{-203}:\\ \;\;\;\;z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;a \leq 3 \cdot 10^{-36}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{elif}\;a \leq 7 \cdot 10^{+64}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 53.0% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{t - z}{t}\\ t_2 := x + y \cdot \frac{z}{a}\\ \mathbf{if}\;a \leq -2.15 \cdot 10^{+151}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq -4.1 \cdot 10^{+145}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -4.4 \cdot 10^{+79}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;a \leq -65:\\ \;\;\;\;\frac{y \cdot t}{t - a}\\ \mathbf{elif}\;a \leq -1.02 \cdot 10^{-14}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -5.1 \cdot 10^{-228}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.22 \cdot 10^{-203}:\\ \;\;\;\;z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;a \leq 4.4 \cdot 10^{-36}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 10^{+64}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- t z) t))) (t_2 (+ x (* y (/ z a)))))
   (if (<= a -2.15e+151)
     (+ x (/ y (/ a z)))
     (if (<= a -4.1e+145)
       t_1
       (if (<= a -4.4e+79)
         (* x (- 1.0 (/ z a)))
         (if (<= a -65.0)
           (/ (* y t) (- t a))
           (if (<= a -1.02e-14)
             t_2
             (if (<= a -5.1e-228)
               t_1
               (if (<= a 1.22e-203)
                 (* z (/ (- x y) t))
                 (if (<= a 4.4e-36)
                   t_1
                   (if (<= a 1e+64) (* z (/ (- y x) a)) t_2)))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((t - z) / t);
	double t_2 = x + (y * (z / a));
	double tmp;
	if (a <= -2.15e+151) {
		tmp = x + (y / (a / z));
	} else if (a <= -4.1e+145) {
		tmp = t_1;
	} else if (a <= -4.4e+79) {
		tmp = x * (1.0 - (z / a));
	} else if (a <= -65.0) {
		tmp = (y * t) / (t - a);
	} else if (a <= -1.02e-14) {
		tmp = t_2;
	} else if (a <= -5.1e-228) {
		tmp = t_1;
	} else if (a <= 1.22e-203) {
		tmp = z * ((x - y) / t);
	} else if (a <= 4.4e-36) {
		tmp = t_1;
	} else if (a <= 1e+64) {
		tmp = z * ((y - x) / a);
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = y * ((t - z) / t)
    t_2 = x + (y * (z / a))
    if (a <= (-2.15d+151)) then
        tmp = x + (y / (a / z))
    else if (a <= (-4.1d+145)) then
        tmp = t_1
    else if (a <= (-4.4d+79)) then
        tmp = x * (1.0d0 - (z / a))
    else if (a <= (-65.0d0)) then
        tmp = (y * t) / (t - a)
    else if (a <= (-1.02d-14)) then
        tmp = t_2
    else if (a <= (-5.1d-228)) then
        tmp = t_1
    else if (a <= 1.22d-203) then
        tmp = z * ((x - y) / t)
    else if (a <= 4.4d-36) then
        tmp = t_1
    else if (a <= 1d+64) then
        tmp = z * ((y - x) / a)
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((t - z) / t);
	double t_2 = x + (y * (z / a));
	double tmp;
	if (a <= -2.15e+151) {
		tmp = x + (y / (a / z));
	} else if (a <= -4.1e+145) {
		tmp = t_1;
	} else if (a <= -4.4e+79) {
		tmp = x * (1.0 - (z / a));
	} else if (a <= -65.0) {
		tmp = (y * t) / (t - a);
	} else if (a <= -1.02e-14) {
		tmp = t_2;
	} else if (a <= -5.1e-228) {
		tmp = t_1;
	} else if (a <= 1.22e-203) {
		tmp = z * ((x - y) / t);
	} else if (a <= 4.4e-36) {
		tmp = t_1;
	} else if (a <= 1e+64) {
		tmp = z * ((y - x) / a);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((t - z) / t)
	t_2 = x + (y * (z / a))
	tmp = 0
	if a <= -2.15e+151:
		tmp = x + (y / (a / z))
	elif a <= -4.1e+145:
		tmp = t_1
	elif a <= -4.4e+79:
		tmp = x * (1.0 - (z / a))
	elif a <= -65.0:
		tmp = (y * t) / (t - a)
	elif a <= -1.02e-14:
		tmp = t_2
	elif a <= -5.1e-228:
		tmp = t_1
	elif a <= 1.22e-203:
		tmp = z * ((x - y) / t)
	elif a <= 4.4e-36:
		tmp = t_1
	elif a <= 1e+64:
		tmp = z * ((y - x) / a)
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(t - z) / t))
	t_2 = Float64(x + Float64(y * Float64(z / a)))
	tmp = 0.0
	if (a <= -2.15e+151)
		tmp = Float64(x + Float64(y / Float64(a / z)));
	elseif (a <= -4.1e+145)
		tmp = t_1;
	elseif (a <= -4.4e+79)
		tmp = Float64(x * Float64(1.0 - Float64(z / a)));
	elseif (a <= -65.0)
		tmp = Float64(Float64(y * t) / Float64(t - a));
	elseif (a <= -1.02e-14)
		tmp = t_2;
	elseif (a <= -5.1e-228)
		tmp = t_1;
	elseif (a <= 1.22e-203)
		tmp = Float64(z * Float64(Float64(x - y) / t));
	elseif (a <= 4.4e-36)
		tmp = t_1;
	elseif (a <= 1e+64)
		tmp = Float64(z * Float64(Float64(y - x) / a));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((t - z) / t);
	t_2 = x + (y * (z / a));
	tmp = 0.0;
	if (a <= -2.15e+151)
		tmp = x + (y / (a / z));
	elseif (a <= -4.1e+145)
		tmp = t_1;
	elseif (a <= -4.4e+79)
		tmp = x * (1.0 - (z / a));
	elseif (a <= -65.0)
		tmp = (y * t) / (t - a);
	elseif (a <= -1.02e-14)
		tmp = t_2;
	elseif (a <= -5.1e-228)
		tmp = t_1;
	elseif (a <= 1.22e-203)
		tmp = z * ((x - y) / t);
	elseif (a <= 4.4e-36)
		tmp = t_1;
	elseif (a <= 1e+64)
		tmp = z * ((y - x) / a);
	else
		tmp = t_2;
	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]}, Block[{t$95$2 = N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.15e+151], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -4.1e+145], t$95$1, If[LessEqual[a, -4.4e+79], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -65.0], N[(N[(y * t), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.02e-14], t$95$2, If[LessEqual[a, -5.1e-228], t$95$1, If[LessEqual[a, 1.22e-203], N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.4e-36], t$95$1, If[LessEqual[a, 1e+64], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -4.1 \cdot 10^{+145}:\\
\;\;\;\;t\_1\\

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

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

\mathbf{elif}\;a \leq -1.02 \cdot 10^{-14}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq -5.1 \cdot 10^{-228}:\\
\;\;\;\;t\_1\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if a < -2.14999999999999991e151

    1. Initial program 68.1%

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{z}}} \]
    10. Applied egg-rr73.1%

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

    if -2.14999999999999991e151 < a < -4.1000000000000001e145 or -1.02e-14 < a < -5.1000000000000002e-228 or 1.21999999999999995e-203 < a < 4.3999999999999999e-36

    1. Initial program 72.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{y \cdot \frac{z - t}{t}} \]
      3. distribute-rgt-neg-in60.4%

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

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

    if -4.1000000000000001e145 < a < -4.3999999999999998e79

    1. Initial program 79.9%

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

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

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

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

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

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

    if -4.3999999999999998e79 < a < -65

    1. Initial program 59.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot y}{a - t}} \]
    13. Step-by-step derivation
      1. mul-1-neg51.8%

        \[\leadsto \color{blue}{-\frac{t \cdot y}{a - t}} \]
      2. distribute-neg-frac51.8%

        \[\leadsto \color{blue}{\frac{-t \cdot y}{a - t}} \]
      3. *-commutative51.8%

        \[\leadsto \frac{-\color{blue}{y \cdot t}}{a - t} \]
      4. distribute-rgt-neg-out51.8%

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

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

    if -65 < a < -1.02e-14 or 1.00000000000000002e64 < a

    1. Initial program 70.5%

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

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

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

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

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

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

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

    if -5.1000000000000002e-228 < a < 1.21999999999999995e-203

    1. Initial program 64.2%

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

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

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

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

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

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

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

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

    if 4.3999999999999999e-36 < a < 1.00000000000000002e64

    1. Initial program 70.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.15 \cdot 10^{+151}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq -4.1 \cdot 10^{+145}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{elif}\;a \leq -4.4 \cdot 10^{+79}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;a \leq -65:\\ \;\;\;\;\frac{y \cdot t}{t - a}\\ \mathbf{elif}\;a \leq -1.02 \cdot 10^{-14}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq -5.1 \cdot 10^{-228}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{elif}\;a \leq 1.22 \cdot 10^{-203}:\\ \;\;\;\;z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;a \leq 4.4 \cdot 10^{-36}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{elif}\;a \leq 10^{+64}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 90.8% accurate, 0.3× speedup?

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

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

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

    1. Initial program 73.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 5.0%

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

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

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

Alternative 6: 54.5% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{t - z}{t}\\ t_2 := x + y \cdot \frac{z}{a}\\ \mathbf{if}\;t \leq -1.3 \cdot 10^{+103}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -2.4 \cdot 10^{+49}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq -3.7 \cdot 10^{-21}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{-203}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-176}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 8.8 \cdot 10^{-69} \lor \neg \left(t \leq 6.8 \cdot 10^{-34}\right) \land t \leq 3 \cdot 10^{+16}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- t z) t))) (t_2 (+ x (* y (/ z a)))))
   (if (<= t -1.3e+103)
     t_1
     (if (<= t -2.4e+49)
       (* x (/ (- z a) t))
       (if (<= t -3.7e-21)
         t_1
         (if (<= t 1.15e-203)
           t_2
           (if (<= t 7e-176)
             (* x (- 1.0 (/ z a)))
             (if (or (<= t 8.8e-69) (and (not (<= t 6.8e-34)) (<= t 3e+16)))
               t_2
               t_1))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((t - z) / t);
	double t_2 = x + (y * (z / a));
	double tmp;
	if (t <= -1.3e+103) {
		tmp = t_1;
	} else if (t <= -2.4e+49) {
		tmp = x * ((z - a) / t);
	} else if (t <= -3.7e-21) {
		tmp = t_1;
	} else if (t <= 1.15e-203) {
		tmp = t_2;
	} else if (t <= 7e-176) {
		tmp = x * (1.0 - (z / a));
	} else if ((t <= 8.8e-69) || (!(t <= 6.8e-34) && (t <= 3e+16))) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = y * ((t - z) / t)
    t_2 = x + (y * (z / a))
    if (t <= (-1.3d+103)) then
        tmp = t_1
    else if (t <= (-2.4d+49)) then
        tmp = x * ((z - a) / t)
    else if (t <= (-3.7d-21)) then
        tmp = t_1
    else if (t <= 1.15d-203) then
        tmp = t_2
    else if (t <= 7d-176) then
        tmp = x * (1.0d0 - (z / a))
    else if ((t <= 8.8d-69) .or. (.not. (t <= 6.8d-34)) .and. (t <= 3d+16)) then
        tmp = t_2
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((t - z) / t);
	double t_2 = x + (y * (z / a));
	double tmp;
	if (t <= -1.3e+103) {
		tmp = t_1;
	} else if (t <= -2.4e+49) {
		tmp = x * ((z - a) / t);
	} else if (t <= -3.7e-21) {
		tmp = t_1;
	} else if (t <= 1.15e-203) {
		tmp = t_2;
	} else if (t <= 7e-176) {
		tmp = x * (1.0 - (z / a));
	} else if ((t <= 8.8e-69) || (!(t <= 6.8e-34) && (t <= 3e+16))) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((t - z) / t)
	t_2 = x + (y * (z / a))
	tmp = 0
	if t <= -1.3e+103:
		tmp = t_1
	elif t <= -2.4e+49:
		tmp = x * ((z - a) / t)
	elif t <= -3.7e-21:
		tmp = t_1
	elif t <= 1.15e-203:
		tmp = t_2
	elif t <= 7e-176:
		tmp = x * (1.0 - (z / a))
	elif (t <= 8.8e-69) or (not (t <= 6.8e-34) and (t <= 3e+16)):
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(t - z) / t))
	t_2 = Float64(x + Float64(y * Float64(z / a)))
	tmp = 0.0
	if (t <= -1.3e+103)
		tmp = t_1;
	elseif (t <= -2.4e+49)
		tmp = Float64(x * Float64(Float64(z - a) / t));
	elseif (t <= -3.7e-21)
		tmp = t_1;
	elseif (t <= 1.15e-203)
		tmp = t_2;
	elseif (t <= 7e-176)
		tmp = Float64(x * Float64(1.0 - Float64(z / a)));
	elseif ((t <= 8.8e-69) || (!(t <= 6.8e-34) && (t <= 3e+16)))
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((t - z) / t);
	t_2 = x + (y * (z / a));
	tmp = 0.0;
	if (t <= -1.3e+103)
		tmp = t_1;
	elseif (t <= -2.4e+49)
		tmp = x * ((z - a) / t);
	elseif (t <= -3.7e-21)
		tmp = t_1;
	elseif (t <= 1.15e-203)
		tmp = t_2;
	elseif (t <= 7e-176)
		tmp = x * (1.0 - (z / a));
	elseif ((t <= 8.8e-69) || (~((t <= 6.8e-34)) && (t <= 3e+16)))
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.3e+103], t$95$1, If[LessEqual[t, -2.4e+49], N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.7e-21], t$95$1, If[LessEqual[t, 1.15e-203], t$95$2, If[LessEqual[t, 7e-176], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 8.8e-69], And[N[Not[LessEqual[t, 6.8e-34]], $MachinePrecision], LessEqual[t, 3e+16]]], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;t \leq 1.15 \cdot 10^{-203}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t \leq 8.8 \cdot 10^{-69} \lor \neg \left(t \leq 6.8 \cdot 10^{-34}\right) \land t \leq 3 \cdot 10^{+16}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.3000000000000001e103 or -2.4e49 < t < -3.7000000000000002e-21 or 8.8000000000000001e-69 < t < 6.8000000000000001e-34 or 3e16 < t

    1. Initial program 52.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{y \cdot \frac{z - t}{t}} \]
      3. distribute-rgt-neg-in60.5%

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

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

    if -1.3000000000000001e103 < t < -2.4e49

    1. Initial program 55.5%

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

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

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

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

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

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

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

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

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

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

    if -3.7000000000000002e-21 < t < 1.14999999999999996e-203 or 7e-176 < t < 8.8000000000000001e-69 or 6.8000000000000001e-34 < t < 3e16

    1. Initial program 86.9%

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

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

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

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

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

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

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

    if 1.14999999999999996e-203 < t < 7e-176

    1. Initial program 90.5%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.3 \cdot 10^{+103}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{elif}\;t \leq -2.4 \cdot 10^{+49}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq -3.7 \cdot 10^{-21}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{-203}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-176}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 8.8 \cdot 10^{-69} \lor \neg \left(t \leq 6.8 \cdot 10^{-34}\right) \land t \leq 3 \cdot 10^{+16}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 90.8% accurate, 0.3× speedup?

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

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

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

    1. Initial program 73.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 5.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 50.7% accurate, 0.4× speedup?

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

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

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

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

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

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

\mathbf{elif}\;t \leq 4.7 \cdot 10^{+30}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 42.9%

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

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

    if -1.06e101 < t < -4.4000000000000001e49

    1. Initial program 51.9%

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

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

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

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

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

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

    if -4.4000000000000001e49 < t < -2.6499999999999999e-11 or 4.6999999999999999e30 < t

    1. Initial program 55.0%

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

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

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

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

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

        \[\leadsto \color{blue}{y + x} \]
    8. Simplified45.5%

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

    if -2.6499999999999999e-11 < t < 1.8000000000000001e-202 or 3.15000000000000006e-176 < t < 4.6999999999999999e30

    1. Initial program 85.7%

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

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

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

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

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

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

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

    if 1.8000000000000001e-202 < t < 3.15000000000000006e-176

    1. Initial program 90.5%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.06 \cdot 10^{+101}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -4.4 \cdot 10^{+49}:\\ \;\;\;\;\frac{x \cdot z}{t}\\ \mathbf{elif}\;t \leq -2.65 \cdot 10^{-11}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{-202}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 3.15 \cdot 10^{-176}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 4.7 \cdot 10^{+30}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 51.0% accurate, 0.4× speedup?

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

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

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

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

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

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

\mathbf{elif}\;t \leq 1.45 \cdot 10^{+36}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 42.9%

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

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

    if -1.64999999999999999e102 < t < -2.2000000000000001e49

    1. Initial program 55.5%

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

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

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

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

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

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

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

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

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

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

    if -2.2000000000000001e49 < t < -1.3499999999999999e-12 or 1.45e36 < t

    1. Initial program 54.5%

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

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

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

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

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

        \[\leadsto \color{blue}{y + x} \]
    8. Simplified46.0%

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

    if -1.3499999999999999e-12 < t < 9.50000000000000063e-204 or 7.7999999999999994e-176 < t < 1.45e36

    1. Initial program 85.7%

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

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

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

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

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

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

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

    if 9.50000000000000063e-204 < t < 7.7999999999999994e-176

    1. Initial program 90.5%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.65 \cdot 10^{+102}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -2.2 \cdot 10^{+49}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq -1.35 \cdot 10^{-12}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{-204}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{-176}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 1.45 \cdot 10^{+36}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 76.9% accurate, 0.4× speedup?

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

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

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

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

\mathbf{elif}\;t \leq 1.2 \cdot 10^{-62}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -9.59999999999999948e-12

    1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.59999999999999948e-12 < t < -4.4000000000000001e-198 or 4.6000000000000002e-262 < t < 1.19999999999999992e-62

    1. Initial program 87.2%

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

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

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

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

    if -4.4000000000000001e-198 < t < 4.6000000000000002e-262

    1. Initial program 86.4%

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

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

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

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

    if 1.19999999999999992e-62 < t < 1.25000000000000001e159

    1. Initial program 69.2%

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

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

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

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

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

    if 1.25000000000000001e159 < t

    1. Initial program 33.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9.6 \cdot 10^{-12}:\\ \;\;\;\;y + \frac{z}{t} \cdot \left(x - y\right)\\ \mathbf{elif}\;t \leq -4.4 \cdot 10^{-198}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{-262}:\\ \;\;\;\;x + \left(x - y\right) \cdot \frac{t - z}{a}\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{-62}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{+159}:\\ \;\;\;\;x + \left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y + x \cdot \frac{z - a}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 79.4% accurate, 0.4× speedup?

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

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

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

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

\mathbf{elif}\;t \leq 1.86 \cdot 10^{-62}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.34999999999999996e-11 or 3.8000000000000001e155 < t

    1. Initial program 46.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.34999999999999996e-11 < t < -3.40000000000000006e-199 or 4.8000000000000001e-262 < t < 1.86000000000000001e-62

    1. Initial program 87.2%

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

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

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

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

    if -3.40000000000000006e-199 < t < 4.8000000000000001e-262

    1. Initial program 86.4%

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

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

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

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

    if 1.86000000000000001e-62 < t < 3.8000000000000001e155

    1. Initial program 69.2%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.35 \cdot 10^{-11}:\\ \;\;\;\;y + \frac{z - a}{t} \cdot \left(x - y\right)\\ \mathbf{elif}\;t \leq -3.4 \cdot 10^{-199}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-262}:\\ \;\;\;\;x + \left(x - y\right) \cdot \frac{t - z}{a}\\ \mathbf{elif}\;t \leq 1.86 \cdot 10^{-62}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{+155}:\\ \;\;\;\;x + \left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y + \frac{z - a}{t} \cdot \left(x - y\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 37.0% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \frac{y}{a}\\ t_2 := x \cdot \frac{z}{t}\\ \mathbf{if}\;z \leq -5.2 \cdot 10^{+230}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -3.3 \cdot 10^{+41}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.52 \cdot 10^{-235}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 2.06 \cdot 10^{-72}:\\ \;\;\;\;y\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{+121}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{+233}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* z (/ y a))) (t_2 (* x (/ z t))))
   (if (<= z -5.2e+230)
     t_2
     (if (<= z -3.3e+41)
       t_1
       (if (<= z -1.52e-235)
         (+ x y)
         (if (<= z 2.06e-72)
           y
           (if (<= z 3.6e+121) (+ x y) (if (<= z 1.5e+233) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = z * (y / a);
	double t_2 = x * (z / t);
	double tmp;
	if (z <= -5.2e+230) {
		tmp = t_2;
	} else if (z <= -3.3e+41) {
		tmp = t_1;
	} else if (z <= -1.52e-235) {
		tmp = x + y;
	} else if (z <= 2.06e-72) {
		tmp = y;
	} else if (z <= 3.6e+121) {
		tmp = x + y;
	} else if (z <= 1.5e+233) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = z * (y / a)
    t_2 = x * (z / t)
    if (z <= (-5.2d+230)) then
        tmp = t_2
    else if (z <= (-3.3d+41)) then
        tmp = t_1
    else if (z <= (-1.52d-235)) then
        tmp = x + y
    else if (z <= 2.06d-72) then
        tmp = y
    else if (z <= 3.6d+121) then
        tmp = x + y
    else if (z <= 1.5d+233) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = z * (y / a);
	double t_2 = x * (z / t);
	double tmp;
	if (z <= -5.2e+230) {
		tmp = t_2;
	} else if (z <= -3.3e+41) {
		tmp = t_1;
	} else if (z <= -1.52e-235) {
		tmp = x + y;
	} else if (z <= 2.06e-72) {
		tmp = y;
	} else if (z <= 3.6e+121) {
		tmp = x + y;
	} else if (z <= 1.5e+233) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = z * (y / a)
	t_2 = x * (z / t)
	tmp = 0
	if z <= -5.2e+230:
		tmp = t_2
	elif z <= -3.3e+41:
		tmp = t_1
	elif z <= -1.52e-235:
		tmp = x + y
	elif z <= 2.06e-72:
		tmp = y
	elif z <= 3.6e+121:
		tmp = x + y
	elif z <= 1.5e+233:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(z * Float64(y / a))
	t_2 = Float64(x * Float64(z / t))
	tmp = 0.0
	if (z <= -5.2e+230)
		tmp = t_2;
	elseif (z <= -3.3e+41)
		tmp = t_1;
	elseif (z <= -1.52e-235)
		tmp = Float64(x + y);
	elseif (z <= 2.06e-72)
		tmp = y;
	elseif (z <= 3.6e+121)
		tmp = Float64(x + y);
	elseif (z <= 1.5e+233)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = z * (y / a);
	t_2 = x * (z / t);
	tmp = 0.0;
	if (z <= -5.2e+230)
		tmp = t_2;
	elseif (z <= -3.3e+41)
		tmp = t_1;
	elseif (z <= -1.52e-235)
		tmp = x + y;
	elseif (z <= 2.06e-72)
		tmp = y;
	elseif (z <= 3.6e+121)
		tmp = x + y;
	elseif (z <= 1.5e+233)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.2e+230], t$95$2, If[LessEqual[z, -3.3e+41], t$95$1, If[LessEqual[z, -1.52e-235], N[(x + y), $MachinePrecision], If[LessEqual[z, 2.06e-72], y, If[LessEqual[z, 3.6e+121], N[(x + y), $MachinePrecision], If[LessEqual[z, 1.5e+233], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -3.3 \cdot 10^{+41}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -1.52 \cdot 10^{-235}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;z \leq 2.06 \cdot 10^{-72}:\\
\;\;\;\;y\\

\mathbf{elif}\;z \leq 3.6 \cdot 10^{+121}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;z \leq 1.5 \cdot 10^{+233}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -5.1999999999999997e230 or 1.50000000000000007e233 < z

    1. Initial program 61.7%

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

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

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

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

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

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

    if -5.1999999999999997e230 < z < -3.3e41 or 3.59999999999999981e121 < z < 1.50000000000000007e233

    1. Initial program 74.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{a}} \]
    13. Step-by-step derivation
      1. *-commutative32.2%

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

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

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

    if -3.3e41 < z < -1.52e-235 or 2.06e-72 < z < 3.59999999999999981e121

    1. Initial program 76.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.1%

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

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

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

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

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

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

    if -1.52e-235 < z < 2.06e-72

    1. Initial program 58.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.2 \cdot 10^{+230}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{elif}\;z \leq -3.3 \cdot 10^{+41}:\\ \;\;\;\;z \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -1.52 \cdot 10^{-235}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 2.06 \cdot 10^{-72}:\\ \;\;\;\;y\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{+121}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{+233}:\\ \;\;\;\;z \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 70.4% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;a \leq -9.2 \cdot 10^{+73}:\\
\;\;\;\;t\_2\\

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

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

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


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

    1. Initial program 69.4%

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

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

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

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

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

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

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

    if -2.0999999999999999e158 < a < -3.8999999999999998e145 or -9.199999999999999e73 < a < -3.4499999999999999e-37

    1. Initial program 67.7%

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

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

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

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

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

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

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

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

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

    if -3.8999999999999998e145 < a < -9.199999999999999e73 or 2.5499999999999999e-46 < a

    1. Initial program 70.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.4499999999999999e-37 < a < 2.5499999999999999e-46

    1. Initial program 70.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.1 \cdot 10^{+158}:\\ \;\;\;\;x - y \cdot \frac{t - z}{a}\\ \mathbf{elif}\;a \leq -3.9 \cdot 10^{+145}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq -9.2 \cdot 10^{+73}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq -3.45 \cdot 10^{-37}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq 2.55 \cdot 10^{-46}:\\ \;\;\;\;y + z \cdot \frac{x - y}{t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 71.2% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -3.6 \cdot 10^{+145}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -2.25 \cdot 10^{+77}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq -7.6 \cdot 10^{-56}:\\
\;\;\;\;t\_1\\

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

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


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

    1. Initial program 69.4%

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

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

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

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

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

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

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

    if -2.0999999999999999e158 < a < -3.59999999999999974e145 or -2.25000000000000012e77 < a < -7.6000000000000004e-56

    1. Initial program 67.7%

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

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

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

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

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

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

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

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

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

    if -3.59999999999999974e145 < a < -2.25000000000000012e77 or 1.69999999999999998e-46 < a

    1. Initial program 70.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.6000000000000004e-56 < a < 1.69999999999999998e-46

    1. Initial program 70.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.1 \cdot 10^{+158}:\\ \;\;\;\;x - y \cdot \frac{t - z}{a}\\ \mathbf{elif}\;a \leq -3.6 \cdot 10^{+145}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq -2.25 \cdot 10^{+77}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq -7.6 \cdot 10^{-56}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{-46}:\\ \;\;\;\;y + \frac{z}{t} \cdot \left(x - y\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 41.3% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{if}\;x \leq -3.4 \cdot 10^{-47}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -7.5 \cdot 10^{-214}:\\
\;\;\;\;y\\

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

\mathbf{elif}\;x \leq 2.6 \cdot 10^{-221}:\\
\;\;\;\;y\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -3.4000000000000002e-47 or 2.39999999999999986e-17 < x

    1. Initial program 65.4%

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

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

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

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

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

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

    if -3.4000000000000002e-47 < x < -7.49999999999999966e-214 or 1.18000000000000003e-287 < x < 2.6000000000000002e-221

    1. Initial program 68.5%

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

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

    if -7.49999999999999966e-214 < x < 1.18000000000000003e-287

    1. Initial program 82.5%

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

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

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

    if 2.6000000000000002e-221 < x < 2.39999999999999986e-17

    1. Initial program 82.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{a}} \]
    14. Simplified48.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}\;x \leq -3.4 \cdot 10^{-47}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;x \leq -7.5 \cdot 10^{-214}:\\ \;\;\;\;y\\ \mathbf{elif}\;x \leq 1.18 \cdot 10^{-287}:\\ \;\;\;\;z \cdot \frac{y}{a - t}\\ \mathbf{elif}\;x \leq 2.6 \cdot 10^{-221}:\\ \;\;\;\;y\\ \mathbf{elif}\;x \leq 2.4 \cdot 10^{-17}:\\ \;\;\;\;y \cdot \frac{z - t}{a}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 67.7% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;x \leq 2.4 \cdot 10^{+245}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -1.8e-25 or 1.25999999999999993e-82 < x < 2.3999999999999998e245

    1. Initial program 69.5%

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

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

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

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

    if -1.8e-25 < x < 1.25999999999999993e-82

    1. Initial program 72.3%

      \[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*91.7%

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

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

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

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

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

    if 2.3999999999999998e245 < x < 5.9999999999999999e273

    1. Initial program 46.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.9999999999999999e273 < x

    1. Initial program 72.6%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.8 \cdot 10^{-25}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;x \leq 1.26 \cdot 10^{-82}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;x \leq 2.4 \cdot 10^{+245}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;x \leq 6 \cdot 10^{+273}:\\ \;\;\;\;y + x \cdot \frac{z - a}{t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\frac{t - z}{a - t} + 1\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 67.4% accurate, 0.4× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -1.26e-25 or 1.89999999999999983e-80 < x < 5.20000000000000008e245

    1. Initial program 69.5%

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

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

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

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

    if -1.26e-25 < x < 1.89999999999999983e-80

    1. Initial program 72.3%

      \[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*91.7%

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

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

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

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

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

    if 5.20000000000000008e245 < x < 1.8499999999999999e273

    1. Initial program 46.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.8499999999999999e273 < x

    1. Initial program 72.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.26 \cdot 10^{-25}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;x \leq 1.9 \cdot 10^{-80}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;x \leq 5.2 \cdot 10^{+245}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;x \leq 1.85 \cdot 10^{+273}:\\ \;\;\;\;y + x \cdot \frac{z - a}{t}\\ \mathbf{else}:\\ \;\;\;\;x + \left(x - y\right) \cdot \frac{t - z}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 58.6% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;x \leq -0.0085 \lor \neg \left(x \leq 2 \cdot 10^{+93}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\

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


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

    1. Initial program 57.7%

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

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

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

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

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

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

    if -2.60000000000000007e228 < x < -1.02000000000000002e101

    1. Initial program 72.8%

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

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

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

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

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

    if -1.02000000000000002e101 < x < -0.0085000000000000006 or 2.00000000000000009e93 < x

    1. Initial program 62.8%

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

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

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

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

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

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

    if -0.0085000000000000006 < x < 2.00000000000000009e93

    1. Initial program 74.1%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.6 \cdot 10^{+228}:\\ \;\;\;\;z \cdot \frac{x}{t - a}\\ \mathbf{elif}\;x \leq -1.02 \cdot 10^{+101}:\\ \;\;\;\;x + \frac{y \cdot z}{a}\\ \mathbf{elif}\;x \leq -0.0085 \lor \neg \left(x \leq 2 \cdot 10^{+93}\right):\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 81.5% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;t \leq 3.8 \cdot 10^{+159}:\\
\;\;\;\;x + \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 t < -4.1e49 or 3.79999999999999965e159 < 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 62.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+62.6%

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

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

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

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

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

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

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

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

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

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

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

    if -4.1e49 < t < 1.7499999999999999e-124

    1. Initial program 87.7%

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

    if 1.7499999999999999e-124 < t < 3.79999999999999965e159

    1. Initial program 69.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.1 \cdot 10^{+49}:\\ \;\;\;\;y + \frac{z - a}{t} \cdot \left(x - y\right)\\ \mathbf{elif}\;t \leq 1.75 \cdot 10^{-124}:\\ \;\;\;\;x + \frac{\left(x - y\right) \cdot \left(t - z\right)}{a - t}\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{+159}:\\ \;\;\;\;x + \left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y + \frac{z - a}{t} \cdot \left(x - y\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 37.3% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq -7.6 \cdot 10^{-236}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;z \leq 8.6 \cdot 10^{-79}:\\
\;\;\;\;y\\

\mathbf{elif}\;z \leq 2.4 \cdot 10^{+158}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.39999999999999991e185 or 2.40000000000000008e158 < z

    1. Initial program 67.0%

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

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

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

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

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

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

    if -1.39999999999999991e185 < z < -7.5999999999999998e-236 or 8.59999999999999963e-79 < z < 2.40000000000000008e158

    1. Initial program 76.3%

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

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

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

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

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

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

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

    if -7.5999999999999998e-236 < z < 8.59999999999999963e-79

    1. Initial program 58.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.4 \cdot 10^{+185}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{elif}\;z \leq -7.6 \cdot 10^{-236}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 8.6 \cdot 10^{-79}:\\ \;\;\;\;y\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{+158}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 59.0% accurate, 0.5× speedup?

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

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

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

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

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


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

    1. Initial program 57.7%

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

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

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

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

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

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

    if -1.9e231 < x < -3.40000000000000002e-25

    1. Initial program 74.8%

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

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

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

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

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

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

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

    if -3.40000000000000002e-25 < x < 8.9999999999999998e92

    1. Initial program 73.1%

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

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

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

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

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

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

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

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

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

    if 8.9999999999999998e92 < x

    1. Initial program 60.4%

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{z - t}{a - t}\right)} \]
    6. Taylor expanded in t around 0 65.4%

      \[\leadsto x \cdot \color{blue}{\left(1 - \frac{z}{a}\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification70.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.9 \cdot 10^{+231}:\\ \;\;\;\;z \cdot \frac{x}{t - a}\\ \mathbf{elif}\;x \leq -3.4 \cdot 10^{-25}:\\ \;\;\;\;x - y \cdot \frac{t - z}{a}\\ \mathbf{elif}\;x \leq 9 \cdot 10^{+92}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 40.9% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{if}\;x \leq -5.7 \cdot 10^{-49}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 6.5 \cdot 10^{-222}:\\ \;\;\;\;y\\ \mathbf{elif}\;x \leq 1.82 \cdot 10^{-7}:\\ \;\;\;\;y \cdot \frac{z - t}{a}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ z a)))))
   (if (<= x -5.7e-49)
     t_1
     (if (<= x 6.5e-222) y (if (<= x 1.82e-7) (* y (/ (- z t) a)) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (z / a));
	double tmp;
	if (x <= -5.7e-49) {
		tmp = t_1;
	} else if (x <= 6.5e-222) {
		tmp = y;
	} else if (x <= 1.82e-7) {
		tmp = y * ((z - t) / a);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * (1.0d0 - (z / a))
    if (x <= (-5.7d-49)) then
        tmp = t_1
    else if (x <= 6.5d-222) then
        tmp = y
    else if (x <= 1.82d-7) then
        tmp = y * ((z - t) / a)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (z / a));
	double tmp;
	if (x <= -5.7e-49) {
		tmp = t_1;
	} else if (x <= 6.5e-222) {
		tmp = y;
	} else if (x <= 1.82e-7) {
		tmp = y * ((z - t) / a);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (z / a))
	tmp = 0
	if x <= -5.7e-49:
		tmp = t_1
	elif x <= 6.5e-222:
		tmp = y
	elif x <= 1.82e-7:
		tmp = y * ((z - t) / a)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(z / a)))
	tmp = 0.0
	if (x <= -5.7e-49)
		tmp = t_1;
	elseif (x <= 6.5e-222)
		tmp = y;
	elseif (x <= 1.82e-7)
		tmp = Float64(y * Float64(Float64(z - t) / a));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (z / a));
	tmp = 0.0;
	if (x <= -5.7e-49)
		tmp = t_1;
	elseif (x <= 6.5e-222)
		tmp = y;
	elseif (x <= 1.82e-7)
		tmp = y * ((z - t) / a);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.7e-49], t$95$1, If[LessEqual[x, 6.5e-222], y, If[LessEqual[x, 1.82e-7], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{if}\;x \leq -5.7 \cdot 10^{-49}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 6.5 \cdot 10^{-222}:\\
\;\;\;\;y\\

\mathbf{elif}\;x \leq 1.82 \cdot 10^{-7}:\\
\;\;\;\;y \cdot \frac{z - t}{a}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -5.7000000000000003e-49 or 1.81999999999999989e-7 < x

    1. Initial program 65.4%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 65.2%

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z - t}{a - t}\right)} \]
    4. Step-by-step derivation
      1. mul-1-neg65.2%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{z - t}{a - t}\right)}\right) \]
      2. unsub-neg65.2%

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{z - t}{a - t}\right)} \]
    5. Simplified65.2%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{z - t}{a - t}\right)} \]
    6. Taylor expanded in t around 0 54.9%

      \[\leadsto x \cdot \color{blue}{\left(1 - \frac{z}{a}\right)} \]

    if -5.7000000000000003e-49 < x < 6.5000000000000005e-222

    1. Initial program 71.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 45.9%

      \[\leadsto \color{blue}{y} \]

    if 6.5000000000000005e-222 < x < 1.81999999999999989e-7

    1. Initial program 82.1%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num82.0%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{a - t}{\left(y - x\right) \cdot \left(z - t\right)}}} \]
      2. inv-pow82.0%

        \[\leadsto x + \color{blue}{{\left(\frac{a - t}{\left(y - x\right) \cdot \left(z - t\right)}\right)}^{-1}} \]
      3. *-commutative82.0%

        \[\leadsto x + {\left(\frac{a - t}{\color{blue}{\left(z - t\right) \cdot \left(y - x\right)}}\right)}^{-1} \]
      4. associate-/r*92.9%

        \[\leadsto x + {\color{blue}{\left(\frac{\frac{a - t}{z - t}}{y - x}\right)}}^{-1} \]
    4. Applied egg-rr92.9%

      \[\leadsto x + \color{blue}{{\left(\frac{\frac{a - t}{z - t}}{y - x}\right)}^{-1}} \]
    5. Step-by-step derivation
      1. unpow-192.9%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - t}{z - t}}{y - x}}} \]
      2. clear-num93.0%

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} \]
      3. div-sub93.0%

        \[\leadsto x + \color{blue}{\left(\frac{y}{\frac{a - t}{z - t}} - \frac{x}{\frac{a - t}{z - t}}\right)} \]
    6. Applied egg-rr93.0%

      \[\leadsto x + \color{blue}{\left(\frac{y}{\frac{a - t}{z - t}} - \frac{x}{\frac{a - t}{z - t}}\right)} \]
    7. Step-by-step derivation
      1. div-sub93.0%

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} \]
    8. Simplified93.0%

      \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} \]
    9. Taylor expanded in x around 0 66.1%

      \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
    10. Step-by-step derivation
      1. *-commutative66.1%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot y}}{a - t} \]
      2. associate-/l*70.8%

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{y}{a - t}} \]
    11. Simplified70.8%

      \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{y}{a - t}} \]
    12. Taylor expanded in a around inf 45.7%

      \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a}} \]
    13. Step-by-step derivation
      1. associate-/l*48.0%

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{a}} \]
    14. Simplified48.0%

      \[\leadsto \color{blue}{y \cdot \frac{z - t}{a}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification51.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.7 \cdot 10^{-49}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;x \leq 6.5 \cdot 10^{-222}:\\ \;\;\;\;y\\ \mathbf{elif}\;x \leq 1.82 \cdot 10^{-7}:\\ \;\;\;\;y \cdot \frac{z - t}{a}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 61.2% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -9.5 \cdot 10^{-26}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;x \leq 1.3 \cdot 10^{+93}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= x -9.5e-26)
   (+ x (* z (/ (- y x) a)))
   (if (<= x 1.3e+93) (* y (/ (- z t) (- a t))) (* x (- 1.0 (/ z a))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (x <= -9.5e-26) {
		tmp = x + (z * ((y - x) / a));
	} else if (x <= 1.3e+93) {
		tmp = y * ((z - t) / (a - t));
	} else {
		tmp = x * (1.0 - (z / a));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (x <= (-9.5d-26)) then
        tmp = x + (z * ((y - x) / a))
    else if (x <= 1.3d+93) then
        tmp = y * ((z - t) / (a - t))
    else
        tmp = x * (1.0d0 - (z / a))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (x <= -9.5e-26) {
		tmp = x + (z * ((y - x) / a));
	} else if (x <= 1.3e+93) {
		tmp = y * ((z - t) / (a - t));
	} else {
		tmp = x * (1.0 - (z / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if x <= -9.5e-26:
		tmp = x + (z * ((y - x) / a))
	elif x <= 1.3e+93:
		tmp = y * ((z - t) / (a - t))
	else:
		tmp = x * (1.0 - (z / a))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (x <= -9.5e-26)
		tmp = Float64(x + Float64(z * Float64(Float64(y - x) / a)));
	elseif (x <= 1.3e+93)
		tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t)));
	else
		tmp = Float64(x * Float64(1.0 - Float64(z / a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (x <= -9.5e-26)
		tmp = x + (z * ((y - x) / a));
	elseif (x <= 1.3e+93)
		tmp = y * ((z - t) / (a - t));
	else
		tmp = x * (1.0 - (z / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -9.5e-26], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.3e+93], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.5 \cdot 10^{-26}:\\
\;\;\;\;x + z \cdot \frac{y - x}{a}\\

\mathbf{elif}\;x \leq 1.3 \cdot 10^{+93}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -9.4999999999999995e-26

    1. Initial program 70.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.7%

      \[\leadsto x + \color{blue}{\frac{z \cdot \left(y - x\right)}{a}} \]
    4. Step-by-step derivation
      1. associate-/l*60.7%

        \[\leadsto x + \color{blue}{z \cdot \frac{y - x}{a}} \]
    5. Simplified60.7%

      \[\leadsto x + \color{blue}{z \cdot \frac{y - x}{a}} \]

    if -9.4999999999999995e-26 < x < 1.3e93

    1. Initial program 73.1%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num72.9%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{a - t}{\left(y - x\right) \cdot \left(z - t\right)}}} \]
      2. inv-pow72.9%

        \[\leadsto x + \color{blue}{{\left(\frac{a - t}{\left(y - x\right) \cdot \left(z - t\right)}\right)}^{-1}} \]
      3. *-commutative72.9%

        \[\leadsto x + {\left(\frac{a - t}{\color{blue}{\left(z - t\right) \cdot \left(y - x\right)}}\right)}^{-1} \]
      4. associate-/r*91.6%

        \[\leadsto x + {\color{blue}{\left(\frac{\frac{a - t}{z - t}}{y - x}\right)}}^{-1} \]
    4. Applied egg-rr91.6%

      \[\leadsto x + \color{blue}{{\left(\frac{\frac{a - t}{z - t}}{y - x}\right)}^{-1}} \]
    5. Taylor expanded in x around 0 61.7%

      \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
    6. Step-by-step derivation
      1. associate-*r/78.4%

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t}} \]
    7. Simplified78.4%

      \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t}} \]

    if 1.3e93 < x

    1. Initial program 60.4%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 71.4%

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z - t}{a - t}\right)} \]
    4. Step-by-step derivation
      1. mul-1-neg71.4%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{z - t}{a - t}\right)}\right) \]
      2. unsub-neg71.4%

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{z - t}{a - t}\right)} \]
    5. Simplified71.4%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{z - t}{a - t}\right)} \]
    6. Taylor expanded in t around 0 65.4%

      \[\leadsto x \cdot \color{blue}{\left(1 - \frac{z}{a}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification71.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -9.5 \cdot 10^{-26}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;x \leq 1.3 \cdot 10^{+93}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 61.5% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -6 \cdot 10^{-25}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\ \mathbf{elif}\;x \leq 2.8 \cdot 10^{+93}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= x -6e-25)
   (+ x (/ (- y x) (/ a z)))
   (if (<= x 2.8e+93) (* y (/ (- z t) (- a t))) (* x (- 1.0 (/ z a))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (x <= -6e-25) {
		tmp = x + ((y - x) / (a / z));
	} else if (x <= 2.8e+93) {
		tmp = y * ((z - t) / (a - t));
	} else {
		tmp = x * (1.0 - (z / a));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (x <= (-6d-25)) then
        tmp = x + ((y - x) / (a / z))
    else if (x <= 2.8d+93) then
        tmp = y * ((z - t) / (a - t))
    else
        tmp = x * (1.0d0 - (z / a))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (x <= -6e-25) {
		tmp = x + ((y - x) / (a / z));
	} else if (x <= 2.8e+93) {
		tmp = y * ((z - t) / (a - t));
	} else {
		tmp = x * (1.0 - (z / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if x <= -6e-25:
		tmp = x + ((y - x) / (a / z))
	elif x <= 2.8e+93:
		tmp = y * ((z - t) / (a - t))
	else:
		tmp = x * (1.0 - (z / a))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (x <= -6e-25)
		tmp = Float64(x + Float64(Float64(y - x) / Float64(a / z)));
	elseif (x <= 2.8e+93)
		tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t)));
	else
		tmp = Float64(x * Float64(1.0 - Float64(z / a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (x <= -6e-25)
		tmp = x + ((y - x) / (a / z));
	elseif (x <= 2.8e+93)
		tmp = y * ((z - t) / (a - t));
	else
		tmp = x * (1.0 - (z / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -6e-25], N[(x + N[(N[(y - x), $MachinePrecision] / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.8e+93], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -6 \cdot 10^{-25}:\\
\;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\

\mathbf{elif}\;x \leq 2.8 \cdot 10^{+93}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -5.9999999999999995e-25

    1. Initial program 70.2%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num70.2%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{a - t}{\left(y - x\right) \cdot \left(z - t\right)}}} \]
      2. inv-pow70.2%

        \[\leadsto x + \color{blue}{{\left(\frac{a - t}{\left(y - x\right) \cdot \left(z - t\right)}\right)}^{-1}} \]
      3. *-commutative70.2%

        \[\leadsto x + {\left(\frac{a - t}{\color{blue}{\left(z - t\right) \cdot \left(y - x\right)}}\right)}^{-1} \]
      4. associate-/r*82.8%

        \[\leadsto x + {\color{blue}{\left(\frac{\frac{a - t}{z - t}}{y - x}\right)}}^{-1} \]
    4. Applied egg-rr82.8%

      \[\leadsto x + \color{blue}{{\left(\frac{\frac{a - t}{z - t}}{y - x}\right)}^{-1}} \]
    5. Step-by-step derivation
      1. unpow-182.8%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - t}{z - t}}{y - x}}} \]
      2. clear-num82.7%

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} \]
      3. div-sub73.7%

        \[\leadsto x + \color{blue}{\left(\frac{y}{\frac{a - t}{z - t}} - \frac{x}{\frac{a - t}{z - t}}\right)} \]
    6. Applied egg-rr73.7%

      \[\leadsto x + \color{blue}{\left(\frac{y}{\frac{a - t}{z - t}} - \frac{x}{\frac{a - t}{z - t}}\right)} \]
    7. Step-by-step derivation
      1. div-sub82.7%

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} \]
    8. Simplified82.7%

      \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} \]
    9. Taylor expanded in t around 0 60.9%

      \[\leadsto x + \frac{y - x}{\color{blue}{\frac{a}{z}}} \]

    if -5.9999999999999995e-25 < x < 2.79999999999999989e93

    1. Initial program 73.1%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num72.9%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{a - t}{\left(y - x\right) \cdot \left(z - t\right)}}} \]
      2. inv-pow72.9%

        \[\leadsto x + \color{blue}{{\left(\frac{a - t}{\left(y - x\right) \cdot \left(z - t\right)}\right)}^{-1}} \]
      3. *-commutative72.9%

        \[\leadsto x + {\left(\frac{a - t}{\color{blue}{\left(z - t\right) \cdot \left(y - x\right)}}\right)}^{-1} \]
      4. associate-/r*91.6%

        \[\leadsto x + {\color{blue}{\left(\frac{\frac{a - t}{z - t}}{y - x}\right)}}^{-1} \]
    4. Applied egg-rr91.6%

      \[\leadsto x + \color{blue}{{\left(\frac{\frac{a - t}{z - t}}{y - x}\right)}^{-1}} \]
    5. Taylor expanded in x around 0 61.7%

      \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
    6. Step-by-step derivation
      1. associate-*r/78.4%

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t}} \]
    7. Simplified78.4%

      \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t}} \]

    if 2.79999999999999989e93 < x

    1. Initial program 60.4%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 71.4%

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z - t}{a - t}\right)} \]
    4. Step-by-step derivation
      1. mul-1-neg71.4%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{z - t}{a - t}\right)}\right) \]
      2. unsub-neg71.4%

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{z - t}{a - t}\right)} \]
    5. Simplified71.4%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{z - t}{a - t}\right)} \]
    6. Taylor expanded in t around 0 65.4%

      \[\leadsto x \cdot \color{blue}{\left(1 - \frac{z}{a}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification71.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6 \cdot 10^{-25}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\ \mathbf{elif}\;x \leq 2.8 \cdot 10^{+93}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 25: 41.0% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -6.4 \cdot 10^{-50} \lor \neg \left(x \leq 3.85 \cdot 10^{-84}\right):\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= x -6.4e-50) (not (<= x 3.85e-84))) (* x (- 1.0 (/ z a))) y))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((x <= -6.4e-50) || !(x <= 3.85e-84)) {
		tmp = x * (1.0 - (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 ((x <= (-6.4d-50)) .or. (.not. (x <= 3.85d-84))) then
        tmp = x * (1.0d0 - (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 ((x <= -6.4e-50) || !(x <= 3.85e-84)) {
		tmp = x * (1.0 - (z / a));
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (x <= -6.4e-50) or not (x <= 3.85e-84):
		tmp = x * (1.0 - (z / a))
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((x <= -6.4e-50) || !(x <= 3.85e-84))
		tmp = Float64(x * Float64(1.0 - Float64(z / a)));
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((x <= -6.4e-50) || ~((x <= 3.85e-84)))
		tmp = x * (1.0 - (z / a));
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -6.4e-50], N[Not[LessEqual[x, 3.85e-84]], $MachinePrecision]], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.4 \cdot 10^{-50} \lor \neg \left(x \leq 3.85 \cdot 10^{-84}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\

\mathbf{else}:\\
\;\;\;\;y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -6.4e-50 or 3.85e-84 < x

    1. Initial program 68.3%

      \[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)} \]
    6. Taylor expanded in t around 0 53.0%

      \[\leadsto x \cdot \color{blue}{\left(1 - \frac{z}{a}\right)} \]

    if -6.4e-50 < x < 3.85e-84

    1. Initial program 72.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 42.5%

      \[\leadsto \color{blue}{y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification48.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6.4 \cdot 10^{-50} \lor \neg \left(x \leq 3.85 \cdot 10^{-84}\right):\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 26: 39.9% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -9 \cdot 10^{+81}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 4.4 \cdot 10^{+68}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -9e+81) x (if (<= a 4.4e+68) y x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -9e+81) {
		tmp = x;
	} else if (a <= 4.4e+68) {
		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 <= (-9d+81)) then
        tmp = x
    else if (a <= 4.4d+68) 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 <= -9e+81) {
		tmp = x;
	} else if (a <= 4.4e+68) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -9e+81:
		tmp = x
	elif a <= 4.4e+68:
		tmp = y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -9e+81)
		tmp = x;
	elseif (a <= 4.4e+68)
		tmp = y;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -9e+81)
		tmp = x;
	elseif (a <= 4.4e+68)
		tmp = y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -9e+81], x, If[LessEqual[a, 4.4e+68], y, x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -9 \cdot 10^{+81}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 4.4 \cdot 10^{+68}:\\
\;\;\;\;y\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -9.00000000000000034e81 or 4.39999999999999974e68 < a

    1. Initial program 68.0%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 49.1%

      \[\leadsto \color{blue}{x} \]

    if -9.00000000000000034e81 < a < 4.39999999999999974e68

    1. Initial program 71.1%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 33.6%

      \[\leadsto \color{blue}{y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification39.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9 \cdot 10^{+81}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 4.4 \cdot 10^{+68}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 27: 25.6% 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 69.9%

    \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
  2. Add Preprocessing
  3. Taylor expanded in a around inf 23.6%

    \[\leadsto \color{blue}{x} \]
  4. Final simplification23.6%

    \[\leadsto x \]
  5. Add Preprocessing

Developer target: 86.5% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\ \mathbf{if}\;a < -1.6153062845442575 \cdot 10^{-142}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a < 3.774403170083174 \cdot 10^{-182}:\\ \;\;\;\;y - \frac{z}{t} \cdot \left(y - x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))
   (if (< a -1.6153062845442575e-142)
     t_1
     (if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
	double tmp;
	if (a < -1.6153062845442575e-142) {
		tmp = t_1;
	} else if (a < 3.774403170083174e-182) {
		tmp = y - ((z / t) * (y - x));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x + (((y - x) / 1.0d0) * ((z - t) / (a - t)))
    if (a < (-1.6153062845442575d-142)) then
        tmp = t_1
    else if (a < 3.774403170083174d-182) then
        tmp = y - ((z / t) * (y - x))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
	double tmp;
	if (a < -1.6153062845442575e-142) {
		tmp = t_1;
	} else if (a < 3.774403170083174e-182) {
		tmp = y - ((z / t) * (y - x));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)))
	tmp = 0
	if a < -1.6153062845442575e-142:
		tmp = t_1
	elif a < 3.774403170083174e-182:
		tmp = y - ((z / t) * (y - x))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(Float64(y - x) / 1.0) * Float64(Float64(z - t) / Float64(a - t))))
	tmp = 0.0
	if (a < -1.6153062845442575e-142)
		tmp = t_1;
	elseif (a < 3.774403170083174e-182)
		tmp = Float64(y - Float64(Float64(z / t) * Float64(y - x)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
	tmp = 0.0;
	if (a < -1.6153062845442575e-142)
		tmp = t_1;
	elseif (a < 3.774403170083174e-182)
		tmp = y - ((z / t) * (y - x));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - x), $MachinePrecision] / 1.0), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[a, -1.6153062845442575e-142], t$95$1, If[Less[a, 3.774403170083174e-182], N[(y - N[(N[(z / t), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;a < -1.6153062845442575 \cdot 10^{-142}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a < 3.774403170083174 \cdot 10^{-182}:\\
\;\;\;\;y - \frac{z}{t} \cdot \left(y - x\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024039 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
  :precision binary64

  :herbie-target
  (if (< a -1.6153062845442575e-142) (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t)))) (if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))

  (+ x (/ (* (- y x) (- z t)) (- a t))))