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

Percentage Accurate: 67.6% → 88.6%
Time: 30.4s
Alternatives: 24
Speedup: 0.6×

Specification

?
\[\begin{array}{l} \\ x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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(Float64(y - z) * 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[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

\[\begin{array}{l} \\ x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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(Float64(y - z) * 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[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 88.6% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 74.5%

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

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

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

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

    1. Initial program 3.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 45.8% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;z \leq -5 \cdot 10^{+50}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{-117}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -3.1 \cdot 10^{-220}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq -6.5 \cdot 10^{-235}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 8.6 \cdot 10^{-267}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{-28}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{+125}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{+190}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y a)))))
   (if (<= z -5e+50)
     t
     (if (<= z -7.5e-117)
       t_1
       (if (<= z -3.1e-220)
         (* y (/ (- t x) a))
         (if (<= z -6.5e-235)
           t_1
           (if (<= z 8.6e-267)
             (+ x (/ (* y t) a))
             (if (<= z 4.4e-28)
               t_1
               (if (<= z 2.05e+125)
                 t
                 (if (<= z 8.2e+190) (* t (/ (- y z) a)) t))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -5e+50) {
		tmp = t;
	} else if (z <= -7.5e-117) {
		tmp = t_1;
	} else if (z <= -3.1e-220) {
		tmp = y * ((t - x) / a);
	} else if (z <= -6.5e-235) {
		tmp = t_1;
	} else if (z <= 8.6e-267) {
		tmp = x + ((y * t) / a);
	} else if (z <= 4.4e-28) {
		tmp = t_1;
	} else if (z <= 2.05e+125) {
		tmp = t;
	} else if (z <= 8.2e+190) {
		tmp = t * ((y - z) / a);
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * (1.0d0 - (y / a))
    if (z <= (-5d+50)) then
        tmp = t
    else if (z <= (-7.5d-117)) then
        tmp = t_1
    else if (z <= (-3.1d-220)) then
        tmp = y * ((t - x) / a)
    else if (z <= (-6.5d-235)) then
        tmp = t_1
    else if (z <= 8.6d-267) then
        tmp = x + ((y * t) / a)
    else if (z <= 4.4d-28) then
        tmp = t_1
    else if (z <= 2.05d+125) then
        tmp = t
    else if (z <= 8.2d+190) then
        tmp = t * ((y - z) / a)
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -5e+50) {
		tmp = t;
	} else if (z <= -7.5e-117) {
		tmp = t_1;
	} else if (z <= -3.1e-220) {
		tmp = y * ((t - x) / a);
	} else if (z <= -6.5e-235) {
		tmp = t_1;
	} else if (z <= 8.6e-267) {
		tmp = x + ((y * t) / a);
	} else if (z <= 4.4e-28) {
		tmp = t_1;
	} else if (z <= 2.05e+125) {
		tmp = t;
	} else if (z <= 8.2e+190) {
		tmp = t * ((y - z) / a);
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (y / a))
	tmp = 0
	if z <= -5e+50:
		tmp = t
	elif z <= -7.5e-117:
		tmp = t_1
	elif z <= -3.1e-220:
		tmp = y * ((t - x) / a)
	elif z <= -6.5e-235:
		tmp = t_1
	elif z <= 8.6e-267:
		tmp = x + ((y * t) / a)
	elif z <= 4.4e-28:
		tmp = t_1
	elif z <= 2.05e+125:
		tmp = t
	elif z <= 8.2e+190:
		tmp = t * ((y - z) / a)
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (z <= -5e+50)
		tmp = t;
	elseif (z <= -7.5e-117)
		tmp = t_1;
	elseif (z <= -3.1e-220)
		tmp = Float64(y * Float64(Float64(t - x) / a));
	elseif (z <= -6.5e-235)
		tmp = t_1;
	elseif (z <= 8.6e-267)
		tmp = Float64(x + Float64(Float64(y * t) / a));
	elseif (z <= 4.4e-28)
		tmp = t_1;
	elseif (z <= 2.05e+125)
		tmp = t;
	elseif (z <= 8.2e+190)
		tmp = Float64(t * Float64(Float64(y - z) / a));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (y / a));
	tmp = 0.0;
	if (z <= -5e+50)
		tmp = t;
	elseif (z <= -7.5e-117)
		tmp = t_1;
	elseif (z <= -3.1e-220)
		tmp = y * ((t - x) / a);
	elseif (z <= -6.5e-235)
		tmp = t_1;
	elseif (z <= 8.6e-267)
		tmp = x + ((y * t) / a);
	elseif (z <= 4.4e-28)
		tmp = t_1;
	elseif (z <= 2.05e+125)
		tmp = t;
	elseif (z <= 8.2e+190)
		tmp = t * ((y - z) / a);
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5e+50], t, If[LessEqual[z, -7.5e-117], t$95$1, If[LessEqual[z, -3.1e-220], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.5e-235], t$95$1, If[LessEqual[z, 8.6e-267], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.4e-28], t$95$1, If[LessEqual[z, 2.05e+125], t, If[LessEqual[z, 8.2e+190], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -7.5 \cdot 10^{-117}:\\
\;\;\;\;t_1\\

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

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

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

\mathbf{elif}\;z \leq 4.4 \cdot 10^{-28}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -5e50 or 4.39999999999999992e-28 < z < 2.04999999999999996e125 or 8.2000000000000004e190 < z

    1. Initial program 41.9%

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

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

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

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

    if -5e50 < z < -7.50000000000000066e-117 or -3.10000000000000011e-220 < z < -6.49999999999999973e-235 or 8.5999999999999992e-267 < z < 4.39999999999999992e-28

    1. Initial program 92.7%

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

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

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

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

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

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

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

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

    if -7.50000000000000066e-117 < z < -3.10000000000000011e-220

    1. Initial program 84.8%

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

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

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

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

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

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

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

    if -6.49999999999999973e-235 < z < 8.5999999999999992e-267

    1. Initial program 91.9%

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

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

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

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

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

    if 2.04999999999999996e125 < z < 8.2000000000000004e190

    1. Initial program 55.0%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5 \cdot 10^{+50}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{-117}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -3.1 \cdot 10^{-220}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq -6.5 \cdot 10^{-235}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 8.6 \cdot 10^{-267}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{-28}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{+125}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{+190}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 45.9% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;z \leq -5.7 \cdot 10^{+50}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.35 \cdot 10^{-113}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.14 \cdot 10^{-218}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-234}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-263}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-24}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{+125}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 5.3 \cdot 10^{+190}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y a)))))
   (if (<= z -5.7e+50)
     t
     (if (<= z -1.35e-113)
       t_1
       (if (<= z -1.14e-218)
         (* y (/ (- t x) a))
         (if (<= z -4.2e-234)
           t_1
           (if (<= z 1.3e-263)
             (+ x (/ (* y t) a))
             (if (<= z 1.8e-24)
               (- x (/ x (/ a y)))
               (if (<= z 2.05e+125)
                 t
                 (if (<= z 5.3e+190) (* t (/ (- y z) a)) t))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -5.7e+50) {
		tmp = t;
	} else if (z <= -1.35e-113) {
		tmp = t_1;
	} else if (z <= -1.14e-218) {
		tmp = y * ((t - x) / a);
	} else if (z <= -4.2e-234) {
		tmp = t_1;
	} else if (z <= 1.3e-263) {
		tmp = x + ((y * t) / a);
	} else if (z <= 1.8e-24) {
		tmp = x - (x / (a / y));
	} else if (z <= 2.05e+125) {
		tmp = t;
	} else if (z <= 5.3e+190) {
		tmp = t * ((y - z) / a);
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * (1.0d0 - (y / a))
    if (z <= (-5.7d+50)) then
        tmp = t
    else if (z <= (-1.35d-113)) then
        tmp = t_1
    else if (z <= (-1.14d-218)) then
        tmp = y * ((t - x) / a)
    else if (z <= (-4.2d-234)) then
        tmp = t_1
    else if (z <= 1.3d-263) then
        tmp = x + ((y * t) / a)
    else if (z <= 1.8d-24) then
        tmp = x - (x / (a / y))
    else if (z <= 2.05d+125) then
        tmp = t
    else if (z <= 5.3d+190) then
        tmp = t * ((y - z) / a)
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -5.7e+50) {
		tmp = t;
	} else if (z <= -1.35e-113) {
		tmp = t_1;
	} else if (z <= -1.14e-218) {
		tmp = y * ((t - x) / a);
	} else if (z <= -4.2e-234) {
		tmp = t_1;
	} else if (z <= 1.3e-263) {
		tmp = x + ((y * t) / a);
	} else if (z <= 1.8e-24) {
		tmp = x - (x / (a / y));
	} else if (z <= 2.05e+125) {
		tmp = t;
	} else if (z <= 5.3e+190) {
		tmp = t * ((y - z) / a);
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (y / a))
	tmp = 0
	if z <= -5.7e+50:
		tmp = t
	elif z <= -1.35e-113:
		tmp = t_1
	elif z <= -1.14e-218:
		tmp = y * ((t - x) / a)
	elif z <= -4.2e-234:
		tmp = t_1
	elif z <= 1.3e-263:
		tmp = x + ((y * t) / a)
	elif z <= 1.8e-24:
		tmp = x - (x / (a / y))
	elif z <= 2.05e+125:
		tmp = t
	elif z <= 5.3e+190:
		tmp = t * ((y - z) / a)
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (z <= -5.7e+50)
		tmp = t;
	elseif (z <= -1.35e-113)
		tmp = t_1;
	elseif (z <= -1.14e-218)
		tmp = Float64(y * Float64(Float64(t - x) / a));
	elseif (z <= -4.2e-234)
		tmp = t_1;
	elseif (z <= 1.3e-263)
		tmp = Float64(x + Float64(Float64(y * t) / a));
	elseif (z <= 1.8e-24)
		tmp = Float64(x - Float64(x / Float64(a / y)));
	elseif (z <= 2.05e+125)
		tmp = t;
	elseif (z <= 5.3e+190)
		tmp = Float64(t * Float64(Float64(y - z) / a));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (y / a));
	tmp = 0.0;
	if (z <= -5.7e+50)
		tmp = t;
	elseif (z <= -1.35e-113)
		tmp = t_1;
	elseif (z <= -1.14e-218)
		tmp = y * ((t - x) / a);
	elseif (z <= -4.2e-234)
		tmp = t_1;
	elseif (z <= 1.3e-263)
		tmp = x + ((y * t) / a);
	elseif (z <= 1.8e-24)
		tmp = x - (x / (a / y));
	elseif (z <= 2.05e+125)
		tmp = t;
	elseif (z <= 5.3e+190)
		tmp = t * ((y - z) / a);
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.7e+50], t, If[LessEqual[z, -1.35e-113], t$95$1, If[LessEqual[z, -1.14e-218], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.2e-234], t$95$1, If[LessEqual[z, 1.3e-263], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.8e-24], N[(x - N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.05e+125], t, If[LessEqual[z, 5.3e+190], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -1.35 \cdot 10^{-113}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq -4.2 \cdot 10^{-234}:\\
\;\;\;\;t_1\\

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

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

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

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

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


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

    1. Initial program 41.9%

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

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

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

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

    if -5.7000000000000002e50 < z < -1.34999999999999998e-113 or -1.14000000000000001e-218 < z < -4.19999999999999982e-234

    1. Initial program 93.3%

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

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

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

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

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

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

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

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

    if -1.34999999999999998e-113 < z < -1.14000000000000001e-218

    1. Initial program 84.8%

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

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

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

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

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

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

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

    if -4.19999999999999982e-234 < z < 1.3e-263

    1. Initial program 91.9%

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

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

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

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

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

    if 1.3e-263 < z < 1.8e-24

    1. Initial program 92.2%

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

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

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

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

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

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

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

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

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

    if 2.04999999999999996e125 < z < 5.30000000000000015e190

    1. Initial program 55.0%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.7 \cdot 10^{+50}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.35 \cdot 10^{-113}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -1.14 \cdot 10^{-218}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-234}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-263}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-24}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{+125}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 5.3 \cdot 10^{+190}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 52.2% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{t}{\frac{a}{y}}\\ t_2 := x \cdot \frac{-y}{a - z}\\ \mathbf{if}\;a \leq -1.35 \cdot 10^{+153}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -2.1 \cdot 10^{+123}:\\ \;\;\;\;\frac{t}{1 - \frac{a}{z}}\\ \mathbf{elif}\;a \leq -6.2 \cdot 10^{-80}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.6 \cdot 10^{-189}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{-219}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 9 \cdot 10^{-158}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 32000:\\ \;\;\;\;t \cdot \left(\frac{a - y}{z} + 1\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ t (/ a y)))) (t_2 (* x (/ (- y) (- a z)))))
   (if (<= a -1.35e+153)
     t_1
     (if (<= a -2.1e+123)
       (/ t (- 1.0 (/ a z)))
       (if (<= a -6.2e-80)
         t_1
         (if (<= a -1.6e-189)
           t_2
           (if (<= a 9.5e-219)
             (* t (- 1.0 (/ y z)))
             (if (<= a 9e-158)
               t_2
               (if (<= a 32000.0) (* t (+ (/ (- a y) z) 1.0)) t_1)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (t / (a / y));
	double t_2 = x * (-y / (a - z));
	double tmp;
	if (a <= -1.35e+153) {
		tmp = t_1;
	} else if (a <= -2.1e+123) {
		tmp = t / (1.0 - (a / z));
	} else if (a <= -6.2e-80) {
		tmp = t_1;
	} else if (a <= -1.6e-189) {
		tmp = t_2;
	} else if (a <= 9.5e-219) {
		tmp = t * (1.0 - (y / z));
	} else if (a <= 9e-158) {
		tmp = t_2;
	} else if (a <= 32000.0) {
		tmp = t * (((a - y) / z) + 1.0);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x + (t / (a / y))
    t_2 = x * (-y / (a - z))
    if (a <= (-1.35d+153)) then
        tmp = t_1
    else if (a <= (-2.1d+123)) then
        tmp = t / (1.0d0 - (a / z))
    else if (a <= (-6.2d-80)) then
        tmp = t_1
    else if (a <= (-1.6d-189)) then
        tmp = t_2
    else if (a <= 9.5d-219) then
        tmp = t * (1.0d0 - (y / z))
    else if (a <= 9d-158) then
        tmp = t_2
    else if (a <= 32000.0d0) then
        tmp = t * (((a - y) / z) + 1.0d0)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (t / (a / y));
	double t_2 = x * (-y / (a - z));
	double tmp;
	if (a <= -1.35e+153) {
		tmp = t_1;
	} else if (a <= -2.1e+123) {
		tmp = t / (1.0 - (a / z));
	} else if (a <= -6.2e-80) {
		tmp = t_1;
	} else if (a <= -1.6e-189) {
		tmp = t_2;
	} else if (a <= 9.5e-219) {
		tmp = t * (1.0 - (y / z));
	} else if (a <= 9e-158) {
		tmp = t_2;
	} else if (a <= 32000.0) {
		tmp = t * (((a - y) / z) + 1.0);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (t / (a / y))
	t_2 = x * (-y / (a - z))
	tmp = 0
	if a <= -1.35e+153:
		tmp = t_1
	elif a <= -2.1e+123:
		tmp = t / (1.0 - (a / z))
	elif a <= -6.2e-80:
		tmp = t_1
	elif a <= -1.6e-189:
		tmp = t_2
	elif a <= 9.5e-219:
		tmp = t * (1.0 - (y / z))
	elif a <= 9e-158:
		tmp = t_2
	elif a <= 32000.0:
		tmp = t * (((a - y) / z) + 1.0)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(t / Float64(a / y)))
	t_2 = Float64(x * Float64(Float64(-y) / Float64(a - z)))
	tmp = 0.0
	if (a <= -1.35e+153)
		tmp = t_1;
	elseif (a <= -2.1e+123)
		tmp = Float64(t / Float64(1.0 - Float64(a / z)));
	elseif (a <= -6.2e-80)
		tmp = t_1;
	elseif (a <= -1.6e-189)
		tmp = t_2;
	elseif (a <= 9.5e-219)
		tmp = Float64(t * Float64(1.0 - Float64(y / z)));
	elseif (a <= 9e-158)
		tmp = t_2;
	elseif (a <= 32000.0)
		tmp = Float64(t * Float64(Float64(Float64(a - y) / z) + 1.0));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (t / (a / y));
	t_2 = x * (-y / (a - z));
	tmp = 0.0;
	if (a <= -1.35e+153)
		tmp = t_1;
	elseif (a <= -2.1e+123)
		tmp = t / (1.0 - (a / z));
	elseif (a <= -6.2e-80)
		tmp = t_1;
	elseif (a <= -1.6e-189)
		tmp = t_2;
	elseif (a <= 9.5e-219)
		tmp = t * (1.0 - (y / z));
	elseif (a <= 9e-158)
		tmp = t_2;
	elseif (a <= 32000.0)
		tmp = t * (((a - y) / z) + 1.0);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[((-y) / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.35e+153], t$95$1, If[LessEqual[a, -2.1e+123], N[(t / N[(1.0 - N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -6.2e-80], t$95$1, If[LessEqual[a, -1.6e-189], t$95$2, If[LessEqual[a, 9.5e-219], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9e-158], t$95$2, If[LessEqual[a, 32000.0], N[(t * N[(N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;a \leq -6.2 \cdot 10^{-80}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -1.6 \cdot 10^{-189}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;a \leq 9 \cdot 10^{-158}:\\
\;\;\;\;t_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -1.35e153 or -2.09999999999999994e123 < a < -6.20000000000000032e-80 or 32000 < a

    1. Initial program 72.1%

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

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

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

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

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

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

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

    if -1.35e153 < a < -2.09999999999999994e123

    1. Initial program 59.3%

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

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

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

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

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

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

      \[\leadsto \frac{t}{\color{blue}{-1 \cdot \frac{a - z}{z}}} \]
    9. Step-by-step derivation
      1. mul-1-neg72.3%

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

        \[\leadsto \frac{t}{-\color{blue}{\left(\frac{a}{z} - \frac{z}{z}\right)}} \]
      3. sub-neg72.3%

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

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

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

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

    if -6.20000000000000032e-80 < a < -1.6e-189 or 9.4999999999999997e-219 < a < 9e-158

    1. Initial program 69.4%

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{-1 \cdot y}{a - z}} \]
      2. mul-1-neg60.7%

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

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

    if -1.6e-189 < a < 9.4999999999999997e-219

    1. Initial program 69.3%

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \color{blue}{\left(-\frac{y - z}{z}\right)} \]
      2. div-sub72.7%

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

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

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

        \[\leadsto t \cdot \left(-\left(\frac{y}{z} + \color{blue}{-1}\right)\right) \]
    10. Simplified72.7%

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

    if 9e-158 < a < 32000

    1. Initial program 64.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.35 \cdot 10^{+153}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq -2.1 \cdot 10^{+123}:\\ \;\;\;\;\frac{t}{1 - \frac{a}{z}}\\ \mathbf{elif}\;a \leq -6.2 \cdot 10^{-80}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq -1.6 \cdot 10^{-189}:\\ \;\;\;\;x \cdot \frac{-y}{a - z}\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{-219}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 9 \cdot 10^{-158}:\\ \;\;\;\;x \cdot \frac{-y}{a - z}\\ \mathbf{elif}\;a \leq 32000:\\ \;\;\;\;t \cdot \left(\frac{a - y}{z} + 1\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 37.7% accurate, 0.3× speedup?

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

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

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

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

\mathbf{elif}\;y \leq -2.85 \cdot 10^{+17}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 9.5 \cdot 10^{-67}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq 4.45 \cdot 10^{+77}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y < -7.0000000000000002e130

    1. Initial program 71.9%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{-1 \cdot y}{a}} \]
      2. mul-1-neg42.1%

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

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

    if -7.0000000000000002e130 < y < -4.3999999999999998e96 or -2.85e17 < y < 2.6e-138

    1. Initial program 67.4%

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

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

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

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

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

    if -4.3999999999999998e96 < y < -9.4999999999999997e57

    1. Initial program 87.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.4999999999999997e57 < y < -2.85e17 or 4.4499999999999999e77 < y

    1. Initial program 73.7%

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

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

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

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

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

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

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

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

    if 2.6e-138 < y < 9.4999999999999994e-67

    1. Initial program 37.4%

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

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

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

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

    if 9.4999999999999994e-67 < y < 4.4499999999999999e77

    1. Initial program 74.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7 \cdot 10^{+130}:\\ \;\;\;\;x \cdot \frac{-y}{a}\\ \mathbf{elif}\;y \leq -4.4 \cdot 10^{+96}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;y \leq -9.5 \cdot 10^{+57}:\\ \;\;\;\;\frac{-x}{\frac{a}{y}}\\ \mathbf{elif}\;y \leq -2.85 \cdot 10^{+17}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;y \leq 2.6 \cdot 10^{-138}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{-67}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 4.45 \cdot 10^{+77}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 37.2% accurate, 0.3× speedup?

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

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

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

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

\mathbf{elif}\;y \leq -7 \cdot 10^{+17}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 1.75 \cdot 10^{-68}:\\
\;\;\;\;t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y < -2.0000000000000001e130

    1. Initial program 71.9%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{-1 \cdot y}{a}} \]
      2. mul-1-neg42.1%

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

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

    if -2.0000000000000001e130 < y < -3.2000000000000001e95 or -7e17 < y < 7.0000000000000006e-141

    1. Initial program 67.4%

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

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

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

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

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

    if -3.2000000000000001e95 < y < -1.95000000000000011e59

    1. Initial program 87.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.95000000000000011e59 < y < -7e17 or 8.50000000000000018e77 < y

    1. Initial program 73.7%

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

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

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

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

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

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

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

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

    if 7.0000000000000006e-141 < y < 1.75000000000000006e-68

    1. Initial program 37.4%

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

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

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

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

    if 1.75000000000000006e-68 < y < 8.50000000000000018e77

    1. Initial program 74.2%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2 \cdot 10^{+130}:\\ \;\;\;\;x \cdot \frac{-y}{a}\\ \mathbf{elif}\;y \leq -3.2 \cdot 10^{+95}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;y \leq -1.95 \cdot 10^{+59}:\\ \;\;\;\;\frac{-x}{\frac{a}{y}}\\ \mathbf{elif}\;y \leq -7 \cdot 10^{+17}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;y \leq 7 \cdot 10^{-141}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;y \leq 1.75 \cdot 10^{-68}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{+77}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 52.2% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(1 - \frac{y}{z}\right)\\ t_2 := x + \frac{t}{\frac{a}{y}}\\ t_3 := x \cdot \frac{-y}{a - z}\\ \mathbf{if}\;a \leq -3.6 \cdot 10^{+153}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -2.1 \cdot 10^{+123}:\\ \;\;\;\;\frac{t}{1 - \frac{a}{z}}\\ \mathbf{elif}\;a \leq -2.4 \cdot 10^{-76}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -1.7 \cdot 10^{-188}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{-219}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 10^{-157}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 36000:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (- 1.0 (/ y z))))
        (t_2 (+ x (/ t (/ a y))))
        (t_3 (* x (/ (- y) (- a z)))))
   (if (<= a -3.6e+153)
     t_2
     (if (<= a -2.1e+123)
       (/ t (- 1.0 (/ a z)))
       (if (<= a -2.4e-76)
         t_2
         (if (<= a -1.7e-188)
           t_3
           (if (<= a 9.5e-219)
             t_1
             (if (<= a 1e-157) t_3 (if (<= a 36000.0) t_1 t_2)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (1.0 - (y / z));
	double t_2 = x + (t / (a / y));
	double t_3 = x * (-y / (a - z));
	double tmp;
	if (a <= -3.6e+153) {
		tmp = t_2;
	} else if (a <= -2.1e+123) {
		tmp = t / (1.0 - (a / z));
	} else if (a <= -2.4e-76) {
		tmp = t_2;
	} else if (a <= -1.7e-188) {
		tmp = t_3;
	} else if (a <= 9.5e-219) {
		tmp = t_1;
	} else if (a <= 1e-157) {
		tmp = t_3;
	} else if (a <= 36000.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = t * (1.0d0 - (y / z))
    t_2 = x + (t / (a / y))
    t_3 = x * (-y / (a - z))
    if (a <= (-3.6d+153)) then
        tmp = t_2
    else if (a <= (-2.1d+123)) then
        tmp = t / (1.0d0 - (a / z))
    else if (a <= (-2.4d-76)) then
        tmp = t_2
    else if (a <= (-1.7d-188)) then
        tmp = t_3
    else if (a <= 9.5d-219) then
        tmp = t_1
    else if (a <= 1d-157) then
        tmp = t_3
    else if (a <= 36000.0d0) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (1.0 - (y / z));
	double t_2 = x + (t / (a / y));
	double t_3 = x * (-y / (a - z));
	double tmp;
	if (a <= -3.6e+153) {
		tmp = t_2;
	} else if (a <= -2.1e+123) {
		tmp = t / (1.0 - (a / z));
	} else if (a <= -2.4e-76) {
		tmp = t_2;
	} else if (a <= -1.7e-188) {
		tmp = t_3;
	} else if (a <= 9.5e-219) {
		tmp = t_1;
	} else if (a <= 1e-157) {
		tmp = t_3;
	} else if (a <= 36000.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (1.0 - (y / z))
	t_2 = x + (t / (a / y))
	t_3 = x * (-y / (a - z))
	tmp = 0
	if a <= -3.6e+153:
		tmp = t_2
	elif a <= -2.1e+123:
		tmp = t / (1.0 - (a / z))
	elif a <= -2.4e-76:
		tmp = t_2
	elif a <= -1.7e-188:
		tmp = t_3
	elif a <= 9.5e-219:
		tmp = t_1
	elif a <= 1e-157:
		tmp = t_3
	elif a <= 36000.0:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(1.0 - Float64(y / z)))
	t_2 = Float64(x + Float64(t / Float64(a / y)))
	t_3 = Float64(x * Float64(Float64(-y) / Float64(a - z)))
	tmp = 0.0
	if (a <= -3.6e+153)
		tmp = t_2;
	elseif (a <= -2.1e+123)
		tmp = Float64(t / Float64(1.0 - Float64(a / z)));
	elseif (a <= -2.4e-76)
		tmp = t_2;
	elseif (a <= -1.7e-188)
		tmp = t_3;
	elseif (a <= 9.5e-219)
		tmp = t_1;
	elseif (a <= 1e-157)
		tmp = t_3;
	elseif (a <= 36000.0)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (1.0 - (y / z));
	t_2 = x + (t / (a / y));
	t_3 = x * (-y / (a - z));
	tmp = 0.0;
	if (a <= -3.6e+153)
		tmp = t_2;
	elseif (a <= -2.1e+123)
		tmp = t / (1.0 - (a / z));
	elseif (a <= -2.4e-76)
		tmp = t_2;
	elseif (a <= -1.7e-188)
		tmp = t_3;
	elseif (a <= 9.5e-219)
		tmp = t_1;
	elseif (a <= 1e-157)
		tmp = t_3;
	elseif (a <= 36000.0)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[((-y) / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.6e+153], t$95$2, If[LessEqual[a, -2.1e+123], N[(t / N[(1.0 - N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -2.4e-76], t$95$2, If[LessEqual[a, -1.7e-188], t$95$3, If[LessEqual[a, 9.5e-219], t$95$1, If[LessEqual[a, 1e-157], t$95$3, If[LessEqual[a, 36000.0], t$95$1, t$95$2]]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;a \leq -2.4 \cdot 10^{-76}:\\
\;\;\;\;t_2\\

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -3.6000000000000001e153 or -2.09999999999999994e123 < a < -2.40000000000000013e-76 or 36000 < a

    1. Initial program 72.1%

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

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

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

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

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

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

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

    if -3.6000000000000001e153 < a < -2.09999999999999994e123

    1. Initial program 59.3%

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

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

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

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

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

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

      \[\leadsto \frac{t}{\color{blue}{-1 \cdot \frac{a - z}{z}}} \]
    9. Step-by-step derivation
      1. mul-1-neg72.3%

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

        \[\leadsto \frac{t}{-\color{blue}{\left(\frac{a}{z} - \frac{z}{z}\right)}} \]
      3. sub-neg72.3%

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

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

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

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

    if -2.40000000000000013e-76 < a < -1.70000000000000014e-188 or 9.4999999999999997e-219 < a < 9.99999999999999943e-158

    1. Initial program 69.4%

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{-1 \cdot y}{a - z}} \]
      2. mul-1-neg60.7%

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

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

    if -1.70000000000000014e-188 < a < 9.4999999999999997e-219 or 9.99999999999999943e-158 < a < 36000

    1. Initial program 67.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.6 \cdot 10^{+153}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq -2.1 \cdot 10^{+123}:\\ \;\;\;\;\frac{t}{1 - \frac{a}{z}}\\ \mathbf{elif}\;a \leq -2.4 \cdot 10^{-76}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq -1.7 \cdot 10^{-188}:\\ \;\;\;\;x \cdot \frac{-y}{a - z}\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{-219}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 10^{-157}:\\ \;\;\;\;x \cdot \frac{-y}{a - z}\\ \mathbf{elif}\;a \leq 36000:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 44.6% accurate, 0.4× speedup?

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

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

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

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

\mathbf{elif}\;z \leq 4.2 \cdot 10^{-25}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -6.5000000000000003e50 or 4.20000000000000005e-25 < z < 2.04999999999999996e125 or 5.30000000000000015e190 < z

    1. Initial program 41.9%

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

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

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

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

    if -6.5000000000000003e50 < z < -1.3999999999999999e-116 or -2.8499999999999999e-272 < z < 4.20000000000000005e-25

    1. Initial program 92.6%

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

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

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

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

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

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

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

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

    if -1.3999999999999999e-116 < z < -2.8499999999999999e-272

    1. Initial program 87.8%

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

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

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

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

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

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

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

    if 2.04999999999999996e125 < z < 5.30000000000000015e190

    1. Initial program 55.0%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.5 \cdot 10^{+50}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.4 \cdot 10^{-116}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -2.85 \cdot 10^{-272}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{-25}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{+125}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 5.3 \cdot 10^{+190}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 68.0% accurate, 0.4× speedup?

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -1.35e-123 or 1.90000000000000005e-28 < t

    1. Initial program 64.6%

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

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

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

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

    if -1.35e-123 < t < -1.0499999999999999e-230

    1. Initial program 57.4%

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

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

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

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

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

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

    if -1.0499999999999999e-230 < t < 4.7999999999999998e-138

    1. Initial program 83.3%

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

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

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

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

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

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

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

    if 4.7999999999999998e-138 < t < 4.2999999999999999e-41

    1. Initial program 91.0%

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

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

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

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

    if 4.2999999999999999e-41 < t < 1.90000000000000005e-28

    1. Initial program 83.1%

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{-1 \cdot y}{a - z}} \]
      2. mul-1-neg83.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.35 \cdot 10^{-123}:\\ \;\;\;\;x - \frac{z - y}{\frac{a - z}{t}}\\ \mathbf{elif}\;t \leq -1.05 \cdot 10^{-230}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-138}:\\ \;\;\;\;x \cdot \left(\frac{z - y}{a - z} + 1\right)\\ \mathbf{elif}\;t \leq 4.3 \cdot 10^{-41}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a}\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{-28}:\\ \;\;\;\;x \cdot \frac{-y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{z - y}{\frac{a - z}{t}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 52.4% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;a \leq 7.6 \cdot 10^{-219}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;a \leq 1:\\
\;\;\;\;t_2\\

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


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

    1. Initial program 72.8%

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

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

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

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

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

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

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

    if -1.64999999999999995e-36 < a < -4.3999999999999999e-188

    1. Initial program 66.8%

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

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

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

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

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

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

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

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

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

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

    if -4.3999999999999999e-188 < a < 7.60000000000000049e-219 or 1.19999999999999993e-171 < a < 1

    1. Initial program 67.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.60000000000000049e-219 < a < 1.19999999999999993e-171

    1. Initial program 67.6%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.65 \cdot 10^{-36}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq -4.4 \cdot 10^{-188}:\\ \;\;\;\;\frac{x}{\frac{z}{y - a}}\\ \mathbf{elif}\;a \leq 7.6 \cdot 10^{-219}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{-171}:\\ \;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\ \mathbf{elif}\;a \leq 1:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 52.9% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{-y}{a - z}\\ t_2 := x + \frac{t}{\frac{a}{y}}\\ t_3 := t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{if}\;a \leq -2.9 \cdot 10^{-78}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -6 \cdot 10^{-189}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{-219}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 2.05 \cdot 10^{-151}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 50:\\ \;\;\;\;t_3\\ \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 (+ x (/ t (/ a y))))
        (t_3 (* t (- 1.0 (/ y z)))))
   (if (<= a -2.9e-78)
     t_2
     (if (<= a -6e-189)
       t_1
       (if (<= a 9.5e-219)
         t_3
         (if (<= a 2.05e-151) t_1 (if (<= a 50.0) t_3 t_2)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (-y / (a - z));
	double t_2 = x + (t / (a / y));
	double t_3 = t * (1.0 - (y / z));
	double tmp;
	if (a <= -2.9e-78) {
		tmp = t_2;
	} else if (a <= -6e-189) {
		tmp = t_1;
	} else if (a <= 9.5e-219) {
		tmp = t_3;
	} else if (a <= 2.05e-151) {
		tmp = t_1;
	} else if (a <= 50.0) {
		tmp = t_3;
	} 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 = x + (t / (a / y))
    t_3 = t * (1.0d0 - (y / z))
    if (a <= (-2.9d-78)) then
        tmp = t_2
    else if (a <= (-6d-189)) then
        tmp = t_1
    else if (a <= 9.5d-219) then
        tmp = t_3
    else if (a <= 2.05d-151) then
        tmp = t_1
    else if (a <= 50.0d0) then
        tmp = t_3
    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 = x + (t / (a / y));
	double t_3 = t * (1.0 - (y / z));
	double tmp;
	if (a <= -2.9e-78) {
		tmp = t_2;
	} else if (a <= -6e-189) {
		tmp = t_1;
	} else if (a <= 9.5e-219) {
		tmp = t_3;
	} else if (a <= 2.05e-151) {
		tmp = t_1;
	} else if (a <= 50.0) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (-y / (a - z))
	t_2 = x + (t / (a / y))
	t_3 = t * (1.0 - (y / z))
	tmp = 0
	if a <= -2.9e-78:
		tmp = t_2
	elif a <= -6e-189:
		tmp = t_1
	elif a <= 9.5e-219:
		tmp = t_3
	elif a <= 2.05e-151:
		tmp = t_1
	elif a <= 50.0:
		tmp = t_3
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(Float64(-y) / Float64(a - z)))
	t_2 = Float64(x + Float64(t / Float64(a / y)))
	t_3 = Float64(t * Float64(1.0 - Float64(y / z)))
	tmp = 0.0
	if (a <= -2.9e-78)
		tmp = t_2;
	elseif (a <= -6e-189)
		tmp = t_1;
	elseif (a <= 9.5e-219)
		tmp = t_3;
	elseif (a <= 2.05e-151)
		tmp = t_1;
	elseif (a <= 50.0)
		tmp = t_3;
	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 = x + (t / (a / y));
	t_3 = t * (1.0 - (y / z));
	tmp = 0.0;
	if (a <= -2.9e-78)
		tmp = t_2;
	elseif (a <= -6e-189)
		tmp = t_1;
	elseif (a <= 9.5e-219)
		tmp = t_3;
	elseif (a <= 2.05e-151)
		tmp = t_1;
	elseif (a <= 50.0)
		tmp = t_3;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[((-y) / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.9e-78], t$95$2, If[LessEqual[a, -6e-189], t$95$1, If[LessEqual[a, 9.5e-219], t$95$3, If[LessEqual[a, 2.05e-151], t$95$1, If[LessEqual[a, 50.0], t$95$3, t$95$2]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -6 \cdot 10^{-189}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 2.05 \cdot 10^{-151}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 50:\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.9000000000000001e-78 or 50 < a

    1. Initial program 71.4%

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

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

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

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

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

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

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

    if -2.9000000000000001e-78 < a < -6e-189 or 9.4999999999999997e-219 < a < 2.0500000000000001e-151

    1. Initial program 69.4%

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{-1 \cdot y}{a - z}} \]
      2. mul-1-neg60.7%

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

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

    if -6e-189 < a < 9.4999999999999997e-219 or 2.0500000000000001e-151 < a < 50

    1. Initial program 67.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.9 \cdot 10^{-78}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq -6 \cdot 10^{-189}:\\ \;\;\;\;x \cdot \frac{-y}{a - z}\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{-219}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 2.05 \cdot 10^{-151}:\\ \;\;\;\;x \cdot \frac{-y}{a - z}\\ \mathbf{elif}\;a \leq 50:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 66.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;z \leq -6.8 \cdot 10^{+50}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{-26}:\\ \;\;\;\;x - \frac{y}{a} \cdot \left(x - t\right)\\ \mathbf{elif}\;z \leq 4 \cdot 10^{+62} \lor \neg \left(z \leq 1.95 \cdot 10^{+83}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\frac{z - y}{a - z} + 1\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) (- a z)))))
   (if (<= z -6.8e+50)
     t_1
     (if (<= z 2.3e-26)
       (- x (* (/ y a) (- x t)))
       (if (or (<= z 4e+62) (not (<= z 1.95e+83)))
         t_1
         (* x (+ (/ (- z y) (- a z)) 1.0)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -6.8e+50) {
		tmp = t_1;
	} else if (z <= 2.3e-26) {
		tmp = x - ((y / a) * (x - t));
	} else if ((z <= 4e+62) || !(z <= 1.95e+83)) {
		tmp = t_1;
	} else {
		tmp = x * (((z - y) / (a - z)) + 1.0);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t * ((y - z) / (a - z))
    if (z <= (-6.8d+50)) then
        tmp = t_1
    else if (z <= 2.3d-26) then
        tmp = x - ((y / a) * (x - t))
    else if ((z <= 4d+62) .or. (.not. (z <= 1.95d+83))) then
        tmp = t_1
    else
        tmp = x * (((z - y) / (a - z)) + 1.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -6.8e+50) {
		tmp = t_1;
	} else if (z <= 2.3e-26) {
		tmp = x - ((y / a) * (x - t));
	} else if ((z <= 4e+62) || !(z <= 1.95e+83)) {
		tmp = t_1;
	} else {
		tmp = x * (((z - y) / (a - z)) + 1.0);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	tmp = 0
	if z <= -6.8e+50:
		tmp = t_1
	elif z <= 2.3e-26:
		tmp = x - ((y / a) * (x - t))
	elif (z <= 4e+62) or not (z <= 1.95e+83):
		tmp = t_1
	else:
		tmp = x * (((z - y) / (a - z)) + 1.0)
	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 <= -6.8e+50)
		tmp = t_1;
	elseif (z <= 2.3e-26)
		tmp = Float64(x - Float64(Float64(y / a) * Float64(x - t)));
	elseif ((z <= 4e+62) || !(z <= 1.95e+83))
		tmp = t_1;
	else
		tmp = Float64(x * Float64(Float64(Float64(z - y) / Float64(a - z)) + 1.0));
	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 <= -6.8e+50)
		tmp = t_1;
	elseif (z <= 2.3e-26)
		tmp = x - ((y / a) * (x - t));
	elseif ((z <= 4e+62) || ~((z <= 1.95e+83)))
		tmp = t_1;
	else
		tmp = x * (((z - y) / (a - z)) + 1.0);
	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, -6.8e+50], t$95$1, If[LessEqual[z, 2.3e-26], N[(x - N[(N[(y / a), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 4e+62], N[Not[LessEqual[z, 1.95e+83]], $MachinePrecision]], t$95$1, N[(x * N[(N[(N[(z - y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq 4 \cdot 10^{+62} \lor \neg \left(z \leq 1.95 \cdot 10^{+83}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.7999999999999997e50 or 2.30000000000000009e-26 < z < 4.00000000000000014e62 or 1.9500000000000001e83 < z

    1. Initial program 40.4%

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

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

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

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

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

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

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

    if -6.7999999999999997e50 < z < 2.30000000000000009e-26

    1. Initial program 91.6%

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

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

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

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

    if 4.00000000000000014e62 < z < 1.9500000000000001e83

    1. Initial program 91.3%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.8 \cdot 10^{+50}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{-26}:\\ \;\;\;\;x - \frac{y}{a} \cdot \left(x - t\right)\\ \mathbf{elif}\;z \leq 4 \cdot 10^{+62} \lor \neg \left(z \leq 1.95 \cdot 10^{+83}\right):\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\frac{z - y}{a - z} + 1\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 67.1% accurate, 0.4× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.99999999999999982e37 or 2.89999999999999999e83 < z

    1. Initial program 39.3%

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

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

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

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

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

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

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

    if -3.99999999999999982e37 < z < 3.2000000000000001e-7

    1. Initial program 91.5%

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

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

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

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

    if 3.2000000000000001e-7 < z < 9e61

    1. Initial program 55.5%

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

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

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

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

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

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

      \[\leadsto \frac{t}{\color{blue}{-1 \cdot \frac{a - z}{z}}} \]
    9. Step-by-step derivation
      1. mul-1-neg80.3%

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

        \[\leadsto \frac{t}{-\color{blue}{\left(\frac{a}{z} - \frac{z}{z}\right)}} \]
      3. sub-neg80.3%

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

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

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

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

    if 9e61 < z < 2.89999999999999999e83

    1. Initial program 91.3%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{+37}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-7}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 9 \cdot 10^{+61}:\\ \;\;\;\;\frac{t}{1 - \frac{a}{z}}\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{+83}:\\ \;\;\;\;x \cdot \left(\frac{z - y}{a - z} + 1\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 73.5% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -6.8 \cdot 10^{-72}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 1.8 \cdot 10^{-48}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.55e-45

    1. Initial program 74.2%

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

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

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

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

    if -1.55e-45 < a < -6.7999999999999997e-72 or -4.2000000000000002e-97 < a < 1.8000000000000001e-48

    1. Initial program 64.4%

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

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 77.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}} \]
    6. Step-by-step derivation
      1. associate--l+77.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. associate-*r/77.9%

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

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

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

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

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

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

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

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

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

    if -6.7999999999999997e-72 < a < -4.2000000000000002e-97

    1. Initial program 72.9%

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

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

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

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

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

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

    if 1.8000000000000001e-48 < a

    1. Initial program 74.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.55 \cdot 10^{-45}:\\ \;\;\;\;x - \frac{z - y}{\frac{a - z}{t}}\\ \mathbf{elif}\;a \leq -6.8 \cdot 10^{-72}:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \mathbf{elif}\;a \leq -4.2 \cdot 10^{-97}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{-48}:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 46.1% accurate, 0.5× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.6000000000000001e50 or 2.3000000000000001e-24 < z < 1.59999999999999992e125 or 5.30000000000000015e190 < z

    1. Initial program 41.9%

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

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

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

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

    if -6.6000000000000001e50 < z < 2.3000000000000001e-24

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

    if 1.59999999999999992e125 < z < 5.30000000000000015e190

    1. Initial program 55.0%

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

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

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

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

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

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

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

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

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

Alternative 16: 37.9% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \frac{y}{z}\\
\mathbf{if}\;y \leq -2.2 \cdot 10^{+136}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 4.8 \cdot 10^{-70}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq 9 \cdot 10^{+57}:\\
\;\;\;\;x + t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.1999999999999999e136 or 8.99999999999999991e57 < y

    1. Initial program 74.9%

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

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

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

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

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

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

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

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

    if -2.1999999999999999e136 < y < 2.89999999999999973e-138 or 4.8000000000000002e-70 < y < 8.99999999999999991e57

    1. Initial program 68.3%

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

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

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

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

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

    if 2.89999999999999973e-138 < y < 4.8000000000000002e-70

    1. Initial program 41.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.2 \cdot 10^{+136}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;y \leq 2.9 \cdot 10^{-138}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{-70}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 9 \cdot 10^{+57}:\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 37.0% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;y \leq 3.8 \cdot 10^{-70}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq 5.6 \cdot 10^{+57}:\\
\;\;\;\;x + t\\

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


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

    1. Initial program 71.9%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{-1 \cdot y}{a}} \]
      2. mul-1-neg42.1%

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

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

    if -5.2999999999999999e129 < y < 4.10000000000000014e-139 or 3.7999999999999998e-70 < y < 5.59999999999999999e57

    1. Initial program 68.4%

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

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

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

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

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

    if 4.10000000000000014e-139 < y < 3.7999999999999998e-70

    1. Initial program 41.3%

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

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

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

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

    if 5.59999999999999999e57 < y

    1. Initial program 76.9%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.3 \cdot 10^{+129}:\\ \;\;\;\;x \cdot \frac{-y}{a}\\ \mathbf{elif}\;y \leq 4.1 \cdot 10^{-139}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;y \leq 3.8 \cdot 10^{-70}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 5.6 \cdot 10^{+57}:\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 60.2% accurate, 0.5× speedup?

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

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

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

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

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


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

    1. Initial program 77.8%

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

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

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

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

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

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

    if -8.00000000000000024e257 < x < -2.3e73

    1. Initial program 64.2%

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

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

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

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

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

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

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

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

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

    if -2.3e73 < x < 1.3e89

    1. Initial program 71.0%

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

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

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

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

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

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

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

    if 1.3e89 < x

    1. Initial program 70.1%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -8 \cdot 10^{+257}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;x \leq -2.3 \cdot 10^{+73}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{elif}\;x \leq 1.3 \cdot 10^{+89}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 70.7% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.49999999999999989e30 or 2.3e14 < t

    1. Initial program 62.1%

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

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

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

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

    if -1.49999999999999989e30 < t < 2.3e14

    1. Initial program 77.1%

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

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

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

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

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

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

Alternative 20: 37.0% accurate, 0.6× speedup?

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

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

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

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

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

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


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

    1. Initial program 46.4%

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

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

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

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

    if -1.7e18 < z < -2e-116 or -2.29999999999999981e-273 < z < 1.26e-25

    1. Initial program 93.0%

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

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

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

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

    if -2e-116 < z < -2.29999999999999981e-273

    1. Initial program 87.8%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.7 \cdot 10^{+18}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2 \cdot 10^{-116}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{-273}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 1.26 \cdot 10^{-25}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 66.6% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.6 \cdot 10^{+51} \lor \neg \left(z \leq 5.6 \cdot 10^{-30}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.5999999999999994e51 or 5.59999999999999977e-30 < z

    1. Initial program 43.1%

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

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

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

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

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

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

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

    if -7.5999999999999994e51 < z < 5.59999999999999977e-30

    1. Initial program 91.6%

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

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

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

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

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

Alternative 22: 60.4% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -7.5e73

    1. Initial program 66.4%

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

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

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

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

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

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

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

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

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

    if -7.5e73 < x < 1.2999999999999999e90

    1. Initial program 71.0%

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

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

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

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

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

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

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

    if 1.2999999999999999e90 < x

    1. Initial program 70.1%

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

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

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

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

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

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

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

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

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

Alternative 23: 37.6% accurate, 1.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.14e17 or 5.2e-28 < z

    1. Initial program 46.4%

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

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

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

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

    if -1.14e17 < z < 5.2e-28

    1. Initial program 91.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.14 \cdot 10^{+17}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-28}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 24.6% accurate, 13.0× speedup?

\[\begin{array}{l} \\ t \end{array} \]
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
	return t;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = t
end function
public static double code(double x, double y, double z, double t, double a) {
	return t;
}
def code(x, y, z, t, a):
	return t
function code(x, y, z, t, a)
	return t
end
function tmp = code(x, y, z, t, a)
	tmp = t;
end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}

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

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

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

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

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

    \[\leadsto t \]
  7. Add Preprocessing

Developer target: 83.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
\mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024021 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
  :precision binary64

  :herbie-target
  (if (< z -1.2536131056095036e+188) (- t (* (/ y z) (- t x))) (if (< z 4.446702369113811e+64) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x)))))

  (+ x (/ (* (- y z) (- t x)) (- a z))))