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

Percentage Accurate: 67.5% → 90.8%
Time: 16.3s
Alternatives: 23
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 23 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.5% 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: 90.8% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y - z}{\frac{a - z}{t - x}}\\ t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-246}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot a + y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+291}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ (- y z) (/ (- a z) (- t x)))))
        (t_2 (+ x (/ (* (- y z) (- t x)) (- a z)))))
   (if (<= t_2 (- INFINITY))
     t_1
     (if (<= t_2 -1e-246)
       t_2
       (if (<= t_2 0.0)
         (+ t (/ (+ (* (- t x) a) (* y (- x t))) z))
         (if (<= t_2 5e+291) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - z) / ((a - z) / (t - x)));
	double t_2 = x + (((y - z) * (t - x)) / (a - z));
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = t_1;
	} else if (t_2 <= -1e-246) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = t + ((((t - x) * a) + (y * (x - t))) / z);
	} else if (t_2 <= 5e+291) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - z) / ((a - z) / (t - x)));
	double t_2 = x + (((y - z) * (t - x)) / (a - z));
	double tmp;
	if (t_2 <= -Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else if (t_2 <= -1e-246) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = t + ((((t - x) * a) + (y * (x - t))) / z);
	} else if (t_2 <= 5e+291) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((y - z) / ((a - z) / (t - x)))
	t_2 = x + (((y - z) * (t - x)) / (a - z))
	tmp = 0
	if t_2 <= -math.inf:
		tmp = t_1
	elif t_2 <= -1e-246:
		tmp = t_2
	elif t_2 <= 0.0:
		tmp = t + ((((t - x) * a) + (y * (x - t))) / z)
	elif t_2 <= 5e+291:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x))))
	t_2 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z)))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = t_1;
	elseif (t_2 <= -1e-246)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = Float64(t + Float64(Float64(Float64(Float64(t - x) * a) + Float64(y * Float64(x - t))) / z));
	elseif (t_2 <= 5e+291)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((y - z) / ((a - z) / (t - x)));
	t_2 = x + (((y - z) * (t - x)) / (a - z));
	tmp = 0.0;
	if (t_2 <= -Inf)
		tmp = t_1;
	elseif (t_2 <= -1e-246)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = t + ((((t - x) * a) + (y * (x - t))) / z);
	elseif (t_2 <= 5e+291)
		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[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -1e-246], t$95$2, If[LessEqual[t$95$2, 0.0], N[(t + N[(N[(N[(N[(t - x), $MachinePrecision] * a), $MachinePrecision] + N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+291], t$95$2, t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \frac{y - z}{\frac{a - z}{t - x}}\\
t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-246}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+291}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 44.9%

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

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

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

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -9.99999999999999956e-247 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 5.0000000000000001e291

    1. Initial program 97.0%

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

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

    1. Initial program 4.0%

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

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

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

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

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

Alternative 2: 90.4% accurate, 0.1× 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 -1 \cdot 10^{-246} \lor \neg \left(t\_1 \leq 0\right):\\ \;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\ \mathbf{else}:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot a + y \cdot \left(x - t\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 -1e-246) (not (<= t_1 0.0)))
     (fma (- t x) (/ (- y z) (- a z)) x)
     (+ t (/ (+ (* (- t x) a) (* y (- x t))) z)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (((y - z) * (t - x)) / (a - z));
	double tmp;
	if ((t_1 <= -1e-246) || !(t_1 <= 0.0)) {
		tmp = fma((t - x), ((y - z) / (a - z)), x);
	} else {
		tmp = t + ((((t - x) * a) + (y * (x - t))) / 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 <= -1e-246) || !(t_1 <= 0.0))
		tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x);
	else
		tmp = Float64(t + Float64(Float64(Float64(Float64(t - x) * a) + Float64(y * Float64(x - t))) / z));
	end
	return 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, -1e-246], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(t + N[(N[(N[(N[(t - x), $MachinePrecision] * a), $MachinePrecision] + N[(y * N[(x - t), $MachinePrecision]), $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 -1 \cdot 10^{-246} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\

\mathbf{else}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot a + y \cdot \left(x - t\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))) < -9.99999999999999956e-247 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

    1. Initial program 73.8%

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

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

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

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

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

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

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

    1. Initial program 4.0%

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

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

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

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

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

Alternative 3: 90.8% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y - z}{\frac{a - z}{t - x}}\\ t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-246}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;t + \frac{\left(y - a\right) \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+291}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ (- y z) (/ (- a z) (- t x)))))
        (t_2 (+ x (/ (* (- y z) (- t x)) (- a z)))))
   (if (<= t_2 (- INFINITY))
     t_1
     (if (<= t_2 -1e-246)
       t_2
       (if (<= t_2 0.0)
         (+ t (/ (* (- y a) (- x t)) z))
         (if (<= t_2 5e+291) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - z) / ((a - z) / (t - x)));
	double t_2 = x + (((y - z) * (t - x)) / (a - z));
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = t_1;
	} else if (t_2 <= -1e-246) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = t + (((y - a) * (x - t)) / z);
	} else if (t_2 <= 5e+291) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - z) / ((a - z) / (t - x)));
	double t_2 = x + (((y - z) * (t - x)) / (a - z));
	double tmp;
	if (t_2 <= -Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else if (t_2 <= -1e-246) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = t + (((y - a) * (x - t)) / z);
	} else if (t_2 <= 5e+291) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((y - z) / ((a - z) / (t - x)))
	t_2 = x + (((y - z) * (t - x)) / (a - z))
	tmp = 0
	if t_2 <= -math.inf:
		tmp = t_1
	elif t_2 <= -1e-246:
		tmp = t_2
	elif t_2 <= 0.0:
		tmp = t + (((y - a) * (x - t)) / z)
	elif t_2 <= 5e+291:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x))))
	t_2 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z)))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = t_1;
	elseif (t_2 <= -1e-246)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = Float64(t + Float64(Float64(Float64(y - a) * Float64(x - t)) / z));
	elseif (t_2 <= 5e+291)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((y - z) / ((a - z) / (t - x)));
	t_2 = x + (((y - z) * (t - x)) / (a - z));
	tmp = 0.0;
	if (t_2 <= -Inf)
		tmp = t_1;
	elseif (t_2 <= -1e-246)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = t + (((y - a) * (x - t)) / z);
	elseif (t_2 <= 5e+291)
		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[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -1e-246], t$95$2, If[LessEqual[t$95$2, 0.0], N[(t + N[(N[(N[(y - a), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+291], t$95$2, t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \frac{y - z}{\frac{a - z}{t - x}}\\
t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-246}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+291}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 44.9%

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

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

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

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -9.99999999999999956e-247 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 5.0000000000000001e291

    1. Initial program 97.0%

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

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

    1. Initial program 4.0%

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

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

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

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

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

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

        \[\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. mul-1-neg99.4%

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

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

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

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

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

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

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

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

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

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

Alternative 4: 90.8% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-246}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;t + \frac{\left(y - a\right) \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+291}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z)))))
        (t_2 (+ x (/ (* (- y z) (- t x)) (- a z)))))
   (if (<= t_2 (- INFINITY))
     t_1
     (if (<= t_2 -1e-246)
       t_2
       (if (<= t_2 0.0)
         (+ t (/ (* (- y a) (- x t)) z))
         (if (<= t_2 5e+291) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - z) * ((t - x) / (a - z)));
	double t_2 = x + (((y - z) * (t - x)) / (a - z));
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = t_1;
	} else if (t_2 <= -1e-246) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = t + (((y - a) * (x - t)) / z);
	} else if (t_2 <= 5e+291) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
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 t_2 = x + (((y - z) * (t - x)) / (a - z));
	double tmp;
	if (t_2 <= -Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else if (t_2 <= -1e-246) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = t + (((y - a) * (x - t)) / z);
	} else if (t_2 <= 5e+291) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((y - z) * ((t - x) / (a - z)))
	t_2 = x + (((y - z) * (t - x)) / (a - z))
	tmp = 0
	if t_2 <= -math.inf:
		tmp = t_1
	elif t_2 <= -1e-246:
		tmp = t_2
	elif t_2 <= 0.0:
		tmp = t + (((y - a) * (x - t)) / z)
	elif t_2 <= 5e+291:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z))))
	t_2 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z)))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = t_1;
	elseif (t_2 <= -1e-246)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = Float64(t + Float64(Float64(Float64(y - a) * Float64(x - t)) / z));
	elseif (t_2 <= 5e+291)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((y - z) * ((t - x) / (a - z)));
	t_2 = x + (((y - z) * (t - x)) / (a - z));
	tmp = 0.0;
	if (t_2 <= -Inf)
		tmp = t_1;
	elseif (t_2 <= -1e-246)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = t + (((y - a) * (x - t)) / z);
	elseif (t_2 <= 5e+291)
		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[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -1e-246], t$95$2, If[LessEqual[t$95$2, 0.0], N[(t + N[(N[(N[(y - a), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+291], t$95$2, t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-246}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+291}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 44.9%

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -9.99999999999999956e-247 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 5.0000000000000001e291

    1. Initial program 97.0%

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

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

    1. Initial program 4.0%

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

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

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

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

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

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

        \[\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. mul-1-neg99.4%

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

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

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

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

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

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

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

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

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

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

Alternative 5: 61.9% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;z \leq -3.3 \cdot 10^{+41}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -5.5 \cdot 10^{-70}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{-129}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{-49}:\\ \;\;\;\;\frac{y \cdot \left(t - x\right)}{a - z}\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{-7}:\\ \;\;\;\;x + z \cdot \frac{x - t}{a}\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{+140}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \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 -3.3e+41)
     t_1
     (if (<= z -5.5e-70)
       (* y (/ (- t x) (- a z)))
       (if (<= z 1.85e-129)
         (+ x (* y (/ (- t x) a)))
         (if (<= z 2.7e-49)
           (/ (* y (- t x)) (- a z))
           (if (<= z 9.2e-7)
             (+ x (* z (/ (- x t) a)))
             (if (<= z 5.8e+140) (* y (/ (- x t) z)) 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 <= -3.3e+41) {
		tmp = t_1;
	} else if (z <= -5.5e-70) {
		tmp = y * ((t - x) / (a - z));
	} else if (z <= 1.85e-129) {
		tmp = x + (y * ((t - x) / a));
	} else if (z <= 2.7e-49) {
		tmp = (y * (t - x)) / (a - z);
	} else if (z <= 9.2e-7) {
		tmp = x + (z * ((x - t) / a));
	} else if (z <= 5.8e+140) {
		tmp = y * ((x - t) / 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 = t * ((y - z) / (a - z))
    if (z <= (-3.3d+41)) then
        tmp = t_1
    else if (z <= (-5.5d-70)) then
        tmp = y * ((t - x) / (a - z))
    else if (z <= 1.85d-129) then
        tmp = x + (y * ((t - x) / a))
    else if (z <= 2.7d-49) then
        tmp = (y * (t - x)) / (a - z)
    else if (z <= 9.2d-7) then
        tmp = x + (z * ((x - t) / a))
    else if (z <= 5.8d+140) then
        tmp = y * ((x - t) / 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 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -3.3e+41) {
		tmp = t_1;
	} else if (z <= -5.5e-70) {
		tmp = y * ((t - x) / (a - z));
	} else if (z <= 1.85e-129) {
		tmp = x + (y * ((t - x) / a));
	} else if (z <= 2.7e-49) {
		tmp = (y * (t - x)) / (a - z);
	} else if (z <= 9.2e-7) {
		tmp = x + (z * ((x - t) / a));
	} else if (z <= 5.8e+140) {
		tmp = y * ((x - t) / z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	tmp = 0
	if z <= -3.3e+41:
		tmp = t_1
	elif z <= -5.5e-70:
		tmp = y * ((t - x) / (a - z))
	elif z <= 1.85e-129:
		tmp = x + (y * ((t - x) / a))
	elif z <= 2.7e-49:
		tmp = (y * (t - x)) / (a - z)
	elif z <= 9.2e-7:
		tmp = x + (z * ((x - t) / a))
	elif z <= 5.8e+140:
		tmp = y * ((x - t) / z)
	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 <= -3.3e+41)
		tmp = t_1;
	elseif (z <= -5.5e-70)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (z <= 1.85e-129)
		tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a)));
	elseif (z <= 2.7e-49)
		tmp = Float64(Float64(y * Float64(t - x)) / Float64(a - z));
	elseif (z <= 9.2e-7)
		tmp = Float64(x + Float64(z * Float64(Float64(x - t) / a)));
	elseif (z <= 5.8e+140)
		tmp = Float64(y * Float64(Float64(x - t) / z));
	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 <= -3.3e+41)
		tmp = t_1;
	elseif (z <= -5.5e-70)
		tmp = y * ((t - x) / (a - z));
	elseif (z <= 1.85e-129)
		tmp = x + (y * ((t - x) / a));
	elseif (z <= 2.7e-49)
		tmp = (y * (t - x)) / (a - z);
	elseif (z <= 9.2e-7)
		tmp = x + (z * ((x - t) / a));
	elseif (z <= 5.8e+140)
		tmp = y * ((x - t) / z);
	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, -3.3e+41], t$95$1, If[LessEqual[z, -5.5e-70], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.85e-129], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.7e-49], N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.2e-7], N[(x + N[(z * N[(N[(x - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.8e+140], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -3.3e41 or 5.7999999999999998e140 < z

    1. Initial program 45.5%

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

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

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

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

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

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

    if -3.3e41 < z < -5.5000000000000001e-70

    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*93.8%

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

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

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

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

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

    if -5.5000000000000001e-70 < z < 1.8500000000000001e-129

    1. Initial program 89.1%

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

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

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

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

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

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

    if 1.8500000000000001e-129 < z < 2.7e-49

    1. Initial program 83.9%

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

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

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

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

    if 2.7e-49 < z < 9.1999999999999998e-7

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{z \cdot \frac{t - x}{a}} \]
    10. Simplified72.9%

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

    if 9.1999999999999998e-7 < z < 5.7999999999999998e140

    1. Initial program 52.3%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.3 \cdot 10^{+41}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq -5.5 \cdot 10^{-70}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{-129}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{-49}:\\ \;\;\;\;\frac{y \cdot \left(t - x\right)}{a - z}\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{-7}:\\ \;\;\;\;x + z \cdot \frac{x - t}{a}\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{+140}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 57.1% accurate, 0.3× speedup?

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

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

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

\mathbf{elif}\;t \leq -1.3 \cdot 10^{-36}:\\
\;\;\;\;t\_2\\

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

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

\mathbf{elif}\;t \leq 7.8 \cdot 10^{+24}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.9e84 or -3.80000000000000025e36 < t < -1.3e-36 or 7.7999999999999995e24 < t

    1. Initial program 61.8%

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

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

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

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

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

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

    if -1.9e84 < t < -3.80000000000000025e36 or -1.3e-36 < t < -1.4500000000000001e-163 or -1.9e-236 < t < 7.7999999999999995e24

    1. Initial program 79.8%

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

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

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

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

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

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

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

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

    if -1.4500000000000001e-163 < t < -1.9e-236

    1. Initial program 64.9%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num68.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    12. Simplified63.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.9 \cdot 10^{+84}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;t \leq -3.8 \cdot 10^{+36}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;t \leq -1.3 \cdot 10^{-36}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;t \leq -1.45 \cdot 10^{-163}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{-236}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{+24}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 51.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + t \cdot \frac{y}{a}\\ t_2 := t \cdot \left(1 - \frac{y}{z}\right)\\ t_3 := y \cdot \frac{x - t}{z}\\ \mathbf{if}\;z \leq -1.9 \cdot 10^{+146}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{+112}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.08 \cdot 10^{+15}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{-73}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;z \leq 2.85 \cdot 10^{-129}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{+139}:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* t (/ y a))))
        (t_2 (* t (- 1.0 (/ y z))))
        (t_3 (* y (/ (- x t) z))))
   (if (<= z -1.9e+146)
     t_2
     (if (<= z -1.15e+112)
       t_1
       (if (<= z -1.08e+15)
         t_2
         (if (<= z -2.1e-73)
           t_3
           (if (<= z 2.85e-129)
             t_1
             (if (<= z 2.1e+139) t_3 (* t (/ z (- z a)))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (t * (y / a));
	double t_2 = t * (1.0 - (y / z));
	double t_3 = y * ((x - t) / z);
	double tmp;
	if (z <= -1.9e+146) {
		tmp = t_2;
	} else if (z <= -1.15e+112) {
		tmp = t_1;
	} else if (z <= -1.08e+15) {
		tmp = t_2;
	} else if (z <= -2.1e-73) {
		tmp = t_3;
	} else if (z <= 2.85e-129) {
		tmp = t_1;
	} else if (z <= 2.1e+139) {
		tmp = t_3;
	} else {
		tmp = t * (z / (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) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = x + (t * (y / a))
    t_2 = t * (1.0d0 - (y / z))
    t_3 = y * ((x - t) / z)
    if (z <= (-1.9d+146)) then
        tmp = t_2
    else if (z <= (-1.15d+112)) then
        tmp = t_1
    else if (z <= (-1.08d+15)) then
        tmp = t_2
    else if (z <= (-2.1d-73)) then
        tmp = t_3
    else if (z <= 2.85d-129) then
        tmp = t_1
    else if (z <= 2.1d+139) then
        tmp = t_3
    else
        tmp = t * (z / (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 = x + (t * (y / a));
	double t_2 = t * (1.0 - (y / z));
	double t_3 = y * ((x - t) / z);
	double tmp;
	if (z <= -1.9e+146) {
		tmp = t_2;
	} else if (z <= -1.15e+112) {
		tmp = t_1;
	} else if (z <= -1.08e+15) {
		tmp = t_2;
	} else if (z <= -2.1e-73) {
		tmp = t_3;
	} else if (z <= 2.85e-129) {
		tmp = t_1;
	} else if (z <= 2.1e+139) {
		tmp = t_3;
	} else {
		tmp = t * (z / (z - a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (t * (y / a))
	t_2 = t * (1.0 - (y / z))
	t_3 = y * ((x - t) / z)
	tmp = 0
	if z <= -1.9e+146:
		tmp = t_2
	elif z <= -1.15e+112:
		tmp = t_1
	elif z <= -1.08e+15:
		tmp = t_2
	elif z <= -2.1e-73:
		tmp = t_3
	elif z <= 2.85e-129:
		tmp = t_1
	elif z <= 2.1e+139:
		tmp = t_3
	else:
		tmp = t * (z / (z - a))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(t * Float64(y / a)))
	t_2 = Float64(t * Float64(1.0 - Float64(y / z)))
	t_3 = Float64(y * Float64(Float64(x - t) / z))
	tmp = 0.0
	if (z <= -1.9e+146)
		tmp = t_2;
	elseif (z <= -1.15e+112)
		tmp = t_1;
	elseif (z <= -1.08e+15)
		tmp = t_2;
	elseif (z <= -2.1e-73)
		tmp = t_3;
	elseif (z <= 2.85e-129)
		tmp = t_1;
	elseif (z <= 2.1e+139)
		tmp = t_3;
	else
		tmp = Float64(t * Float64(z / Float64(z - a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (t * (y / a));
	t_2 = t * (1.0 - (y / z));
	t_3 = y * ((x - t) / z);
	tmp = 0.0;
	if (z <= -1.9e+146)
		tmp = t_2;
	elseif (z <= -1.15e+112)
		tmp = t_1;
	elseif (z <= -1.08e+15)
		tmp = t_2;
	elseif (z <= -2.1e-73)
		tmp = t_3;
	elseif (z <= 2.85e-129)
		tmp = t_1;
	elseif (z <= 2.1e+139)
		tmp = t_3;
	else
		tmp = t * (z / (z - a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.9e+146], t$95$2, If[LessEqual[z, -1.15e+112], t$95$1, If[LessEqual[z, -1.08e+15], t$95$2, If[LessEqual[z, -2.1e-73], t$95$3, If[LessEqual[z, 2.85e-129], t$95$1, If[LessEqual[z, 2.1e+139], t$95$3, N[(t * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;z \leq -2.1 \cdot 10^{-73}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;z \leq 2.85 \cdot 10^{-129}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.1 \cdot 10^{+139}:\\
\;\;\;\;t\_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.8999999999999999e146 or -1.15e112 < z < -1.08e15

    1. Initial program 46.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\left(t - x\right) \cdot \frac{y - z}{z}} \]
      4. div-sub64.0%

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \left(-\color{blue}{\left(-1 + \frac{y}{z}\right)}\right) \]
      6. distribute-neg-in60.7%

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

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

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

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

    if -1.8999999999999999e146 < z < -1.15e112 or -2.0999999999999999e-73 < z < 2.85e-129

    1. Initial program 85.6%

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

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

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

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

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

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

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

    if -1.08e15 < z < -2.0999999999999999e-73 or 2.85e-129 < z < 2.0999999999999999e139

    1. Initial program 77.1%

      \[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}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified81.9%

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

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

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

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

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

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

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

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

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

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

    if 2.0999999999999999e139 < z

    1. Initial program 39.1%

      \[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}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified57.7%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.9 \cdot 10^{+146}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{+112}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -1.08 \cdot 10^{+15}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{-73}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;z \leq 2.85 \cdot 10^{-129}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{+139}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 57.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - x \cdot \frac{y}{a}\\ t_2 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;t \leq -1.9 \cdot 10^{+84}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -7.5 \cdot 10^{+36}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -5.3 \cdot 10^{-17}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -2.5 \cdot 10^{-257}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{+24}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (* x (/ y a)))) (t_2 (* t (/ (- y z) (- a z)))))
   (if (<= t -1.9e+84)
     t_2
     (if (<= t -7.5e+36)
       t_1
       (if (<= t -5.3e-17)
         t_2
         (if (<= t -2.5e-257)
           (* y (/ (- t x) (- a z)))
           (if (<= t 7.8e+24) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (x * (y / a));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (t <= -1.9e+84) {
		tmp = t_2;
	} else if (t <= -7.5e+36) {
		tmp = t_1;
	} else if (t <= -5.3e-17) {
		tmp = t_2;
	} else if (t <= -2.5e-257) {
		tmp = y * ((t - x) / (a - z));
	} else if (t <= 7.8e+24) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x - (x * (y / a))
    t_2 = t * ((y - z) / (a - z))
    if (t <= (-1.9d+84)) then
        tmp = t_2
    else if (t <= (-7.5d+36)) then
        tmp = t_1
    else if (t <= (-5.3d-17)) then
        tmp = t_2
    else if (t <= (-2.5d-257)) then
        tmp = y * ((t - x) / (a - z))
    else if (t <= 7.8d+24) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (x * (y / a));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (t <= -1.9e+84) {
		tmp = t_2;
	} else if (t <= -7.5e+36) {
		tmp = t_1;
	} else if (t <= -5.3e-17) {
		tmp = t_2;
	} else if (t <= -2.5e-257) {
		tmp = y * ((t - x) / (a - z));
	} else if (t <= 7.8e+24) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (x * (y / a))
	t_2 = t * ((y - z) / (a - z))
	tmp = 0
	if t <= -1.9e+84:
		tmp = t_2
	elif t <= -7.5e+36:
		tmp = t_1
	elif t <= -5.3e-17:
		tmp = t_2
	elif t <= -2.5e-257:
		tmp = y * ((t - x) / (a - z))
	elif t <= 7.8e+24:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(x * Float64(y / a)))
	t_2 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	tmp = 0.0
	if (t <= -1.9e+84)
		tmp = t_2;
	elseif (t <= -7.5e+36)
		tmp = t_1;
	elseif (t <= -5.3e-17)
		tmp = t_2;
	elseif (t <= -2.5e-257)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (t <= 7.8e+24)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (x * (y / a));
	t_2 = t * ((y - z) / (a - z));
	tmp = 0.0;
	if (t <= -1.9e+84)
		tmp = t_2;
	elseif (t <= -7.5e+36)
		tmp = t_1;
	elseif (t <= -5.3e-17)
		tmp = t_2;
	elseif (t <= -2.5e-257)
		tmp = y * ((t - x) / (a - z));
	elseif (t <= 7.8e+24)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.9e+84], t$95$2, If[LessEqual[t, -7.5e+36], t$95$1, If[LessEqual[t, -5.3e-17], t$95$2, If[LessEqual[t, -2.5e-257], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.8e+24], t$95$1, t$95$2]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -7.5 \cdot 10^{+36}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -5.3 \cdot 10^{-17}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t \leq 7.8 \cdot 10^{+24}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.9e84 or -7.50000000000000054e36 < t < -5.2999999999999998e-17 or 7.7999999999999995e24 < t

    1. Initial program 61.5%

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

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

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

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

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

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

    if -1.9e84 < t < -7.50000000000000054e36 or -2.49999999999999994e-257 < t < 7.7999999999999995e24

    1. Initial program 82.1%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    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 0 54.0%

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

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

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

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

    if -5.2999999999999998e-17 < t < -2.49999999999999994e-257

    1. Initial program 69.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.9 \cdot 10^{+84}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;t \leq -7.5 \cdot 10^{+36}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;t \leq -5.3 \cdot 10^{-17}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;t \leq -2.5 \cdot 10^{-257}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{+24}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 54.0% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(1 - \frac{y}{z}\right)\\ t_2 := x + t \cdot \frac{y}{a}\\ \mathbf{if}\;a \leq -3.5 \cdot 10^{+90}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -1.35 \cdot 10^{+60}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -2.65 \cdot 10^{-30}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;a \leq -2.7 \cdot 10^{-35}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \mathbf{elif}\;a \leq 3.4 \cdot 10^{-62}:\\ \;\;\;\;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 (/ y a)))))
   (if (<= a -3.5e+90)
     t_2
     (if (<= a -1.35e+60)
       t_1
       (if (<= a -2.65e-30)
         (+ x (/ (* y t) a))
         (if (<= a -2.7e-35)
           (* t (/ z (- z a)))
           (if (<= a 3.4e-62) 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 * (y / a));
	double tmp;
	if (a <= -3.5e+90) {
		tmp = t_2;
	} else if (a <= -1.35e+60) {
		tmp = t_1;
	} else if (a <= -2.65e-30) {
		tmp = x + ((y * t) / a);
	} else if (a <= -2.7e-35) {
		tmp = t * (z / (z - a));
	} else if (a <= 3.4e-62) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t * (1.0d0 - (y / z))
    t_2 = x + (t * (y / a))
    if (a <= (-3.5d+90)) then
        tmp = t_2
    else if (a <= (-1.35d+60)) then
        tmp = t_1
    else if (a <= (-2.65d-30)) then
        tmp = x + ((y * t) / a)
    else if (a <= (-2.7d-35)) then
        tmp = t * (z / (z - a))
    else if (a <= 3.4d-62) 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 * (y / a));
	double tmp;
	if (a <= -3.5e+90) {
		tmp = t_2;
	} else if (a <= -1.35e+60) {
		tmp = t_1;
	} else if (a <= -2.65e-30) {
		tmp = x + ((y * t) / a);
	} else if (a <= -2.7e-35) {
		tmp = t * (z / (z - a));
	} else if (a <= 3.4e-62) {
		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 * (y / a))
	tmp = 0
	if a <= -3.5e+90:
		tmp = t_2
	elif a <= -1.35e+60:
		tmp = t_1
	elif a <= -2.65e-30:
		tmp = x + ((y * t) / a)
	elif a <= -2.7e-35:
		tmp = t * (z / (z - a))
	elif a <= 3.4e-62:
		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(y / a)))
	tmp = 0.0
	if (a <= -3.5e+90)
		tmp = t_2;
	elseif (a <= -1.35e+60)
		tmp = t_1;
	elseif (a <= -2.65e-30)
		tmp = Float64(x + Float64(Float64(y * t) / a));
	elseif (a <= -2.7e-35)
		tmp = Float64(t * Float64(z / Float64(z - a)));
	elseif (a <= 3.4e-62)
		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 * (y / a));
	tmp = 0.0;
	if (a <= -3.5e+90)
		tmp = t_2;
	elseif (a <= -1.35e+60)
		tmp = t_1;
	elseif (a <= -2.65e-30)
		tmp = x + ((y * t) / a);
	elseif (a <= -2.7e-35)
		tmp = t * (z / (z - a));
	elseif (a <= 3.4e-62)
		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[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.5e+90], t$95$2, If[LessEqual[a, -1.35e+60], t$95$1, If[LessEqual[a, -2.65e-30], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -2.7e-35], N[(t * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.4e-62], 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 + t \cdot \frac{y}{a}\\
\mathbf{if}\;a \leq -3.5 \cdot 10^{+90}:\\
\;\;\;\;t\_2\\

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

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

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

\mathbf{elif}\;a \leq 3.4 \cdot 10^{-62}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -3.4999999999999998e90 or 3.39999999999999988e-62 < a

    1. Initial program 65.2%

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

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

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

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

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

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

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

    if -3.4999999999999998e90 < a < -1.35e60 or -2.6999999999999997e-35 < a < 3.39999999999999988e-62

    1. Initial program 73.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.35e60 < a < -2.64999999999999987e-30

    1. Initial program 79.1%

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

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

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

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

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

    if -2.64999999999999987e-30 < a < -2.6999999999999997e-35

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.5 \cdot 10^{+90}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq -1.35 \cdot 10^{+60}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq -2.65 \cdot 10^{-30}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;a \leq -2.7 \cdot 10^{-35}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \mathbf{elif}\;a \leq 3.4 \cdot 10^{-62}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 64.3% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;t \leq -5 \cdot 10^{+85}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -3 \cdot 10^{+36}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;t \leq -9 \cdot 10^{-17}:\\ \;\;\;\;\frac{\left(y - z\right) \cdot t}{a - z}\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{+24}:\\ \;\;\;\;x \cdot \left(\frac{y - z}{z - a} + 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 (<= t -5e+85)
     t_1
     (if (<= t -3e+36)
       (+ x (* y (/ (- t x) a)))
       (if (<= t -9e-17)
         (/ (* (- y z) t) (- a z))
         (if (<= t 4.5e+24) (* x (+ (/ (- y z) (- z a)) 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 (t <= -5e+85) {
		tmp = t_1;
	} else if (t <= -3e+36) {
		tmp = x + (y * ((t - x) / a));
	} else if (t <= -9e-17) {
		tmp = ((y - z) * t) / (a - z);
	} else if (t <= 4.5e+24) {
		tmp = x * (((y - z) / (z - a)) + 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 (t <= (-5d+85)) then
        tmp = t_1
    else if (t <= (-3d+36)) then
        tmp = x + (y * ((t - x) / a))
    else if (t <= (-9d-17)) then
        tmp = ((y - z) * t) / (a - z)
    else if (t <= 4.5d+24) then
        tmp = x * (((y - z) / (z - a)) + 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 (t <= -5e+85) {
		tmp = t_1;
	} else if (t <= -3e+36) {
		tmp = x + (y * ((t - x) / a));
	} else if (t <= -9e-17) {
		tmp = ((y - z) * t) / (a - z);
	} else if (t <= 4.5e+24) {
		tmp = x * (((y - z) / (z - a)) + 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 t <= -5e+85:
		tmp = t_1
	elif t <= -3e+36:
		tmp = x + (y * ((t - x) / a))
	elif t <= -9e-17:
		tmp = ((y - z) * t) / (a - z)
	elif t <= 4.5e+24:
		tmp = x * (((y - z) / (z - a)) + 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 (t <= -5e+85)
		tmp = t_1;
	elseif (t <= -3e+36)
		tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a)));
	elseif (t <= -9e-17)
		tmp = Float64(Float64(Float64(y - z) * t) / Float64(a - z));
	elseif (t <= 4.5e+24)
		tmp = Float64(x * Float64(Float64(Float64(y - z) / Float64(z - a)) + 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 (t <= -5e+85)
		tmp = t_1;
	elseif (t <= -3e+36)
		tmp = x + (y * ((t - x) / a));
	elseif (t <= -9e-17)
		tmp = ((y - z) * t) / (a - z);
	elseif (t <= 4.5e+24)
		tmp = x * (((y - z) / (z - a)) + 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[t, -5e+85], t$95$1, If[LessEqual[t, -3e+36], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -9e-17], N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.5e+24], N[(x * N[(N[(N[(y - z), $MachinePrecision] / N[(z - a), $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}\;t \leq -5 \cdot 10^{+85}:\\
\;\;\;\;t\_1\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -5.0000000000000001e85 or 4.50000000000000019e24 < t

    1. Initial program 59.7%

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

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

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

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

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

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

    if -5.0000000000000001e85 < t < -3e36

    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*100.0%

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

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

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

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

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

    if -3e36 < t < -8.99999999999999957e-17

    1. Initial program 83.9%

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

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

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

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

    if -8.99999999999999957e-17 < t < 4.50000000000000019e24

    1. Initial program 76.4%

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

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

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

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

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

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

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

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

Alternative 11: 62.2% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;z \leq -3.5 \cdot 10^{+42}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-66}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-67}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+139}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \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 -3.5e+42)
     t_1
     (if (<= z -2.6e-66)
       (* y (/ (- t x) (- a z)))
       (if (<= z 8e-67)
         (+ x (* y (/ (- t x) a)))
         (if (<= z 2e+139) (* y (/ (- x t) z)) 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 <= -3.5e+42) {
		tmp = t_1;
	} else if (z <= -2.6e-66) {
		tmp = y * ((t - x) / (a - z));
	} else if (z <= 8e-67) {
		tmp = x + (y * ((t - x) / a));
	} else if (z <= 2e+139) {
		tmp = y * ((x - t) / 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 = t * ((y - z) / (a - z))
    if (z <= (-3.5d+42)) then
        tmp = t_1
    else if (z <= (-2.6d-66)) then
        tmp = y * ((t - x) / (a - z))
    else if (z <= 8d-67) then
        tmp = x + (y * ((t - x) / a))
    else if (z <= 2d+139) then
        tmp = y * ((x - t) / 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 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -3.5e+42) {
		tmp = t_1;
	} else if (z <= -2.6e-66) {
		tmp = y * ((t - x) / (a - z));
	} else if (z <= 8e-67) {
		tmp = x + (y * ((t - x) / a));
	} else if (z <= 2e+139) {
		tmp = y * ((x - t) / z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	tmp = 0
	if z <= -3.5e+42:
		tmp = t_1
	elif z <= -2.6e-66:
		tmp = y * ((t - x) / (a - z))
	elif z <= 8e-67:
		tmp = x + (y * ((t - x) / a))
	elif z <= 2e+139:
		tmp = y * ((x - t) / z)
	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 <= -3.5e+42)
		tmp = t_1;
	elseif (z <= -2.6e-66)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (z <= 8e-67)
		tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a)));
	elseif (z <= 2e+139)
		tmp = Float64(y * Float64(Float64(x - t) / z));
	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 <= -3.5e+42)
		tmp = t_1;
	elseif (z <= -2.6e-66)
		tmp = y * ((t - x) / (a - z));
	elseif (z <= 8e-67)
		tmp = x + (y * ((t - x) / a));
	elseif (z <= 2e+139)
		tmp = y * ((x - t) / z);
	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, -3.5e+42], t$95$1, If[LessEqual[z, -2.6e-66], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8e-67], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e+139], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.50000000000000023e42 or 2.00000000000000007e139 < z

    1. Initial program 45.5%

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

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

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

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

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

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

    if -3.50000000000000023e42 < z < -2.5999999999999999e-66

    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*93.8%

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

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

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

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

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

    if -2.5999999999999999e-66 < z < 7.99999999999999954e-67

    1. Initial program 88.5%

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

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

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

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

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

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

    if 7.99999999999999954e-67 < z < 2.00000000000000007e139

    1. Initial program 68.9%

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{y \cdot \frac{t - x}{z}} \]
      3. distribute-rgt-neg-in48.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.5 \cdot 10^{+42}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-66}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-67}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+139}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 47.3% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;a \leq -2.4 \cdot 10^{+108}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.0000000000000001e206 or -3.4000000000000001e114 < a < -2.40000000000000019e108 or 1.08000000000000004e55 < a

    1. Initial program 65.2%

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

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

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

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

    if -3.0000000000000001e206 < a < -3.4000000000000001e114

    1. Initial program 73.9%

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

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

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

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

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

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

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

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

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

    if -2.40000000000000019e108 < a < 1.08000000000000004e55

    1. Initial program 72.2%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num81.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \color{blue}{\left(1 - \frac{y}{z}\right)} \]
    12. Simplified48.1%

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

Alternative 13: 82.3% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -7.9999999999999998e-154 or 8.79999999999999906e-193 < a

    1. Initial program 70.5%

      \[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}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified86.0%

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

    if -7.9999999999999998e-154 < a < 8.79999999999999906e-193

    1. Initial program 69.5%

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

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

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

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

        \[\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/87.5%

        \[\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/87.5%

        \[\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. mul-1-neg87.5%

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

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

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

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

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

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

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

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

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

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

Alternative 14: 37.1% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.6 \cdot 10^{-7}:\\
\;\;\;\;t\\

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

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

\mathbf{elif}\;z \leq 5.4 \cdot 10^{+56}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -8.6000000000000002e-7 or 5.40000000000000019e56 < z

    1. Initial program 45.1%

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

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

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

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

    if -8.6000000000000002e-7 < z < -2.89999999999999975e-265 or 2.15000000000000007e-44 < z < 5.40000000000000019e56

    1. Initial program 87.6%

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

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

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

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

    if -2.89999999999999975e-265 < z < 2.15000000000000007e-44

    1. Initial program 87.5%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    10. Simplified35.1%

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

Alternative 15: 70.3% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.1e-17 or 8.50000000000000007e-104 < t

    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*88.5%

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

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

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

    if -1.1e-17 < t < 8.50000000000000007e-104

    1. Initial program 75.0%

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

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

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

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

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

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

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

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

Alternative 16: 75.1% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.1499999999999999e-54

    1. Initial program 67.1%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num85.0%

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

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

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

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

    if -1.1499999999999999e-54 < a < 1.94999999999999991e-66

    1. Initial program 76.7%

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

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

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

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

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

        \[\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/80.4%

        \[\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. mul-1-neg80.4%

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

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

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

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

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

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

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

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

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

    if 1.94999999999999991e-66 < a

    1. Initial program 65.0%

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

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

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

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

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

Alternative 17: 70.3% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.9000000000000001e-17

    1. Initial program 56.6%

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

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

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

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

    if -1.9000000000000001e-17 < t < 4.40000000000000023e-104

    1. Initial program 75.0%

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

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

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

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

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

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

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

    if 4.40000000000000023e-104 < t

    1. Initial program 76.0%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num84.8%

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

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

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

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

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

Alternative 18: 35.4% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq -2.7 \cdot 10^{-48}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 1.08 \cdot 10^{+50}:\\
\;\;\;\;x \cdot \frac{y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.5999999999999998e107 or 1.08000000000000004e50 < a

    1. Initial program 66.9%

      \[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}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified86.5%

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

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

    if -3.5999999999999998e107 < a < -2.70000000000000011e-48

    1. Initial program 60.7%

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

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

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

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

    if -2.70000000000000011e-48 < a < 1.08000000000000004e50

    1. Initial program 75.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\left(t - x\right) \cdot \frac{y - z}{z}} \]
      4. div-sub67.0%

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

        \[\leadsto x - \left(t - x\right) \cdot \left(\frac{y}{z} - \color{blue}{1}\right) \]
    9. Simplified67.0%

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    12. Simplified40.1%

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

Alternative 19: 54.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.6 \cdot 10^{+90} \lor \neg \left(a \leq 2.2 \cdot 10^{-61}\right):\\
\;\;\;\;x + t \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.6e90 or 2.20000000000000009e-61 < a

    1. Initial program 65.2%

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

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

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

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

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

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

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

    if -3.6e90 < a < 2.20000000000000009e-61

    1. Initial program 74.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \left(-\color{blue}{\left(-1 + \frac{y}{z}\right)}\right) \]
      6. distribute-neg-in51.2%

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

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

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

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

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

Alternative 20: 48.0% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -9.50000000000000019e107 or 6.20000000000000009e56 < a

    1. Initial program 66.9%

      \[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}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified86.5%

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

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

    if -9.50000000000000019e107 < a < 6.20000000000000009e56

    1. Initial program 72.2%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num81.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \color{blue}{\left(1 - \frac{y}{z}\right)} \]
    12. Simplified48.1%

      \[\leadsto \color{blue}{t \cdot \left(1 - \frac{y}{z}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 21: 37.7% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.4 \cdot 10^{-6}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 8.6 \cdot 10^{+57}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.39999999999999997e-6 or 8.60000000000000066e57 < z

    1. Initial program 45.1%

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

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

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

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

    if -5.39999999999999997e-6 < z < 8.60000000000000066e57

    1. Initial program 87.5%

      \[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}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified91.0%

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 22: 24.7% 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 70.3%

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

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

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

    \[\leadsto \color{blue}{t} \]
  6. Add Preprocessing

Alternative 23: 2.8% accurate, 13.0× speedup?

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

\\
0
\end{array}
Derivation
  1. Initial program 70.3%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x - \left(-\color{blue}{x \cdot \frac{z}{a - z}}\right) \]
  10. Simplified24.3%

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

    \[\leadsto \color{blue}{x + -1 \cdot x} \]
  12. Step-by-step derivation
    1. distribute-rgt1-in2.7%

      \[\leadsto \color{blue}{\left(-1 + 1\right) \cdot x} \]
    2. metadata-eval2.7%

      \[\leadsto \color{blue}{0} \cdot x \]
    3. mul0-lft2.7%

      \[\leadsto \color{blue}{0} \]
  13. Simplified2.7%

    \[\leadsto \color{blue}{0} \]
  14. 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 2024100 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
  :precision binary64

  :alt
  (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))))