Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 80.8% → 91.0%
Time: 26.2s
Alternatives: 21
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 21 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: 80.8% 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: 91.0% 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 -2 \cdot 10^{-300}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-260}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y - z, t\_1, x\right)\\ \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 -2e-300)
     t_2
     (if (<= t_2 2e-260)
       (+ t (/ (- x t) (/ z (- y a))))
       (fma (- y z) t_1 x)))))
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 <= -2e-300) {
		tmp = t_2;
	} else if (t_2 <= 2e-260) {
		tmp = t + ((x - t) / (z / (y - a)));
	} else {
		tmp = fma((y - z), t_1, x);
	}
	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 <= -2e-300)
		tmp = t_2;
	elseif (t_2 <= 2e-260)
		tmp = Float64(t + Float64(Float64(x - t) / Float64(z / Float64(y - a))));
	else
		tmp = fma(Float64(y - z), t_1, x);
	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, -2e-300], t$95$2, If[LessEqual[t$95$2, 2e-260], N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y - z), $MachinePrecision] * t$95$1 + x), $MachinePrecision]]]]]
\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 -2 \cdot 10^{-300}:\\
\;\;\;\;t\_2\\

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y - z, t\_1, x\right)\\


\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)))) < -2.00000000000000005e-300

    1. Initial program 88.2%

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

    if -2.00000000000000005e-300 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 1.99999999999999992e-260

    1. Initial program 6.4%

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

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

        \[\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--83.4%

        \[\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-sub83.4%

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

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

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

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

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

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

    if 1.99999999999999992e-260 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 89.7%

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{t - x}{a - z}, x\right)} \]
    4. Add Preprocessing
  3. Recombined 3 regimes into one program.
  4. Final simplification90.1%

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

Alternative 2: 50.9% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\ t_2 := y \cdot \frac{t - x}{a}\\ \mathbf{if}\;z \leq -1.45 \cdot 10^{+147}:\\ \;\;\;\;t + \frac{a}{\frac{-z}{x}}\\ \mathbf{elif}\;z \leq -4 \cdot 10^{+94}:\\ \;\;\;\;\frac{-y}{\frac{z}{t - x}}\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{-61}:\\ \;\;\;\;t - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{-164}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{-261}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-244}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 4.3 \cdot 10^{-204}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-114}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t + y \cdot \frac{x}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y a)))) (t_2 (* y (/ (- t x) a))))
   (if (<= z -1.45e+147)
     (+ t (/ a (/ (- z) x)))
     (if (<= z -4e+94)
       (/ (- y) (/ z (- t x)))
       (if (<= z -2.3e-61)
         (- t (* t (/ y z)))
         (if (<= z -1.15e-164)
           t_1
           (if (<= z -2.3e-261)
             t_2
             (if (<= z 2.1e-244)
               t_1
               (if (<= z 4.3e-204)
                 t_2
                 (if (<= z 2.9e-114) t_1 (+ t (* y (/ x z)))))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double t_2 = y * ((t - x) / a);
	double tmp;
	if (z <= -1.45e+147) {
		tmp = t + (a / (-z / x));
	} else if (z <= -4e+94) {
		tmp = -y / (z / (t - x));
	} else if (z <= -2.3e-61) {
		tmp = t - (t * (y / z));
	} else if (z <= -1.15e-164) {
		tmp = t_1;
	} else if (z <= -2.3e-261) {
		tmp = t_2;
	} else if (z <= 2.1e-244) {
		tmp = t_1;
	} else if (z <= 4.3e-204) {
		tmp = t_2;
	} else if (z <= 2.9e-114) {
		tmp = t_1;
	} else {
		tmp = t + (y * (x / z));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x * (1.0d0 - (y / a))
    t_2 = y * ((t - x) / a)
    if (z <= (-1.45d+147)) then
        tmp = t + (a / (-z / x))
    else if (z <= (-4d+94)) then
        tmp = -y / (z / (t - x))
    else if (z <= (-2.3d-61)) then
        tmp = t - (t * (y / z))
    else if (z <= (-1.15d-164)) then
        tmp = t_1
    else if (z <= (-2.3d-261)) then
        tmp = t_2
    else if (z <= 2.1d-244) then
        tmp = t_1
    else if (z <= 4.3d-204) then
        tmp = t_2
    else if (z <= 2.9d-114) then
        tmp = t_1
    else
        tmp = t + (y * (x / z))
    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 = y * ((t - x) / a);
	double tmp;
	if (z <= -1.45e+147) {
		tmp = t + (a / (-z / x));
	} else if (z <= -4e+94) {
		tmp = -y / (z / (t - x));
	} else if (z <= -2.3e-61) {
		tmp = t - (t * (y / z));
	} else if (z <= -1.15e-164) {
		tmp = t_1;
	} else if (z <= -2.3e-261) {
		tmp = t_2;
	} else if (z <= 2.1e-244) {
		tmp = t_1;
	} else if (z <= 4.3e-204) {
		tmp = t_2;
	} else if (z <= 2.9e-114) {
		tmp = t_1;
	} else {
		tmp = t + (y * (x / z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (y / a))
	t_2 = y * ((t - x) / a)
	tmp = 0
	if z <= -1.45e+147:
		tmp = t + (a / (-z / x))
	elif z <= -4e+94:
		tmp = -y / (z / (t - x))
	elif z <= -2.3e-61:
		tmp = t - (t * (y / z))
	elif z <= -1.15e-164:
		tmp = t_1
	elif z <= -2.3e-261:
		tmp = t_2
	elif z <= 2.1e-244:
		tmp = t_1
	elif z <= 4.3e-204:
		tmp = t_2
	elif z <= 2.9e-114:
		tmp = t_1
	else:
		tmp = t + (y * (x / z))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(y / a)))
	t_2 = Float64(y * Float64(Float64(t - x) / a))
	tmp = 0.0
	if (z <= -1.45e+147)
		tmp = Float64(t + Float64(a / Float64(Float64(-z) / x)));
	elseif (z <= -4e+94)
		tmp = Float64(Float64(-y) / Float64(z / Float64(t - x)));
	elseif (z <= -2.3e-61)
		tmp = Float64(t - Float64(t * Float64(y / z)));
	elseif (z <= -1.15e-164)
		tmp = t_1;
	elseif (z <= -2.3e-261)
		tmp = t_2;
	elseif (z <= 2.1e-244)
		tmp = t_1;
	elseif (z <= 4.3e-204)
		tmp = t_2;
	elseif (z <= 2.9e-114)
		tmp = t_1;
	else
		tmp = Float64(t + Float64(y * Float64(x / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (y / a));
	t_2 = y * ((t - x) / a);
	tmp = 0.0;
	if (z <= -1.45e+147)
		tmp = t + (a / (-z / x));
	elseif (z <= -4e+94)
		tmp = -y / (z / (t - x));
	elseif (z <= -2.3e-61)
		tmp = t - (t * (y / z));
	elseif (z <= -1.15e-164)
		tmp = t_1;
	elseif (z <= -2.3e-261)
		tmp = t_2;
	elseif (z <= 2.1e-244)
		tmp = t_1;
	elseif (z <= 4.3e-204)
		tmp = t_2;
	elseif (z <= 2.9e-114)
		tmp = t_1;
	else
		tmp = t + (y * (x / z));
	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[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.45e+147], N[(t + N[(a / N[((-z) / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4e+94], N[((-y) / N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.3e-61], N[(t - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.15e-164], t$95$1, If[LessEqual[z, -2.3e-261], t$95$2, If[LessEqual[z, 2.1e-244], t$95$1, If[LessEqual[z, 4.3e-204], t$95$2, If[LessEqual[z, 2.9e-114], t$95$1, N[(t + N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;z \leq -1.15 \cdot 10^{-164}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -2.3 \cdot 10^{-261}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq 2.1 \cdot 10^{-244}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 4.3 \cdot 10^{-204}:\\
\;\;\;\;t\_2\\

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

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


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

    1. Initial program 61.8%

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

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

        \[\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--59.2%

        \[\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-sub59.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + \frac{a}{\frac{\color{blue}{-z}}{x}} \]
    11. Simplified65.5%

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

    if -1.4499999999999999e147 < z < -4.0000000000000001e94

    1. Initial program 91.3%

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

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

        \[\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--47.9%

        \[\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-sub47.9%

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

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

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

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

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

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

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

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

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

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

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

    if -4.0000000000000001e94 < z < -2.29999999999999992e-61

    1. Initial program 80.5%

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

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

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

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

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

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

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

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

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

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

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

    if -2.29999999999999992e-61 < z < -1.14999999999999993e-164 or -2.3e-261 < z < 2.10000000000000002e-244 or 4.3000000000000003e-204 < z < 2.89999999999999997e-114

    1. Initial program 91.0%

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

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

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

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

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

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

    if -1.14999999999999993e-164 < z < -2.3e-261 or 2.10000000000000002e-244 < z < 4.3000000000000003e-204

    1. Initial program 89.4%

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a}} \]
    6. Simplified70.3%

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

    if 2.89999999999999997e-114 < z

    1. Initial program 65.6%

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

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

        \[\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--69.6%

        \[\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-sub69.7%

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

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

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

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

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

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

      \[\leadsto t - \frac{t - x}{\color{blue}{\frac{z}{y}}} \]
    7. Taylor expanded in t around 0 55.3%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.45 \cdot 10^{+147}:\\ \;\;\;\;t + \frac{a}{\frac{-z}{x}}\\ \mathbf{elif}\;z \leq -4 \cdot 10^{+94}:\\ \;\;\;\;\frac{-y}{\frac{z}{t - x}}\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{-61}:\\ \;\;\;\;t - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{-164}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{-261}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-244}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 4.3 \cdot 10^{-204}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-114}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t + y \cdot \frac{x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 91.0% 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 -2 \cdot 10^{-300} \lor \neg \left(t\_1 \leq 2 \cdot 10^{-260}\right):\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\ \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 -2e-300) (not (<= t_1 2e-260)))
     t_1
     (+ t (/ (- x t) (/ z (- y a)))))))
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 <= -2e-300) || !(t_1 <= 2e-260)) {
		tmp = t_1;
	} else {
		tmp = t + ((x - t) / (z / (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) :: t_1
    real(8) :: tmp
    t_1 = x + ((y - z) * ((t - x) / (a - z)))
    if ((t_1 <= (-2d-300)) .or. (.not. (t_1 <= 2d-260))) then
        tmp = t_1
    else
        tmp = t + ((x - t) / (z / (y - a)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - z) * ((t - x) / (a - z)));
	double tmp;
	if ((t_1 <= -2e-300) || !(t_1 <= 2e-260)) {
		tmp = t_1;
	} else {
		tmp = t + ((x - t) / (z / (y - a)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((y - z) * ((t - x) / (a - z)))
	tmp = 0
	if (t_1 <= -2e-300) or not (t_1 <= 2e-260):
		tmp = t_1
	else:
		tmp = t + ((x - t) / (z / (y - a)))
	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 <= -2e-300) || !(t_1 <= 2e-260))
		tmp = t_1;
	else
		tmp = Float64(t + Float64(Float64(x - t) / Float64(z / Float64(y - a))));
	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 <= -2e-300) || ~((t_1 <= 2e-260)))
		tmp = t_1;
	else
		tmp = t + ((x - t) / (z / (y - a)));
	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, -2e-300], N[Not[LessEqual[t$95$1, 2e-260]], $MachinePrecision]], t$95$1, N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / N[(y - a), $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 -2 \cdot 10^{-300} \lor \neg \left(t\_1 \leq 2 \cdot 10^{-260}\right):\\
\;\;\;\;t\_1\\

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


\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)))) < -2.00000000000000005e-300 or 1.99999999999999992e-260 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 89.0%

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

    if -2.00000000000000005e-300 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 1.99999999999999992e-260

    1. Initial program 6.4%

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

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

        \[\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--83.4%

        \[\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-sub83.4%

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

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

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

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

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

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

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

Alternative 4: 48.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\ t_2 := t - t \cdot \frac{y}{z}\\ t_3 := y \cdot \frac{t - x}{a}\\ \mathbf{if}\;z \leq -2.45 \cdot 10^{-61}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -4.6 \cdot 10^{-163}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -3.1 \cdot 10^{-261}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;z \leq 9.8 \cdot 10^{-244}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{-203}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-114}:\\ \;\;\;\;t\_1\\ \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 (* t (/ y z))))
        (t_3 (* y (/ (- t x) a))))
   (if (<= z -2.45e-61)
     t_2
     (if (<= z -4.6e-163)
       t_1
       (if (<= z -3.1e-261)
         t_3
         (if (<= z 9.8e-244)
           t_1
           (if (<= z 1.12e-203) t_3 (if (<= z 2.9e-114) t_1 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 - (t * (y / z));
	double t_3 = y * ((t - x) / a);
	double tmp;
	if (z <= -2.45e-61) {
		tmp = t_2;
	} else if (z <= -4.6e-163) {
		tmp = t_1;
	} else if (z <= -3.1e-261) {
		tmp = t_3;
	} else if (z <= 9.8e-244) {
		tmp = t_1;
	} else if (z <= 1.12e-203) {
		tmp = t_3;
	} else if (z <= 2.9e-114) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = x * (1.0d0 - (y / a))
    t_2 = t - (t * (y / z))
    t_3 = y * ((t - x) / a)
    if (z <= (-2.45d-61)) then
        tmp = t_2
    else if (z <= (-4.6d-163)) then
        tmp = t_1
    else if (z <= (-3.1d-261)) then
        tmp = t_3
    else if (z <= 9.8d-244) then
        tmp = t_1
    else if (z <= 1.12d-203) then
        tmp = t_3
    else if (z <= 2.9d-114) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double t_2 = t - (t * (y / z));
	double t_3 = y * ((t - x) / a);
	double tmp;
	if (z <= -2.45e-61) {
		tmp = t_2;
	} else if (z <= -4.6e-163) {
		tmp = t_1;
	} else if (z <= -3.1e-261) {
		tmp = t_3;
	} else if (z <= 9.8e-244) {
		tmp = t_1;
	} else if (z <= 1.12e-203) {
		tmp = t_3;
	} else if (z <= 2.9e-114) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (y / a))
	t_2 = t - (t * (y / z))
	t_3 = y * ((t - x) / a)
	tmp = 0
	if z <= -2.45e-61:
		tmp = t_2
	elif z <= -4.6e-163:
		tmp = t_1
	elif z <= -3.1e-261:
		tmp = t_3
	elif z <= 9.8e-244:
		tmp = t_1
	elif z <= 1.12e-203:
		tmp = t_3
	elif z <= 2.9e-114:
		tmp = t_1
	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(t - Float64(t * Float64(y / z)))
	t_3 = Float64(y * Float64(Float64(t - x) / a))
	tmp = 0.0
	if (z <= -2.45e-61)
		tmp = t_2;
	elseif (z <= -4.6e-163)
		tmp = t_1;
	elseif (z <= -3.1e-261)
		tmp = t_3;
	elseif (z <= 9.8e-244)
		tmp = t_1;
	elseif (z <= 1.12e-203)
		tmp = t_3;
	elseif (z <= 2.9e-114)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (y / a));
	t_2 = t - (t * (y / z));
	t_3 = y * ((t - x) / a);
	tmp = 0.0;
	if (z <= -2.45e-61)
		tmp = t_2;
	elseif (z <= -4.6e-163)
		tmp = t_1;
	elseif (z <= -3.1e-261)
		tmp = t_3;
	elseif (z <= 9.8e-244)
		tmp = t_1;
	elseif (z <= 1.12e-203)
		tmp = t_3;
	elseif (z <= 2.9e-114)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.45e-61], t$95$2, If[LessEqual[z, -4.6e-163], t$95$1, If[LessEqual[z, -3.1e-261], t$95$3, If[LessEqual[z, 9.8e-244], t$95$1, If[LessEqual[z, 1.12e-203], t$95$3, If[LessEqual[z, 2.9e-114], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -4.6 \cdot 10^{-163}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -3.1 \cdot 10^{-261}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;z \leq 9.8 \cdot 10^{-244}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.12 \cdot 10^{-203}:\\
\;\;\;\;t\_3\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.45000000000000001e-61 or 2.89999999999999997e-114 < z

    1. Initial program 69.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \color{blue}{t \cdot \frac{y}{z}} \]
    9. Simplified52.2%

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

    if -2.45000000000000001e-61 < z < -4.5999999999999999e-163 or -3.0999999999999998e-261 < z < 9.80000000000000029e-244 or 1.12e-203 < z < 2.89999999999999997e-114

    1. Initial program 91.0%

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

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

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

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

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

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

    if -4.5999999999999999e-163 < z < -3.0999999999999998e-261 or 9.80000000000000029e-244 < z < 1.12e-203

    1. Initial program 89.4%

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a}} \]
    6. Simplified70.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.45 \cdot 10^{-61}:\\ \;\;\;\;t - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -4.6 \cdot 10^{-163}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -3.1 \cdot 10^{-261}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 9.8 \cdot 10^{-244}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{-203}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-114}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t - t \cdot \frac{y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 51.2% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\ t_2 := y \cdot \frac{t - x}{a}\\ \mathbf{if}\;z \leq -1.32 \cdot 10^{-61}:\\ \;\;\;\;t - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -3.6 \cdot 10^{-165}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{-262}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-244}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{-202}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-114}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t + y \cdot \frac{x}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y a)))) (t_2 (* y (/ (- t x) a))))
   (if (<= z -1.32e-61)
     (- t (* t (/ y z)))
     (if (<= z -3.6e-165)
       t_1
       (if (<= z -1.2e-262)
         t_2
         (if (<= z 1.1e-244)
           t_1
           (if (<= z 5.4e-202)
             t_2
             (if (<= z 2.9e-114) t_1 (+ t (* y (/ x z)))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double t_2 = y * ((t - x) / a);
	double tmp;
	if (z <= -1.32e-61) {
		tmp = t - (t * (y / z));
	} else if (z <= -3.6e-165) {
		tmp = t_1;
	} else if (z <= -1.2e-262) {
		tmp = t_2;
	} else if (z <= 1.1e-244) {
		tmp = t_1;
	} else if (z <= 5.4e-202) {
		tmp = t_2;
	} else if (z <= 2.9e-114) {
		tmp = t_1;
	} else {
		tmp = t + (y * (x / z));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x * (1.0d0 - (y / a))
    t_2 = y * ((t - x) / a)
    if (z <= (-1.32d-61)) then
        tmp = t - (t * (y / z))
    else if (z <= (-3.6d-165)) then
        tmp = t_1
    else if (z <= (-1.2d-262)) then
        tmp = t_2
    else if (z <= 1.1d-244) then
        tmp = t_1
    else if (z <= 5.4d-202) then
        tmp = t_2
    else if (z <= 2.9d-114) then
        tmp = t_1
    else
        tmp = t + (y * (x / z))
    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 = y * ((t - x) / a);
	double tmp;
	if (z <= -1.32e-61) {
		tmp = t - (t * (y / z));
	} else if (z <= -3.6e-165) {
		tmp = t_1;
	} else if (z <= -1.2e-262) {
		tmp = t_2;
	} else if (z <= 1.1e-244) {
		tmp = t_1;
	} else if (z <= 5.4e-202) {
		tmp = t_2;
	} else if (z <= 2.9e-114) {
		tmp = t_1;
	} else {
		tmp = t + (y * (x / z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (y / a))
	t_2 = y * ((t - x) / a)
	tmp = 0
	if z <= -1.32e-61:
		tmp = t - (t * (y / z))
	elif z <= -3.6e-165:
		tmp = t_1
	elif z <= -1.2e-262:
		tmp = t_2
	elif z <= 1.1e-244:
		tmp = t_1
	elif z <= 5.4e-202:
		tmp = t_2
	elif z <= 2.9e-114:
		tmp = t_1
	else:
		tmp = t + (y * (x / z))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(y / a)))
	t_2 = Float64(y * Float64(Float64(t - x) / a))
	tmp = 0.0
	if (z <= -1.32e-61)
		tmp = Float64(t - Float64(t * Float64(y / z)));
	elseif (z <= -3.6e-165)
		tmp = t_1;
	elseif (z <= -1.2e-262)
		tmp = t_2;
	elseif (z <= 1.1e-244)
		tmp = t_1;
	elseif (z <= 5.4e-202)
		tmp = t_2;
	elseif (z <= 2.9e-114)
		tmp = t_1;
	else
		tmp = Float64(t + Float64(y * Float64(x / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (y / a));
	t_2 = y * ((t - x) / a);
	tmp = 0.0;
	if (z <= -1.32e-61)
		tmp = t - (t * (y / z));
	elseif (z <= -3.6e-165)
		tmp = t_1;
	elseif (z <= -1.2e-262)
		tmp = t_2;
	elseif (z <= 1.1e-244)
		tmp = t_1;
	elseif (z <= 5.4e-202)
		tmp = t_2;
	elseif (z <= 2.9e-114)
		tmp = t_1;
	else
		tmp = t + (y * (x / z));
	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[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.32e-61], N[(t - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.6e-165], t$95$1, If[LessEqual[z, -1.2e-262], t$95$2, If[LessEqual[z, 1.1e-244], t$95$1, If[LessEqual[z, 5.4e-202], t$95$2, If[LessEqual[z, 2.9e-114], t$95$1, N[(t + N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -3.6 \cdot 10^{-165}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -1.2 \cdot 10^{-262}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq 1.1 \cdot 10^{-244}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 5.4 \cdot 10^{-202}:\\
\;\;\;\;t\_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.32000000000000002e-61

    1. Initial program 74.1%

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

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

        \[\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--63.6%

        \[\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-sub63.6%

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

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

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

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

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

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

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

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

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

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

    if -1.32000000000000002e-61 < z < -3.59999999999999984e-165 or -1.2e-262 < z < 1.09999999999999992e-244 or 5.3999999999999997e-202 < z < 2.89999999999999997e-114

    1. Initial program 91.0%

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

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

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

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

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

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

    if -3.59999999999999984e-165 < z < -1.2e-262 or 1.09999999999999992e-244 < z < 5.3999999999999997e-202

    1. Initial program 89.4%

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a}} \]
    6. Simplified70.3%

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

    if 2.89999999999999997e-114 < z

    1. Initial program 65.6%

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

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

        \[\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--69.6%

        \[\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-sub69.7%

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

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

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

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

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

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

      \[\leadsto t - \frac{t - x}{\color{blue}{\frac{z}{y}}} \]
    7. Taylor expanded in t around 0 55.3%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.32 \cdot 10^{-61}:\\ \;\;\;\;t - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -3.6 \cdot 10^{-165}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{-262}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-244}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{-202}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-114}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t + y \cdot \frac{x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 38.3% accurate, 0.4× speedup?

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.05e62 or 5.6e9 < a

    1. Initial program 86.1%

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

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

    if -1.05e62 < a < -3.50000000000000015e-265 or 1.14999999999999992e-242 < a < 1.22e-44

    1. Initial program 70.1%

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

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

    if -3.50000000000000015e-265 < a < 1.14999999999999992e-242

    1. Initial program 75.0%

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

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

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

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

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

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

    if 1.22e-44 < a < 5.6e9

    1. Initial program 93.1%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.05 \cdot 10^{+62}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -3.5 \cdot 10^{-265}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{-242}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 1.22 \cdot 10^{-44}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 5600000000:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 38.3% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -1.25 \cdot 10^{-263}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 1.85 \cdot 10^{-46}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 5600000000:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -9.2e66 or 5.6e9 < a

    1. Initial program 86.1%

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

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

    if -9.2e66 < a < -1.25000000000000002e-263 or 6.70000000000000009e-243 < a < 1.84999999999999992e-46

    1. Initial program 70.1%

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

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

    if -1.25000000000000002e-263 < a < 6.70000000000000009e-243

    1. Initial program 75.0%

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

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

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

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

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

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

    if 1.84999999999999992e-46 < a < 5.6e9

    1. Initial program 93.1%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.2 \cdot 10^{+66}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.25 \cdot 10^{-263}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 6.7 \cdot 10^{-243}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 1.85 \cdot 10^{-46}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 5600000000:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 38.4% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -4.7 \cdot 10^{-265}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 2.2 \cdot 10^{-41}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 4500000000:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -7.20000000000000021e61 or 4.5e9 < a

    1. Initial program 86.1%

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

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

    if -7.20000000000000021e61 < a < -4.69999999999999986e-265 or 2.49999999999999989e-247 < a < 2.2e-41

    1. Initial program 70.1%

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

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

    if -4.69999999999999986e-265 < a < 2.49999999999999989e-247

    1. Initial program 75.0%

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

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

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

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

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

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

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

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

    if 2.2e-41 < a < 4.5e9

    1. Initial program 93.1%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.2 \cdot 10^{+61}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -4.7 \cdot 10^{-265}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{-247}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 2.2 \cdot 10^{-41}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 4500000000:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 37.7% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -1.46 \cdot 10^{-279}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 1.75 \cdot 10^{-45}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 5500000000:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.1000000000000001e67 or 5.5e9 < a

    1. Initial program 86.1%

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

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

    if -2.1000000000000001e67 < a < -1.46000000000000005e-279 or 9.3999999999999996e-247 < a < 1.75e-45

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

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

    if -1.46000000000000005e-279 < a < 9.3999999999999996e-247

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-t}{\frac{z}{y}}} \]
    11. Simplified58.1%

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

    if 1.75e-45 < a < 5.5e9

    1. Initial program 93.1%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.1 \cdot 10^{+67}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.46 \cdot 10^{-279}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 9.4 \cdot 10^{-247}:\\ \;\;\;\;\frac{-t}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 1.75 \cdot 10^{-45}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 5500000000:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 39.6% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;y \leq -4.4 \cdot 10^{+168}:\\ \;\;\;\;y \cdot \frac{t}{a - z}\\ \mathbf{elif}\;y \leq -1.6 \cdot 10^{-39}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 8 \cdot 10^{-309}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{+82}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y a)))))
   (if (<= y -4.4e+168)
     (* y (/ t (- a z)))
     (if (<= y -1.6e-39)
       t_1
       (if (<= y 8e-309) t (if (<= y 3.5e+82) t_1 (* y (/ (- t x) a))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double tmp;
	if (y <= -4.4e+168) {
		tmp = y * (t / (a - z));
	} else if (y <= -1.6e-39) {
		tmp = t_1;
	} else if (y <= 8e-309) {
		tmp = t;
	} else if (y <= 3.5e+82) {
		tmp = t_1;
	} else {
		tmp = y * ((t - x) / a);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * (1.0d0 - (y / a))
    if (y <= (-4.4d+168)) then
        tmp = y * (t / (a - z))
    else if (y <= (-1.6d-39)) then
        tmp = t_1
    else if (y <= 8d-309) then
        tmp = t
    else if (y <= 3.5d+82) then
        tmp = t_1
    else
        tmp = y * ((t - x) / a)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double tmp;
	if (y <= -4.4e+168) {
		tmp = y * (t / (a - z));
	} else if (y <= -1.6e-39) {
		tmp = t_1;
	} else if (y <= 8e-309) {
		tmp = t;
	} else if (y <= 3.5e+82) {
		tmp = t_1;
	} else {
		tmp = y * ((t - x) / a);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (y / a))
	tmp = 0
	if y <= -4.4e+168:
		tmp = y * (t / (a - z))
	elif y <= -1.6e-39:
		tmp = t_1
	elif y <= 8e-309:
		tmp = t
	elif y <= 3.5e+82:
		tmp = t_1
	else:
		tmp = y * ((t - x) / a)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (y <= -4.4e+168)
		tmp = Float64(y * Float64(t / Float64(a - z)));
	elseif (y <= -1.6e-39)
		tmp = t_1;
	elseif (y <= 8e-309)
		tmp = t;
	elseif (y <= 3.5e+82)
		tmp = t_1;
	else
		tmp = Float64(y * Float64(Float64(t - x) / a));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (y / a));
	tmp = 0.0;
	if (y <= -4.4e+168)
		tmp = y * (t / (a - z));
	elseif (y <= -1.6e-39)
		tmp = t_1;
	elseif (y <= 8e-309)
		tmp = t;
	elseif (y <= 3.5e+82)
		tmp = t_1;
	else
		tmp = y * ((t - x) / a);
	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[y, -4.4e+168], N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.6e-39], t$95$1, If[LessEqual[y, 8e-309], t, If[LessEqual[y, 3.5e+82], t$95$1, N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -1.6 \cdot 10^{-39}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 8 \cdot 10^{-309}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq 3.5 \cdot 10^{+82}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -4.4000000000000004e168

    1. Initial program 87.7%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t}{\frac{a - z}{y}}} \]
    9. Step-by-step derivation
      1. associate-/r/49.5%

        \[\leadsto \color{blue}{\frac{t}{a - z} \cdot y} \]
    10. Applied egg-rr49.5%

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

    if -4.4000000000000004e168 < y < -1.5999999999999999e-39 or 8.0000000000000003e-309 < y < 3.5e82

    1. Initial program 75.6%

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

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

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

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

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

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

    if -1.5999999999999999e-39 < y < 8.0000000000000003e-309

    1. Initial program 62.5%

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

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

    if 3.5e82 < y

    1. Initial program 95.9%

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a}} \]
    6. Simplified61.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.4 \cdot 10^{+168}:\\ \;\;\;\;y \cdot \frac{t}{a - z}\\ \mathbf{elif}\;y \leq -1.6 \cdot 10^{-39}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;y \leq 8 \cdot 10^{-309}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{+82}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 56.6% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.2e59 or 6.7999999999999997e63 < x

    1. Initial program 70.2%

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

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

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

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

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

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

    if -2.2e59 < x < -5.9000000000000004e-78

    1. Initial program 88.1%

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

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

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

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

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

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

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

    if -5.9000000000000004e-78 < x < 6.7999999999999997e63

    1. Initial program 82.4%

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

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

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

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

        \[\leadsto {\left(\sqrt[3]{\color{blue}{\mathsf{fma}\left(y - z, \frac{t - x}{a - z}, x\right)}}\right)}^{3} \]
    4. Applied egg-rr81.1%

      \[\leadsto \color{blue}{{\left(\sqrt[3]{\mathsf{fma}\left(y - z, \frac{t - x}{a - z}, x\right)}\right)}^{3}} \]
    5. Taylor expanded in x around 0 65.5%

      \[\leadsto \color{blue}{{1}^{0.3333333333333333} \cdot \frac{t \cdot \left(y - z\right)}{a - z}} \]
    6. Step-by-step derivation
      1. pow-base-165.5%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.2 \cdot 10^{+59}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;x \leq -5.9 \cdot 10^{-78}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;x \leq 6.8 \cdot 10^{+63}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 63.7% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.6e151

    1. Initial program 61.8%

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

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

        \[\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--59.2%

        \[\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-sub59.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.6e151 < z < -4.09999999999999999e-61

    1. Initial program 83.4%

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

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

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

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

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

      \[\leadsto \color{blue}{{\left(\sqrt[3]{\mathsf{fma}\left(y - z, \frac{t - x}{a - z}, x\right)}\right)}^{3}} \]
    5. Taylor expanded in x around 0 54.3%

      \[\leadsto \color{blue}{{1}^{0.3333333333333333} \cdot \frac{t \cdot \left(y - z\right)}{a - z}} \]
    6. Step-by-step derivation
      1. pow-base-154.3%

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

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

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

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

    if -4.09999999999999999e-61 < z < 9.1999999999999994e-99

    1. Initial program 90.7%

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

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

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

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

    if 9.1999999999999994e-99 < z

    1. Initial program 63.9%

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

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

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

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

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

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

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

      \[\leadsto t - \frac{t - x}{\color{blue}{\frac{z}{y}}} \]
    7. Taylor expanded in t around 0 57.9%

      \[\leadsto t - \color{blue}{-1 \cdot \frac{x \cdot y}{z}} \]
    8. Step-by-step derivation
      1. mul-1-neg57.9%

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

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

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

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

        \[\leadsto t - y \cdot \color{blue}{\frac{-x}{z}} \]
    9. Simplified59.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.6 \cdot 10^{+151}:\\ \;\;\;\;t + \frac{a}{\frac{z}{t - x}}\\ \mathbf{elif}\;z \leq -4.1 \cdot 10^{-61}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{-99}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;t + y \cdot \frac{x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 36.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;y \leq -5.5 \cdot 10^{-39}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 2 \cdot 10^{-308}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 9.8 \cdot 10^{+250}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y a)))))
   (if (<= y -5.5e-39)
     t_1
     (if (<= y 2e-308) t (if (<= y 9.8e+250) t_1 (* t (/ y a)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double tmp;
	if (y <= -5.5e-39) {
		tmp = t_1;
	} else if (y <= 2e-308) {
		tmp = t;
	} else if (y <= 9.8e+250) {
		tmp = t_1;
	} else {
		tmp = t * (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) :: t_1
    real(8) :: tmp
    t_1 = x * (1.0d0 - (y / a))
    if (y <= (-5.5d-39)) then
        tmp = t_1
    else if (y <= 2d-308) then
        tmp = t
    else if (y <= 9.8d+250) then
        tmp = t_1
    else
        tmp = t * (y / a)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double tmp;
	if (y <= -5.5e-39) {
		tmp = t_1;
	} else if (y <= 2e-308) {
		tmp = t;
	} else if (y <= 9.8e+250) {
		tmp = t_1;
	} else {
		tmp = t * (y / a);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (y / a))
	tmp = 0
	if y <= -5.5e-39:
		tmp = t_1
	elif y <= 2e-308:
		tmp = t
	elif y <= 9.8e+250:
		tmp = t_1
	else:
		tmp = t * (y / a)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (y <= -5.5e-39)
		tmp = t_1;
	elseif (y <= 2e-308)
		tmp = t;
	elseif (y <= 9.8e+250)
		tmp = t_1;
	else
		tmp = Float64(t * Float64(y / a));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (y / a));
	tmp = 0.0;
	if (y <= -5.5e-39)
		tmp = t_1;
	elseif (y <= 2e-308)
		tmp = t;
	elseif (y <= 9.8e+250)
		tmp = t_1;
	else
		tmp = t * (y / a);
	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[y, -5.5e-39], t$95$1, If[LessEqual[y, 2e-308], t, If[LessEqual[y, 9.8e+250], t$95$1, N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 2 \cdot 10^{-308}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq 9.8 \cdot 10^{+250}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -5.50000000000000018e-39 or 1.9999999999999998e-308 < y < 9.79999999999999986e250

    1. Initial program 81.0%

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

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

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

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

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

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

    if -5.50000000000000018e-39 < y < 1.9999999999999998e-308

    1. Initial program 62.5%

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

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

    if 9.79999999999999986e250 < y

    1. Initial program 99.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.5 \cdot 10^{-39}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;y \leq 2 \cdot 10^{-308}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 9.8 \cdot 10^{+250}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 38.5% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;y \leq -2.6 \cdot 10^{-39}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -8.2 \cdot 10^{-307}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 2.9 \cdot 10^{+87}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y a)))))
   (if (<= y -2.6e-39)
     t_1
     (if (<= y -8.2e-307) t (if (<= y 2.9e+87) t_1 (* y (/ (- t x) a)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double tmp;
	if (y <= -2.6e-39) {
		tmp = t_1;
	} else if (y <= -8.2e-307) {
		tmp = t;
	} else if (y <= 2.9e+87) {
		tmp = t_1;
	} else {
		tmp = y * ((t - x) / a);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * (1.0d0 - (y / a))
    if (y <= (-2.6d-39)) then
        tmp = t_1
    else if (y <= (-8.2d-307)) then
        tmp = t
    else if (y <= 2.9d+87) then
        tmp = t_1
    else
        tmp = y * ((t - x) / a)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double tmp;
	if (y <= -2.6e-39) {
		tmp = t_1;
	} else if (y <= -8.2e-307) {
		tmp = t;
	} else if (y <= 2.9e+87) {
		tmp = t_1;
	} else {
		tmp = y * ((t - x) / a);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (y / a))
	tmp = 0
	if y <= -2.6e-39:
		tmp = t_1
	elif y <= -8.2e-307:
		tmp = t
	elif y <= 2.9e+87:
		tmp = t_1
	else:
		tmp = y * ((t - x) / a)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (y <= -2.6e-39)
		tmp = t_1;
	elseif (y <= -8.2e-307)
		tmp = t;
	elseif (y <= 2.9e+87)
		tmp = t_1;
	else
		tmp = Float64(y * Float64(Float64(t - x) / a));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (y / a));
	tmp = 0.0;
	if (y <= -2.6e-39)
		tmp = t_1;
	elseif (y <= -8.2e-307)
		tmp = t;
	elseif (y <= 2.9e+87)
		tmp = t_1;
	else
		tmp = y * ((t - x) / a);
	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[y, -2.6e-39], t$95$1, If[LessEqual[y, -8.2e-307], t, If[LessEqual[y, 2.9e+87], t$95$1, N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -8.2 \cdot 10^{-307}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq 2.9 \cdot 10^{+87}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.6e-39 or -8.20000000000000064e-307 < y < 2.8999999999999998e87

    1. Initial program 78.0%

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

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

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

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

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

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

    if -2.6e-39 < y < -8.20000000000000064e-307

    1. Initial program 62.5%

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

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

    if 2.8999999999999998e87 < y

    1. Initial program 95.9%

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a}} \]
    6. Simplified61.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.6 \cdot 10^{-39}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;y \leq -8.2 \cdot 10^{-307}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 2.9 \cdot 10^{+87}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 72.0% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.8000000000000003e-65 or 8.0000000000000002e-99 < z

    1. Initial program 68.7%

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

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

        \[\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--68.4%

        \[\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-sub68.5%

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

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

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

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

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

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

    if -4.8000000000000003e-65 < z < 8.0000000000000002e-99

    1. Initial program 90.7%

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

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

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

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

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

Alternative 16: 38.4% accurate, 0.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.14999999999999999e62 or 4.4e9 < a

    1. Initial program 86.1%

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

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

    if -3.14999999999999999e62 < a < 3.5e-45

    1. Initial program 70.7%

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

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

    if 3.5e-45 < a < 4.4e9

    1. Initial program 93.1%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.15 \cdot 10^{+62}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{-45}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 4400000000:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 57.1% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.5 \cdot 10^{+60} \lor \neg \left(x \leq 6.3 \cdot 10^{+66}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -5.5000000000000001e60 or 6.2999999999999998e66 < x

    1. Initial program 70.0%

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

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

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

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

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

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

    if -5.5000000000000001e60 < x < 6.2999999999999998e66

    1. Initial program 83.5%

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

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

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

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

        \[\leadsto {\left(\sqrt[3]{\color{blue}{\mathsf{fma}\left(y - z, \frac{t - x}{a - z}, x\right)}}\right)}^{3} \]
    4. Applied egg-rr82.3%

      \[\leadsto \color{blue}{{\left(\sqrt[3]{\mathsf{fma}\left(y - z, \frac{t - x}{a - z}, x\right)}\right)}^{3}} \]
    5. Taylor expanded in x around 0 61.3%

      \[\leadsto \color{blue}{{1}^{0.3333333333333333} \cdot \frac{t \cdot \left(y - z\right)}{a - z}} \]
    6. Step-by-step derivation
      1. pow-base-161.3%

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

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

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

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

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

Alternative 18: 67.6% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{-63} \lor \neg \left(z \leq 3.45 \cdot 10^{-99}\right):\\
\;\;\;\;t + y \cdot \frac{x - t}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.3000000000000001e-63 or 3.4500000000000002e-99 < z

    1. Initial program 68.7%

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

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

        \[\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--68.4%

        \[\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-sub68.5%

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

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

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

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

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

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

      \[\leadsto t - \frac{t - x}{\color{blue}{\frac{z}{y}}} \]
    7. Step-by-step derivation
      1. associate-/r/67.5%

        \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot y} \]
    8. Applied egg-rr67.5%

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

    if -1.3000000000000001e-63 < z < 3.4500000000000002e-99

    1. Initial program 90.7%

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

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

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

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

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

Alternative 19: 68.0% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.0000000000000001e-61

    1. Initial program 74.1%

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

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

        \[\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--63.6%

        \[\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-sub63.6%

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

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

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

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

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

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

      \[\leadsto t - \frac{t - x}{\color{blue}{\frac{z}{y}}} \]
    7. Step-by-step derivation
      1. associate-/r/67.5%

        \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot y} \]
    8. Applied egg-rr67.5%

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

    if -2.0000000000000001e-61 < z < 2.74999999999999995e-99

    1. Initial program 90.7%

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

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

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

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

    if 2.74999999999999995e-99 < z

    1. Initial program 63.9%

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

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

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

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

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

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

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

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

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

Alternative 20: 38.0% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq 6.4 \cdot 10^{+155}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.10000000000000001e64 or 6.40000000000000024e155 < a

    1. Initial program 87.1%

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

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

    if -1.10000000000000001e64 < a < 6.40000000000000024e155

    1. Initial program 73.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.1 \cdot 10^{+64}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 6.4 \cdot 10^{+155}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 25.5% 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 77.7%

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

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

    \[\leadsto t \]
  5. Add Preprocessing

Reproduce

?
herbie shell --seed 2024040 
(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)))))