Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 79.0% → 89.8%
Time: 25.8s
Alternatives: 22
Speedup: 0.3×

Specification

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

\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\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 22 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: 79.0% accurate, 1.0× speedup?

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

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

Alternative 1: 89.8% accurate, 0.1× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;t_2\\


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

    1. Initial program 93.0%

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

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

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

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

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

    1. Initial program 3.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{a + -1 \cdot y}{\frac{z}{t - x}}} \]
      2. mul-1-neg96.6%

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

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

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

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

    1. Initial program 92.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
  3. Recombined 3 regimes into one program.
  4. Final simplification93.1%

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

Alternative 2: 45.8% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;z \leq -5.2 \cdot 10^{+50}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -4.3 \cdot 10^{-116}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2.65 \cdot 10^{-217}:\\ \;\;\;\;\frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq -3.3 \cdot 10^{-235}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{-265}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-24}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{+125}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 5.3 \cdot 10^{+190}:\\ \;\;\;\;\frac{t}{\frac{a}{y - z}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y a)))))
   (if (<= z -5.2e+50)
     t
     (if (<= z -4.3e-116)
       t_1
       (if (<= z -2.65e-217)
         (/ y (/ a (- t x)))
         (if (<= z -3.3e-235)
           t_1
           (if (<= z 9.2e-265)
             (+ x (/ (* y t) a))
             (if (<= z 2.4e-24)
               (- x (/ x (/ a y)))
               (if (<= z 1.3e+125)
                 t
                 (if (<= z 5.3e+190) (/ t (/ a (- y z))) t))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -5.2e+50) {
		tmp = t;
	} else if (z <= -4.3e-116) {
		tmp = t_1;
	} else if (z <= -2.65e-217) {
		tmp = y / (a / (t - x));
	} else if (z <= -3.3e-235) {
		tmp = t_1;
	} else if (z <= 9.2e-265) {
		tmp = x + ((y * t) / a);
	} else if (z <= 2.4e-24) {
		tmp = x - (x / (a / y));
	} else if (z <= 1.3e+125) {
		tmp = t;
	} else if (z <= 5.3e+190) {
		tmp = t / (a / (y - z));
	} else {
		tmp = 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 * (1.0d0 - (y / a))
    if (z <= (-5.2d+50)) then
        tmp = t
    else if (z <= (-4.3d-116)) then
        tmp = t_1
    else if (z <= (-2.65d-217)) then
        tmp = y / (a / (t - x))
    else if (z <= (-3.3d-235)) then
        tmp = t_1
    else if (z <= 9.2d-265) then
        tmp = x + ((y * t) / a)
    else if (z <= 2.4d-24) then
        tmp = x - (x / (a / y))
    else if (z <= 1.3d+125) then
        tmp = t
    else if (z <= 5.3d+190) then
        tmp = t / (a / (y - z))
    else
        tmp = 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 * (1.0 - (y / a));
	double tmp;
	if (z <= -5.2e+50) {
		tmp = t;
	} else if (z <= -4.3e-116) {
		tmp = t_1;
	} else if (z <= -2.65e-217) {
		tmp = y / (a / (t - x));
	} else if (z <= -3.3e-235) {
		tmp = t_1;
	} else if (z <= 9.2e-265) {
		tmp = x + ((y * t) / a);
	} else if (z <= 2.4e-24) {
		tmp = x - (x / (a / y));
	} else if (z <= 1.3e+125) {
		tmp = t;
	} else if (z <= 5.3e+190) {
		tmp = t / (a / (y - z));
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (y / a))
	tmp = 0
	if z <= -5.2e+50:
		tmp = t
	elif z <= -4.3e-116:
		tmp = t_1
	elif z <= -2.65e-217:
		tmp = y / (a / (t - x))
	elif z <= -3.3e-235:
		tmp = t_1
	elif z <= 9.2e-265:
		tmp = x + ((y * t) / a)
	elif z <= 2.4e-24:
		tmp = x - (x / (a / y))
	elif z <= 1.3e+125:
		tmp = t
	elif z <= 5.3e+190:
		tmp = t / (a / (y - z))
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (z <= -5.2e+50)
		tmp = t;
	elseif (z <= -4.3e-116)
		tmp = t_1;
	elseif (z <= -2.65e-217)
		tmp = Float64(y / Float64(a / Float64(t - x)));
	elseif (z <= -3.3e-235)
		tmp = t_1;
	elseif (z <= 9.2e-265)
		tmp = Float64(x + Float64(Float64(y * t) / a));
	elseif (z <= 2.4e-24)
		tmp = Float64(x - Float64(x / Float64(a / y)));
	elseif (z <= 1.3e+125)
		tmp = t;
	elseif (z <= 5.3e+190)
		tmp = Float64(t / Float64(a / Float64(y - z)));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (y / a));
	tmp = 0.0;
	if (z <= -5.2e+50)
		tmp = t;
	elseif (z <= -4.3e-116)
		tmp = t_1;
	elseif (z <= -2.65e-217)
		tmp = y / (a / (t - x));
	elseif (z <= -3.3e-235)
		tmp = t_1;
	elseif (z <= 9.2e-265)
		tmp = x + ((y * t) / a);
	elseif (z <= 2.4e-24)
		tmp = x - (x / (a / y));
	elseif (z <= 1.3e+125)
		tmp = t;
	elseif (z <= 5.3e+190)
		tmp = t / (a / (y - z));
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.2e+50], t, If[LessEqual[z, -4.3e-116], t$95$1, If[LessEqual[z, -2.65e-217], N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.3e-235], t$95$1, If[LessEqual[z, 9.2e-265], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.4e-24], N[(x - N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.3e+125], t, If[LessEqual[z, 5.3e+190], N[(t / N[(a / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -4.3 \cdot 10^{-116}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq -3.3 \cdot 10^{-235}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;z \leq 1.3 \cdot 10^{+125}:\\
\;\;\;\;t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -5.2000000000000004e50 or 2.3999999999999998e-24 < z < 1.30000000000000002e125 or 5.30000000000000015e190 < z

    1. Initial program 70.5%

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

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

    if -5.2000000000000004e50 < z < -4.2999999999999997e-116 or -2.65e-217 < z < -3.30000000000000028e-235

    1. Initial program 88.9%

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

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

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

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

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

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

    if -4.2999999999999997e-116 < z < -2.65e-217

    1. Initial program 90.3%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    8. Simplified62.6%

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

    if -3.30000000000000028e-235 < z < 9.1999999999999996e-265

    1. Initial program 87.8%

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

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

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

    if 9.1999999999999996e-265 < z < 2.3999999999999998e-24

    1. Initial program 93.9%

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a}{y}}} \]
    6. Simplified55.4%

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

    if 1.30000000000000002e125 < z < 5.30000000000000015e190

    1. Initial program 80.2%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.2 \cdot 10^{+50}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -4.3 \cdot 10^{-116}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -2.65 \cdot 10^{-217}:\\ \;\;\;\;\frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq -3.3 \cdot 10^{-235}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{-265}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-24}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{+125}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 5.3 \cdot 10^{+190}:\\ \;\;\;\;\frac{t}{\frac{a}{y - z}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 89.8% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 92.7%

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

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

    1. Initial program 3.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{a + -1 \cdot y}{\frac{z}{t - x}}} \]
      2. mul-1-neg96.6%

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

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

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

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

Alternative 4: 52.2% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-t}{\frac{z}{y - z}}\\ t_2 := x + \frac{t}{\frac{a}{y}}\\ t_3 := \frac{-x}{\frac{a - z}{y}}\\ \mathbf{if}\;a \leq -1.45 \cdot 10^{+153}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -2 \cdot 10^{+123}:\\ \;\;\;\;\frac{-t}{\frac{a}{z} + -1}\\ \mathbf{elif}\;a \leq -7 \cdot 10^{-77}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -4.2 \cdot 10^{-188}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{-219}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.06 \cdot 10^{-157}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 0.0033:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (- t) (/ z (- y z))))
        (t_2 (+ x (/ t (/ a y))))
        (t_3 (/ (- x) (/ (- a z) y))))
   (if (<= a -1.45e+153)
     t_2
     (if (<= a -2e+123)
       (/ (- t) (+ (/ a z) -1.0))
       (if (<= a -7e-77)
         t_2
         (if (<= a -4.2e-188)
           t_3
           (if (<= a 9.5e-219)
             t_1
             (if (<= a 1.06e-157) t_3 (if (<= a 0.0033) t_1 t_2)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = -t / (z / (y - z));
	double t_2 = x + (t / (a / y));
	double t_3 = -x / ((a - z) / y);
	double tmp;
	if (a <= -1.45e+153) {
		tmp = t_2;
	} else if (a <= -2e+123) {
		tmp = -t / ((a / z) + -1.0);
	} else if (a <= -7e-77) {
		tmp = t_2;
	} else if (a <= -4.2e-188) {
		tmp = t_3;
	} else if (a <= 9.5e-219) {
		tmp = t_1;
	} else if (a <= 1.06e-157) {
		tmp = t_3;
	} else if (a <= 0.0033) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = -t / (z / (y - z))
    t_2 = x + (t / (a / y))
    t_3 = -x / ((a - z) / y)
    if (a <= (-1.45d+153)) then
        tmp = t_2
    else if (a <= (-2d+123)) then
        tmp = -t / ((a / z) + (-1.0d0))
    else if (a <= (-7d-77)) then
        tmp = t_2
    else if (a <= (-4.2d-188)) then
        tmp = t_3
    else if (a <= 9.5d-219) then
        tmp = t_1
    else if (a <= 1.06d-157) then
        tmp = t_3
    else if (a <= 0.0033d0) 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 = -t / (z / (y - z));
	double t_2 = x + (t / (a / y));
	double t_3 = -x / ((a - z) / y);
	double tmp;
	if (a <= -1.45e+153) {
		tmp = t_2;
	} else if (a <= -2e+123) {
		tmp = -t / ((a / z) + -1.0);
	} else if (a <= -7e-77) {
		tmp = t_2;
	} else if (a <= -4.2e-188) {
		tmp = t_3;
	} else if (a <= 9.5e-219) {
		tmp = t_1;
	} else if (a <= 1.06e-157) {
		tmp = t_3;
	} else if (a <= 0.0033) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = -t / (z / (y - z))
	t_2 = x + (t / (a / y))
	t_3 = -x / ((a - z) / y)
	tmp = 0
	if a <= -1.45e+153:
		tmp = t_2
	elif a <= -2e+123:
		tmp = -t / ((a / z) + -1.0)
	elif a <= -7e-77:
		tmp = t_2
	elif a <= -4.2e-188:
		tmp = t_3
	elif a <= 9.5e-219:
		tmp = t_1
	elif a <= 1.06e-157:
		tmp = t_3
	elif a <= 0.0033:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(-t) / Float64(z / Float64(y - z)))
	t_2 = Float64(x + Float64(t / Float64(a / y)))
	t_3 = Float64(Float64(-x) / Float64(Float64(a - z) / y))
	tmp = 0.0
	if (a <= -1.45e+153)
		tmp = t_2;
	elseif (a <= -2e+123)
		tmp = Float64(Float64(-t) / Float64(Float64(a / z) + -1.0));
	elseif (a <= -7e-77)
		tmp = t_2;
	elseif (a <= -4.2e-188)
		tmp = t_3;
	elseif (a <= 9.5e-219)
		tmp = t_1;
	elseif (a <= 1.06e-157)
		tmp = t_3;
	elseif (a <= 0.0033)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = -t / (z / (y - z));
	t_2 = x + (t / (a / y));
	t_3 = -x / ((a - z) / y);
	tmp = 0.0;
	if (a <= -1.45e+153)
		tmp = t_2;
	elseif (a <= -2e+123)
		tmp = -t / ((a / z) + -1.0);
	elseif (a <= -7e-77)
		tmp = t_2;
	elseif (a <= -4.2e-188)
		tmp = t_3;
	elseif (a <= 9.5e-219)
		tmp = t_1;
	elseif (a <= 1.06e-157)
		tmp = t_3;
	elseif (a <= 0.0033)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-t) / N[(z / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[((-x) / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.45e+153], t$95$2, If[LessEqual[a, -2e+123], N[((-t) / N[(N[(a / z), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -7e-77], t$95$2, If[LessEqual[a, -4.2e-188], t$95$3, If[LessEqual[a, 9.5e-219], t$95$1, If[LessEqual[a, 1.06e-157], t$95$3, If[LessEqual[a, 0.0033], t$95$1, t$95$2]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -2 \cdot 10^{+123}:\\
\;\;\;\;\frac{-t}{\frac{a}{z} + -1}\\

\mathbf{elif}\;a \leq -7 \cdot 10^{-77}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq -4.2 \cdot 10^{-188}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;a \leq 9.5 \cdot 10^{-219}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 1.06 \cdot 10^{-157}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;a \leq 0.0033:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.45000000000000001e153 or -1.99999999999999996e123 < a < -7.00000000000000026e-77 or 0.0033 < a

    1. Initial program 88.0%

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

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

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

        \[\leadsto x + \color{blue}{\frac{t}{\frac{a}{y}}} \]
    6. Simplified55.8%

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

    if -1.45000000000000001e153 < a < -1.99999999999999996e123

    1. Initial program 85.8%

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a - z}{y - z}}} \]
    5. Simplified72.3%

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

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

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

        \[\leadsto -\color{blue}{\frac{t}{\frac{a - z}{z}}} \]
      3. distribute-neg-frac72.3%

        \[\leadsto \color{blue}{\frac{-t}{\frac{a - z}{z}}} \]
      4. div-sub72.3%

        \[\leadsto \frac{-t}{\color{blue}{\frac{a}{z} - \frac{z}{z}}} \]
      5. sub-neg72.3%

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

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

        \[\leadsto \frac{-t}{\frac{a}{z} + \color{blue}{-1}} \]
    8. Simplified72.3%

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

    if -7.00000000000000026e-77 < a < -4.1999999999999998e-188 or 9.4999999999999997e-219 < a < 1.06e-157

    1. Initial program 69.6%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      4. associate-/r/67.8%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{a - z}} \]
    7. Step-by-step derivation
      1. mul-1-neg51.0%

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

        \[\leadsto -\color{blue}{\frac{x}{\frac{a - z}{y}}} \]
      3. distribute-neg-frac60.8%

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

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

    if -4.1999999999999998e-188 < a < 9.4999999999999997e-219 or 1.06e-157 < a < 0.0033

    1. Initial program 80.1%

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{t}{\frac{z}{y - z}}} \]
      3. distribute-neg-frac71.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.45 \cdot 10^{+153}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq -2 \cdot 10^{+123}:\\ \;\;\;\;\frac{-t}{\frac{a}{z} + -1}\\ \mathbf{elif}\;a \leq -7 \cdot 10^{-77}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq -4.2 \cdot 10^{-188}:\\ \;\;\;\;\frac{-x}{\frac{a - z}{y}}\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{-219}:\\ \;\;\;\;\frac{-t}{\frac{z}{y - z}}\\ \mathbf{elif}\;a \leq 1.06 \cdot 10^{-157}:\\ \;\;\;\;\frac{-x}{\frac{a - z}{y}}\\ \mathbf{elif}\;a \leq 0.0033:\\ \;\;\;\;\frac{-t}{\frac{z}{y - z}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 66.6% accurate, 0.3× speedup?

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

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

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

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

\mathbf{elif}\;z \leq 3.2 \cdot 10^{-133}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 5.7 \cdot 10^{-5}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -6.7999999999999997e50

    1. Initial program 65.9%

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

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

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

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

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

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

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

    if -6.7999999999999997e50 < z < -9.19999999999999983e-108

    1. Initial program 88.8%

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

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

    if -9.19999999999999983e-108 < z < -2.5000000000000001e-203

    1. Initial program 84.8%

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

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

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

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

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

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

    if -2.5000000000000001e-203 < z < 3.20000000000000013e-133 or 1.12000000000000001e-61 < z < 5.7000000000000003e-5

    1. Initial program 94.4%

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

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

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

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

    if 3.20000000000000013e-133 < z < 1.12000000000000001e-61

    1. Initial program 89.0%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      4. associate-/r/80.0%

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

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

    if 5.7000000000000003e-5 < z

    1. Initial program 73.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.8 \cdot 10^{+50}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq -9.2 \cdot 10^{-108}:\\ \;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a}\\ \mathbf{elif}\;z \leq -2.5 \cdot 10^{-203}:\\ \;\;\;\;\frac{y}{\frac{a - z}{t - x}}\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-133}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{-61}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 5.7 \cdot 10^{-5}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{a - y}{\frac{z}{t - x}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 34.3% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-x}{\frac{a}{y}}\\ \mathbf{if}\;z \leq -1.75 \cdot 10^{+20}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -6.6 \cdot 10^{-108}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -9.8 \cdot 10^{-233}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{-288}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-144}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-135}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 12000000:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (- x) (/ a y))))
   (if (<= z -1.75e+20)
     t
     (if (<= z -6.6e-108)
       x
       (if (<= z -9.8e-233)
         t_1
         (if (<= z 1.25e-288)
           x
           (if (<= z 1.1e-144)
             t_1
             (if (<= z 6e-135) x (if (<= z 12000000.0) (/ (* x y) z) t)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = -x / (a / y);
	double tmp;
	if (z <= -1.75e+20) {
		tmp = t;
	} else if (z <= -6.6e-108) {
		tmp = x;
	} else if (z <= -9.8e-233) {
		tmp = t_1;
	} else if (z <= 1.25e-288) {
		tmp = x;
	} else if (z <= 1.1e-144) {
		tmp = t_1;
	} else if (z <= 6e-135) {
		tmp = x;
	} else if (z <= 12000000.0) {
		tmp = (x * y) / z;
	} else {
		tmp = 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 / (a / y)
    if (z <= (-1.75d+20)) then
        tmp = t
    else if (z <= (-6.6d-108)) then
        tmp = x
    else if (z <= (-9.8d-233)) then
        tmp = t_1
    else if (z <= 1.25d-288) then
        tmp = x
    else if (z <= 1.1d-144) then
        tmp = t_1
    else if (z <= 6d-135) then
        tmp = x
    else if (z <= 12000000.0d0) then
        tmp = (x * y) / z
    else
        tmp = 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 / (a / y);
	double tmp;
	if (z <= -1.75e+20) {
		tmp = t;
	} else if (z <= -6.6e-108) {
		tmp = x;
	} else if (z <= -9.8e-233) {
		tmp = t_1;
	} else if (z <= 1.25e-288) {
		tmp = x;
	} else if (z <= 1.1e-144) {
		tmp = t_1;
	} else if (z <= 6e-135) {
		tmp = x;
	} else if (z <= 12000000.0) {
		tmp = (x * y) / z;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = -x / (a / y)
	tmp = 0
	if z <= -1.75e+20:
		tmp = t
	elif z <= -6.6e-108:
		tmp = x
	elif z <= -9.8e-233:
		tmp = t_1
	elif z <= 1.25e-288:
		tmp = x
	elif z <= 1.1e-144:
		tmp = t_1
	elif z <= 6e-135:
		tmp = x
	elif z <= 12000000.0:
		tmp = (x * y) / z
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(-x) / Float64(a / y))
	tmp = 0.0
	if (z <= -1.75e+20)
		tmp = t;
	elseif (z <= -6.6e-108)
		tmp = x;
	elseif (z <= -9.8e-233)
		tmp = t_1;
	elseif (z <= 1.25e-288)
		tmp = x;
	elseif (z <= 1.1e-144)
		tmp = t_1;
	elseif (z <= 6e-135)
		tmp = x;
	elseif (z <= 12000000.0)
		tmp = Float64(Float64(x * y) / z);
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = -x / (a / y);
	tmp = 0.0;
	if (z <= -1.75e+20)
		tmp = t;
	elseif (z <= -6.6e-108)
		tmp = x;
	elseif (z <= -9.8e-233)
		tmp = t_1;
	elseif (z <= 1.25e-288)
		tmp = x;
	elseif (z <= 1.1e-144)
		tmp = t_1;
	elseif (z <= 6e-135)
		tmp = x;
	elseif (z <= 12000000.0)
		tmp = (x * y) / z;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-x) / N[(a / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.75e+20], t, If[LessEqual[z, -6.6e-108], x, If[LessEqual[z, -9.8e-233], t$95$1, If[LessEqual[z, 1.25e-288], x, If[LessEqual[z, 1.1e-144], t$95$1, If[LessEqual[z, 6e-135], x, If[LessEqual[z, 12000000.0], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision], t]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -6.6 \cdot 10^{-108}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq -9.8 \cdot 10^{-233}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 1.25 \cdot 10^{-288}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 1.1 \cdot 10^{-144}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 6 \cdot 10^{-135}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 12000000:\\
\;\;\;\;\frac{x \cdot y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.75e20 or 1.2e7 < z

    1. Initial program 71.8%

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

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

    if -1.75e20 < z < -6.6000000000000004e-108 or -9.7999999999999999e-233 < z < 1.25000000000000003e-288 or 1.10000000000000003e-144 < z < 6.00000000000000024e-135

    1. Initial program 90.5%

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

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

    if -6.6000000000000004e-108 < z < -9.7999999999999999e-233 or 1.25000000000000003e-288 < z < 1.10000000000000003e-144

    1. Initial program 91.1%

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{a}} \]
    8. Step-by-step derivation
      1. mul-1-neg36.3%

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

        \[\leadsto -\color{blue}{\frac{x}{\frac{a}{y}}} \]
      3. distribute-neg-frac41.5%

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

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

    if 6.00000000000000024e-135 < z < 1.2e7

    1. Initial program 92.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      4. associate-/r/68.8%

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

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

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

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

        \[\leadsto -\color{blue}{\frac{x}{\frac{a - z}{y}}} \]
      3. distribute-neg-frac44.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.75 \cdot 10^{+20}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -6.6 \cdot 10^{-108}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -9.8 \cdot 10^{-233}:\\ \;\;\;\;\frac{-x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{-288}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-144}:\\ \;\;\;\;\frac{-x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-135}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 12000000:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 64.5% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{+51}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq -2 \cdot 10^{-108}:\\ \;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a}\\ \mathbf{elif}\;z \leq -5.3 \cdot 10^{-204}:\\ \;\;\;\;\frac{y}{\frac{a - z}{t - x}}\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{-133}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-48}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 2.25 \cdot 10^{-29}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t - \frac{t - x}{\frac{z}{y}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -4.2e+51)
   (* t (/ (- y z) (- a z)))
   (if (<= z -2e-108)
     (+ x (/ (* y (- t x)) a))
     (if (<= z -5.3e-204)
       (/ y (/ (- a z) (- t x)))
       (if (<= z 1.45e-133)
         (+ x (/ y (/ a (- t x))))
         (if (<= z 6e-48)
           (* (- t x) (/ y (- a z)))
           (if (<= z 2.25e-29)
             (- x (/ x (/ a y)))
             (- t (/ (- t x) (/ z y))))))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -4.2e+51) {
		tmp = t * ((y - z) / (a - z));
	} else if (z <= -2e-108) {
		tmp = x + ((y * (t - x)) / a);
	} else if (z <= -5.3e-204) {
		tmp = y / ((a - z) / (t - x));
	} else if (z <= 1.45e-133) {
		tmp = x + (y / (a / (t - x)));
	} else if (z <= 6e-48) {
		tmp = (t - x) * (y / (a - z));
	} else if (z <= 2.25e-29) {
		tmp = x - (x / (a / y));
	} else {
		tmp = t - ((t - x) / (z / 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 (z <= (-4.2d+51)) then
        tmp = t * ((y - z) / (a - z))
    else if (z <= (-2d-108)) then
        tmp = x + ((y * (t - x)) / a)
    else if (z <= (-5.3d-204)) then
        tmp = y / ((a - z) / (t - x))
    else if (z <= 1.45d-133) then
        tmp = x + (y / (a / (t - x)))
    else if (z <= 6d-48) then
        tmp = (t - x) * (y / (a - z))
    else if (z <= 2.25d-29) then
        tmp = x - (x / (a / y))
    else
        tmp = t - ((t - x) / (z / y))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -4.2e+51) {
		tmp = t * ((y - z) / (a - z));
	} else if (z <= -2e-108) {
		tmp = x + ((y * (t - x)) / a);
	} else if (z <= -5.3e-204) {
		tmp = y / ((a - z) / (t - x));
	} else if (z <= 1.45e-133) {
		tmp = x + (y / (a / (t - x)));
	} else if (z <= 6e-48) {
		tmp = (t - x) * (y / (a - z));
	} else if (z <= 2.25e-29) {
		tmp = x - (x / (a / y));
	} else {
		tmp = t - ((t - x) / (z / y));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -4.2e+51:
		tmp = t * ((y - z) / (a - z))
	elif z <= -2e-108:
		tmp = x + ((y * (t - x)) / a)
	elif z <= -5.3e-204:
		tmp = y / ((a - z) / (t - x))
	elif z <= 1.45e-133:
		tmp = x + (y / (a / (t - x)))
	elif z <= 6e-48:
		tmp = (t - x) * (y / (a - z))
	elif z <= 2.25e-29:
		tmp = x - (x / (a / y))
	else:
		tmp = t - ((t - x) / (z / y))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -4.2e+51)
		tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z)));
	elseif (z <= -2e-108)
		tmp = Float64(x + Float64(Float64(y * Float64(t - x)) / a));
	elseif (z <= -5.3e-204)
		tmp = Float64(y / Float64(Float64(a - z) / Float64(t - x)));
	elseif (z <= 1.45e-133)
		tmp = Float64(x + Float64(y / Float64(a / Float64(t - x))));
	elseif (z <= 6e-48)
		tmp = Float64(Float64(t - x) * Float64(y / Float64(a - z)));
	elseif (z <= 2.25e-29)
		tmp = Float64(x - Float64(x / Float64(a / y)));
	else
		tmp = Float64(t - Float64(Float64(t - x) / Float64(z / y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -4.2e+51)
		tmp = t * ((y - z) / (a - z));
	elseif (z <= -2e-108)
		tmp = x + ((y * (t - x)) / a);
	elseif (z <= -5.3e-204)
		tmp = y / ((a - z) / (t - x));
	elseif (z <= 1.45e-133)
		tmp = x + (y / (a / (t - x)));
	elseif (z <= 6e-48)
		tmp = (t - x) * (y / (a - z));
	elseif (z <= 2.25e-29)
		tmp = x - (x / (a / y));
	else
		tmp = t - ((t - x) / (z / y));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.2e+51], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2e-108], N[(x + N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.3e-204], N[(y / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.45e-133], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e-48], N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.25e-29], N[(x - N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t - N[(N[(t - x), $MachinePrecision] / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{+51}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if z < -4.2000000000000002e51

    1. Initial program 65.9%

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

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

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

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

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

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

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

    if -4.2000000000000002e51 < z < -2.00000000000000008e-108

    1. Initial program 88.8%

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

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

    if -2.00000000000000008e-108 < z < -5.2999999999999997e-204

    1. Initial program 84.8%

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

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

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

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

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

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

    if -5.2999999999999997e-204 < z < 1.4499999999999999e-133

    1. Initial program 93.7%

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

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

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

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

    if 1.4499999999999999e-133 < z < 5.9999999999999998e-48

    1. Initial program 89.0%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      4. associate-/r/80.0%

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

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

    if 5.9999999999999998e-48 < z < 2.2499999999999999e-29

    1. Initial program 100.0%

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

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{x \cdot y}{a}} \]
    5. Step-by-step derivation
      1. mul-1-neg100.0%

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

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

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

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

    if 2.2499999999999999e-29 < z

    1. Initial program 74.6%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{+51}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq -2 \cdot 10^{-108}:\\ \;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a}\\ \mathbf{elif}\;z \leq -5.3 \cdot 10^{-204}:\\ \;\;\;\;\frac{y}{\frac{a - z}{t - x}}\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{-133}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-48}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 2.25 \cdot 10^{-29}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t - \frac{t - x}{\frac{z}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 49.9% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\ t_2 := \frac{-t}{\frac{a}{z} + -1}\\ \mathbf{if}\;z \leq -6.6 \cdot 10^{+50}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-114}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -3.15 \cdot 10^{-223}:\\ \;\;\;\;\frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq -1.05 \cdot 10^{-233}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-265}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-26}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y a)))) (t_2 (/ (- t) (+ (/ a z) -1.0))))
   (if (<= z -6.6e+50)
     t_2
     (if (<= z -1.8e-114)
       t_1
       (if (<= z -3.15e-223)
         (/ y (/ a (- t x)))
         (if (<= z -1.05e-233)
           t_1
           (if (<= z 2.9e-265)
             (+ x (/ (* y t) a))
             (if (<= z 6.8e-26) (- x (/ x (/ a y))) t_2))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double t_2 = -t / ((a / z) + -1.0);
	double tmp;
	if (z <= -6.6e+50) {
		tmp = t_2;
	} else if (z <= -1.8e-114) {
		tmp = t_1;
	} else if (z <= -3.15e-223) {
		tmp = y / (a / (t - x));
	} else if (z <= -1.05e-233) {
		tmp = t_1;
	} else if (z <= 2.9e-265) {
		tmp = x + ((y * t) / a);
	} else if (z <= 6.8e-26) {
		tmp = x - (x / (a / 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 = x * (1.0d0 - (y / a))
    t_2 = -t / ((a / z) + (-1.0d0))
    if (z <= (-6.6d+50)) then
        tmp = t_2
    else if (z <= (-1.8d-114)) then
        tmp = t_1
    else if (z <= (-3.15d-223)) then
        tmp = y / (a / (t - x))
    else if (z <= (-1.05d-233)) then
        tmp = t_1
    else if (z <= 2.9d-265) then
        tmp = x + ((y * t) / a)
    else if (z <= 6.8d-26) then
        tmp = x - (x / (a / 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 = x * (1.0 - (y / a));
	double t_2 = -t / ((a / z) + -1.0);
	double tmp;
	if (z <= -6.6e+50) {
		tmp = t_2;
	} else if (z <= -1.8e-114) {
		tmp = t_1;
	} else if (z <= -3.15e-223) {
		tmp = y / (a / (t - x));
	} else if (z <= -1.05e-233) {
		tmp = t_1;
	} else if (z <= 2.9e-265) {
		tmp = x + ((y * t) / a);
	} else if (z <= 6.8e-26) {
		tmp = x - (x / (a / y));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (y / a))
	t_2 = -t / ((a / z) + -1.0)
	tmp = 0
	if z <= -6.6e+50:
		tmp = t_2
	elif z <= -1.8e-114:
		tmp = t_1
	elif z <= -3.15e-223:
		tmp = y / (a / (t - x))
	elif z <= -1.05e-233:
		tmp = t_1
	elif z <= 2.9e-265:
		tmp = x + ((y * t) / a)
	elif z <= 6.8e-26:
		tmp = x - (x / (a / y))
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(y / a)))
	t_2 = Float64(Float64(-t) / Float64(Float64(a / z) + -1.0))
	tmp = 0.0
	if (z <= -6.6e+50)
		tmp = t_2;
	elseif (z <= -1.8e-114)
		tmp = t_1;
	elseif (z <= -3.15e-223)
		tmp = Float64(y / Float64(a / Float64(t - x)));
	elseif (z <= -1.05e-233)
		tmp = t_1;
	elseif (z <= 2.9e-265)
		tmp = Float64(x + Float64(Float64(y * t) / a));
	elseif (z <= 6.8e-26)
		tmp = Float64(x - Float64(x / Float64(a / y)));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (y / a));
	t_2 = -t / ((a / z) + -1.0);
	tmp = 0.0;
	if (z <= -6.6e+50)
		tmp = t_2;
	elseif (z <= -1.8e-114)
		tmp = t_1;
	elseif (z <= -3.15e-223)
		tmp = y / (a / (t - x));
	elseif (z <= -1.05e-233)
		tmp = t_1;
	elseif (z <= 2.9e-265)
		tmp = x + ((y * t) / a);
	elseif (z <= 6.8e-26)
		tmp = x - (x / (a / y));
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[((-t) / N[(N[(a / z), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.6e+50], t$95$2, If[LessEqual[z, -1.8e-114], t$95$1, If[LessEqual[z, -3.15e-223], N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.05e-233], t$95$1, If[LessEqual[z, 2.9e-265], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.8e-26], N[(x - N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -1.8 \cdot 10^{-114}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq -1.05 \cdot 10^{-233}:\\
\;\;\;\;t_1\\

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

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

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -6.6000000000000001e50 or 6.80000000000000026e-26 < z

    1. Initial program 71.7%

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a - z}{y - z}}} \]
    5. Simplified70.4%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot z}{a - z}} \]
    7. Step-by-step derivation
      1. mul-1-neg33.6%

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

        \[\leadsto -\color{blue}{\frac{t}{\frac{a - z}{z}}} \]
      3. distribute-neg-frac60.0%

        \[\leadsto \color{blue}{\frac{-t}{\frac{a - z}{z}}} \]
      4. div-sub60.0%

        \[\leadsto \frac{-t}{\color{blue}{\frac{a}{z} - \frac{z}{z}}} \]
      5. sub-neg60.0%

        \[\leadsto \frac{-t}{\color{blue}{\frac{a}{z} + \left(-\frac{z}{z}\right)}} \]
      6. *-inverses60.0%

        \[\leadsto \frac{-t}{\frac{a}{z} + \left(-\color{blue}{1}\right)} \]
      7. metadata-eval60.0%

        \[\leadsto \frac{-t}{\frac{a}{z} + \color{blue}{-1}} \]
    8. Simplified60.0%

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

    if -6.6000000000000001e50 < z < -1.80000000000000009e-114 or -3.14999999999999993e-223 < z < -1.0499999999999999e-233

    1. Initial program 88.9%

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

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

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

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

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

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

    if -1.80000000000000009e-114 < z < -3.14999999999999993e-223

    1. Initial program 90.3%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    8. Simplified62.6%

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

    if -1.0499999999999999e-233 < z < 2.89999999999999975e-265

    1. Initial program 87.8%

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

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

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

    if 2.89999999999999975e-265 < z < 6.80000000000000026e-26

    1. Initial program 93.9%

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a}{y}}} \]
    6. Simplified55.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.6 \cdot 10^{+50}:\\ \;\;\;\;\frac{-t}{\frac{a}{z} + -1}\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-114}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -3.15 \cdot 10^{-223}:\\ \;\;\;\;\frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq -1.05 \cdot 10^{-233}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-265}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-26}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-t}{\frac{a}{z} + -1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 46.6% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.1 \cdot 10^{+50}:\\
\;\;\;\;t\\

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

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

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

\mathbf{elif}\;z \leq 1.65 \cdot 10^{+125}:\\
\;\;\;\;t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -6.10000000000000026e50 or 2.2499999999999999e-24 < z < 1.65000000000000003e125 or 5.30000000000000015e190 < z

    1. Initial program 70.5%

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

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

    if -6.10000000000000026e50 < z < -4.3999999999999998e-234

    1. Initial program 89.3%

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{y}{a}\right)} \]
    6. Simplified56.0%

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

    if -4.3999999999999998e-234 < z < 8.2000000000000006e-266

    1. Initial program 87.8%

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

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

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

    if 8.2000000000000006e-266 < z < 2.2499999999999999e-24

    1. Initial program 93.9%

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a}{y}}} \]
    6. Simplified55.4%

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

    if 1.65000000000000003e125 < z < 5.30000000000000015e190

    1. Initial program 80.2%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.1 \cdot 10^{+50}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -4.4 \cdot 10^{-234}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{-266}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 2.25 \cdot 10^{-24}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{+125}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 5.3 \cdot 10^{+190}:\\ \;\;\;\;\frac{t}{\frac{a}{y - z}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 36.6% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.3 \cdot 10^{+14}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq -1.3 \cdot 10^{-115}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 5.8 \cdot 10^{-135}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 135000000:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -4.3e14 or 1.35e8 < z

    1. Initial program 71.8%

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

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

    if -4.3e14 < z < -1.30000000000000002e-115 or -2.7999999999999997e-271 < z < 5.8000000000000004e-135

    1. Initial program 89.5%

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

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

    if -1.30000000000000002e-115 < z < -2.7999999999999997e-271

    1. Initial program 94.0%

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    7. Simplified45.7%

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

    if 5.8000000000000004e-135 < z < 1.35e8

    1. Initial program 92.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      4. associate-/r/68.8%

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

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

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

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

        \[\leadsto -\color{blue}{\frac{x}{\frac{a - z}{y}}} \]
      3. distribute-neg-frac44.5%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    11. Simplified41.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.3 \cdot 10^{+14}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.3 \cdot 10^{-115}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{-271}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-135}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 135000000:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 36.5% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -76000:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq -2.9 \cdot 10^{-117}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 7.8 \cdot 10^{-135}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 255000:\\
\;\;\;\;\frac{x \cdot y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -76000 or 255000 < z

    1. Initial program 71.8%

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

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

    if -76000 < z < -2.9000000000000001e-117 or -5.99999999999999954e-274 < z < 7.80000000000000043e-135

    1. Initial program 89.5%

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

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

    if -2.9000000000000001e-117 < z < -5.99999999999999954e-274

    1. Initial program 94.0%

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    7. Simplified45.7%

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

    if 7.80000000000000043e-135 < z < 255000

    1. Initial program 92.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      4. associate-/r/68.8%

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

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

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

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

        \[\leadsto -\color{blue}{\frac{x}{\frac{a - z}{y}}} \]
      3. distribute-neg-frac44.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -76000:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.9 \cdot 10^{-117}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -6 \cdot 10^{-274}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 7.8 \cdot 10^{-135}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 255000:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 57.8% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t \leq -2.45 \cdot 10^{-235}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 1.3 \cdot 10^{+42}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


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

    1. Initial program 89.7%

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

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

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

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

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

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

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

    if -3.4000000000000001e58 < t < -2.44999999999999983e-235 or 8.5e-231 < t < 1.29999999999999995e42

    1. Initial program 73.8%

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

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

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

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

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

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

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

    if -2.44999999999999983e-235 < t < 8.5e-231

    1. Initial program 85.2%

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{y}{a}\right)} \]
    6. Simplified68.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.4 \cdot 10^{+58}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;t \leq -2.45 \cdot 10^{-235}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{-231}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{+42}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 64.8% accurate, 0.4× speedup?

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

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

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

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

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -8.9999999999999999e52 or 2.1999999999999999e-29 < z

    1. Initial program 71.5%

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

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

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

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

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

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

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

    if -8.9999999999999999e52 < z < 3.10000000000000016e-133

    1. Initial program 90.8%

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

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

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

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

    if 3.10000000000000016e-133 < z < 1.95000000000000003e-57

    1. Initial program 89.0%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      4. associate-/r/80.0%

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

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

    if 1.95000000000000003e-57 < z < 2.1999999999999999e-29

    1. Initial program 100.0%

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

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{x \cdot y}{a}} \]
    5. Step-by-step derivation
      1. mul-1-neg100.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9 \cdot 10^{+52}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{-133}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{-57}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{-29}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 66.5% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.25 \cdot 10^{+51}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.25e51

    1. Initial program 65.9%

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

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

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

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

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

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

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

    if -1.25e51 < z < 2.8999999999999998e-133

    1. Initial program 90.8%

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

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

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

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

    if 2.8999999999999998e-133 < z < 2.59999999999999987e-45

    1. Initial program 89.0%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      4. associate-/r/80.0%

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

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

    if 2.59999999999999987e-45 < z < 4.39999999999999967e-30

    1. Initial program 100.0%

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

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{x \cdot y}{a}} \]
    5. Step-by-step derivation
      1. mul-1-neg100.0%

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

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

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

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

    if 4.39999999999999967e-30 < z

    1. Initial program 74.6%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.25 \cdot 10^{+51}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-133}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-45}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{-30}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t - \frac{t - x}{\frac{z}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 47.8% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq -1.15 \cdot 10^{-233}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 2.4 \cdot 10^{-24}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.10000000000000026e50 or 2.3999999999999998e-24 < z

    1. Initial program 71.7%

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

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

    if -6.10000000000000026e50 < z < -1.1500000000000001e-233 or 1.7e-265 < z < 2.3999999999999998e-24

    1. Initial program 91.4%

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{y}{a}\right)} \]
    6. Simplified55.7%

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

    if -1.1500000000000001e-233 < z < 1.7e-265

    1. Initial program 87.8%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.1 \cdot 10^{+50}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{-233}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-265}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-24}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 47.8% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.6 \cdot 10^{+50}:\\
\;\;\;\;t\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -5.5999999999999996e50 or 1.8999999999999999e-25 < z

    1. Initial program 71.7%

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

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

    if -5.5999999999999996e50 < z < -4.7999999999999998e-234

    1. Initial program 89.3%

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{y}{a}\right)} \]
    6. Simplified56.0%

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

    if -4.7999999999999998e-234 < z < 5.5999999999999999e-266

    1. Initial program 87.8%

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

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

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

    if 5.5999999999999999e-266 < z < 1.8999999999999999e-25

    1. Initial program 93.9%

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a}{y}}} \]
    6. Simplified55.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.6 \cdot 10^{+50}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -4.8 \cdot 10^{-234}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 5.6 \cdot 10^{-266}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{-25}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 60.2% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.7 \cdot 10^{+259}:\\
\;\;\;\;\frac{-x}{\frac{a - z}{y}}\\

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

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

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


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

    1. Initial program 78.2%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      4. associate-/r/89.4%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{a - z}} \]
    7. Step-by-step derivation
      1. mul-1-neg79.2%

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

        \[\leadsto -\color{blue}{\frac{x}{\frac{a - z}{y}}} \]
      3. distribute-neg-frac89.6%

        \[\leadsto \color{blue}{\frac{-x}{\frac{a - z}{y}}} \]
    8. Simplified89.6%

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

    if -2.69999999999999988e259 < x < -2.49999999999999982e74

    1. Initial program 75.4%

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

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{x \cdot y}{a}} \]
    5. Step-by-step derivation
      1. mul-1-neg61.2%

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

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

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a}{y}}} \]
    6. Simplified63.1%

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

    if -2.49999999999999982e74 < x < 4.5999999999999998e89

    1. Initial program 87.5%

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

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

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

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

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

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

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

    if 4.5999999999999998e89 < x

    1. Initial program 70.5%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.7 \cdot 10^{+259}:\\ \;\;\;\;\frac{-x}{\frac{a - z}{y}}\\ \mathbf{elif}\;x \leq -2.5 \cdot 10^{+74}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{elif}\;x \leq 4.6 \cdot 10^{+89}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 37.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -31500000000000:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq -1.25 \cdot 10^{-116}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 8.5 \cdot 10^{-26}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.15e13 or 8.50000000000000004e-26 < z

    1. Initial program 72.7%

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

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

    if -3.15e13 < z < -1.2500000000000001e-116 or -2.1000000000000002e-273 < z < 8.50000000000000004e-26

    1. Initial program 90.1%

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

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

    if -1.2500000000000001e-116 < z < -2.1000000000000002e-273

    1. Initial program 94.0%

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    7. Simplified45.7%

      \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    8. Step-by-step derivation
      1. div-inv45.6%

        \[\leadsto \color{blue}{t \cdot \frac{1}{\frac{a}{y}}} \]
      2. clear-num45.6%

        \[\leadsto t \cdot \color{blue}{\frac{y}{a}} \]
    9. Applied egg-rr45.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -31500000000000:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{-116}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{-273}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-26}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 36.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -20000:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq -1.22 \cdot 10^{-116}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 1.9 \cdot 10^{-25}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2e4 or 1.8999999999999999e-25 < z

    1. Initial program 72.7%

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

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

    if -2e4 < z < -1.22e-116 or -1.14999999999999994e-272 < z < 1.8999999999999999e-25

    1. Initial program 90.1%

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

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

    if -1.22e-116 < z < -1.14999999999999994e-272

    1. Initial program 94.0%

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    7. Simplified45.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -20000:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.22 \cdot 10^{-116}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{-272}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{-25}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 47.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.9 \cdot 10^{+50}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 2.4 \cdot 10^{-24}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.9000000000000002e50 or 2.3999999999999998e-24 < z

    1. Initial program 71.7%

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

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

    if -4.9000000000000002e50 < z < 2.3999999999999998e-24

    1. Initial program 90.8%

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{y}{a}\right)} \]
    6. Simplified55.7%

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

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

Alternative 21: 37.5% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.12 \cdot 10^{+16}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 1.32 \cdot 10^{-24}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.12e16 or 1.3199999999999999e-24 < z

    1. Initial program 72.7%

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

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

    if -1.12e16 < z < 1.3199999999999999e-24

    1. Initial program 91.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.12 \cdot 10^{+16}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.32 \cdot 10^{-24}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 24.6% accurate, 13.0× speedup?

\[\begin{array}{l} \\ t \end{array} \]
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
	return 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 = t
end function
public static double code(double x, double y, double z, double t, double a) {
	return t;
}
def code(x, y, z, t, a):
	return t
function code(x, y, z, t, a)
	return t
end
function tmp = code(x, y, z, t, a)
	tmp = t;
end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}

\\
t
\end{array}
Derivation
  1. Initial program 82.2%

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

    \[\leadsto \color{blue}{t} \]
  4. Final simplification25.1%

    \[\leadsto t \]
  5. Add Preprocessing

Reproduce

?
herbie shell --seed 2024021 
(FPCore (x y z t a)
  :name "Numeric.Signal:interpolate   from hsignal-0.2.7.1"
  :precision binary64
  (+ x (* (- y z) (/ (- t x) (- a z)))))