Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 80.4% → 89.9%
Time: 23.1s
Alternatives: 20
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 20 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 80.4% accurate, 1.0× speedup?

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

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

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

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


\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)))) < -9.9999999999999996e-226 or 5.0000000000000002e-154 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 95.0%

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

    if -9.9999999999999996e-226 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 5.0000000000000002e-154

    1. Initial program 6.1%

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 42.2% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{z}{z - a}\\ \mathbf{if}\;z \leq -1.25 \cdot 10^{+134}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{+16}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq -8 \cdot 10^{-82}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{-148}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{-284}:\\ \;\;\;\;\frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-252}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 8.6 \cdot 10^{-47}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ z (- z a)))))
   (if (<= z -1.25e+134)
     t_1
     (if (<= z -1.8e+16)
       (* t (/ y (- a z)))
       (if (<= z -8e-82)
         (/ (* x y) z)
         (if (<= z -7.5e-148)
           x
           (if (<= z 3.3e-284)
             (/ y (/ a (- t x)))
             (if (<= z 6.8e-252)
               x
               (if (<= z 8.6e-47) (* y (/ (- t x) a)) t_1)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (z / (z - a));
	double tmp;
	if (z <= -1.25e+134) {
		tmp = t_1;
	} else if (z <= -1.8e+16) {
		tmp = t * (y / (a - z));
	} else if (z <= -8e-82) {
		tmp = (x * y) / z;
	} else if (z <= -7.5e-148) {
		tmp = x;
	} else if (z <= 3.3e-284) {
		tmp = y / (a / (t - x));
	} else if (z <= 6.8e-252) {
		tmp = x;
	} else if (z <= 8.6e-47) {
		tmp = y * ((t - x) / a);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t * (z / (z - a))
    if (z <= (-1.25d+134)) then
        tmp = t_1
    else if (z <= (-1.8d+16)) then
        tmp = t * (y / (a - z))
    else if (z <= (-8d-82)) then
        tmp = (x * y) / z
    else if (z <= (-7.5d-148)) then
        tmp = x
    else if (z <= 3.3d-284) then
        tmp = y / (a / (t - x))
    else if (z <= 6.8d-252) then
        tmp = x
    else if (z <= 8.6d-47) then
        tmp = y * ((t - x) / a)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (z / (z - a));
	double tmp;
	if (z <= -1.25e+134) {
		tmp = t_1;
	} else if (z <= -1.8e+16) {
		tmp = t * (y / (a - z));
	} else if (z <= -8e-82) {
		tmp = (x * y) / z;
	} else if (z <= -7.5e-148) {
		tmp = x;
	} else if (z <= 3.3e-284) {
		tmp = y / (a / (t - x));
	} else if (z <= 6.8e-252) {
		tmp = x;
	} else if (z <= 8.6e-47) {
		tmp = y * ((t - x) / a);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (z / (z - a))
	tmp = 0
	if z <= -1.25e+134:
		tmp = t_1
	elif z <= -1.8e+16:
		tmp = t * (y / (a - z))
	elif z <= -8e-82:
		tmp = (x * y) / z
	elif z <= -7.5e-148:
		tmp = x
	elif z <= 3.3e-284:
		tmp = y / (a / (t - x))
	elif z <= 6.8e-252:
		tmp = x
	elif z <= 8.6e-47:
		tmp = y * ((t - x) / a)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(z / Float64(z - a)))
	tmp = 0.0
	if (z <= -1.25e+134)
		tmp = t_1;
	elseif (z <= -1.8e+16)
		tmp = Float64(t * Float64(y / Float64(a - z)));
	elseif (z <= -8e-82)
		tmp = Float64(Float64(x * y) / z);
	elseif (z <= -7.5e-148)
		tmp = x;
	elseif (z <= 3.3e-284)
		tmp = Float64(y / Float64(a / Float64(t - x)));
	elseif (z <= 6.8e-252)
		tmp = x;
	elseif (z <= 8.6e-47)
		tmp = Float64(y * Float64(Float64(t - x) / a));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (z / (z - a));
	tmp = 0.0;
	if (z <= -1.25e+134)
		tmp = t_1;
	elseif (z <= -1.8e+16)
		tmp = t * (y / (a - z));
	elseif (z <= -8e-82)
		tmp = (x * y) / z;
	elseif (z <= -7.5e-148)
		tmp = x;
	elseif (z <= 3.3e-284)
		tmp = y / (a / (t - x));
	elseif (z <= 6.8e-252)
		tmp = x;
	elseif (z <= 8.6e-47)
		tmp = y * ((t - x) / a);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.25e+134], t$95$1, If[LessEqual[z, -1.8e+16], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -8e-82], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -7.5e-148], x, If[LessEqual[z, 3.3e-284], N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.8e-252], x, If[LessEqual[z, 8.6e-47], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;z \leq -7.5 \cdot 10^{-148}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 6.8 \cdot 10^{-252}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -1.24999999999999995e134 or 8.5999999999999995e-47 < z

    1. Initial program 69.3%

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

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

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

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

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

        \[\leadsto t \cdot \color{blue}{\left(-\frac{z}{a - z}\right)} \]
      2. distribute-neg-frac254.6%

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

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

    if -1.24999999999999995e134 < z < -1.8e16

    1. Initial program 85.9%

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

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

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

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

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

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

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

    if -1.8e16 < z < -8e-82

    1. Initial program 94.3%

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

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

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

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

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

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

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

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

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

    if -8e-82 < z < -7.5000000000000005e-148 or 3.30000000000000008e-284 < z < 6.7999999999999999e-252

    1. Initial program 90.3%

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

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

    if -7.5000000000000005e-148 < z < 3.30000000000000008e-284

    1. Initial program 97.3%

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

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

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

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

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

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

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

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

    if 6.7999999999999999e-252 < z < 8.5999999999999995e-47

    1. Initial program 91.2%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.25 \cdot 10^{+134}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{+16}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq -8 \cdot 10^{-82}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{-148}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{-284}:\\ \;\;\;\;\frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-252}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 8.6 \cdot 10^{-47}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 46.2% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;a \leq -0.0024:\\
\;\;\;\;x\\

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

\mathbf{elif}\;a \leq 8.5 \cdot 10^{+214}:\\
\;\;\;\;\frac{y}{\frac{a}{t - x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.50000000000000012e107 or -5.0999999999999998e39 < a < -0.00239999999999999979 or 8.50000000000000045e214 < a

    1. Initial program 95.6%

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

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

    if -1.50000000000000012e107 < a < -5.0999999999999998e39

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

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

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

    if -0.00239999999999999979 < a < 1.69999999999999987e-7

    1. Initial program 73.6%

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

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

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

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

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

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

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

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

    if 1.69999999999999987e-7 < a < 8.50000000000000045e214

    1. Initial program 80.3%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.5 \cdot 10^{+107}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -5.1 \cdot 10^{+39}:\\ \;\;\;\;x \cdot \frac{y}{z - a}\\ \mathbf{elif}\;a \leq -0.0024:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{-7}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;a \leq 8.5 \cdot 10^{+214}:\\ \;\;\;\;\frac{y}{\frac{a}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 46.2% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;a \leq -2.9 \cdot 10^{-5}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;a \leq 3.05 \cdot 10^{+214}:\\
\;\;\;\;\frac{y}{\frac{a}{t - x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.9499999999999999e107 or -5.1999999999999998e38 < a < -2.9e-5 or 3.05000000000000018e214 < a

    1. Initial program 95.6%

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

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

    if -1.9499999999999999e107 < a < -5.1999999999999998e38

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y}{\frac{\color{blue}{-\left(a - z\right)}}{x}} \]
    10. Simplified39.7%

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

    if -2.9e-5 < a < 4.49999999999999993e-8

    1. Initial program 73.6%

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

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

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

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

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

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

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

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

    if 4.49999999999999993e-8 < a < 3.05000000000000018e214

    1. Initial program 80.3%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.95 \cdot 10^{+107}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -5.2 \cdot 10^{+38}:\\ \;\;\;\;\frac{y}{\frac{z - a}{x}}\\ \mathbf{elif}\;a \leq -2.9 \cdot 10^{-5}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{-8}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;a \leq 3.05 \cdot 10^{+214}:\\ \;\;\;\;\frac{y}{\frac{a}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 58.1% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;x \leq -5 \cdot 10^{+27} \lor \neg \left(x \leq 7.4 \cdot 10^{+96}\right):\\
\;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a}\\

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


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

    1. Initial program 72.2%

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

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

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

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

    if -7.49999999999999989e182 < x < -2.7999999999999999e132

    1. Initial program 64.2%

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

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

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

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

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

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

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

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

    if -2.7999999999999999e132 < x < -4.99999999999999979e27 or 7.39999999999999982e96 < x

    1. Initial program 78.8%

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

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

    if -4.99999999999999979e27 < x < 7.39999999999999982e96

    1. Initial program 86.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -7.5 \cdot 10^{+182}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;x \leq -2.8 \cdot 10^{+132}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;x \leq -5 \cdot 10^{+27} \lor \neg \left(x \leq 7.4 \cdot 10^{+96}\right):\\ \;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 35.8% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq 2.4 \cdot 10^{-9}:\\
\;\;\;\;t\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -9.2e20 or 3.05000000000000018e214 < a

    1. Initial program 92.4%

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

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

    if -9.2e20 < a < 2.4e-9

    1. Initial program 74.3%

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

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

    if 2.4e-9 < a < 1.1500000000000001e93

    1. Initial program 81.1%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{a}} \]
    10. Step-by-step derivation
      1. mul-1-neg38.9%

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

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

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

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

    if 1.1500000000000001e93 < a < 3.05000000000000018e214

    1. Initial program 79.4%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.2 \cdot 10^{+20}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{-9}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{+93}:\\ \;\;\;\;x \cdot \frac{y}{-a}\\ \mathbf{elif}\;a \leq 3.05 \cdot 10^{+214}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 57.4% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;t \leq 1.1 \cdot 10^{-96}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.45e-101 or 1.0999999999999999e-96 < t

    1. Initial program 87.1%

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

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

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

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

    if -1.45e-101 < t < 1.80000000000000008e-209

    1. Initial program 65.2%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \left(-\frac{y}{a - z}\right)} \]
      4. distribute-neg-frac251.9%

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

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

    if 1.80000000000000008e-209 < t < 1.0999999999999999e-96

    1. Initial program 74.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.45 \cdot 10^{-101}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{-209}:\\ \;\;\;\;x \cdot \frac{y}{z - a}\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{-96}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 57.9% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;t \leq 1.02 \cdot 10^{-96}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.6e-96 or 1.02000000000000007e-96 < t

    1. Initial program 87.0%

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

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

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

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

    if -4.6e-96 < t < 8.4999999999999997e-210

    1. Initial program 65.8%

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

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

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

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

    if 8.4999999999999997e-210 < t < 1.02000000000000007e-96

    1. Initial program 74.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.6 \cdot 10^{-96}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{-210}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;t \leq 1.02 \cdot 10^{-96}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 61.1% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := x + \frac{y - z}{\frac{a}{t}}\\
\mathbf{if}\;a \leq -0.46:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -0.46000000000000002 or 3.89999999999999993e126 < a

    1. Initial program 90.0%

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

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

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

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

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

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

    if -0.46000000000000002 < a < 2.6000000000000001e-132

    1. Initial program 74.7%

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

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

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

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

    if 2.6000000000000001e-132 < a < 3.89999999999999993e126

    1. Initial program 77.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.46:\\ \;\;\;\;x + \frac{y - z}{\frac{a}{t}}\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{-132}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 3.9 \cdot 10^{+126}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - z}{\frac{a}{t}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 61.2% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.6499999999999999 or 9.49999999999999986e122 < a

    1. Initial program 90.0%

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

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

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

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

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

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

    if -1.6499999999999999 < a < 1.1000000000000001e-127

    1. Initial program 74.7%

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

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

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

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

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

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

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

    if 1.1000000000000001e-127 < a < 9.49999999999999986e122

    1. Initial program 77.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.65:\\ \;\;\;\;x + \frac{y - z}{\frac{a}{t}}\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{-127}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{+122}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - z}{\frac{a}{t}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 60.1% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := x + \frac{y - z}{\frac{a}{t}}\\
\mathbf{if}\;a \leq -0.062:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -0.062 or 8.5000000000000002e154 < a

    1. Initial program 90.6%

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

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

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

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

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

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

    if -0.062 < a < 2.74999999999999993e-126

    1. Initial program 74.7%

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

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

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

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

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

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

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

    if 2.74999999999999993e-126 < a < 8.5000000000000002e154

    1. Initial program 77.2%

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

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

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

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

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

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

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

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

Alternative 12: 37.8% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;a \leq 4.5 \cdot 10^{+214}:\\
\;\;\;\;y \cdot \frac{t - x}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.5e21 or 4.49999999999999968e214 < a

    1. Initial program 92.4%

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

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

    if -3.5e21 < a < 6.4999999999999998e-134

    1. Initial program 75.0%

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

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

    if 6.4999999999999998e-134 < a < 4.49999999999999968e214

    1. Initial program 77.9%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.5 \cdot 10^{+21}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{-134}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{+214}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 37.8% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq 4.5 \cdot 10^{-135}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 3.05 \cdot 10^{+214}:\\
\;\;\;\;\frac{y}{\frac{a}{t - x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.4499999999999999e22 or 3.05000000000000018e214 < a

    1. Initial program 92.4%

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

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

    if -2.4499999999999999e22 < a < 4.49999999999999987e-135

    1. Initial program 75.0%

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

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

    if 4.49999999999999987e-135 < a < 3.05000000000000018e214

    1. Initial program 77.9%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.45 \cdot 10^{+22}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{-135}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 3.05 \cdot 10^{+214}:\\ \;\;\;\;\frac{y}{\frac{a}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 46.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.0024:\\
\;\;\;\;x\\

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

\mathbf{elif}\;a \leq 7.2 \cdot 10^{+214}:\\
\;\;\;\;\frac{y}{\frac{a}{t - x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -0.00239999999999999979 or 7.2000000000000002e214 < a

    1. Initial program 92.6%

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

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

    if -0.00239999999999999979 < a < 1.15e-8

    1. Initial program 73.6%

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

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

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

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

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

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

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

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

    if 1.15e-8 < a < 7.2000000000000002e214

    1. Initial program 80.3%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.0024:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{-8}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;a \leq 7.2 \cdot 10^{+214}:\\ \;\;\;\;\frac{y}{\frac{a}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 37.6% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq 1.4 \cdot 10^{-7}:\\
\;\;\;\;t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -4.6e20 or 1.25e100 < a

    1. Initial program 89.3%

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

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

    if -4.6e20 < a < 1.4000000000000001e-7

    1. Initial program 74.3%

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

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

    if 1.4000000000000001e-7 < a < 1.25e100

    1. Initial program 81.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{x \cdot \frac{y}{a}} \]
      3. distribute-rgt-neg-in43.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.6 \cdot 10^{+20}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.4 \cdot 10^{-7}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{+100}:\\ \;\;\;\;x \cdot \frac{y}{-a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 67.5% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -0.14499999999999999 or 4.79999999999999973e-17 < a

    1. Initial program 87.2%

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

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

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

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

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

    if -0.14499999999999999 < a < 4.79999999999999973e-17

    1. Initial program 74.3%

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

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

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

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

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

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

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

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

Alternative 17: 75.4% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.45e-4 or 5.4000000000000002e-21 < a

    1. Initial program 87.3%

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

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

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

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

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

    if -1.45e-4 < a < 5.4000000000000002e-21

    1. Initial program 74.0%

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 36.4% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq 6 \cdot 10^{+75}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 3.05 \cdot 10^{+214}:\\
\;\;\;\;t \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -5.50000000000000004e23 or 3.05000000000000018e214 < a

    1. Initial program 92.4%

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

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

    if -5.50000000000000004e23 < a < 6e75

    1. Initial program 74.7%

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

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

    if 6e75 < a < 3.05000000000000018e214

    1. Initial program 83.4%

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    8. Simplified42.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.5 \cdot 10^{+23}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 6 \cdot 10^{+75}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 3.05 \cdot 10^{+214}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 38.6% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq 1.7 \cdot 10^{+102}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.6e19 or 1.7e102 < a

    1. Initial program 89.2%

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

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

    if -3.6e19 < a < 1.7e102

    1. Initial program 76.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.6 \cdot 10^{+19}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{+102}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 25.4% 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 81.5%

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

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

    \[\leadsto t \]
  5. Add Preprocessing

Reproduce

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