Numeric.Signal:interpolate from hsignal-0.2.7.1

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

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

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


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

    1. Initial program 92.4%

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

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

    1. Initial program 3.5%

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

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

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

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

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

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

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

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

Alternative 2: 47.8% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y - a}{z}\\ t_2 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;z \leq -6.4 \cdot 10^{+84}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{+60}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -0.0105:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{-33}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-76}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 6.4 \cdot 10^{-44}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{-6}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{+112}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 2.65 \cdot 10^{+147}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (/ (- y a) z))) (t_2 (* x (- 1.0 (/ y a)))))
   (if (<= z -6.4e+84)
     t
     (if (<= z -2.3e+60)
       t_1
       (if (<= z -0.0105)
         t
         (if (<= z -1.15e-33)
           (* y (/ (- t x) a))
           (if (<= z 4.5e-76)
             t_2
             (if (<= z 6.4e-44)
               (* t (/ (- y z) a))
               (if (<= z 9.5e-6)
                 t_2
                 (if (<= z 1.5e+112)
                   (+ x (/ t (/ a y)))
                   (if (<= z 2.65e+147) t_1 t)))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * ((y - a) / z);
	double t_2 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -6.4e+84) {
		tmp = t;
	} else if (z <= -2.3e+60) {
		tmp = t_1;
	} else if (z <= -0.0105) {
		tmp = t;
	} else if (z <= -1.15e-33) {
		tmp = y * ((t - x) / a);
	} else if (z <= 4.5e-76) {
		tmp = t_2;
	} else if (z <= 6.4e-44) {
		tmp = t * ((y - z) / a);
	} else if (z <= 9.5e-6) {
		tmp = t_2;
	} else if (z <= 1.5e+112) {
		tmp = x + (t / (a / y));
	} else if (z <= 2.65e+147) {
		tmp = t_1;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x * ((y - a) / z)
    t_2 = x * (1.0d0 - (y / a))
    if (z <= (-6.4d+84)) then
        tmp = t
    else if (z <= (-2.3d+60)) then
        tmp = t_1
    else if (z <= (-0.0105d0)) then
        tmp = t
    else if (z <= (-1.15d-33)) then
        tmp = y * ((t - x) / a)
    else if (z <= 4.5d-76) then
        tmp = t_2
    else if (z <= 6.4d-44) then
        tmp = t * ((y - z) / a)
    else if (z <= 9.5d-6) then
        tmp = t_2
    else if (z <= 1.5d+112) then
        tmp = x + (t / (a / y))
    else if (z <= 2.65d+147) then
        tmp = t_1
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * ((y - a) / z);
	double t_2 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -6.4e+84) {
		tmp = t;
	} else if (z <= -2.3e+60) {
		tmp = t_1;
	} else if (z <= -0.0105) {
		tmp = t;
	} else if (z <= -1.15e-33) {
		tmp = y * ((t - x) / a);
	} else if (z <= 4.5e-76) {
		tmp = t_2;
	} else if (z <= 6.4e-44) {
		tmp = t * ((y - z) / a);
	} else if (z <= 9.5e-6) {
		tmp = t_2;
	} else if (z <= 1.5e+112) {
		tmp = x + (t / (a / y));
	} else if (z <= 2.65e+147) {
		tmp = t_1;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * ((y - a) / z)
	t_2 = x * (1.0 - (y / a))
	tmp = 0
	if z <= -6.4e+84:
		tmp = t
	elif z <= -2.3e+60:
		tmp = t_1
	elif z <= -0.0105:
		tmp = t
	elif z <= -1.15e-33:
		tmp = y * ((t - x) / a)
	elif z <= 4.5e-76:
		tmp = t_2
	elif z <= 6.4e-44:
		tmp = t * ((y - z) / a)
	elif z <= 9.5e-6:
		tmp = t_2
	elif z <= 1.5e+112:
		tmp = x + (t / (a / y))
	elif z <= 2.65e+147:
		tmp = t_1
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(Float64(y - a) / z))
	t_2 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (z <= -6.4e+84)
		tmp = t;
	elseif (z <= -2.3e+60)
		tmp = t_1;
	elseif (z <= -0.0105)
		tmp = t;
	elseif (z <= -1.15e-33)
		tmp = Float64(y * Float64(Float64(t - x) / a));
	elseif (z <= 4.5e-76)
		tmp = t_2;
	elseif (z <= 6.4e-44)
		tmp = Float64(t * Float64(Float64(y - z) / a));
	elseif (z <= 9.5e-6)
		tmp = t_2;
	elseif (z <= 1.5e+112)
		tmp = Float64(x + Float64(t / Float64(a / y)));
	elseif (z <= 2.65e+147)
		tmp = t_1;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * ((y - a) / z);
	t_2 = x * (1.0 - (y / a));
	tmp = 0.0;
	if (z <= -6.4e+84)
		tmp = t;
	elseif (z <= -2.3e+60)
		tmp = t_1;
	elseif (z <= -0.0105)
		tmp = t;
	elseif (z <= -1.15e-33)
		tmp = y * ((t - x) / a);
	elseif (z <= 4.5e-76)
		tmp = t_2;
	elseif (z <= 6.4e-44)
		tmp = t * ((y - z) / a);
	elseif (z <= 9.5e-6)
		tmp = t_2;
	elseif (z <= 1.5e+112)
		tmp = x + (t / (a / y));
	elseif (z <= 2.65e+147)
		tmp = t_1;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.4e+84], t, If[LessEqual[z, -2.3e+60], t$95$1, If[LessEqual[z, -0.0105], t, If[LessEqual[z, -1.15e-33], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.5e-76], t$95$2, If[LessEqual[z, 6.4e-44], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.5e-6], t$95$2, If[LessEqual[z, 1.5e+112], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.65e+147], t$95$1, t]]]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -0.0105:\\
\;\;\;\;t\\

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

\mathbf{elif}\;z \leq 4.5 \cdot 10^{-76}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;z \leq 9.5 \cdot 10^{-6}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;z \leq 2.65 \cdot 10^{+147}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -6.4000000000000002e84 or -2.30000000000000017e60 < z < -0.0105000000000000007 or 2.6500000000000001e147 < z

    1. Initial program 53.9%

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

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

    if -6.4000000000000002e84 < z < -2.30000000000000017e60 or 1.4999999999999999e112 < z < 2.6500000000000001e147

    1. Initial program 61.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -0.0105000000000000007 < z < -1.14999999999999993e-33

    1. Initial program 99.5%

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

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

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

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

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

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

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

    if -1.14999999999999993e-33 < z < 4.5000000000000001e-76 or 6.3999999999999999e-44 < z < 9.5000000000000005e-6

    1. Initial program 95.7%

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

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

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

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

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

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

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

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

    if 4.5000000000000001e-76 < z < 6.3999999999999999e-44

    1. Initial program 89.0%

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

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

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

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

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

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

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

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

    if 9.5000000000000005e-6 < z < 1.4999999999999999e112

    1. Initial program 81.6%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.4 \cdot 10^{+84}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{+60}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -0.0105:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{-33}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-76}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 6.4 \cdot 10^{-44}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{-6}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{+112}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 2.65 \cdot 10^{+147}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 36.3% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y}{a}\\ \mathbf{if}\;z \leq -1.8 \cdot 10^{-27}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -5.2 \cdot 10^{-138}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-244}:\\ \;\;\;\;\frac{x}{a} \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-240}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-210}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{-86}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-31}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{+112}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 7.8 \cdot 10^{+147}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ y a))))
   (if (<= z -1.8e-27)
     t
     (if (<= z -5.2e-138)
       x
       (if (<= z -2.6e-244)
         (* (/ x a) (- y))
         (if (<= z 7.5e-240)
           x
           (if (<= z 3.2e-210)
             t_1
             (if (<= z 1.25e-86)
               x
               (if (<= z 5e-31)
                 t_1
                 (if (<= z 1.75e+112)
                   x
                   (if (<= z 7.8e+147) (/ x (/ z y)) t)))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (y / a);
	double tmp;
	if (z <= -1.8e-27) {
		tmp = t;
	} else if (z <= -5.2e-138) {
		tmp = x;
	} else if (z <= -2.6e-244) {
		tmp = (x / a) * -y;
	} else if (z <= 7.5e-240) {
		tmp = x;
	} else if (z <= 3.2e-210) {
		tmp = t_1;
	} else if (z <= 1.25e-86) {
		tmp = x;
	} else if (z <= 5e-31) {
		tmp = t_1;
	} else if (z <= 1.75e+112) {
		tmp = x;
	} else if (z <= 7.8e+147) {
		tmp = x / (z / y);
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t * (y / a)
    if (z <= (-1.8d-27)) then
        tmp = t
    else if (z <= (-5.2d-138)) then
        tmp = x
    else if (z <= (-2.6d-244)) then
        tmp = (x / a) * -y
    else if (z <= 7.5d-240) then
        tmp = x
    else if (z <= 3.2d-210) then
        tmp = t_1
    else if (z <= 1.25d-86) then
        tmp = x
    else if (z <= 5d-31) then
        tmp = t_1
    else if (z <= 1.75d+112) then
        tmp = x
    else if (z <= 7.8d+147) then
        tmp = x / (z / y)
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (y / a);
	double tmp;
	if (z <= -1.8e-27) {
		tmp = t;
	} else if (z <= -5.2e-138) {
		tmp = x;
	} else if (z <= -2.6e-244) {
		tmp = (x / a) * -y;
	} else if (z <= 7.5e-240) {
		tmp = x;
	} else if (z <= 3.2e-210) {
		tmp = t_1;
	} else if (z <= 1.25e-86) {
		tmp = x;
	} else if (z <= 5e-31) {
		tmp = t_1;
	} else if (z <= 1.75e+112) {
		tmp = x;
	} else if (z <= 7.8e+147) {
		tmp = x / (z / y);
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (y / a)
	tmp = 0
	if z <= -1.8e-27:
		tmp = t
	elif z <= -5.2e-138:
		tmp = x
	elif z <= -2.6e-244:
		tmp = (x / a) * -y
	elif z <= 7.5e-240:
		tmp = x
	elif z <= 3.2e-210:
		tmp = t_1
	elif z <= 1.25e-86:
		tmp = x
	elif z <= 5e-31:
		tmp = t_1
	elif z <= 1.75e+112:
		tmp = x
	elif z <= 7.8e+147:
		tmp = x / (z / y)
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(y / a))
	tmp = 0.0
	if (z <= -1.8e-27)
		tmp = t;
	elseif (z <= -5.2e-138)
		tmp = x;
	elseif (z <= -2.6e-244)
		tmp = Float64(Float64(x / a) * Float64(-y));
	elseif (z <= 7.5e-240)
		tmp = x;
	elseif (z <= 3.2e-210)
		tmp = t_1;
	elseif (z <= 1.25e-86)
		tmp = x;
	elseif (z <= 5e-31)
		tmp = t_1;
	elseif (z <= 1.75e+112)
		tmp = x;
	elseif (z <= 7.8e+147)
		tmp = Float64(x / Float64(z / y));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (y / a);
	tmp = 0.0;
	if (z <= -1.8e-27)
		tmp = t;
	elseif (z <= -5.2e-138)
		tmp = x;
	elseif (z <= -2.6e-244)
		tmp = (x / a) * -y;
	elseif (z <= 7.5e-240)
		tmp = x;
	elseif (z <= 3.2e-210)
		tmp = t_1;
	elseif (z <= 1.25e-86)
		tmp = x;
	elseif (z <= 5e-31)
		tmp = t_1;
	elseif (z <= 1.75e+112)
		tmp = x;
	elseif (z <= 7.8e+147)
		tmp = x / (z / y);
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.8e-27], t, If[LessEqual[z, -5.2e-138], x, If[LessEqual[z, -2.6e-244], N[(N[(x / a), $MachinePrecision] * (-y)), $MachinePrecision], If[LessEqual[z, 7.5e-240], x, If[LessEqual[z, 3.2e-210], t$95$1, If[LessEqual[z, 1.25e-86], x, If[LessEqual[z, 5e-31], t$95$1, If[LessEqual[z, 1.75e+112], x, If[LessEqual[z, 7.8e+147], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision], t]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -5.2 \cdot 10^{-138}:\\
\;\;\;\;x\\

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

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

\mathbf{elif}\;z \leq 3.2 \cdot 10^{-210}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 5 \cdot 10^{-31}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.75 \cdot 10^{+112}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 7.8 \cdot 10^{+147}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.7999999999999999e-27 or 7.80000000000000033e147 < z

    1. Initial program 58.7%

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

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

    if -1.7999999999999999e-27 < z < -5.2e-138 or -2.6000000000000001e-244 < z < 7.4999999999999995e-240 or 3.20000000000000028e-210 < z < 1.25e-86 or 5e-31 < z < 1.74999999999999998e112

    1. Initial program 95.5%

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

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

    if -5.2e-138 < z < -2.6000000000000001e-244

    1. Initial program 89.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.4999999999999995e-240 < z < 3.20000000000000028e-210 or 1.25e-86 < z < 5e-31

    1. Initial program 82.8%

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

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

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

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

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

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

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

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

    if 1.74999999999999998e112 < z < 7.80000000000000033e147

    1. Initial program 51.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    8. Simplified64.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.8 \cdot 10^{-27}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -5.2 \cdot 10^{-138}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-244}:\\ \;\;\;\;\frac{x}{a} \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-240}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-210}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{-86}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-31}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{+112}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 7.8 \cdot 10^{+147}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 47.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a}\\ t_2 := x \cdot \frac{y - a}{z}\\ t_3 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;z \leq -3.5 \cdot 10^{+88}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.5 \cdot 10^{+60}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -175000000:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -3 \cdot 10^{-26}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-75}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;z \leq 7 \cdot 10^{-44}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.35 \cdot 10^{+111}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{+147}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) a)))
        (t_2 (* x (/ (- y a) z)))
        (t_3 (* x (- 1.0 (/ y a)))))
   (if (<= z -3.5e+88)
     t
     (if (<= z -2.5e+60)
       t_2
       (if (<= z -175000000.0)
         t
         (if (<= z -3e-26)
           t_1
           (if (<= z 3e-75)
             t_3
             (if (<= z 7e-44)
               t_1
               (if (<= z 2.35e+111) t_3 (if (<= z 5.8e+147) t_2 t))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / a);
	double t_2 = x * ((y - a) / z);
	double t_3 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -3.5e+88) {
		tmp = t;
	} else if (z <= -2.5e+60) {
		tmp = t_2;
	} else if (z <= -175000000.0) {
		tmp = t;
	} else if (z <= -3e-26) {
		tmp = t_1;
	} else if (z <= 3e-75) {
		tmp = t_3;
	} else if (z <= 7e-44) {
		tmp = t_1;
	} else if (z <= 2.35e+111) {
		tmp = t_3;
	} else if (z <= 5.8e+147) {
		tmp = t_2;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = t * ((y - z) / a)
    t_2 = x * ((y - a) / z)
    t_3 = x * (1.0d0 - (y / a))
    if (z <= (-3.5d+88)) then
        tmp = t
    else if (z <= (-2.5d+60)) then
        tmp = t_2
    else if (z <= (-175000000.0d0)) then
        tmp = t
    else if (z <= (-3d-26)) then
        tmp = t_1
    else if (z <= 3d-75) then
        tmp = t_3
    else if (z <= 7d-44) then
        tmp = t_1
    else if (z <= 2.35d+111) then
        tmp = t_3
    else if (z <= 5.8d+147) then
        tmp = t_2
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / a);
	double t_2 = x * ((y - a) / z);
	double t_3 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -3.5e+88) {
		tmp = t;
	} else if (z <= -2.5e+60) {
		tmp = t_2;
	} else if (z <= -175000000.0) {
		tmp = t;
	} else if (z <= -3e-26) {
		tmp = t_1;
	} else if (z <= 3e-75) {
		tmp = t_3;
	} else if (z <= 7e-44) {
		tmp = t_1;
	} else if (z <= 2.35e+111) {
		tmp = t_3;
	} else if (z <= 5.8e+147) {
		tmp = t_2;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / a)
	t_2 = x * ((y - a) / z)
	t_3 = x * (1.0 - (y / a))
	tmp = 0
	if z <= -3.5e+88:
		tmp = t
	elif z <= -2.5e+60:
		tmp = t_2
	elif z <= -175000000.0:
		tmp = t
	elif z <= -3e-26:
		tmp = t_1
	elif z <= 3e-75:
		tmp = t_3
	elif z <= 7e-44:
		tmp = t_1
	elif z <= 2.35e+111:
		tmp = t_3
	elif z <= 5.8e+147:
		tmp = t_2
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(y - z) / a))
	t_2 = Float64(x * Float64(Float64(y - a) / z))
	t_3 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (z <= -3.5e+88)
		tmp = t;
	elseif (z <= -2.5e+60)
		tmp = t_2;
	elseif (z <= -175000000.0)
		tmp = t;
	elseif (z <= -3e-26)
		tmp = t_1;
	elseif (z <= 3e-75)
		tmp = t_3;
	elseif (z <= 7e-44)
		tmp = t_1;
	elseif (z <= 2.35e+111)
		tmp = t_3;
	elseif (z <= 5.8e+147)
		tmp = t_2;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((y - z) / a);
	t_2 = x * ((y - a) / z);
	t_3 = x * (1.0 - (y / a));
	tmp = 0.0;
	if (z <= -3.5e+88)
		tmp = t;
	elseif (z <= -2.5e+60)
		tmp = t_2;
	elseif (z <= -175000000.0)
		tmp = t;
	elseif (z <= -3e-26)
		tmp = t_1;
	elseif (z <= 3e-75)
		tmp = t_3;
	elseif (z <= 7e-44)
		tmp = t_1;
	elseif (z <= 2.35e+111)
		tmp = t_3;
	elseif (z <= 5.8e+147)
		tmp = t_2;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.5e+88], t, If[LessEqual[z, -2.5e+60], t$95$2, If[LessEqual[z, -175000000.0], t, If[LessEqual[z, -3e-26], t$95$1, If[LessEqual[z, 3e-75], t$95$3, If[LessEqual[z, 7e-44], t$95$1, If[LessEqual[z, 2.35e+111], t$95$3, If[LessEqual[z, 5.8e+147], t$95$2, t]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -2.5 \cdot 10^{+60}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq -175000000:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq -3 \cdot 10^{-26}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 3 \cdot 10^{-75}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;z \leq 7 \cdot 10^{-44}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.35 \cdot 10^{+111}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;z \leq 5.8 \cdot 10^{+147}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.4999999999999998e88 or -2.49999999999999987e60 < z < -1.75e8 or 5.7999999999999997e147 < z

    1. Initial program 53.3%

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

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

    if -3.4999999999999998e88 < z < -2.49999999999999987e60 or 2.35000000000000004e111 < z < 5.7999999999999997e147

    1. Initial program 61.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.75e8 < z < -3.00000000000000012e-26 or 2.9999999999999999e-75 < z < 6.9999999999999995e-44

    1. Initial program 89.2%

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

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

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

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

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

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

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

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

    if -3.00000000000000012e-26 < z < 2.9999999999999999e-75 or 6.9999999999999995e-44 < z < 2.35000000000000004e111

    1. Initial program 93.6%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.5 \cdot 10^{+88}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.5 \cdot 10^{+60}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -175000000:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -3 \cdot 10^{-26}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-75}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 7 \cdot 10^{-44}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 2.35 \cdot 10^{+111}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{+147}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 47.3% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y - a}{z}\\ t_2 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;z \leq -1.02 \cdot 10^{+89}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.35 \cdot 10^{+60}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -0.001:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.12 \cdot 10^{-35}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-75}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{-42}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{+111}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 4.7 \cdot 10^{+147}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (/ (- y a) z))) (t_2 (* x (- 1.0 (/ y a)))))
   (if (<= z -1.02e+89)
     t
     (if (<= z -2.35e+60)
       t_1
       (if (<= z -0.001)
         t
         (if (<= z -1.12e-35)
           (* y (/ (- t x) a))
           (if (<= z 3.2e-75)
             t_2
             (if (<= z 5.5e-42)
               (* t (/ (- y z) a))
               (if (<= z 3.4e+111) t_2 (if (<= z 4.7e+147) t_1 t))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * ((y - a) / z);
	double t_2 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -1.02e+89) {
		tmp = t;
	} else if (z <= -2.35e+60) {
		tmp = t_1;
	} else if (z <= -0.001) {
		tmp = t;
	} else if (z <= -1.12e-35) {
		tmp = y * ((t - x) / a);
	} else if (z <= 3.2e-75) {
		tmp = t_2;
	} else if (z <= 5.5e-42) {
		tmp = t * ((y - z) / a);
	} else if (z <= 3.4e+111) {
		tmp = t_2;
	} else if (z <= 4.7e+147) {
		tmp = t_1;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x * ((y - a) / z)
    t_2 = x * (1.0d0 - (y / a))
    if (z <= (-1.02d+89)) then
        tmp = t
    else if (z <= (-2.35d+60)) then
        tmp = t_1
    else if (z <= (-0.001d0)) then
        tmp = t
    else if (z <= (-1.12d-35)) then
        tmp = y * ((t - x) / a)
    else if (z <= 3.2d-75) then
        tmp = t_2
    else if (z <= 5.5d-42) then
        tmp = t * ((y - z) / a)
    else if (z <= 3.4d+111) then
        tmp = t_2
    else if (z <= 4.7d+147) then
        tmp = t_1
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * ((y - a) / z);
	double t_2 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -1.02e+89) {
		tmp = t;
	} else if (z <= -2.35e+60) {
		tmp = t_1;
	} else if (z <= -0.001) {
		tmp = t;
	} else if (z <= -1.12e-35) {
		tmp = y * ((t - x) / a);
	} else if (z <= 3.2e-75) {
		tmp = t_2;
	} else if (z <= 5.5e-42) {
		tmp = t * ((y - z) / a);
	} else if (z <= 3.4e+111) {
		tmp = t_2;
	} else if (z <= 4.7e+147) {
		tmp = t_1;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * ((y - a) / z)
	t_2 = x * (1.0 - (y / a))
	tmp = 0
	if z <= -1.02e+89:
		tmp = t
	elif z <= -2.35e+60:
		tmp = t_1
	elif z <= -0.001:
		tmp = t
	elif z <= -1.12e-35:
		tmp = y * ((t - x) / a)
	elif z <= 3.2e-75:
		tmp = t_2
	elif z <= 5.5e-42:
		tmp = t * ((y - z) / a)
	elif z <= 3.4e+111:
		tmp = t_2
	elif z <= 4.7e+147:
		tmp = t_1
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(Float64(y - a) / z))
	t_2 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (z <= -1.02e+89)
		tmp = t;
	elseif (z <= -2.35e+60)
		tmp = t_1;
	elseif (z <= -0.001)
		tmp = t;
	elseif (z <= -1.12e-35)
		tmp = Float64(y * Float64(Float64(t - x) / a));
	elseif (z <= 3.2e-75)
		tmp = t_2;
	elseif (z <= 5.5e-42)
		tmp = Float64(t * Float64(Float64(y - z) / a));
	elseif (z <= 3.4e+111)
		tmp = t_2;
	elseif (z <= 4.7e+147)
		tmp = t_1;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * ((y - a) / z);
	t_2 = x * (1.0 - (y / a));
	tmp = 0.0;
	if (z <= -1.02e+89)
		tmp = t;
	elseif (z <= -2.35e+60)
		tmp = t_1;
	elseif (z <= -0.001)
		tmp = t;
	elseif (z <= -1.12e-35)
		tmp = y * ((t - x) / a);
	elseif (z <= 3.2e-75)
		tmp = t_2;
	elseif (z <= 5.5e-42)
		tmp = t * ((y - z) / a);
	elseif (z <= 3.4e+111)
		tmp = t_2;
	elseif (z <= 4.7e+147)
		tmp = t_1;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.02e+89], t, If[LessEqual[z, -2.35e+60], t$95$1, If[LessEqual[z, -0.001], t, If[LessEqual[z, -1.12e-35], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.2e-75], t$95$2, If[LessEqual[z, 5.5e-42], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.4e+111], t$95$2, If[LessEqual[z, 4.7e+147], t$95$1, t]]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -0.001:\\
\;\;\;\;t\\

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

\mathbf{elif}\;z \leq 3.2 \cdot 10^{-75}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;z \leq 3.4 \cdot 10^{+111}:\\
\;\;\;\;t\_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.0199999999999999e89 or -2.3499999999999999e60 < z < -1e-3 or 4.7000000000000003e147 < z

    1. Initial program 53.9%

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

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

    if -1.0199999999999999e89 < z < -2.3499999999999999e60 or 3.4000000000000001e111 < z < 4.7000000000000003e147

    1. Initial program 61.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1e-3 < z < -1.12e-35

    1. Initial program 99.5%

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

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

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

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

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

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

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

    if -1.12e-35 < z < 3.19999999999999977e-75 or 5.5e-42 < z < 3.4000000000000001e111

    1. Initial program 93.5%

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

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

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

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

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

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

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

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

    if 3.19999999999999977e-75 < z < 5.5e-42

    1. Initial program 89.0%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.02 \cdot 10^{+89}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.35 \cdot 10^{+60}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -0.001:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.12 \cdot 10^{-35}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-75}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{-42}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{+111}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 4.7 \cdot 10^{+147}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 50.4% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y - a}{z}\\ t_2 := t - \frac{t}{\frac{z}{y}}\\ t_3 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;z \leq -2 \cdot 10^{+85}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{+60}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -4.4 \cdot 10^{-27}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-75}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;z \leq 5.3 \cdot 10^{-39}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 165000000000:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;z \leq 2.35 \cdot 10^{+111}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 2.25 \cdot 10^{+148}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (/ (- y a) z)))
        (t_2 (- t (/ t (/ z y))))
        (t_3 (* x (- 1.0 (/ y a)))))
   (if (<= z -2e+85)
     t_2
     (if (<= z -2.6e+60)
       t_1
       (if (<= z -4.4e-27)
         t_2
         (if (<= z 2.8e-75)
           t_3
           (if (<= z 5.3e-39)
             (* t (/ (- y z) a))
             (if (<= z 165000000000.0)
               t_3
               (if (<= z 2.35e+111)
                 (+ x (/ t (/ a y)))
                 (if (<= z 2.25e+148) t_1 t_2))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * ((y - a) / z);
	double t_2 = t - (t / (z / y));
	double t_3 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -2e+85) {
		tmp = t_2;
	} else if (z <= -2.6e+60) {
		tmp = t_1;
	} else if (z <= -4.4e-27) {
		tmp = t_2;
	} else if (z <= 2.8e-75) {
		tmp = t_3;
	} else if (z <= 5.3e-39) {
		tmp = t * ((y - z) / a);
	} else if (z <= 165000000000.0) {
		tmp = t_3;
	} else if (z <= 2.35e+111) {
		tmp = x + (t / (a / y));
	} else if (z <= 2.25e+148) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = x * ((y - a) / z)
    t_2 = t - (t / (z / y))
    t_3 = x * (1.0d0 - (y / a))
    if (z <= (-2d+85)) then
        tmp = t_2
    else if (z <= (-2.6d+60)) then
        tmp = t_1
    else if (z <= (-4.4d-27)) then
        tmp = t_2
    else if (z <= 2.8d-75) then
        tmp = t_3
    else if (z <= 5.3d-39) then
        tmp = t * ((y - z) / a)
    else if (z <= 165000000000.0d0) then
        tmp = t_3
    else if (z <= 2.35d+111) then
        tmp = x + (t / (a / y))
    else if (z <= 2.25d+148) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * ((y - a) / z);
	double t_2 = t - (t / (z / y));
	double t_3 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -2e+85) {
		tmp = t_2;
	} else if (z <= -2.6e+60) {
		tmp = t_1;
	} else if (z <= -4.4e-27) {
		tmp = t_2;
	} else if (z <= 2.8e-75) {
		tmp = t_3;
	} else if (z <= 5.3e-39) {
		tmp = t * ((y - z) / a);
	} else if (z <= 165000000000.0) {
		tmp = t_3;
	} else if (z <= 2.35e+111) {
		tmp = x + (t / (a / y));
	} else if (z <= 2.25e+148) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * ((y - a) / z)
	t_2 = t - (t / (z / y))
	t_3 = x * (1.0 - (y / a))
	tmp = 0
	if z <= -2e+85:
		tmp = t_2
	elif z <= -2.6e+60:
		tmp = t_1
	elif z <= -4.4e-27:
		tmp = t_2
	elif z <= 2.8e-75:
		tmp = t_3
	elif z <= 5.3e-39:
		tmp = t * ((y - z) / a)
	elif z <= 165000000000.0:
		tmp = t_3
	elif z <= 2.35e+111:
		tmp = x + (t / (a / y))
	elif z <= 2.25e+148:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(Float64(y - a) / z))
	t_2 = Float64(t - Float64(t / Float64(z / y)))
	t_3 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (z <= -2e+85)
		tmp = t_2;
	elseif (z <= -2.6e+60)
		tmp = t_1;
	elseif (z <= -4.4e-27)
		tmp = t_2;
	elseif (z <= 2.8e-75)
		tmp = t_3;
	elseif (z <= 5.3e-39)
		tmp = Float64(t * Float64(Float64(y - z) / a));
	elseif (z <= 165000000000.0)
		tmp = t_3;
	elseif (z <= 2.35e+111)
		tmp = Float64(x + Float64(t / Float64(a / y)));
	elseif (z <= 2.25e+148)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * ((y - a) / z);
	t_2 = t - (t / (z / y));
	t_3 = x * (1.0 - (y / a));
	tmp = 0.0;
	if (z <= -2e+85)
		tmp = t_2;
	elseif (z <= -2.6e+60)
		tmp = t_1;
	elseif (z <= -4.4e-27)
		tmp = t_2;
	elseif (z <= 2.8e-75)
		tmp = t_3;
	elseif (z <= 5.3e-39)
		tmp = t * ((y - z) / a);
	elseif (z <= 165000000000.0)
		tmp = t_3;
	elseif (z <= 2.35e+111)
		tmp = x + (t / (a / y));
	elseif (z <= 2.25e+148)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(t / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2e+85], t$95$2, If[LessEqual[z, -2.6e+60], t$95$1, If[LessEqual[z, -4.4e-27], t$95$2, If[LessEqual[z, 2.8e-75], t$95$3, If[LessEqual[z, 5.3e-39], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 165000000000.0], t$95$3, If[LessEqual[z, 2.35e+111], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.25e+148], t$95$1, t$95$2]]]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -4.4 \cdot 10^{-27}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq 2.8 \cdot 10^{-75}:\\
\;\;\;\;t\_3\\

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

\mathbf{elif}\;z \leq 165000000000:\\
\;\;\;\;t\_3\\

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

\mathbf{elif}\;z \leq 2.25 \cdot 10^{+148}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -2e85 or -2.60000000000000008e60 < z < -4.39999999999999974e-27 or 2.24999999999999997e148 < z

    1. Initial program 57.3%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\left(-\frac{t \cdot y}{z}\right)} \]
      2. unsub-neg51.9%

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

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

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

    if -2e85 < z < -2.60000000000000008e60 or 2.35000000000000004e111 < z < 2.24999999999999997e148

    1. Initial program 61.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.39999999999999974e-27 < z < 2.79999999999999998e-75 or 5.30000000000000003e-39 < z < 1.65e11

    1. Initial program 95.8%

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

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

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

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

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

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

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

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

    if 2.79999999999999998e-75 < z < 5.30000000000000003e-39

    1. Initial program 89.0%

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

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

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

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

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

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

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

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

    if 1.65e11 < z < 2.35000000000000004e111

    1. Initial program 81.6%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{+85}:\\ \;\;\;\;t - \frac{t}{\frac{z}{y}}\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{+60}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -4.4 \cdot 10^{-27}:\\ \;\;\;\;t - \frac{t}{\frac{z}{y}}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-75}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 5.3 \cdot 10^{-39}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 165000000000:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 2.35 \cdot 10^{+111}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 2.25 \cdot 10^{+148}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;t - \frac{t}{\frac{z}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 50.4% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y - a}{z}\\ t_2 := t - \frac{t}{\frac{z}{y}}\\ \mathbf{if}\;z \leq -3.8 \cdot 10^{+85}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -3.8 \cdot 10^{+60}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -4.4 \cdot 10^{-27}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-75}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{-42}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 20000000:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 8.4 \cdot 10^{+111}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 8.4 \cdot 10^{+146}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (/ (- y a) z))) (t_2 (- t (/ t (/ z y)))))
   (if (<= z -3.8e+85)
     t_2
     (if (<= z -3.8e+60)
       t_1
       (if (<= z -4.4e-27)
         t_2
         (if (<= z 3.2e-75)
           (- x (/ x (/ a y)))
           (if (<= z 5.5e-42)
             (* t (/ (- y z) a))
             (if (<= z 20000000.0)
               (* x (- 1.0 (/ y a)))
               (if (<= z 8.4e+111)
                 (+ x (/ t (/ a y)))
                 (if (<= z 8.4e+146) t_1 t_2))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * ((y - a) / z);
	double t_2 = t - (t / (z / y));
	double tmp;
	if (z <= -3.8e+85) {
		tmp = t_2;
	} else if (z <= -3.8e+60) {
		tmp = t_1;
	} else if (z <= -4.4e-27) {
		tmp = t_2;
	} else if (z <= 3.2e-75) {
		tmp = x - (x / (a / y));
	} else if (z <= 5.5e-42) {
		tmp = t * ((y - z) / a);
	} else if (z <= 20000000.0) {
		tmp = x * (1.0 - (y / a));
	} else if (z <= 8.4e+111) {
		tmp = x + (t / (a / y));
	} else if (z <= 8.4e+146) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x * ((y - a) / z)
    t_2 = t - (t / (z / y))
    if (z <= (-3.8d+85)) then
        tmp = t_2
    else if (z <= (-3.8d+60)) then
        tmp = t_1
    else if (z <= (-4.4d-27)) then
        tmp = t_2
    else if (z <= 3.2d-75) then
        tmp = x - (x / (a / y))
    else if (z <= 5.5d-42) then
        tmp = t * ((y - z) / a)
    else if (z <= 20000000.0d0) then
        tmp = x * (1.0d0 - (y / a))
    else if (z <= 8.4d+111) then
        tmp = x + (t / (a / y))
    else if (z <= 8.4d+146) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * ((y - a) / z);
	double t_2 = t - (t / (z / y));
	double tmp;
	if (z <= -3.8e+85) {
		tmp = t_2;
	} else if (z <= -3.8e+60) {
		tmp = t_1;
	} else if (z <= -4.4e-27) {
		tmp = t_2;
	} else if (z <= 3.2e-75) {
		tmp = x - (x / (a / y));
	} else if (z <= 5.5e-42) {
		tmp = t * ((y - z) / a);
	} else if (z <= 20000000.0) {
		tmp = x * (1.0 - (y / a));
	} else if (z <= 8.4e+111) {
		tmp = x + (t / (a / y));
	} else if (z <= 8.4e+146) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * ((y - a) / z)
	t_2 = t - (t / (z / y))
	tmp = 0
	if z <= -3.8e+85:
		tmp = t_2
	elif z <= -3.8e+60:
		tmp = t_1
	elif z <= -4.4e-27:
		tmp = t_2
	elif z <= 3.2e-75:
		tmp = x - (x / (a / y))
	elif z <= 5.5e-42:
		tmp = t * ((y - z) / a)
	elif z <= 20000000.0:
		tmp = x * (1.0 - (y / a))
	elif z <= 8.4e+111:
		tmp = x + (t / (a / y))
	elif z <= 8.4e+146:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(Float64(y - a) / z))
	t_2 = Float64(t - Float64(t / Float64(z / y)))
	tmp = 0.0
	if (z <= -3.8e+85)
		tmp = t_2;
	elseif (z <= -3.8e+60)
		tmp = t_1;
	elseif (z <= -4.4e-27)
		tmp = t_2;
	elseif (z <= 3.2e-75)
		tmp = Float64(x - Float64(x / Float64(a / y)));
	elseif (z <= 5.5e-42)
		tmp = Float64(t * Float64(Float64(y - z) / a));
	elseif (z <= 20000000.0)
		tmp = Float64(x * Float64(1.0 - Float64(y / a)));
	elseif (z <= 8.4e+111)
		tmp = Float64(x + Float64(t / Float64(a / y)));
	elseif (z <= 8.4e+146)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * ((y - a) / z);
	t_2 = t - (t / (z / y));
	tmp = 0.0;
	if (z <= -3.8e+85)
		tmp = t_2;
	elseif (z <= -3.8e+60)
		tmp = t_1;
	elseif (z <= -4.4e-27)
		tmp = t_2;
	elseif (z <= 3.2e-75)
		tmp = x - (x / (a / y));
	elseif (z <= 5.5e-42)
		tmp = t * ((y - z) / a);
	elseif (z <= 20000000.0)
		tmp = x * (1.0 - (y / a));
	elseif (z <= 8.4e+111)
		tmp = x + (t / (a / y));
	elseif (z <= 8.4e+146)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(t / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.8e+85], t$95$2, If[LessEqual[z, -3.8e+60], t$95$1, If[LessEqual[z, -4.4e-27], t$95$2, If[LessEqual[z, 3.2e-75], N[(x - N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.5e-42], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 20000000.0], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.4e+111], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.4e+146], t$95$1, t$95$2]]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -4.4 \cdot 10^{-27}:\\
\;\;\;\;t\_2\\

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

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

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

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

\mathbf{elif}\;z \leq 8.4 \cdot 10^{+146}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -3.79999999999999992e85 or -3.80000000000000009e60 < z < -4.39999999999999974e-27 or 8.4000000000000002e146 < z

    1. Initial program 57.3%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\left(-\frac{t \cdot y}{z}\right)} \]
      2. unsub-neg51.9%

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

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

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

    if -3.79999999999999992e85 < z < -3.80000000000000009e60 or 8.3999999999999998e111 < z < 8.4000000000000002e146

    1. Initial program 61.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.39999999999999974e-27 < z < 3.19999999999999977e-75

    1. Initial program 95.5%

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

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

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

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

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

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

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

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

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

    if 3.19999999999999977e-75 < z < 5.5e-42

    1. Initial program 89.0%

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

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

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

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

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

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

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

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

    if 5.5e-42 < z < 2e7

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

    if 2e7 < z < 8.3999999999999998e111

    1. Initial program 81.6%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.8 \cdot 10^{+85}:\\ \;\;\;\;t - \frac{t}{\frac{z}{y}}\\ \mathbf{elif}\;z \leq -3.8 \cdot 10^{+60}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -4.4 \cdot 10^{-27}:\\ \;\;\;\;t - \frac{t}{\frac{z}{y}}\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-75}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{-42}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 20000000:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 8.4 \cdot 10^{+111}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 8.4 \cdot 10^{+146}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;t - \frac{t}{\frac{z}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 50.4% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t - \frac{t}{\frac{z}{y}}\\ \mathbf{if}\;z \leq -1.25 \cdot 10^{+88}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{+60}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -4.4 \cdot 10^{-27}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-75}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 6.4 \cdot 10^{-44}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 4.7:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 9.6 \cdot 10^{+100}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 1.52 \cdot 10^{+149}:\\ \;\;\;\;\frac{y}{\frac{z}{x - t}}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- t (/ t (/ z y)))))
   (if (<= z -1.25e+88)
     t_1
     (if (<= z -4.5e+60)
       (* x (/ (- y a) z))
       (if (<= z -4.4e-27)
         t_1
         (if (<= z 3.2e-75)
           (- x (/ x (/ a y)))
           (if (<= z 6.4e-44)
             (* t (/ (- y z) a))
             (if (<= z 4.7)
               (* x (- 1.0 (/ y a)))
               (if (<= z 9.6e+100)
                 (+ x (/ t (/ a y)))
                 (if (<= z 1.52e+149) (/ y (/ z (- x t))) t_1))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t - (t / (z / y));
	double tmp;
	if (z <= -1.25e+88) {
		tmp = t_1;
	} else if (z <= -4.5e+60) {
		tmp = x * ((y - a) / z);
	} else if (z <= -4.4e-27) {
		tmp = t_1;
	} else if (z <= 3.2e-75) {
		tmp = x - (x / (a / y));
	} else if (z <= 6.4e-44) {
		tmp = t * ((y - z) / a);
	} else if (z <= 4.7) {
		tmp = x * (1.0 - (y / a));
	} else if (z <= 9.6e+100) {
		tmp = x + (t / (a / y));
	} else if (z <= 1.52e+149) {
		tmp = y / (z / (x - t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t - (t / (z / y))
    if (z <= (-1.25d+88)) then
        tmp = t_1
    else if (z <= (-4.5d+60)) then
        tmp = x * ((y - a) / z)
    else if (z <= (-4.4d-27)) then
        tmp = t_1
    else if (z <= 3.2d-75) then
        tmp = x - (x / (a / y))
    else if (z <= 6.4d-44) then
        tmp = t * ((y - z) / a)
    else if (z <= 4.7d0) then
        tmp = x * (1.0d0 - (y / a))
    else if (z <= 9.6d+100) then
        tmp = x + (t / (a / y))
    else if (z <= 1.52d+149) then
        tmp = y / (z / (x - t))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t - (t / (z / y));
	double tmp;
	if (z <= -1.25e+88) {
		tmp = t_1;
	} else if (z <= -4.5e+60) {
		tmp = x * ((y - a) / z);
	} else if (z <= -4.4e-27) {
		tmp = t_1;
	} else if (z <= 3.2e-75) {
		tmp = x - (x / (a / y));
	} else if (z <= 6.4e-44) {
		tmp = t * ((y - z) / a);
	} else if (z <= 4.7) {
		tmp = x * (1.0 - (y / a));
	} else if (z <= 9.6e+100) {
		tmp = x + (t / (a / y));
	} else if (z <= 1.52e+149) {
		tmp = y / (z / (x - t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t - (t / (z / y))
	tmp = 0
	if z <= -1.25e+88:
		tmp = t_1
	elif z <= -4.5e+60:
		tmp = x * ((y - a) / z)
	elif z <= -4.4e-27:
		tmp = t_1
	elif z <= 3.2e-75:
		tmp = x - (x / (a / y))
	elif z <= 6.4e-44:
		tmp = t * ((y - z) / a)
	elif z <= 4.7:
		tmp = x * (1.0 - (y / a))
	elif z <= 9.6e+100:
		tmp = x + (t / (a / y))
	elif z <= 1.52e+149:
		tmp = y / (z / (x - t))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t - Float64(t / Float64(z / y)))
	tmp = 0.0
	if (z <= -1.25e+88)
		tmp = t_1;
	elseif (z <= -4.5e+60)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	elseif (z <= -4.4e-27)
		tmp = t_1;
	elseif (z <= 3.2e-75)
		tmp = Float64(x - Float64(x / Float64(a / y)));
	elseif (z <= 6.4e-44)
		tmp = Float64(t * Float64(Float64(y - z) / a));
	elseif (z <= 4.7)
		tmp = Float64(x * Float64(1.0 - Float64(y / a)));
	elseif (z <= 9.6e+100)
		tmp = Float64(x + Float64(t / Float64(a / y)));
	elseif (z <= 1.52e+149)
		tmp = Float64(y / Float64(z / Float64(x - t)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t - (t / (z / y));
	tmp = 0.0;
	if (z <= -1.25e+88)
		tmp = t_1;
	elseif (z <= -4.5e+60)
		tmp = x * ((y - a) / z);
	elseif (z <= -4.4e-27)
		tmp = t_1;
	elseif (z <= 3.2e-75)
		tmp = x - (x / (a / y));
	elseif (z <= 6.4e-44)
		tmp = t * ((y - z) / a);
	elseif (z <= 4.7)
		tmp = x * (1.0 - (y / a));
	elseif (z <= 9.6e+100)
		tmp = x + (t / (a / y));
	elseif (z <= 1.52e+149)
		tmp = y / (z / (x - t));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(t / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.25e+88], t$95$1, If[LessEqual[z, -4.5e+60], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.4e-27], t$95$1, If[LessEqual[z, 3.2e-75], N[(x - N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.4e-44], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.7], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.6e+100], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.52e+149], N[(y / N[(z / N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]]
\begin{array}{l}

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

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

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if z < -1.24999999999999999e88 or -4.50000000000000013e60 < z < -4.39999999999999974e-27 or 1.5199999999999999e149 < z

    1. Initial program 57.3%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\left(-\frac{t \cdot y}{z}\right)} \]
      2. unsub-neg51.9%

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

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

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

    if -1.24999999999999999e88 < z < -4.50000000000000013e60

    1. Initial program 71.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.39999999999999974e-27 < z < 3.19999999999999977e-75

    1. Initial program 95.5%

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

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

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

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

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

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

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

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

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

    if 3.19999999999999977e-75 < z < 6.3999999999999999e-44

    1. Initial program 89.0%

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

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

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

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

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

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

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

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

    if 6.3999999999999999e-44 < z < 4.70000000000000018

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

    if 4.70000000000000018 < z < 9.60000000000000046e100

    1. Initial program 80.6%

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

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

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

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

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

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

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

    if 9.60000000000000046e100 < z < 1.5199999999999999e149

    1. Initial program 57.1%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.25 \cdot 10^{+88}:\\ \;\;\;\;t - \frac{t}{\frac{z}{y}}\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{+60}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -4.4 \cdot 10^{-27}:\\ \;\;\;\;t - \frac{t}{\frac{z}{y}}\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-75}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 6.4 \cdot 10^{-44}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 4.7:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 9.6 \cdot 10^{+100}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 1.52 \cdot 10^{+149}:\\ \;\;\;\;\frac{y}{\frac{z}{x - t}}\\ \mathbf{else}:\\ \;\;\;\;t - \frac{t}{\frac{z}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 50.5% accurate, 0.3× speedup?

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

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

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

\mathbf{elif}\;z \leq -0.1:\\
\;\;\;\;\left(-t\right) \cdot \frac{z}{a - z}\\

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 8 regimes
  2. if z < -1.26000000000000007e84 or 5.4999999999999997e147 < z

    1. Initial program 49.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.26000000000000007e84 < z < -2.49999999999999987e60

    1. Initial program 71.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.49999999999999987e60 < z < -0.10000000000000001

    1. Initial program 82.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \color{blue}{\frac{-z}{a - z}} \]
    10. Simplified68.8%

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

    if -0.10000000000000001 < z < 3.19999999999999977e-75

    1. Initial program 95.7%

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

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

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

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

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

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

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

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

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

    if 3.19999999999999977e-75 < z < 8.00000000000000062e-43

    1. Initial program 89.0%

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

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

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

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

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

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

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

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

    if 8.00000000000000062e-43 < z < 0.112000000000000002

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

    if 0.112000000000000002 < z < 3.0999999999999999e106

    1. Initial program 80.6%

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

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

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

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

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

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

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

    if 3.0999999999999999e106 < z < 5.4999999999999997e147

    1. Initial program 57.1%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.26 \cdot 10^{+84}:\\ \;\;\;\;t - \frac{t}{\frac{z}{y}}\\ \mathbf{elif}\;z \leq -2.5 \cdot 10^{+60}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -0.1:\\ \;\;\;\;\left(-t\right) \cdot \frac{z}{a - z}\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-75}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-43}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 0.112:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{+106}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{+147}:\\ \;\;\;\;\frac{y}{\frac{z}{x - t}}\\ \mathbf{else}:\\ \;\;\;\;t - \frac{t}{\frac{z}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 50.4% accurate, 0.3× speedup?

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

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

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

\mathbf{elif}\;z \leq -0.009:\\
\;\;\;\;\left(-t\right) \cdot \frac{z}{a - z}\\

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 9 regimes
  2. if z < -4.79999999999999993e85

    1. Initial program 57.6%

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

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

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

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

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

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

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

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

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

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

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

    if -4.79999999999999993e85 < z < -2.3499999999999999e60

    1. Initial program 71.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.3499999999999999e60 < z < -0.00899999999999999932

    1. Initial program 82.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \color{blue}{\frac{-z}{a - z}} \]
    10. Simplified68.8%

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

    if -0.00899999999999999932 < z < 9.60000000000000023e-79

    1. Initial program 95.7%

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

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

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

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

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

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

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

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

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

    if 9.60000000000000023e-79 < z < 1.25000000000000005e-43

    1. Initial program 89.0%

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

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

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

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

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

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

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

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

    if 1.25000000000000005e-43 < z < 0.0012999999999999999

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

    if 0.0012999999999999999 < z < 8.59999999999999986e100

    1. Initial program 80.6%

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

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

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

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

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

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

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

    if 8.59999999999999986e100 < z < 2.3500000000000001e147

    1. Initial program 57.1%

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

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

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

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

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

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

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

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

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

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

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

    if 2.3500000000000001e147 < z

    1. Initial program 42.2%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\left(-\frac{t \cdot y}{z}\right)} \]
      2. unsub-neg54.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.8 \cdot 10^{+85}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;z \leq -2.35 \cdot 10^{+60}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -0.009:\\ \;\;\;\;\left(-t\right) \cdot \frac{z}{a - z}\\ \mathbf{elif}\;z \leq 9.6 \cdot 10^{-79}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{-43}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 0.0013:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 8.6 \cdot 10^{+100}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 2.35 \cdot 10^{+147}:\\ \;\;\;\;\frac{y}{\frac{z}{x - t}}\\ \mathbf{else}:\\ \;\;\;\;t - \frac{t}{\frac{z}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 50.5% accurate, 0.3× speedup?

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

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

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

\mathbf{elif}\;z \leq -0.029:\\
\;\;\;\;\left(-t\right) \cdot \frac{z}{a - z}\\

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 9 regimes
  2. if z < -5.09999999999999988e87

    1. Initial program 57.6%

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

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

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

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

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

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

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

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

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

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

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

    if -5.09999999999999988e87 < z < -2.49999999999999987e60

    1. Initial program 71.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.49999999999999987e60 < z < -0.0290000000000000015

    1. Initial program 82.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \color{blue}{\frac{-z}{a - z}} \]
    10. Simplified68.8%

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

    if -0.0290000000000000015 < z < 3.10000000000000007e-75

    1. Initial program 95.7%

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

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

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

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

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

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

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

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

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

    if 3.10000000000000007e-75 < z < 6.0000000000000005e-44

    1. Initial program 89.0%

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

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

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

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

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

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

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

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

    if 6.0000000000000005e-44 < z < 8.1999999999999994e-6

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

    if 8.1999999999999994e-6 < z < 9.4999999999999995e100

    1. Initial program 80.6%

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

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

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

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

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

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

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

    if 9.4999999999999995e100 < z < 4.9999999999999999e146

    1. Initial program 57.1%

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

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

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

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

        \[\leadsto -\color{blue}{\frac{y}{\frac{z}{t - x}}} \]
      3. associate-/r/68.6%

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

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

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

    if 4.9999999999999999e146 < z

    1. Initial program 42.2%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\left(-\frac{t \cdot y}{z}\right)} \]
      2. unsub-neg54.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.1 \cdot 10^{+87}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;z \leq -2.5 \cdot 10^{+60}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -0.029:\\ \;\;\;\;\left(-t\right) \cdot \frac{z}{a - z}\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{-75}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-44}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{-6}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{+100}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{+146}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;t - \frac{t}{\frac{z}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 49.1% accurate, 0.3× speedup?

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

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

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

\mathbf{elif}\;z \leq -0.00105:\\
\;\;\;\;\left(-t\right) \cdot \frac{z}{a - z}\\

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 9 regimes
  2. if z < -1.99999999999999984e134

    1. Initial program 60.1%

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

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

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

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

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

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

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

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

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

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

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

    if -1.99999999999999984e134 < z < -3.70000000000000003e61

    1. Initial program 55.7%

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

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

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

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

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

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

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

    if -3.70000000000000003e61 < z < -0.00104999999999999994

    1. Initial program 84.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \color{blue}{\frac{-z}{a - z}} \]
    10. Simplified63.3%

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

    if -0.00104999999999999994 < z < 2.49999999999999982e-77

    1. Initial program 95.7%

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

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

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

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

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

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

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

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

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

    if 2.49999999999999982e-77 < z < 5.6000000000000003e-41

    1. Initial program 89.0%

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

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

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

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

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

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

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

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

    if 5.6000000000000003e-41 < z < 8.50000000000000014e-7

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

    if 8.50000000000000014e-7 < z < 9.00000000000000073e100

    1. Initial program 80.6%

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

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

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

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

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

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

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

    if 9.00000000000000073e100 < z < 8.5e146

    1. Initial program 57.1%

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

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

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

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

        \[\leadsto -\color{blue}{\frac{y}{\frac{z}{t - x}}} \]
      3. associate-/r/68.6%

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

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

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

    if 8.5e146 < z

    1. Initial program 42.2%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\left(-\frac{t \cdot y}{z}\right)} \]
      2. unsub-neg54.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{+134}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;z \leq -3.7 \cdot 10^{+61}:\\ \;\;\;\;\frac{-x}{\frac{a - z}{y}}\\ \mathbf{elif}\;z \leq -0.00105:\\ \;\;\;\;\left(-t\right) \cdot \frac{z}{a - z}\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{-77}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 5.6 \cdot 10^{-41}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-7}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 9 \cdot 10^{+100}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+146}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;t - \frac{t}{\frac{z}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 46.2% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a}\\ t_2 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;z \leq -4.8 \cdot 10^{+159}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{+60}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -215000000:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-26}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{-78}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 7 \cdot 10^{-44}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{+112}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 10^{+151}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) a))) (t_2 (* x (- 1.0 (/ y a)))))
   (if (<= z -4.8e+159)
     t
     (if (<= z -2.3e+60)
       t_2
       (if (<= z -215000000.0)
         t
         (if (<= z -2.6e-26)
           t_1
           (if (<= z 1.35e-78)
             t_2
             (if (<= z 7e-44)
               t_1
               (if (<= z 4.8e+112)
                 t_2
                 (if (<= z 1e+151) (/ x (/ z y)) t))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / a);
	double t_2 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -4.8e+159) {
		tmp = t;
	} else if (z <= -2.3e+60) {
		tmp = t_2;
	} else if (z <= -215000000.0) {
		tmp = t;
	} else if (z <= -2.6e-26) {
		tmp = t_1;
	} else if (z <= 1.35e-78) {
		tmp = t_2;
	} else if (z <= 7e-44) {
		tmp = t_1;
	} else if (z <= 4.8e+112) {
		tmp = t_2;
	} else if (z <= 1e+151) {
		tmp = x / (z / y);
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t * ((y - z) / a)
    t_2 = x * (1.0d0 - (y / a))
    if (z <= (-4.8d+159)) then
        tmp = t
    else if (z <= (-2.3d+60)) then
        tmp = t_2
    else if (z <= (-215000000.0d0)) then
        tmp = t
    else if (z <= (-2.6d-26)) then
        tmp = t_1
    else if (z <= 1.35d-78) then
        tmp = t_2
    else if (z <= 7d-44) then
        tmp = t_1
    else if (z <= 4.8d+112) then
        tmp = t_2
    else if (z <= 1d+151) then
        tmp = x / (z / y)
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / a);
	double t_2 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -4.8e+159) {
		tmp = t;
	} else if (z <= -2.3e+60) {
		tmp = t_2;
	} else if (z <= -215000000.0) {
		tmp = t;
	} else if (z <= -2.6e-26) {
		tmp = t_1;
	} else if (z <= 1.35e-78) {
		tmp = t_2;
	} else if (z <= 7e-44) {
		tmp = t_1;
	} else if (z <= 4.8e+112) {
		tmp = t_2;
	} else if (z <= 1e+151) {
		tmp = x / (z / y);
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / a)
	t_2 = x * (1.0 - (y / a))
	tmp = 0
	if z <= -4.8e+159:
		tmp = t
	elif z <= -2.3e+60:
		tmp = t_2
	elif z <= -215000000.0:
		tmp = t
	elif z <= -2.6e-26:
		tmp = t_1
	elif z <= 1.35e-78:
		tmp = t_2
	elif z <= 7e-44:
		tmp = t_1
	elif z <= 4.8e+112:
		tmp = t_2
	elif z <= 1e+151:
		tmp = x / (z / y)
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(y - z) / a))
	t_2 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (z <= -4.8e+159)
		tmp = t;
	elseif (z <= -2.3e+60)
		tmp = t_2;
	elseif (z <= -215000000.0)
		tmp = t;
	elseif (z <= -2.6e-26)
		tmp = t_1;
	elseif (z <= 1.35e-78)
		tmp = t_2;
	elseif (z <= 7e-44)
		tmp = t_1;
	elseif (z <= 4.8e+112)
		tmp = t_2;
	elseif (z <= 1e+151)
		tmp = Float64(x / Float64(z / y));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((y - z) / a);
	t_2 = x * (1.0 - (y / a));
	tmp = 0.0;
	if (z <= -4.8e+159)
		tmp = t;
	elseif (z <= -2.3e+60)
		tmp = t_2;
	elseif (z <= -215000000.0)
		tmp = t;
	elseif (z <= -2.6e-26)
		tmp = t_1;
	elseif (z <= 1.35e-78)
		tmp = t_2;
	elseif (z <= 7e-44)
		tmp = t_1;
	elseif (z <= 4.8e+112)
		tmp = t_2;
	elseif (z <= 1e+151)
		tmp = x / (z / y);
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.8e+159], t, If[LessEqual[z, -2.3e+60], t$95$2, If[LessEqual[z, -215000000.0], t, If[LessEqual[z, -2.6e-26], t$95$1, If[LessEqual[z, 1.35e-78], t$95$2, If[LessEqual[z, 7e-44], t$95$1, If[LessEqual[z, 4.8e+112], t$95$2, If[LessEqual[z, 1e+151], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision], t]]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -215000000:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq -2.6 \cdot 10^{-26}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.35 \cdot 10^{-78}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq 7 \cdot 10^{-44}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 4.8 \cdot 10^{+112}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq 10^{+151}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -4.8e159 or -2.30000000000000017e60 < z < -2.15e8 or 1.00000000000000002e151 < z

    1. Initial program 51.0%

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

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

    if -4.8e159 < z < -2.30000000000000017e60 or -2.6000000000000001e-26 < z < 1.34999999999999997e-78 or 6.9999999999999995e-44 < z < 4.8e112

    1. Initial program 91.2%

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

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

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

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

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

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

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

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

    if -2.15e8 < z < -2.6000000000000001e-26 or 1.34999999999999997e-78 < z < 6.9999999999999995e-44

    1. Initial program 89.2%

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

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

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

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

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

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

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

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

    if 4.8e112 < z < 1.00000000000000002e151

    1. Initial program 51.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    8. Simplified64.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.8 \cdot 10^{+159}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{+60}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -215000000:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-26}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{-78}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 7 \cdot 10^{-44}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{+112}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 10^{+151}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 37.8% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;z \leq 6.4 \cdot 10^{-240}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 4.5 \cdot 10^{-207}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 4.8 \cdot 10^{-82}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 8.5 \cdot 10^{-31}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 8.4 \cdot 10^{+111}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 5.8 \cdot 10^{+147}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.7999999999999999e-27 or 5.7999999999999997e147 < z

    1. Initial program 58.7%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 43.8%

      \[\leadsto \color{blue}{t} \]

    if -1.7999999999999999e-27 < z < 6.3999999999999998e-240 or 4.49999999999999992e-207 < z < 4.80000000000000017e-82 or 8.5000000000000007e-31 < z < 8.3999999999999998e111

    1. Initial program 94.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 44.2%

      \[\leadsto \color{blue}{x} \]

    if 6.3999999999999998e-240 < z < 4.49999999999999992e-207 or 4.80000000000000017e-82 < z < 8.5000000000000007e-31

    1. Initial program 82.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*r/94.2%

        \[\leadsto x + \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}} \]
      2. clear-num94.2%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{a - z}{\left(y - z\right) \cdot \left(t - x\right)}}} \]
    4. Applied egg-rr94.2%

      \[\leadsto x + \color{blue}{\frac{1}{\frac{a - z}{\left(y - z\right) \cdot \left(t - x\right)}}} \]
    5. Taylor expanded in t around inf 71.0%

      \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
    6. Step-by-step derivation
      1. div-sub71.0%

        \[\leadsto t \cdot \color{blue}{\frac{y - z}{a - z}} \]
    7. Simplified71.0%

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    8. Taylor expanded in z around 0 60.7%

      \[\leadsto t \cdot \color{blue}{\frac{y}{a}} \]

    if 8.3999999999999998e111 < z < 5.7999999999999997e147

    1. Initial program 51.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 17.1%

      \[\leadsto x + \color{blue}{-1 \cdot \frac{\left(t - x\right) \cdot \left(y - z\right)}{z}} \]
    4. Step-by-step derivation
      1. associate-*r/17.1%

        \[\leadsto x + \color{blue}{\frac{-1 \cdot \left(\left(t - x\right) \cdot \left(y - z\right)\right)}{z}} \]
      2. *-commutative17.1%

        \[\leadsto x + \frac{-1 \cdot \color{blue}{\left(\left(y - z\right) \cdot \left(t - x\right)\right)}}{z} \]
      3. neg-mul-117.1%

        \[\leadsto x + \frac{\color{blue}{-\left(y - z\right) \cdot \left(t - x\right)}}{z} \]
      4. distribute-rgt-neg-in17.1%

        \[\leadsto x + \frac{\color{blue}{\left(y - z\right) \cdot \left(-\left(t - x\right)\right)}}{z} \]
      5. associate-/l*39.5%

        \[\leadsto x + \color{blue}{\frac{y - z}{\frac{z}{-\left(t - x\right)}}} \]
    5. Simplified39.5%

      \[\leadsto x + \color{blue}{\frac{y - z}{\frac{z}{-\left(t - x\right)}}} \]
    6. Taylor expanded in x around inf 42.0%

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
    7. Step-by-step derivation
      1. associate-/l*64.3%

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    8. Simplified64.3%

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification45.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.8 \cdot 10^{-27}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 6.4 \cdot 10^{-240}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-207}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{-82}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-31}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 8.4 \cdot 10^{+111}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{+147}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 65.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;z \leq -1.45 \cdot 10^{+82}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -4.1 \cdot 10^{+60}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -0.028:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{+103}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+140}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;t + \frac{a}{\frac{z}{t - x}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) (- a z)))))
   (if (<= z -1.45e+82)
     t_1
     (if (<= z -4.1e+60)
       (* x (/ (- y a) z))
       (if (<= z -0.028)
         t_1
         (if (<= z 2.5e+103)
           (+ x (* (- t x) (/ y a)))
           (if (<= z 6.5e+140)
             (* (/ y z) (- x t))
             (+ t (/ a (/ z (- t x)))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -1.45e+82) {
		tmp = t_1;
	} else if (z <= -4.1e+60) {
		tmp = x * ((y - a) / z);
	} else if (z <= -0.028) {
		tmp = t_1;
	} else if (z <= 2.5e+103) {
		tmp = x + ((t - x) * (y / a));
	} else if (z <= 6.5e+140) {
		tmp = (y / z) * (x - t);
	} else {
		tmp = t + (a / (z / (t - x)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t * ((y - z) / (a - z))
    if (z <= (-1.45d+82)) then
        tmp = t_1
    else if (z <= (-4.1d+60)) then
        tmp = x * ((y - a) / z)
    else if (z <= (-0.028d0)) then
        tmp = t_1
    else if (z <= 2.5d+103) then
        tmp = x + ((t - x) * (y / a))
    else if (z <= 6.5d+140) then
        tmp = (y / z) * (x - t)
    else
        tmp = t + (a / (z / (t - x)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -1.45e+82) {
		tmp = t_1;
	} else if (z <= -4.1e+60) {
		tmp = x * ((y - a) / z);
	} else if (z <= -0.028) {
		tmp = t_1;
	} else if (z <= 2.5e+103) {
		tmp = x + ((t - x) * (y / a));
	} else if (z <= 6.5e+140) {
		tmp = (y / z) * (x - t);
	} else {
		tmp = t + (a / (z / (t - x)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	tmp = 0
	if z <= -1.45e+82:
		tmp = t_1
	elif z <= -4.1e+60:
		tmp = x * ((y - a) / z)
	elif z <= -0.028:
		tmp = t_1
	elif z <= 2.5e+103:
		tmp = x + ((t - x) * (y / a))
	elif z <= 6.5e+140:
		tmp = (y / z) * (x - t)
	else:
		tmp = t + (a / (z / (t - x)))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	tmp = 0.0
	if (z <= -1.45e+82)
		tmp = t_1;
	elseif (z <= -4.1e+60)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	elseif (z <= -0.028)
		tmp = t_1;
	elseif (z <= 2.5e+103)
		tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a)));
	elseif (z <= 6.5e+140)
		tmp = Float64(Float64(y / z) * Float64(x - t));
	else
		tmp = Float64(t + Float64(a / Float64(z / Float64(t - x))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((y - z) / (a - z));
	tmp = 0.0;
	if (z <= -1.45e+82)
		tmp = t_1;
	elseif (z <= -4.1e+60)
		tmp = x * ((y - a) / z);
	elseif (z <= -0.028)
		tmp = t_1;
	elseif (z <= 2.5e+103)
		tmp = x + ((t - x) * (y / a));
	elseif (z <= 6.5e+140)
		tmp = (y / z) * (x - t);
	else
		tmp = t + (a / (z / (t - x)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.45e+82], t$95$1, If[LessEqual[z, -4.1e+60], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -0.028], t$95$1, If[LessEqual[z, 2.5e+103], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.5e+140], N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision], N[(t + N[(a / N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;z \leq -1.45 \cdot 10^{+82}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -4.1 \cdot 10^{+60}:\\
\;\;\;\;x \cdot \frac{y - a}{z}\\

\mathbf{elif}\;z \leq -0.028:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.5 \cdot 10^{+103}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\

\mathbf{elif}\;z \leq 6.5 \cdot 10^{+140}:\\
\;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\

\mathbf{else}:\\
\;\;\;\;t + \frac{a}{\frac{z}{t - x}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.4500000000000001e82 or -4.1e60 < z < -0.0280000000000000006

    1. Initial program 64.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*r/45.2%

        \[\leadsto x + \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}} \]
      2. clear-num45.0%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{a - z}{\left(y - z\right) \cdot \left(t - x\right)}}} \]
    4. Applied egg-rr45.0%

      \[\leadsto x + \color{blue}{\frac{1}{\frac{a - z}{\left(y - z\right) \cdot \left(t - x\right)}}} \]
    5. Taylor expanded in t around inf 66.7%

      \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
    6. Step-by-step derivation
      1. div-sub66.7%

        \[\leadsto t \cdot \color{blue}{\frac{y - z}{a - z}} \]
    7. Simplified66.7%

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]

    if -1.4500000000000001e82 < z < -4.1e60

    1. Initial program 67.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 53.9%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    4. Step-by-step derivation
      1. associate--l+53.9%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--53.9%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub53.9%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg53.9%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg53.9%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. distribute-rgt-out--53.9%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      7. associate-/l*84.4%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    5. Simplified84.4%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    6. Taylor expanded in t around 0 53.9%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - a\right)}{z}} \]
    7. Step-by-step derivation
      1. associate-*r/84.6%

        \[\leadsto \color{blue}{x \cdot \frac{y - a}{z}} \]
    8. Simplified84.6%

      \[\leadsto \color{blue}{x \cdot \frac{y - a}{z}} \]

    if -0.0280000000000000006 < z < 2.5e103

    1. Initial program 93.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 75.7%

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
    4. Step-by-step derivation
      1. associate-/l*79.6%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
      2. associate-/r/81.1%

        \[\leadsto x + \color{blue}{\frac{y}{a} \cdot \left(t - x\right)} \]
    5. Simplified81.1%

      \[\leadsto \color{blue}{x + \frac{y}{a} \cdot \left(t - x\right)} \]

    if 2.5e103 < z < 6.4999999999999999e140

    1. Initial program 63.9%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf 41.7%

      \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a - z}} \]
    4. Taylor expanded in a around 0 41.8%

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right)}{z}} \]
    5. Step-by-step derivation
      1. mul-1-neg41.8%

        \[\leadsto \color{blue}{-\frac{y \cdot \left(t - x\right)}{z}} \]
      2. associate-/l*75.8%

        \[\leadsto -\color{blue}{\frac{y}{\frac{z}{t - x}}} \]
      3. associate-/r/75.9%

        \[\leadsto -\color{blue}{\frac{y}{z} \cdot \left(t - x\right)} \]
      4. distribute-rgt-neg-in75.9%

        \[\leadsto \color{blue}{\frac{y}{z} \cdot \left(-\left(t - x\right)\right)} \]
    6. Simplified75.9%

      \[\leadsto \color{blue}{\frac{y}{z} \cdot \left(-\left(t - x\right)\right)} \]

    if 6.4999999999999999e140 < z

    1. Initial program 41.3%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 66.0%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    4. Step-by-step derivation
      1. associate--l+66.0%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--66.0%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub66.1%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg66.1%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg66.1%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. distribute-rgt-out--66.2%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      7. associate-/l*88.8%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    5. Simplified88.8%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    6. Taylor expanded in y around 0 54.5%

      \[\leadsto \color{blue}{t - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    7. Step-by-step derivation
      1. sub-neg54.5%

        \[\leadsto \color{blue}{t + \left(--1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. mul-1-neg54.5%

        \[\leadsto t + \left(-\color{blue}{\left(-\frac{a \cdot \left(t - x\right)}{z}\right)}\right) \]
      3. remove-double-neg54.5%

        \[\leadsto t + \color{blue}{\frac{a \cdot \left(t - x\right)}{z}} \]
      4. associate-/l*66.9%

        \[\leadsto t + \color{blue}{\frac{a}{\frac{z}{t - x}}} \]
    8. Simplified66.9%

      \[\leadsto \color{blue}{t + \frac{a}{\frac{z}{t - x}}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification76.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.45 \cdot 10^{+82}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq -4.1 \cdot 10^{+60}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -0.028:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{+103}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+140}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;t + \frac{a}{\frac{z}{t - x}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 38.3% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y}{a}\\ \mathbf{if}\;z \leq -1.8 \cdot 10^{-27}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 5.3 \cdot 10^{-241}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-208}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 5.1 \cdot 10^{-82}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{-30}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.35 \cdot 10^{+111}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ y a))))
   (if (<= z -1.8e-27)
     t
     (if (<= z 5.3e-241)
       x
       (if (<= z 5.8e-208)
         t_1
         (if (<= z 5.1e-82)
           x
           (if (<= z 4.2e-30) t_1 (if (<= z 2.35e+111) x t))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (y / a);
	double tmp;
	if (z <= -1.8e-27) {
		tmp = t;
	} else if (z <= 5.3e-241) {
		tmp = x;
	} else if (z <= 5.8e-208) {
		tmp = t_1;
	} else if (z <= 5.1e-82) {
		tmp = x;
	} else if (z <= 4.2e-30) {
		tmp = t_1;
	} else if (z <= 2.35e+111) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t * (y / a)
    if (z <= (-1.8d-27)) then
        tmp = t
    else if (z <= 5.3d-241) then
        tmp = x
    else if (z <= 5.8d-208) then
        tmp = t_1
    else if (z <= 5.1d-82) then
        tmp = x
    else if (z <= 4.2d-30) then
        tmp = t_1
    else if (z <= 2.35d+111) then
        tmp = x
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (y / a);
	double tmp;
	if (z <= -1.8e-27) {
		tmp = t;
	} else if (z <= 5.3e-241) {
		tmp = x;
	} else if (z <= 5.8e-208) {
		tmp = t_1;
	} else if (z <= 5.1e-82) {
		tmp = x;
	} else if (z <= 4.2e-30) {
		tmp = t_1;
	} else if (z <= 2.35e+111) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (y / a)
	tmp = 0
	if z <= -1.8e-27:
		tmp = t
	elif z <= 5.3e-241:
		tmp = x
	elif z <= 5.8e-208:
		tmp = t_1
	elif z <= 5.1e-82:
		tmp = x
	elif z <= 4.2e-30:
		tmp = t_1
	elif z <= 2.35e+111:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(y / a))
	tmp = 0.0
	if (z <= -1.8e-27)
		tmp = t;
	elseif (z <= 5.3e-241)
		tmp = x;
	elseif (z <= 5.8e-208)
		tmp = t_1;
	elseif (z <= 5.1e-82)
		tmp = x;
	elseif (z <= 4.2e-30)
		tmp = t_1;
	elseif (z <= 2.35e+111)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (y / a);
	tmp = 0.0;
	if (z <= -1.8e-27)
		tmp = t;
	elseif (z <= 5.3e-241)
		tmp = x;
	elseif (z <= 5.8e-208)
		tmp = t_1;
	elseif (z <= 5.1e-82)
		tmp = x;
	elseif (z <= 4.2e-30)
		tmp = t_1;
	elseif (z <= 2.35e+111)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.8e-27], t, If[LessEqual[z, 5.3e-241], x, If[LessEqual[z, 5.8e-208], t$95$1, If[LessEqual[z, 5.1e-82], x, If[LessEqual[z, 4.2e-30], t$95$1, If[LessEqual[z, 2.35e+111], x, t]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{a}\\
\mathbf{if}\;z \leq -1.8 \cdot 10^{-27}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 5.3 \cdot 10^{-241}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 5.8 \cdot 10^{-208}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 5.1 \cdot 10^{-82}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 4.2 \cdot 10^{-30}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.35 \cdot 10^{+111}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;t\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.7999999999999999e-27 or 2.35000000000000004e111 < z

    1. Initial program 58.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 40.9%

      \[\leadsto \color{blue}{t} \]

    if -1.7999999999999999e-27 < z < 5.2999999999999998e-241 or 5.7999999999999999e-208 < z < 5.09999999999999992e-82 or 4.2000000000000004e-30 < z < 2.35000000000000004e111

    1. Initial program 94.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 44.2%

      \[\leadsto \color{blue}{x} \]

    if 5.2999999999999998e-241 < z < 5.7999999999999999e-208 or 5.09999999999999992e-82 < z < 4.2000000000000004e-30

    1. Initial program 82.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*r/94.2%

        \[\leadsto x + \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}} \]
      2. clear-num94.2%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{a - z}{\left(y - z\right) \cdot \left(t - x\right)}}} \]
    4. Applied egg-rr94.2%

      \[\leadsto x + \color{blue}{\frac{1}{\frac{a - z}{\left(y - z\right) \cdot \left(t - x\right)}}} \]
    5. Taylor expanded in t around inf 71.0%

      \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
    6. Step-by-step derivation
      1. div-sub71.0%

        \[\leadsto t \cdot \color{blue}{\frac{y - z}{a - z}} \]
    7. Simplified71.0%

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    8. Taylor expanded in z around 0 60.7%

      \[\leadsto t \cdot \color{blue}{\frac{y}{a}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification43.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.8 \cdot 10^{-27}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 5.3 \cdot 10^{-241}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-208}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 5.1 \cdot 10^{-82}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{-30}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 2.35 \cdot 10^{+111}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 30.0% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -5 \cdot 10^{+224}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;x \leq -2.6 \cdot 10^{+63}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -1.4 \cdot 10^{-162}:\\ \;\;\;\;t\\ \mathbf{elif}\;x \leq 5.2 \cdot 10^{-69}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;x \leq 8 \cdot 10^{+144}:\\ \;\;\;\;\frac{x}{a} \cdot \left(-y\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= x -5e+224)
   (/ x (/ z y))
   (if (<= x -2.6e+63)
     x
     (if (<= x -1.4e-162)
       t
       (if (<= x 5.2e-69)
         (* t (/ (- y z) a))
         (if (<= x 8e+144) (* (/ x a) (- y)) x))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (x <= -5e+224) {
		tmp = x / (z / y);
	} else if (x <= -2.6e+63) {
		tmp = x;
	} else if (x <= -1.4e-162) {
		tmp = t;
	} else if (x <= 5.2e-69) {
		tmp = t * ((y - z) / a);
	} else if (x <= 8e+144) {
		tmp = (x / a) * -y;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (x <= (-5d+224)) then
        tmp = x / (z / y)
    else if (x <= (-2.6d+63)) then
        tmp = x
    else if (x <= (-1.4d-162)) then
        tmp = t
    else if (x <= 5.2d-69) then
        tmp = t * ((y - z) / a)
    else if (x <= 8d+144) then
        tmp = (x / a) * -y
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (x <= -5e+224) {
		tmp = x / (z / y);
	} else if (x <= -2.6e+63) {
		tmp = x;
	} else if (x <= -1.4e-162) {
		tmp = t;
	} else if (x <= 5.2e-69) {
		tmp = t * ((y - z) / a);
	} else if (x <= 8e+144) {
		tmp = (x / a) * -y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if x <= -5e+224:
		tmp = x / (z / y)
	elif x <= -2.6e+63:
		tmp = x
	elif x <= -1.4e-162:
		tmp = t
	elif x <= 5.2e-69:
		tmp = t * ((y - z) / a)
	elif x <= 8e+144:
		tmp = (x / a) * -y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (x <= -5e+224)
		tmp = Float64(x / Float64(z / y));
	elseif (x <= -2.6e+63)
		tmp = x;
	elseif (x <= -1.4e-162)
		tmp = t;
	elseif (x <= 5.2e-69)
		tmp = Float64(t * Float64(Float64(y - z) / a));
	elseif (x <= 8e+144)
		tmp = Float64(Float64(x / a) * Float64(-y));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (x <= -5e+224)
		tmp = x / (z / y);
	elseif (x <= -2.6e+63)
		tmp = x;
	elseif (x <= -1.4e-162)
		tmp = t;
	elseif (x <= 5.2e-69)
		tmp = t * ((y - z) / a);
	elseif (x <= 8e+144)
		tmp = (x / a) * -y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -5e+224], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.6e+63], x, If[LessEqual[x, -1.4e-162], t, If[LessEqual[x, 5.2e-69], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8e+144], N[(N[(x / a), $MachinePrecision] * (-y)), $MachinePrecision], x]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -5 \cdot 10^{+224}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\

\mathbf{elif}\;x \leq -2.6 \cdot 10^{+63}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq -1.4 \cdot 10^{-162}:\\
\;\;\;\;t\\

\mathbf{elif}\;x \leq 5.2 \cdot 10^{-69}:\\
\;\;\;\;t \cdot \frac{y - z}{a}\\

\mathbf{elif}\;x \leq 8 \cdot 10^{+144}:\\
\;\;\;\;\frac{x}{a} \cdot \left(-y\right)\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -4.99999999999999964e224

    1. Initial program 64.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 34.6%

      \[\leadsto x + \color{blue}{-1 \cdot \frac{\left(t - x\right) \cdot \left(y - z\right)}{z}} \]
    4. Step-by-step derivation
      1. associate-*r/34.6%

        \[\leadsto x + \color{blue}{\frac{-1 \cdot \left(\left(t - x\right) \cdot \left(y - z\right)\right)}{z}} \]
      2. *-commutative34.6%

        \[\leadsto x + \frac{-1 \cdot \color{blue}{\left(\left(y - z\right) \cdot \left(t - x\right)\right)}}{z} \]
      3. neg-mul-134.6%

        \[\leadsto x + \frac{\color{blue}{-\left(y - z\right) \cdot \left(t - x\right)}}{z} \]
      4. distribute-rgt-neg-in34.6%

        \[\leadsto x + \frac{\color{blue}{\left(y - z\right) \cdot \left(-\left(t - x\right)\right)}}{z} \]
      5. associate-/l*43.4%

        \[\leadsto x + \color{blue}{\frac{y - z}{\frac{z}{-\left(t - x\right)}}} \]
    5. Simplified43.4%

      \[\leadsto x + \color{blue}{\frac{y - z}{\frac{z}{-\left(t - x\right)}}} \]
    6. Taylor expanded in x around inf 42.4%

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
    7. Step-by-step derivation
      1. associate-/l*58.8%

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    8. Simplified58.8%

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]

    if -4.99999999999999964e224 < x < -2.6000000000000001e63 or 8.00000000000000019e144 < x

    1. Initial program 76.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 48.6%

      \[\leadsto \color{blue}{x} \]

    if -2.6000000000000001e63 < x < -1.40000000000000011e-162

    1. Initial program 74.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 32.8%

      \[\leadsto \color{blue}{t} \]

    if -1.40000000000000011e-162 < x < 5.2000000000000004e-69

    1. Initial program 83.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*r/83.4%

        \[\leadsto x + \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}} \]
      2. clear-num83.2%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{a - z}{\left(y - z\right) \cdot \left(t - x\right)}}} \]
    4. Applied egg-rr83.2%

      \[\leadsto x + \color{blue}{\frac{1}{\frac{a - z}{\left(y - z\right) \cdot \left(t - x\right)}}} \]
    5. Taylor expanded in t around inf 77.5%

      \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
    6. Step-by-step derivation
      1. div-sub77.6%

        \[\leadsto t \cdot \color{blue}{\frac{y - z}{a - z}} \]
    7. Simplified77.6%

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    8. Taylor expanded in a around inf 49.2%

      \[\leadsto t \cdot \color{blue}{\frac{y - z}{a}} \]

    if 5.2000000000000004e-69 < x < 8.00000000000000019e144

    1. Initial program 85.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 48.2%

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
    4. Step-by-step derivation
      1. associate-/l*54.7%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    5. Simplified54.7%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a}{t - x}}} \]
    6. Taylor expanded in t around 0 48.1%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{x \cdot y}{a}} \]
    7. Step-by-step derivation
      1. mul-1-neg48.1%

        \[\leadsto x + \color{blue}{\left(-\frac{x \cdot y}{a}\right)} \]
      2. unsub-neg48.1%

        \[\leadsto \color{blue}{x - \frac{x \cdot y}{a}} \]
      3. associate-/l*54.6%

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a}{y}}} \]
    8. Simplified54.6%

      \[\leadsto \color{blue}{x - \frac{x}{\frac{a}{y}}} \]
    9. Taylor expanded in a around 0 29.6%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{a}} \]
    10. Step-by-step derivation
      1. mul-1-neg29.6%

        \[\leadsto \color{blue}{-\frac{x \cdot y}{a}} \]
      2. associate-*l/36.2%

        \[\leadsto -\color{blue}{\frac{x}{a} \cdot y} \]
      3. distribute-rgt-neg-out36.2%

        \[\leadsto \color{blue}{\frac{x}{a} \cdot \left(-y\right)} \]
    11. Simplified36.2%

      \[\leadsto \color{blue}{\frac{x}{a} \cdot \left(-y\right)} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification45.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5 \cdot 10^{+224}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;x \leq -2.6 \cdot 10^{+63}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -1.4 \cdot 10^{-162}:\\ \;\;\;\;t\\ \mathbf{elif}\;x \leq 5.2 \cdot 10^{-69}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;x \leq 8 \cdot 10^{+144}:\\ \;\;\;\;\frac{x}{a} \cdot \left(-y\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 33.0% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.7 \cdot 10^{+224}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;x \leq -1.15 \cdot 10^{+67}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -2.3 \cdot 10^{-158}:\\ \;\;\;\;t\\ \mathbf{elif}\;x \leq 6 \cdot 10^{+18}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= x -2.7e+224)
   (/ x (/ z y))
   (if (<= x -1.15e+67)
     x
     (if (<= x -2.3e-158) t (if (<= x 6e+18) (* t (/ y (- a z))) x)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (x <= -2.7e+224) {
		tmp = x / (z / y);
	} else if (x <= -1.15e+67) {
		tmp = x;
	} else if (x <= -2.3e-158) {
		tmp = t;
	} else if (x <= 6e+18) {
		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 (x <= (-2.7d+224)) then
        tmp = x / (z / y)
    else if (x <= (-1.15d+67)) then
        tmp = x
    else if (x <= (-2.3d-158)) then
        tmp = t
    else if (x <= 6d+18) 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 (x <= -2.7e+224) {
		tmp = x / (z / y);
	} else if (x <= -1.15e+67) {
		tmp = x;
	} else if (x <= -2.3e-158) {
		tmp = t;
	} else if (x <= 6e+18) {
		tmp = t * (y / (a - z));
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if x <= -2.7e+224:
		tmp = x / (z / y)
	elif x <= -1.15e+67:
		tmp = x
	elif x <= -2.3e-158:
		tmp = t
	elif x <= 6e+18:
		tmp = t * (y / (a - z))
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (x <= -2.7e+224)
		tmp = Float64(x / Float64(z / y));
	elseif (x <= -1.15e+67)
		tmp = x;
	elseif (x <= -2.3e-158)
		tmp = t;
	elseif (x <= 6e+18)
		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 (x <= -2.7e+224)
		tmp = x / (z / y);
	elseif (x <= -1.15e+67)
		tmp = x;
	elseif (x <= -2.3e-158)
		tmp = t;
	elseif (x <= 6e+18)
		tmp = t * (y / (a - z));
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -2.7e+224], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.15e+67], x, If[LessEqual[x, -2.3e-158], t, If[LessEqual[x, 6e+18], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.7 \cdot 10^{+224}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\

\mathbf{elif}\;x \leq -1.15 \cdot 10^{+67}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq -2.3 \cdot 10^{-158}:\\
\;\;\;\;t\\

\mathbf{elif}\;x \leq 6 \cdot 10^{+18}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -2.6999999999999999e224

    1. Initial program 64.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 34.6%

      \[\leadsto x + \color{blue}{-1 \cdot \frac{\left(t - x\right) \cdot \left(y - z\right)}{z}} \]
    4. Step-by-step derivation
      1. associate-*r/34.6%

        \[\leadsto x + \color{blue}{\frac{-1 \cdot \left(\left(t - x\right) \cdot \left(y - z\right)\right)}{z}} \]
      2. *-commutative34.6%

        \[\leadsto x + \frac{-1 \cdot \color{blue}{\left(\left(y - z\right) \cdot \left(t - x\right)\right)}}{z} \]
      3. neg-mul-134.6%

        \[\leadsto x + \frac{\color{blue}{-\left(y - z\right) \cdot \left(t - x\right)}}{z} \]
      4. distribute-rgt-neg-in34.6%

        \[\leadsto x + \frac{\color{blue}{\left(y - z\right) \cdot \left(-\left(t - x\right)\right)}}{z} \]
      5. associate-/l*43.4%

        \[\leadsto x + \color{blue}{\frac{y - z}{\frac{z}{-\left(t - x\right)}}} \]
    5. Simplified43.4%

      \[\leadsto x + \color{blue}{\frac{y - z}{\frac{z}{-\left(t - x\right)}}} \]
    6. Taylor expanded in x around inf 42.4%

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
    7. Step-by-step derivation
      1. associate-/l*58.8%

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    8. Simplified58.8%

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]

    if -2.6999999999999999e224 < x < -1.1499999999999999e67 or 6e18 < x

    1. Initial program 78.3%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 42.8%

      \[\leadsto \color{blue}{x} \]

    if -1.1499999999999999e67 < x < -2.2999999999999999e-158

    1. Initial program 74.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 32.8%

      \[\leadsto \color{blue}{t} \]

    if -2.2999999999999999e-158 < x < 6e18

    1. Initial program 84.7%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*r/84.6%

        \[\leadsto x + \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}} \]
      2. clear-num84.4%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{a - z}{\left(y - z\right) \cdot \left(t - x\right)}}} \]
    4. Applied egg-rr84.4%

      \[\leadsto x + \color{blue}{\frac{1}{\frac{a - z}{\left(y - z\right) \cdot \left(t - x\right)}}} \]
    5. Taylor expanded in t around inf 73.4%

      \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
    6. Step-by-step derivation
      1. div-sub73.5%

        \[\leadsto t \cdot \color{blue}{\frac{y - z}{a - z}} \]
    7. Simplified73.5%

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    8. Taylor expanded in y around inf 42.3%

      \[\leadsto t \cdot \color{blue}{\frac{y}{a - z}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification42.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.7 \cdot 10^{+224}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;x \leq -1.15 \cdot 10^{+67}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -2.3 \cdot 10^{-158}:\\ \;\;\;\;t\\ \mathbf{elif}\;x \leq 6 \cdot 10^{+18}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 60.0% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -6.8 \cdot 10^{+222}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;x \leq -1.5 \cdot 10^{+79} \lor \neg \left(x \leq 2.5 \cdot 10^{+51}\right):\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= x -6.8e+222)
   (* x (/ (- y a) z))
   (if (or (<= x -1.5e+79) (not (<= x 2.5e+51)))
     (- x (/ x (/ a y)))
     (* t (/ (- y z) (- a z))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (x <= -6.8e+222) {
		tmp = x * ((y - a) / z);
	} else if ((x <= -1.5e+79) || !(x <= 2.5e+51)) {
		tmp = x - (x / (a / y));
	} 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 <= (-6.8d+222)) then
        tmp = x * ((y - a) / z)
    else if ((x <= (-1.5d+79)) .or. (.not. (x <= 2.5d+51))) then
        tmp = x - (x / (a / y))
    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 <= -6.8e+222) {
		tmp = x * ((y - a) / z);
	} else if ((x <= -1.5e+79) || !(x <= 2.5e+51)) {
		tmp = x - (x / (a / y));
	} else {
		tmp = t * ((y - z) / (a - z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if x <= -6.8e+222:
		tmp = x * ((y - a) / z)
	elif (x <= -1.5e+79) or not (x <= 2.5e+51):
		tmp = x - (x / (a / y))
	else:
		tmp = t * ((y - z) / (a - z))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (x <= -6.8e+222)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	elseif ((x <= -1.5e+79) || !(x <= 2.5e+51))
		tmp = Float64(x - Float64(x / Float64(a / y)));
	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 <= -6.8e+222)
		tmp = x * ((y - a) / z);
	elseif ((x <= -1.5e+79) || ~((x <= 2.5e+51)))
		tmp = x - (x / (a / y));
	else
		tmp = t * ((y - z) / (a - z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -6.8e+222], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -1.5e+79], N[Not[LessEqual[x, 2.5e+51]], $MachinePrecision]], N[(x - N[(x / N[(a / y), $MachinePrecision]), $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 -6.8 \cdot 10^{+222}:\\
\;\;\;\;x \cdot \frac{y - a}{z}\\

\mathbf{elif}\;x \leq -1.5 \cdot 10^{+79} \lor \neg \left(x \leq 2.5 \cdot 10^{+51}\right):\\
\;\;\;\;x - \frac{x}{\frac{a}{y}}\\

\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -6.80000000000000032e222

    1. Initial program 64.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 42.4%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    4. Step-by-step derivation
      1. associate--l+42.4%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--42.4%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub50.0%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg50.0%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg50.0%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. distribute-rgt-out--50.2%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      7. associate-/l*76.7%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    5. Simplified76.7%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    6. Taylor expanded in t around 0 43.6%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - a\right)}{z}} \]
    7. Step-by-step derivation
      1. associate-*r/70.2%

        \[\leadsto \color{blue}{x \cdot \frac{y - a}{z}} \]
    8. Simplified70.2%

      \[\leadsto \color{blue}{x \cdot \frac{y - a}{z}} \]

    if -6.80000000000000032e222 < x < -1.49999999999999987e79 or 2.5e51 < x

    1. Initial program 77.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 58.8%

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
    4. Step-by-step derivation
      1. associate-/l*64.6%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    5. Simplified64.6%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a}{t - x}}} \]
    6. Taylor expanded in t around 0 56.5%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{x \cdot y}{a}} \]
    7. Step-by-step derivation
      1. mul-1-neg56.5%

        \[\leadsto x + \color{blue}{\left(-\frac{x \cdot y}{a}\right)} \]
      2. unsub-neg56.5%

        \[\leadsto \color{blue}{x - \frac{x \cdot y}{a}} \]
      3. associate-/l*61.9%

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a}{y}}} \]
    8. Simplified61.9%

      \[\leadsto \color{blue}{x - \frac{x}{\frac{a}{y}}} \]

    if -1.49999999999999987e79 < x < 2.5e51

    1. Initial program 81.3%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*r/76.3%

        \[\leadsto x + \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}} \]
      2. clear-num76.3%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{a - z}{\left(y - z\right) \cdot \left(t - x\right)}}} \]
    4. Applied egg-rr76.3%

      \[\leadsto x + \color{blue}{\frac{1}{\frac{a - z}{\left(y - z\right) \cdot \left(t - x\right)}}} \]
    5. Taylor expanded in t around inf 65.2%

      \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
    6. Step-by-step derivation
      1. div-sub65.2%

        \[\leadsto t \cdot \color{blue}{\frac{y - z}{a - z}} \]
    7. Simplified65.2%

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification64.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6.8 \cdot 10^{+222}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;x \leq -1.5 \cdot 10^{+79} \lor \neg \left(x \leq 2.5 \cdot 10^{+51}\right):\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 71.5% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -145000000 \lor \neg \left(z \leq 1.65 \cdot 10^{+112}\right):\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{x - t}{\frac{a}{y - z}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -145000000.0) (not (<= z 1.65e+112)))
   (+ t (* y (/ (- x t) z)))
   (- x (/ (- x t) (/ a (- y z))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -145000000.0) || !(z <= 1.65e+112)) {
		tmp = t + (y * ((x - t) / z));
	} else {
		tmp = x - ((x - t) / (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 ((z <= (-145000000.0d0)) .or. (.not. (z <= 1.65d+112))) then
        tmp = t + (y * ((x - t) / z))
    else
        tmp = x - ((x - t) / (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 ((z <= -145000000.0) || !(z <= 1.65e+112)) {
		tmp = t + (y * ((x - t) / z));
	} else {
		tmp = x - ((x - t) / (a / (y - z)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -145000000.0) or not (z <= 1.65e+112):
		tmp = t + (y * ((x - t) / z))
	else:
		tmp = x - ((x - t) / (a / (y - z)))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -145000000.0) || !(z <= 1.65e+112))
		tmp = Float64(t + Float64(y * Float64(Float64(x - t) / z)));
	else
		tmp = Float64(x - Float64(Float64(x - t) / Float64(a / Float64(y - z))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -145000000.0) || ~((z <= 1.65e+112)))
		tmp = t + (y * ((x - t) / z));
	else
		tmp = x - ((x - t) / (a / (y - z)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -145000000.0], N[Not[LessEqual[z, 1.65e+112]], $MachinePrecision]], N[(t + N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(x - t), $MachinePrecision] / N[(a / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -145000000 \lor \neg \left(z \leq 1.65 \cdot 10^{+112}\right):\\
\;\;\;\;t + y \cdot \frac{x - t}{z}\\

\mathbf{else}:\\
\;\;\;\;x - \frac{x - t}{\frac{a}{y - z}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.45e8 or 1.64999999999999995e112 < z

    1. Initial program 54.5%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 64.2%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    4. Step-by-step derivation
      1. associate--l+64.2%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--64.2%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub64.2%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg64.2%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg64.2%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. distribute-rgt-out--64.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}{\frac{t - x}{\frac{z}{y - a}}} \]
    5. Simplified85.5%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    6. Taylor expanded in y around inf 60.4%

      \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]
    7. Step-by-step derivation
      1. associate-*r/75.6%

        \[\leadsto t - \color{blue}{y \cdot \frac{t - x}{z}} \]
    8. Simplified75.6%

      \[\leadsto t - \color{blue}{y \cdot \frac{t - x}{z}} \]

    if -1.45e8 < z < 1.64999999999999995e112

    1. Initial program 93.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 77.1%

      \[\leadsto \color{blue}{x + \frac{\left(t - x\right) \cdot \left(y - z\right)}{a}} \]
    4. Step-by-step derivation
      1. associate-/l*84.4%

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a}{y - z}}} \]
    5. Simplified84.4%

      \[\leadsto \color{blue}{x + \frac{t - x}{\frac{a}{y - z}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification81.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -145000000 \lor \neg \left(z \leq 1.65 \cdot 10^{+112}\right):\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{x - t}{\frac{a}{y - z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 75.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -140000000 \lor \neg \left(z \leq 3.1 \cdot 10^{+111}\right):\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{x - t}{\frac{a}{y - z}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -140000000.0) (not (<= z 3.1e+111)))
   (+ t (/ (- x t) (/ z (- y a))))
   (- x (/ (- x t) (/ a (- y z))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -140000000.0) || !(z <= 3.1e+111)) {
		tmp = t + ((x - t) / (z / (y - a)));
	} else {
		tmp = x - ((x - t) / (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 ((z <= (-140000000.0d0)) .or. (.not. (z <= 3.1d+111))) then
        tmp = t + ((x - t) / (z / (y - a)))
    else
        tmp = x - ((x - t) / (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 ((z <= -140000000.0) || !(z <= 3.1e+111)) {
		tmp = t + ((x - t) / (z / (y - a)));
	} else {
		tmp = x - ((x - t) / (a / (y - z)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -140000000.0) or not (z <= 3.1e+111):
		tmp = t + ((x - t) / (z / (y - a)))
	else:
		tmp = x - ((x - t) / (a / (y - z)))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -140000000.0) || !(z <= 3.1e+111))
		tmp = Float64(t + Float64(Float64(x - t) / Float64(z / Float64(y - a))));
	else
		tmp = Float64(x - Float64(Float64(x - t) / Float64(a / Float64(y - z))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -140000000.0) || ~((z <= 3.1e+111)))
		tmp = t + ((x - t) / (z / (y - a)));
	else
		tmp = x - ((x - t) / (a / (y - z)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -140000000.0], N[Not[LessEqual[z, 3.1e+111]], $MachinePrecision]], N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(x - t), $MachinePrecision] / N[(a / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -140000000 \lor \neg \left(z \leq 3.1 \cdot 10^{+111}\right):\\
\;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\

\mathbf{else}:\\
\;\;\;\;x - \frac{x - t}{\frac{a}{y - z}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.4e8 or 3.1e111 < z

    1. Initial program 54.5%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 64.2%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    4. Step-by-step derivation
      1. associate--l+64.2%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--64.2%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub64.2%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg64.2%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg64.2%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. distribute-rgt-out--64.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}{\frac{t - x}{\frac{z}{y - a}}} \]
    5. Simplified85.5%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]

    if -1.4e8 < z < 3.1e111

    1. Initial program 93.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 77.1%

      \[\leadsto \color{blue}{x + \frac{\left(t - x\right) \cdot \left(y - z\right)}{a}} \]
    4. Step-by-step derivation
      1. associate-/l*84.4%

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a}{y - z}}} \]
    5. Simplified84.4%

      \[\leadsto \color{blue}{x + \frac{t - x}{\frac{a}{y - z}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification84.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -140000000 \lor \neg \left(z \leq 3.1 \cdot 10^{+111}\right):\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{x - t}{\frac{a}{y - z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 69.0% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -145000000 \lor \neg \left(z \leq 3.1 \cdot 10^{+111}\right):\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -145000000.0) (not (<= z 3.1e+111)))
   (+ t (* y (/ (- x t) z)))
   (+ x (* (- t x) (/ y a)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -145000000.0) || !(z <= 3.1e+111)) {
		tmp = t + (y * ((x - t) / z));
	} else {
		tmp = x + ((t - x) * (y / a));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((z <= (-145000000.0d0)) .or. (.not. (z <= 3.1d+111))) then
        tmp = t + (y * ((x - t) / z))
    else
        tmp = x + ((t - x) * (y / a))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -145000000.0) || !(z <= 3.1e+111)) {
		tmp = t + (y * ((x - t) / z));
	} else {
		tmp = x + ((t - x) * (y / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -145000000.0) or not (z <= 3.1e+111):
		tmp = t + (y * ((x - t) / z))
	else:
		tmp = x + ((t - x) * (y / a))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -145000000.0) || !(z <= 3.1e+111))
		tmp = Float64(t + Float64(y * Float64(Float64(x - t) / z)));
	else
		tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -145000000.0) || ~((z <= 3.1e+111)))
		tmp = t + (y * ((x - t) / z));
	else
		tmp = x + ((t - x) * (y / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -145000000.0], N[Not[LessEqual[z, 3.1e+111]], $MachinePrecision]], N[(t + N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -145000000 \lor \neg \left(z \leq 3.1 \cdot 10^{+111}\right):\\
\;\;\;\;t + y \cdot \frac{x - t}{z}\\

\mathbf{else}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.45e8 or 3.1e111 < z

    1. Initial program 54.5%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 64.2%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    4. Step-by-step derivation
      1. associate--l+64.2%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--64.2%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub64.2%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg64.2%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg64.2%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. distribute-rgt-out--64.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}{\frac{t - x}{\frac{z}{y - a}}} \]
    5. Simplified85.5%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    6. Taylor expanded in y around inf 60.4%

      \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]
    7. Step-by-step derivation
      1. associate-*r/75.6%

        \[\leadsto t - \color{blue}{y \cdot \frac{t - x}{z}} \]
    8. Simplified75.6%

      \[\leadsto t - \color{blue}{y \cdot \frac{t - x}{z}} \]

    if -1.45e8 < z < 3.1e111

    1. Initial program 93.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 74.5%

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
    4. Step-by-step derivation
      1. associate-/l*77.7%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
      2. associate-/r/79.8%

        \[\leadsto x + \color{blue}{\frac{y}{a} \cdot \left(t - x\right)} \]
    5. Simplified79.8%

      \[\leadsto \color{blue}{x + \frac{y}{a} \cdot \left(t - x\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification78.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -145000000 \lor \neg \left(z \leq 3.1 \cdot 10^{+111}\right):\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 38.9% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.8 \cdot 10^{-27}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.72 \cdot 10^{+112}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -1.8e-27) t (if (<= z 1.72e+112) x t)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.8e-27) {
		tmp = t;
	} else if (z <= 1.72e+112) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-1.8d-27)) then
        tmp = t
    else if (z <= 1.72d+112) then
        tmp = x
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.8e-27) {
		tmp = t;
	} else if (z <= 1.72e+112) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -1.8e-27:
		tmp = t
	elif z <= 1.72e+112:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -1.8e-27)
		tmp = t;
	elseif (z <= 1.72e+112)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -1.8e-27)
		tmp = t;
	elseif (z <= 1.72e+112)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.8e-27], t, If[LessEqual[z, 1.72e+112], x, t]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{-27}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 1.72 \cdot 10^{+112}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;t\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.7999999999999999e-27 or 1.71999999999999997e112 < z

    1. Initial program 58.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 40.9%

      \[\leadsto \color{blue}{t} \]

    if -1.7999999999999999e-27 < z < 1.71999999999999997e112

    1. Initial program 93.3%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 39.6%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification40.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.8 \cdot 10^{-27}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.72 \cdot 10^{+112}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 25.8% 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 78.2%

    \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
  2. Add Preprocessing
  3. Taylor expanded in z around inf 21.4%

    \[\leadsto \color{blue}{t} \]
  4. Final simplification21.4%

    \[\leadsto t \]
  5. Add Preprocessing

Reproduce

?
herbie shell --seed 2024036 
(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)))))