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

Percentage Accurate: 68.0% → 90.6%
Time: 28.3s
Alternatives: 27
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 27 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: 68.0% 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.6% 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 -4 \cdot 10^{-290}:\\ \;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;t + x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{-1}{\frac{\frac{a - z}{y - z}}{x - t}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ (* (- y z) (- t x)) (- a z)))))
   (if (<= t_1 -4e-290)
     (fma (- t x) (/ (- y z) (- a z)) x)
     (if (<= t_1 0.0)
       (+ t (* x (/ (- y a) z)))
       (+ x (/ -1.0 (/ (/ (- a z) (- y z)) (- x t))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (((y - z) * (t - x)) / (a - z));
	double tmp;
	if (t_1 <= -4e-290) {
		tmp = fma((t - x), ((y - z) / (a - z)), x);
	} else if (t_1 <= 0.0) {
		tmp = t + (x * ((y - a) / z));
	} else {
		tmp = x + (-1.0 / (((a - z) / (y - z)) / (x - t)));
	}
	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 <= -4e-290)
		tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x);
	elseif (t_1 <= 0.0)
		tmp = Float64(t + Float64(x * Float64(Float64(y - a) / z)));
	else
		tmp = Float64(x + Float64(-1.0 / Float64(Float64(Float64(a - z) / Float64(y - z)) / Float64(x - t))));
	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[LessEqual[t$95$1, -4e-290], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(t + N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(-1.0 / N[(N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(x - t), $MachinePrecision]), $MachinePrecision]), $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 -4 \cdot 10^{-290}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\

\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;t + x \cdot \frac{y - a}{z}\\

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


\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))) < -4.0000000000000003e-290

    1. Initial program 72.8%

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

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

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

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

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

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

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

    1. Initial program 4.7%

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

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

      \[\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}{\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.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. distribute-lft-out--99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 77.5%

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

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

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

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

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

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

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

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

Alternative 2: 88.6% 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 -4 \cdot 10^{-290}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;t + x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+285}:\\ \;\;\;\;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 -4e-290)
     t_1
     (if (<= t_2 0.0)
       (+ t (* x (/ (- y a) z)))
       (if (<= t_2 2e+285) 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 <= -4e-290) {
		tmp = t_1;
	} else if (t_2 <= 0.0) {
		tmp = t + (x * ((y - a) / z));
	} else if (t_2 <= 2e+285) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x + ((y - z) * ((t - x) / (a - z)))
    t_2 = x + (((y - z) * (t - x)) / (a - z))
    if (t_2 <= (-4d-290)) then
        tmp = t_1
    else if (t_2 <= 0.0d0) then
        tmp = t + (x * ((y - a) / z))
    else if (t_2 <= 2d+285) then
        tmp = t_2
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - z) * ((t - x) / (a - z)));
	double t_2 = x + (((y - z) * (t - x)) / (a - z));
	double tmp;
	if (t_2 <= -4e-290) {
		tmp = t_1;
	} else if (t_2 <= 0.0) {
		tmp = t + (x * ((y - a) / z));
	} else if (t_2 <= 2e+285) {
		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 <= -4e-290:
		tmp = t_1
	elif t_2 <= 0.0:
		tmp = t + (x * ((y - a) / z))
	elif t_2 <= 2e+285:
		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 <= -4e-290)
		tmp = t_1;
	elseif (t_2 <= 0.0)
		tmp = Float64(t + Float64(x * Float64(Float64(y - a) / z)));
	elseif (t_2 <= 2e+285)
		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 <= -4e-290)
		tmp = t_1;
	elseif (t_2 <= 0.0)
		tmp = t + (x * ((y - a) / z));
	elseif (t_2 <= 2e+285)
		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, -4e-290], t$95$1, If[LessEqual[t$95$2, 0.0], N[(t + N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+285], 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 -4 \cdot 10^{-290}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+285}:\\
\;\;\;\;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))) < -4.0000000000000003e-290 or 2e285 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

    1. Initial program 64.1%

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

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

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

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

    1. Initial program 4.7%

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

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

      \[\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}{\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.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. distribute-lft-out--99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 2e285

    1. Initial program 98.3%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Add Preprocessing
  3. Recombined 3 regimes into one program.
  4. Final simplification90.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \leq -4 \cdot 10^{-290}:\\ \;\;\;\;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 0:\\ \;\;\;\;t + x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \leq 2 \cdot 10^{+285}:\\ \;\;\;\;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 3: 88.6% 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 -4 \cdot 10^{-290}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;t + x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+285}:\\ \;\;\;\;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 -4e-290)
     t_1
     (if (<= t_2 0.0)
       (+ t (* x (/ (- y a) z)))
       (if (<= t_2 2e+285) 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 <= -4e-290) {
		tmp = t_1;
	} else if (t_2 <= 0.0) {
		tmp = t + (x * ((y - a) / z));
	} else if (t_2 <= 2e+285) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x + ((y - z) / ((a - z) / (t - x)))
    t_2 = x + (((y - z) * (t - x)) / (a - z))
    if (t_2 <= (-4d-290)) then
        tmp = t_1
    else if (t_2 <= 0.0d0) then
        tmp = t + (x * ((y - a) / z))
    else if (t_2 <= 2d+285) then
        tmp = t_2
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - z) / ((a - z) / (t - x)));
	double t_2 = x + (((y - z) * (t - x)) / (a - z));
	double tmp;
	if (t_2 <= -4e-290) {
		tmp = t_1;
	} else if (t_2 <= 0.0) {
		tmp = t + (x * ((y - a) / z));
	} else if (t_2 <= 2e+285) {
		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 <= -4e-290:
		tmp = t_1
	elif t_2 <= 0.0:
		tmp = t + (x * ((y - a) / z))
	elif t_2 <= 2e+285:
		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 <= -4e-290)
		tmp = t_1;
	elseif (t_2 <= 0.0)
		tmp = Float64(t + Float64(x * Float64(Float64(y - a) / z)));
	elseif (t_2 <= 2e+285)
		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 <= -4e-290)
		tmp = t_1;
	elseif (t_2 <= 0.0)
		tmp = t + (x * ((y - a) / z));
	elseif (t_2 <= 2e+285)
		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, -4e-290], t$95$1, If[LessEqual[t$95$2, 0.0], N[(t + N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+285], 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 -4 \cdot 10^{-290}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+285}:\\
\;\;\;\;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))) < -4.0000000000000003e-290 or 2e285 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

    1. Initial program 64.1%

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

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

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

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

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

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

    1. Initial program 4.7%

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

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

      \[\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}{\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.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. distribute-lft-out--99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 2e285

    1. Initial program 98.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \leq -4 \cdot 10^{-290}:\\ \;\;\;\;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 0:\\ \;\;\;\;t + x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \leq 2 \cdot 10^{+285}:\\ \;\;\;\;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.5% accurate, 0.3× speedup?

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

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

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

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

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

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

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

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

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

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

    1. Initial program 4.7%

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

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

      \[\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}{\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.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. distribute-lft-out--99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 41.2% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{z}{z - a}\\ t_2 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;a \leq -1.25 \cdot 10^{+90}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -4.2 \cdot 10^{-80}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;a \leq -2.3 \cdot 10^{-189}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq -2.85 \cdot 10^{-245}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{-273}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 2.9 \cdot 10^{-60}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{+63}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ z (- z a)))) (t_2 (* x (- 1.0 (/ y a)))))
   (if (<= a -1.25e+90)
     t_2
     (if (<= a -4.2e-80)
       (* t (/ (- y z) a))
       (if (<= a -2.3e-189)
         t
         (if (<= a -2.85e-245)
           (/ (* x y) z)
           (if (<= a 9.5e-273)
             t_1
             (if (<= a 2.9e-60)
               (* x (/ (- y a) z))
               (if (<= a 9.5e+63) t_1 t_2)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (z / (z - a));
	double t_2 = x * (1.0 - (y / a));
	double tmp;
	if (a <= -1.25e+90) {
		tmp = t_2;
	} else if (a <= -4.2e-80) {
		tmp = t * ((y - z) / a);
	} else if (a <= -2.3e-189) {
		tmp = t;
	} else if (a <= -2.85e-245) {
		tmp = (x * y) / z;
	} else if (a <= 9.5e-273) {
		tmp = t_1;
	} else if (a <= 2.9e-60) {
		tmp = x * ((y - a) / z);
	} else if (a <= 9.5e+63) {
		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 * (z / (z - a))
    t_2 = x * (1.0d0 - (y / a))
    if (a <= (-1.25d+90)) then
        tmp = t_2
    else if (a <= (-4.2d-80)) then
        tmp = t * ((y - z) / a)
    else if (a <= (-2.3d-189)) then
        tmp = t
    else if (a <= (-2.85d-245)) then
        tmp = (x * y) / z
    else if (a <= 9.5d-273) then
        tmp = t_1
    else if (a <= 2.9d-60) then
        tmp = x * ((y - a) / z)
    else if (a <= 9.5d+63) 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 * (z / (z - a));
	double t_2 = x * (1.0 - (y / a));
	double tmp;
	if (a <= -1.25e+90) {
		tmp = t_2;
	} else if (a <= -4.2e-80) {
		tmp = t * ((y - z) / a);
	} else if (a <= -2.3e-189) {
		tmp = t;
	} else if (a <= -2.85e-245) {
		tmp = (x * y) / z;
	} else if (a <= 9.5e-273) {
		tmp = t_1;
	} else if (a <= 2.9e-60) {
		tmp = x * ((y - a) / z);
	} else if (a <= 9.5e+63) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (z / (z - a))
	t_2 = x * (1.0 - (y / a))
	tmp = 0
	if a <= -1.25e+90:
		tmp = t_2
	elif a <= -4.2e-80:
		tmp = t * ((y - z) / a)
	elif a <= -2.3e-189:
		tmp = t
	elif a <= -2.85e-245:
		tmp = (x * y) / z
	elif a <= 9.5e-273:
		tmp = t_1
	elif a <= 2.9e-60:
		tmp = x * ((y - a) / z)
	elif a <= 9.5e+63:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(z / Float64(z - a)))
	t_2 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (a <= -1.25e+90)
		tmp = t_2;
	elseif (a <= -4.2e-80)
		tmp = Float64(t * Float64(Float64(y - z) / a));
	elseif (a <= -2.3e-189)
		tmp = t;
	elseif (a <= -2.85e-245)
		tmp = Float64(Float64(x * y) / z);
	elseif (a <= 9.5e-273)
		tmp = t_1;
	elseif (a <= 2.9e-60)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	elseif (a <= 9.5e+63)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (z / (z - a));
	t_2 = x * (1.0 - (y / a));
	tmp = 0.0;
	if (a <= -1.25e+90)
		tmp = t_2;
	elseif (a <= -4.2e-80)
		tmp = t * ((y - z) / a);
	elseif (a <= -2.3e-189)
		tmp = t;
	elseif (a <= -2.85e-245)
		tmp = (x * y) / z;
	elseif (a <= 9.5e-273)
		tmp = t_1;
	elseif (a <= 2.9e-60)
		tmp = x * ((y - a) / z);
	elseif (a <= 9.5e+63)
		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[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.25e+90], t$95$2, If[LessEqual[a, -4.2e-80], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -2.3e-189], t, If[LessEqual[a, -2.85e-245], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 9.5e-273], t$95$1, If[LessEqual[a, 2.9e-60], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9.5e+63], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;a \leq -2.3 \cdot 10^{-189}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 9.5 \cdot 10^{-273}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 9.5 \cdot 10^{+63}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if a < -1.2500000000000001e90 or 9.5000000000000003e63 < a

    1. Initial program 71.4%

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

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

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

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

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

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

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

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

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

    if -1.2500000000000001e90 < a < -4.20000000000000003e-80

    1. Initial program 79.3%

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

        \[\leadsto x + \color{blue}{\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 a around inf 61.3%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a}, x\right)} \]
    8. Taylor expanded in t around inf 45.9%

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

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

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

    if -4.20000000000000003e-80 < a < -2.2999999999999998e-189

    1. Initial program 57.4%

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

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

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

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

    if -2.2999999999999998e-189 < a < -2.85e-245

    1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{x \cdot y}}{z} \]
    10. Step-by-step derivation
      1. *-commutative70.8%

        \[\leadsto \frac{\color{blue}{y \cdot x}}{z} \]
    11. Simplified70.8%

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

    if -2.85e-245 < a < 9.49999999999999925e-273 or 2.8999999999999999e-60 < a < 9.5000000000000003e63

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{1}{\frac{\frac{\color{blue}{-\left(a - z\right)}}{z}}{t - x}} \]
    9. Simplified48.1%

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

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

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

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

    if 9.49999999999999925e-273 < a < 2.8999999999999999e-60

    1. Initial program 60.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.25 \cdot 10^{+90}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;a \leq -4.2 \cdot 10^{-80}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;a \leq -2.3 \cdot 10^{-189}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq -2.85 \cdot 10^{-245}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{-273}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \mathbf{elif}\;a \leq 2.9 \cdot 10^{-60}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{+63}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 52.7% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot \frac{t}{a}\\ t_2 := t \cdot \frac{z}{z - a}\\ \mathbf{if}\;z \leq -1.15 \cdot 10^{+99}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{-71}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{-28}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 210000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{+67}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{+117}:\\ \;\;\;\;x - \frac{z \cdot t}{a}\\ \mathbf{elif}\;z \leq 6.6 \cdot 10^{+137}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* y (/ t a)))) (t_2 (* t (/ z (- z a)))))
   (if (<= z -1.15e+99)
     t_2
     (if (<= z 1.05e-71)
       t_1
       (if (<= z 1.15e-28)
         (* x (/ y z))
         (if (<= z 210000000000.0)
           t_1
           (if (<= z 2.8e+67)
             t_2
             (if (<= z 2.4e+117)
               (- x (/ (* z t) a))
               (if (<= z 6.6e+137) (* x (/ (- y a) z)) t_2)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * (t / a));
	double t_2 = t * (z / (z - a));
	double tmp;
	if (z <= -1.15e+99) {
		tmp = t_2;
	} else if (z <= 1.05e-71) {
		tmp = t_1;
	} else if (z <= 1.15e-28) {
		tmp = x * (y / z);
	} else if (z <= 210000000000.0) {
		tmp = t_1;
	} else if (z <= 2.8e+67) {
		tmp = t_2;
	} else if (z <= 2.4e+117) {
		tmp = x - ((z * t) / a);
	} else if (z <= 6.6e+137) {
		tmp = x * ((y - a) / z);
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x + (y * (t / a))
    t_2 = t * (z / (z - a))
    if (z <= (-1.15d+99)) then
        tmp = t_2
    else if (z <= 1.05d-71) then
        tmp = t_1
    else if (z <= 1.15d-28) then
        tmp = x * (y / z)
    else if (z <= 210000000000.0d0) then
        tmp = t_1
    else if (z <= 2.8d+67) then
        tmp = t_2
    else if (z <= 2.4d+117) then
        tmp = x - ((z * t) / a)
    else if (z <= 6.6d+137) then
        tmp = x * ((y - a) / z)
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * (t / a));
	double t_2 = t * (z / (z - a));
	double tmp;
	if (z <= -1.15e+99) {
		tmp = t_2;
	} else if (z <= 1.05e-71) {
		tmp = t_1;
	} else if (z <= 1.15e-28) {
		tmp = x * (y / z);
	} else if (z <= 210000000000.0) {
		tmp = t_1;
	} else if (z <= 2.8e+67) {
		tmp = t_2;
	} else if (z <= 2.4e+117) {
		tmp = x - ((z * t) / a);
	} else if (z <= 6.6e+137) {
		tmp = x * ((y - a) / z);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (y * (t / a))
	t_2 = t * (z / (z - a))
	tmp = 0
	if z <= -1.15e+99:
		tmp = t_2
	elif z <= 1.05e-71:
		tmp = t_1
	elif z <= 1.15e-28:
		tmp = x * (y / z)
	elif z <= 210000000000.0:
		tmp = t_1
	elif z <= 2.8e+67:
		tmp = t_2
	elif z <= 2.4e+117:
		tmp = x - ((z * t) / a)
	elif z <= 6.6e+137:
		tmp = x * ((y - a) / z)
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(y * Float64(t / a)))
	t_2 = Float64(t * Float64(z / Float64(z - a)))
	tmp = 0.0
	if (z <= -1.15e+99)
		tmp = t_2;
	elseif (z <= 1.05e-71)
		tmp = t_1;
	elseif (z <= 1.15e-28)
		tmp = Float64(x * Float64(y / z));
	elseif (z <= 210000000000.0)
		tmp = t_1;
	elseif (z <= 2.8e+67)
		tmp = t_2;
	elseif (z <= 2.4e+117)
		tmp = Float64(x - Float64(Float64(z * t) / a));
	elseif (z <= 6.6e+137)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (y * (t / a));
	t_2 = t * (z / (z - a));
	tmp = 0.0;
	if (z <= -1.15e+99)
		tmp = t_2;
	elseif (z <= 1.05e-71)
		tmp = t_1;
	elseif (z <= 1.15e-28)
		tmp = x * (y / z);
	elseif (z <= 210000000000.0)
		tmp = t_1;
	elseif (z <= 2.8e+67)
		tmp = t_2;
	elseif (z <= 2.4e+117)
		tmp = x - ((z * t) / a);
	elseif (z <= 6.6e+137)
		tmp = x * ((y - a) / z);
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.15e+99], t$95$2, If[LessEqual[z, 1.05e-71], t$95$1, If[LessEqual[z, 1.15e-28], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 210000000000.0], t$95$1, If[LessEqual[z, 2.8e+67], t$95$2, If[LessEqual[z, 2.4e+117], N[(x - N[(N[(z * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.6e+137], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 1.05 \cdot 10^{-71}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 210000000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.8 \cdot 10^{+67}:\\
\;\;\;\;t\_2\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.1500000000000001e99 or 2.1e11 < z < 2.7999999999999998e67 or 6.60000000000000005e137 < z

    1. Initial program 42.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.1500000000000001e99 < z < 1.0500000000000001e-71 or 1.14999999999999993e-28 < z < 2.1e11

    1. Initial program 83.5%

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

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

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

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

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

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

    if 1.0500000000000001e-71 < z < 1.14999999999999993e-28

    1. Initial program 79.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    11. Simplified58.7%

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

    if 2.7999999999999998e67 < z < 2.3999999999999999e117

    1. Initial program 60.8%

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

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

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

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

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

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

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

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

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

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

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

    if 2.3999999999999999e117 < z < 6.60000000000000005e137

    1. Initial program 45.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{+99}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{-71}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{-28}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 210000000000:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{+67}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{+117}:\\ \;\;\;\;x - \frac{z \cdot t}{a}\\ \mathbf{elif}\;z \leq 6.6 \cdot 10^{+137}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 52.9% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot \frac{t}{a}\\ t_2 := t \cdot \frac{z}{z - a}\\ \mathbf{if}\;z \leq -3.7 \cdot 10^{+87}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{-71}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-30}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 1060000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+99} \lor \neg \left(z \leq 6.4 \cdot 10^{+137}\right):\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* y (/ t a)))) (t_2 (* t (/ z (- z a)))))
   (if (<= z -3.7e+87)
     t_2
     (if (<= z 1.05e-71)
       t_1
       (if (<= z 9e-30)
         (* x (/ y z))
         (if (<= z 1060000000000.0)
           t_1
           (if (or (<= z 2e+99) (not (<= z 6.4e+137)))
             t_2
             (* x (/ (- y a) z)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * (t / a));
	double t_2 = t * (z / (z - a));
	double tmp;
	if (z <= -3.7e+87) {
		tmp = t_2;
	} else if (z <= 1.05e-71) {
		tmp = t_1;
	} else if (z <= 9e-30) {
		tmp = x * (y / z);
	} else if (z <= 1060000000000.0) {
		tmp = t_1;
	} else if ((z <= 2e+99) || !(z <= 6.4e+137)) {
		tmp = t_2;
	} else {
		tmp = x * ((y - 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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x + (y * (t / a))
    t_2 = t * (z / (z - a))
    if (z <= (-3.7d+87)) then
        tmp = t_2
    else if (z <= 1.05d-71) then
        tmp = t_1
    else if (z <= 9d-30) then
        tmp = x * (y / z)
    else if (z <= 1060000000000.0d0) then
        tmp = t_1
    else if ((z <= 2d+99) .or. (.not. (z <= 6.4d+137))) then
        tmp = t_2
    else
        tmp = x * ((y - a) / z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * (t / a));
	double t_2 = t * (z / (z - a));
	double tmp;
	if (z <= -3.7e+87) {
		tmp = t_2;
	} else if (z <= 1.05e-71) {
		tmp = t_1;
	} else if (z <= 9e-30) {
		tmp = x * (y / z);
	} else if (z <= 1060000000000.0) {
		tmp = t_1;
	} else if ((z <= 2e+99) || !(z <= 6.4e+137)) {
		tmp = t_2;
	} else {
		tmp = x * ((y - a) / z);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (y * (t / a))
	t_2 = t * (z / (z - a))
	tmp = 0
	if z <= -3.7e+87:
		tmp = t_2
	elif z <= 1.05e-71:
		tmp = t_1
	elif z <= 9e-30:
		tmp = x * (y / z)
	elif z <= 1060000000000.0:
		tmp = t_1
	elif (z <= 2e+99) or not (z <= 6.4e+137):
		tmp = t_2
	else:
		tmp = x * ((y - a) / z)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(y * Float64(t / a)))
	t_2 = Float64(t * Float64(z / Float64(z - a)))
	tmp = 0.0
	if (z <= -3.7e+87)
		tmp = t_2;
	elseif (z <= 1.05e-71)
		tmp = t_1;
	elseif (z <= 9e-30)
		tmp = Float64(x * Float64(y / z));
	elseif (z <= 1060000000000.0)
		tmp = t_1;
	elseif ((z <= 2e+99) || !(z <= 6.4e+137))
		tmp = t_2;
	else
		tmp = Float64(x * Float64(Float64(y - a) / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (y * (t / a));
	t_2 = t * (z / (z - a));
	tmp = 0.0;
	if (z <= -3.7e+87)
		tmp = t_2;
	elseif (z <= 1.05e-71)
		tmp = t_1;
	elseif (z <= 9e-30)
		tmp = x * (y / z);
	elseif (z <= 1060000000000.0)
		tmp = t_1;
	elseif ((z <= 2e+99) || ~((z <= 6.4e+137)))
		tmp = t_2;
	else
		tmp = x * ((y - a) / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.7e+87], t$95$2, If[LessEqual[z, 1.05e-71], t$95$1, If[LessEqual[z, 9e-30], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1060000000000.0], t$95$1, If[Or[LessEqual[z, 2e+99], N[Not[LessEqual[z, 6.4e+137]], $MachinePrecision]], t$95$2, N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 1.05 \cdot 10^{-71}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 1060000000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2 \cdot 10^{+99} \lor \neg \left(z \leq 6.4 \cdot 10^{+137}\right):\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.70000000000000003e87 or 1.06e12 < z < 1.9999999999999999e99 or 6.40000000000000038e137 < z

    1. Initial program 43.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{1}{\frac{\frac{\color{blue}{-\left(a - z\right)}}{z}}{t - x}} \]
    9. Simplified51.0%

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

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

        \[\leadsto \color{blue}{t \cdot \frac{z}{z - a}} \]
    12. Simplified59.1%

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

    if -3.70000000000000003e87 < z < 1.0500000000000001e-71 or 8.99999999999999935e-30 < z < 1.06e12

    1. Initial program 83.5%

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

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

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

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

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

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

    if 1.0500000000000001e-71 < z < 8.99999999999999935e-30

    1. Initial program 79.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    11. Simplified58.7%

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

    if 1.9999999999999999e99 < z < 6.40000000000000038e137

    1. Initial program 56.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.7 \cdot 10^{+87}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{-71}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-30}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 1060000000000:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+99} \lor \neg \left(z \leq 6.4 \cdot 10^{+137}\right):\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 52.9% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot \frac{t}{a}\\ t_2 := t \cdot \frac{z}{z - a}\\ \mathbf{if}\;z \leq -1.02 \cdot 10^{+82}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{-71}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 7.4 \cdot 10^{-30}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 700000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{+52} \lor \neg \left(z \leq 1.1 \cdot 10^{+125}\right):\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* y (/ t a)))) (t_2 (* t (/ z (- z a)))))
   (if (<= z -1.02e+82)
     t_2
     (if (<= z 1.05e-71)
       t_1
       (if (<= z 7.4e-30)
         (* x (/ y z))
         (if (<= z 700000000000.0)
           t_1
           (if (or (<= z 1.25e+52) (not (<= z 1.1e+125)))
             t_2
             (* y (/ (- x t) z)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * (t / a));
	double t_2 = t * (z / (z - a));
	double tmp;
	if (z <= -1.02e+82) {
		tmp = t_2;
	} else if (z <= 1.05e-71) {
		tmp = t_1;
	} else if (z <= 7.4e-30) {
		tmp = x * (y / z);
	} else if (z <= 700000000000.0) {
		tmp = t_1;
	} else if ((z <= 1.25e+52) || !(z <= 1.1e+125)) {
		tmp = t_2;
	} else {
		tmp = y * ((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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x + (y * (t / a))
    t_2 = t * (z / (z - a))
    if (z <= (-1.02d+82)) then
        tmp = t_2
    else if (z <= 1.05d-71) then
        tmp = t_1
    else if (z <= 7.4d-30) then
        tmp = x * (y / z)
    else if (z <= 700000000000.0d0) then
        tmp = t_1
    else if ((z <= 1.25d+52) .or. (.not. (z <= 1.1d+125))) then
        tmp = t_2
    else
        tmp = y * ((x - t) / z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * (t / a));
	double t_2 = t * (z / (z - a));
	double tmp;
	if (z <= -1.02e+82) {
		tmp = t_2;
	} else if (z <= 1.05e-71) {
		tmp = t_1;
	} else if (z <= 7.4e-30) {
		tmp = x * (y / z);
	} else if (z <= 700000000000.0) {
		tmp = t_1;
	} else if ((z <= 1.25e+52) || !(z <= 1.1e+125)) {
		tmp = t_2;
	} else {
		tmp = y * ((x - t) / z);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (y * (t / a))
	t_2 = t * (z / (z - a))
	tmp = 0
	if z <= -1.02e+82:
		tmp = t_2
	elif z <= 1.05e-71:
		tmp = t_1
	elif z <= 7.4e-30:
		tmp = x * (y / z)
	elif z <= 700000000000.0:
		tmp = t_1
	elif (z <= 1.25e+52) or not (z <= 1.1e+125):
		tmp = t_2
	else:
		tmp = y * ((x - t) / z)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(y * Float64(t / a)))
	t_2 = Float64(t * Float64(z / Float64(z - a)))
	tmp = 0.0
	if (z <= -1.02e+82)
		tmp = t_2;
	elseif (z <= 1.05e-71)
		tmp = t_1;
	elseif (z <= 7.4e-30)
		tmp = Float64(x * Float64(y / z));
	elseif (z <= 700000000000.0)
		tmp = t_1;
	elseif ((z <= 1.25e+52) || !(z <= 1.1e+125))
		tmp = t_2;
	else
		tmp = Float64(y * Float64(Float64(x - t) / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (y * (t / a));
	t_2 = t * (z / (z - a));
	tmp = 0.0;
	if (z <= -1.02e+82)
		tmp = t_2;
	elseif (z <= 1.05e-71)
		tmp = t_1;
	elseif (z <= 7.4e-30)
		tmp = x * (y / z);
	elseif (z <= 700000000000.0)
		tmp = t_1;
	elseif ((z <= 1.25e+52) || ~((z <= 1.1e+125)))
		tmp = t_2;
	else
		tmp = y * ((x - t) / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.02e+82], t$95$2, If[LessEqual[z, 1.05e-71], t$95$1, If[LessEqual[z, 7.4e-30], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 700000000000.0], t$95$1, If[Or[LessEqual[z, 1.25e+52], N[Not[LessEqual[z, 1.1e+125]], $MachinePrecision]], t$95$2, N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 1.05 \cdot 10^{-71}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 700000000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.25 \cdot 10^{+52} \lor \neg \left(z \leq 1.1 \cdot 10^{+125}\right):\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.0200000000000001e82 or 7e11 < z < 1.25e52 or 1.09999999999999995e125 < z

    1. Initial program 42.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.0200000000000001e82 < z < 1.0500000000000001e-71 or 7.4000000000000006e-30 < z < 7e11

    1. Initial program 83.5%

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

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

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

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

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

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

    if 1.0500000000000001e-71 < z < 7.4000000000000006e-30

    1. Initial program 79.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    11. Simplified58.7%

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

    if 1.25e52 < z < 1.09999999999999995e125

    1. Initial program 58.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.02 \cdot 10^{+82}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{-71}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 7.4 \cdot 10^{-30}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 700000000000:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{+52} \lor \neg \left(z \leq 1.1 \cdot 10^{+125}\right):\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 48.2% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\ t_2 := t \cdot \frac{z}{z - a}\\ t_3 := t \cdot \frac{y - z}{a}\\ \mathbf{if}\;z \leq -5.9 \cdot 10^{+91}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{-229}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 7.4 \cdot 10^{-177}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;z \leq 7.4 \cdot 10^{-72}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-31}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 22000000000:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y a))))
        (t_2 (* t (/ z (- z a))))
        (t_3 (* t (/ (- y z) a))))
   (if (<= z -5.9e+91)
     t_2
     (if (<= z 4.8e-229)
       t_1
       (if (<= z 7.4e-177)
         t_3
         (if (<= z 7.4e-72)
           t_1
           (if (<= z 5.8e-31)
             (* x (/ y z))
             (if (<= z 22000000000.0) t_3 t_2))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double t_2 = t * (z / (z - a));
	double t_3 = t * ((y - z) / a);
	double tmp;
	if (z <= -5.9e+91) {
		tmp = t_2;
	} else if (z <= 4.8e-229) {
		tmp = t_1;
	} else if (z <= 7.4e-177) {
		tmp = t_3;
	} else if (z <= 7.4e-72) {
		tmp = t_1;
	} else if (z <= 5.8e-31) {
		tmp = x * (y / z);
	} else if (z <= 22000000000.0) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = x * (1.0d0 - (y / a))
    t_2 = t * (z / (z - a))
    t_3 = t * ((y - z) / a)
    if (z <= (-5.9d+91)) then
        tmp = t_2
    else if (z <= 4.8d-229) then
        tmp = t_1
    else if (z <= 7.4d-177) then
        tmp = t_3
    else if (z <= 7.4d-72) then
        tmp = t_1
    else if (z <= 5.8d-31) then
        tmp = x * (y / z)
    else if (z <= 22000000000.0d0) then
        tmp = t_3
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double t_2 = t * (z / (z - a));
	double t_3 = t * ((y - z) / a);
	double tmp;
	if (z <= -5.9e+91) {
		tmp = t_2;
	} else if (z <= 4.8e-229) {
		tmp = t_1;
	} else if (z <= 7.4e-177) {
		tmp = t_3;
	} else if (z <= 7.4e-72) {
		tmp = t_1;
	} else if (z <= 5.8e-31) {
		tmp = x * (y / z);
	} else if (z <= 22000000000.0) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (y / a))
	t_2 = t * (z / (z - a))
	t_3 = t * ((y - z) / a)
	tmp = 0
	if z <= -5.9e+91:
		tmp = t_2
	elif z <= 4.8e-229:
		tmp = t_1
	elif z <= 7.4e-177:
		tmp = t_3
	elif z <= 7.4e-72:
		tmp = t_1
	elif z <= 5.8e-31:
		tmp = x * (y / z)
	elif z <= 22000000000.0:
		tmp = t_3
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(y / a)))
	t_2 = Float64(t * Float64(z / Float64(z - a)))
	t_3 = Float64(t * Float64(Float64(y - z) / a))
	tmp = 0.0
	if (z <= -5.9e+91)
		tmp = t_2;
	elseif (z <= 4.8e-229)
		tmp = t_1;
	elseif (z <= 7.4e-177)
		tmp = t_3;
	elseif (z <= 7.4e-72)
		tmp = t_1;
	elseif (z <= 5.8e-31)
		tmp = Float64(x * Float64(y / z));
	elseif (z <= 22000000000.0)
		tmp = t_3;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (y / a));
	t_2 = t * (z / (z - a));
	t_3 = t * ((y - z) / a);
	tmp = 0.0;
	if (z <= -5.9e+91)
		tmp = t_2;
	elseif (z <= 4.8e-229)
		tmp = t_1;
	elseif (z <= 7.4e-177)
		tmp = t_3;
	elseif (z <= 7.4e-72)
		tmp = t_1;
	elseif (z <= 5.8e-31)
		tmp = x * (y / z);
	elseif (z <= 22000000000.0)
		tmp = t_3;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.9e+91], t$95$2, If[LessEqual[z, 4.8e-229], t$95$1, If[LessEqual[z, 7.4e-177], t$95$3, If[LessEqual[z, 7.4e-72], t$95$1, If[LessEqual[z, 5.8e-31], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 22000000000.0], t$95$3, t$95$2]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 4.8 \cdot 10^{-229}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 7.4 \cdot 10^{-177}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;z \leq 7.4 \cdot 10^{-72}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -5.9000000000000002e91 or 2.2e10 < 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*63.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{z}{z - a}} \]
    12. Simplified51.4%

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

    if -5.9000000000000002e91 < z < 4.8e-229 or 7.39999999999999986e-177 < z < 7.3999999999999997e-72

    1. Initial program 84.3%

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

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

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

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

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

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

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

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

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

    if 4.8e-229 < z < 7.39999999999999986e-177 or 5.8000000000000001e-31 < z < 2.2e10

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a}, x\right)} \]
    8. Taylor expanded in t around inf 68.7%

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

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

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

    if 7.3999999999999997e-72 < z < 5.8000000000000001e-31

    1. Initial program 77.6%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 62.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+62.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. distribute-lft-out--62.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.9 \cdot 10^{+91}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{-229}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 7.4 \cdot 10^{-177}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 7.4 \cdot 10^{-72}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-31}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 22000000000:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 66.0% accurate, 0.4× speedup?

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

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

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

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

\mathbf{elif}\;a \leq 1.85 \cdot 10^{+66}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -5.59999999999999997e94

    1. Initial program 62.2%

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

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

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

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

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

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

    if -5.59999999999999997e94 < a < -1.22000000000000001e-136 or 1.65e-72 < a < 1.85e66

    1. Initial program 68.2%

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

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

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

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

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

    if -1.22000000000000001e-136 < a < 1.65e-72

    1. Initial program 61.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.85e66 < a < 3.99999999999999976e166

    1. Initial program 82.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.99999999999999976e166 < a

    1. Initial program 80.7%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.6 \cdot 10^{+94}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq -1.22 \cdot 10^{-136}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{-72}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 1.85 \cdot 10^{+66}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 4 \cdot 10^{+166}:\\ \;\;\;\;x - \frac{z \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 66.0% accurate, 0.4× speedup?

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if a < -5.59999999999999997e94

    1. Initial program 62.2%

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

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

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

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

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

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

    if -5.59999999999999997e94 < a < -1.29999999999999998e-136

    1. Initial program 69.9%

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

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

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

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

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

    if -1.29999999999999998e-136 < a < 2.0499999999999999e-63

    1. Initial program 61.9%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 84.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+84.6%

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

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

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

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

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

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

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

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

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

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

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

    if 2.0499999999999999e-63 < a < 6.0000000000000001e85

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.0000000000000001e85 < a < 3.99999999999999976e166

    1. Initial program 86.0%

      \[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
    5. Taylor expanded in a around inf 78.3%

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

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

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

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

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

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

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

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

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

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

    if 3.99999999999999976e166 < a

    1. Initial program 80.7%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.6 \cdot 10^{+94}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq -1.3 \cdot 10^{-136}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 2.05 \cdot 10^{-63}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 6 \cdot 10^{+85}:\\ \;\;\;\;t + x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 4 \cdot 10^{+166}:\\ \;\;\;\;x - \frac{z \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 65.9% accurate, 0.4× speedup?

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if a < -4.3999999999999998e95

    1. Initial program 62.2%

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

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

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

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

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

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

    if -4.3999999999999998e95 < a < -3.7e-136

    1. Initial program 69.9%

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

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

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

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

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

    if -3.7e-136 < a < 1.3500000000000001e-62

    1. Initial program 61.9%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 84.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+84.6%

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

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

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

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

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

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

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

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

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

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

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

    if 1.3500000000000001e-62 < a < 5.59999999999999963e84

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.59999999999999963e84 < a < 4.5000000000000003e166

    1. Initial program 86.0%

      \[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
    5. Taylor expanded in a around inf 78.3%

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

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

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

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

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

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

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

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

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

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

    if 4.5000000000000003e166 < a

    1. Initial program 80.7%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.4 \cdot 10^{+95}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq -3.7 \cdot 10^{-136}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{-62}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 5.6 \cdot 10^{+84}:\\ \;\;\;\;t + \left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{+166}:\\ \;\;\;\;x - \frac{z \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 37.4% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -6 \cdot 10^{-188}:\\
\;\;\;\;t\\

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

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

\mathbf{elif}\;a \leq 1.1 \cdot 10^{-58}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 5.8 \cdot 10^{+60}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -5.59999999999999997e94 or 5.79999999999999999e60 < a

    1. Initial program 72.1%

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

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

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

    if -5.59999999999999997e94 < a < -6.00000000000000033e-188 or -1.2499999999999999e-246 < a < 3.39999999999999991e-273 or 1.10000000000000003e-58 < a < 5.79999999999999999e60

    1. Initial program 68.0%

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

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

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

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

    if -6.00000000000000033e-188 < a < -1.2499999999999999e-246 or 3.39999999999999991e-273 < a < 1.10000000000000003e-58

    1. Initial program 59.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    11. Simplified42.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.6 \cdot 10^{+94}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -6 \cdot 10^{-188}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq -1.25 \cdot 10^{-246}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 3.4 \cdot 10^{-273}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{-58}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 5.8 \cdot 10^{+60}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 37.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -5.8 \cdot 10^{+94}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -3 \cdot 10^{-188}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq -4.2 \cdot 10^{-229}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;a \leq 2.56 \cdot 10^{-272}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 7.2 \cdot 10^{-58}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 7.5 \cdot 10^{+63}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -5.8e+94)
   x
   (if (<= a -3e-188)
     t
     (if (<= a -4.2e-229)
       (/ (* x y) z)
       (if (<= a 2.56e-272)
         t
         (if (<= a 7.2e-58) (* x (/ y z)) (if (<= a 7.5e+63) t x)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -5.8e+94) {
		tmp = x;
	} else if (a <= -3e-188) {
		tmp = t;
	} else if (a <= -4.2e-229) {
		tmp = (x * y) / z;
	} else if (a <= 2.56e-272) {
		tmp = t;
	} else if (a <= 7.2e-58) {
		tmp = x * (y / z);
	} else if (a <= 7.5e+63) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (a <= (-5.8d+94)) then
        tmp = x
    else if (a <= (-3d-188)) then
        tmp = t
    else if (a <= (-4.2d-229)) then
        tmp = (x * y) / z
    else if (a <= 2.56d-272) then
        tmp = t
    else if (a <= 7.2d-58) then
        tmp = x * (y / z)
    else if (a <= 7.5d+63) then
        tmp = t
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -5.8e+94) {
		tmp = x;
	} else if (a <= -3e-188) {
		tmp = t;
	} else if (a <= -4.2e-229) {
		tmp = (x * y) / z;
	} else if (a <= 2.56e-272) {
		tmp = t;
	} else if (a <= 7.2e-58) {
		tmp = x * (y / z);
	} else if (a <= 7.5e+63) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -5.8e+94:
		tmp = x
	elif a <= -3e-188:
		tmp = t
	elif a <= -4.2e-229:
		tmp = (x * y) / z
	elif a <= 2.56e-272:
		tmp = t
	elif a <= 7.2e-58:
		tmp = x * (y / z)
	elif a <= 7.5e+63:
		tmp = t
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -5.8e+94)
		tmp = x;
	elseif (a <= -3e-188)
		tmp = t;
	elseif (a <= -4.2e-229)
		tmp = Float64(Float64(x * y) / z);
	elseif (a <= 2.56e-272)
		tmp = t;
	elseif (a <= 7.2e-58)
		tmp = Float64(x * Float64(y / z));
	elseif (a <= 7.5e+63)
		tmp = t;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -5.8e+94)
		tmp = x;
	elseif (a <= -3e-188)
		tmp = t;
	elseif (a <= -4.2e-229)
		tmp = (x * y) / z;
	elseif (a <= 2.56e-272)
		tmp = t;
	elseif (a <= 7.2e-58)
		tmp = x * (y / z);
	elseif (a <= 7.5e+63)
		tmp = t;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5.8e+94], x, If[LessEqual[a, -3e-188], t, If[LessEqual[a, -4.2e-229], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 2.56e-272], t, If[LessEqual[a, 7.2e-58], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.5e+63], t, x]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -3 \cdot 10^{-188}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 2.56 \cdot 10^{-272}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 7.5 \cdot 10^{+63}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -5.7999999999999997e94 or 7.5000000000000005e63 < a

    1. Initial program 72.1%

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

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

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

    if -5.7999999999999997e94 < a < -3.00000000000000017e-188 or -4.19999999999999967e-229 < a < 2.55999999999999991e-272 or 7.20000000000000019e-58 < a < 7.5000000000000005e63

    1. Initial program 68.0%

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

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

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

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

    if -3.00000000000000017e-188 < a < -4.19999999999999967e-229

    1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{x \cdot y}}{z} \]
    10. Step-by-step derivation
      1. *-commutative70.8%

        \[\leadsto \frac{\color{blue}{y \cdot x}}{z} \]
    11. Simplified70.8%

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

    if 2.55999999999999991e-272 < a < 7.20000000000000019e-58

    1. Initial program 60.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    11. Simplified37.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.8 \cdot 10^{+94}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -3 \cdot 10^{-188}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq -4.2 \cdot 10^{-229}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;a \leq 2.56 \cdot 10^{-272}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 7.2 \cdot 10^{-58}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 7.5 \cdot 10^{+63}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 58.3% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;x \leq -5.8 \cdot 10^{+21}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -1.3000000000000001e251 or -6.5000000000000005e104 < x < -5.8e21

    1. Initial program 69.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot 1 + x \cdot \color{blue}{\left(-1 \cdot \frac{y - z}{a}\right)} \]
      6. distribute-lft-in68.0%

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

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

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

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

    if -1.3000000000000001e251 < x < -6.5000000000000005e104

    1. Initial program 42.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.8e21 < x < 1.15e66

    1. Initial program 75.4%

      \[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 x around 0 60.5%

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

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

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

    if 1.15e66 < x

    1. Initial program 57.7%

      \[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 0 46.4%

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

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

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

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

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

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

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

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

Alternative 16: 39.2% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq 1.2 \cdot 10^{-73}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 480000000000:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.05000000000000003e30 or 4.8e11 < z

    1. Initial program 49.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{z}{z - a}} \]
    12. Simplified49.3%

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

    if -2.05000000000000003e30 < z < 1.20000000000000003e-73 or 6.99999999999999971e-31 < z < 4.8e11

    1. Initial program 83.7%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a}, x\right)} \]
    8. Taylor expanded in t around inf 37.4%

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

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

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

    if 1.20000000000000003e-73 < z < 6.99999999999999971e-31

    1. Initial program 80.6%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 54.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+54.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. distribute-lft-out--54.5%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    11. Simplified61.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.05 \cdot 10^{+30}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{-73}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{-31}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 480000000000:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 73.5% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq -2.55 \cdot 10^{-83} \lor \neg \left(a \leq 2.1 \cdot 10^{-29}\right):\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.15000000000000007e98

    1. Initial program 62.2%

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

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

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

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

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

    if -1.15000000000000007e98 < a < -2.55000000000000018e-83 or 2.09999999999999989e-29 < a

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

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

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

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

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

    if -2.55000000000000018e-83 < a < 2.09999999999999989e-29

    1. Initial program 61.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 71.8% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -9.1999999999999999e94 or 2.70000000000000014e-31 < a

    1. Initial program 71.4%

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

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

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

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

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

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

    if -9.1999999999999999e94 < a < -9.8000000000000005e-135

    1. Initial program 69.9%

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

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

      \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
    6. Step-by-step derivation
      1. associate-/l*71.3%

        \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    7. Simplified71.3%

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]

    if -9.8000000000000005e-135 < a < 2.70000000000000014e-31

    1. Initial program 61.3%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*67.0%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified67.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 84.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+84.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. distribute-lft-out--84.5%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub84.5%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg84.5%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg84.5%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. div-sub84.5%

        \[\leadsto t - \color{blue}{\left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      7. associate-/l*84.2%

        \[\leadsto t - \left(\color{blue}{y \cdot \frac{t - x}{z}} - \frac{a \cdot \left(t - x\right)}{z}\right) \]
      8. associate-/l*80.7%

        \[\leadsto t - \left(y \cdot \frac{t - x}{z} - \color{blue}{a \cdot \frac{t - x}{z}}\right) \]
      9. distribute-rgt-out--84.3%

        \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
    7. Simplified84.3%

      \[\leadsto \color{blue}{t - \frac{t - x}{z} \cdot \left(y - a\right)} \]
    8. Taylor expanded in y around inf 79.2%

      \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification76.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.2 \cdot 10^{+94}:\\ \;\;\;\;x - \frac{y - z}{a} \cdot \left(x - t\right)\\ \mathbf{elif}\;a \leq -9.8 \cdot 10^{-135}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{-31}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y - z}{a} \cdot \left(x - t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 75.4% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \frac{y - z}{a} \cdot \left(x - t\right)\\ \mathbf{if}\;a \leq -2.6 \cdot 10^{+96}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{-68}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\ \mathbf{elif}\;a \leq 5 \cdot 10^{+98}:\\ \;\;\;\;t + \left(y - a\right) \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (* (/ (- y z) a) (- x t)))))
   (if (<= a -2.6e+96)
     t_1
     (if (<= a -6.5e-68)
       (+ x (/ (- y z) (/ (- a z) t)))
       (if (<= a 5e+98) (+ t (* (- y a) (/ (- x t) z))) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (((y - z) / a) * (x - t));
	double tmp;
	if (a <= -2.6e+96) {
		tmp = t_1;
	} else if (a <= -6.5e-68) {
		tmp = x + ((y - z) / ((a - z) / t));
	} else if (a <= 5e+98) {
		tmp = t + ((y - a) * ((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 = x - (((y - z) / a) * (x - t))
    if (a <= (-2.6d+96)) then
        tmp = t_1
    else if (a <= (-6.5d-68)) then
        tmp = x + ((y - z) / ((a - z) / t))
    else if (a <= 5d+98) then
        tmp = t + ((y - a) * ((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 = x - (((y - z) / a) * (x - t));
	double tmp;
	if (a <= -2.6e+96) {
		tmp = t_1;
	} else if (a <= -6.5e-68) {
		tmp = x + ((y - z) / ((a - z) / t));
	} else if (a <= 5e+98) {
		tmp = t + ((y - a) * ((x - t) / z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (((y - z) / a) * (x - t))
	tmp = 0
	if a <= -2.6e+96:
		tmp = t_1
	elif a <= -6.5e-68:
		tmp = x + ((y - z) / ((a - z) / t))
	elif a <= 5e+98:
		tmp = t + ((y - a) * ((x - t) / z))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(Float64(Float64(y - z) / a) * Float64(x - t)))
	tmp = 0.0
	if (a <= -2.6e+96)
		tmp = t_1;
	elseif (a <= -6.5e-68)
		tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / t)));
	elseif (a <= 5e+98)
		tmp = Float64(t + Float64(Float64(y - a) * Float64(Float64(x - t) / z)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (((y - z) / a) * (x - t));
	tmp = 0.0;
	if (a <= -2.6e+96)
		tmp = t_1;
	elseif (a <= -6.5e-68)
		tmp = x + ((y - z) / ((a - z) / t));
	elseif (a <= 5e+98)
		tmp = t + ((y - a) * ((x - t) / z));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.6e+96], t$95$1, If[LessEqual[a, -6.5e-68], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5e+98], N[(t + N[(N[(y - a), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x - \frac{y - z}{a} \cdot \left(x - t\right)\\
\mathbf{if}\;a \leq -2.6 \cdot 10^{+96}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -6.5 \cdot 10^{-68}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\

\mathbf{elif}\;a \leq 5 \cdot 10^{+98}:\\
\;\;\;\;t + \left(y - a\right) \cdot \frac{x - t}{z}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.6e96 or 4.9999999999999998e98 < a

    1. Initial program 73.3%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*92.0%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified92.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 67.2%

      \[\leadsto \color{blue}{x + \frac{\left(t - x\right) \cdot \left(y - z\right)}{a}} \]
    6. Step-by-step derivation
      1. associate-/l*88.6%

        \[\leadsto x + \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a}} \]
    7. Simplified88.6%

      \[\leadsto \color{blue}{x + \left(t - x\right) \cdot \frac{y - z}{a}} \]

    if -2.6e96 < a < -6.4999999999999997e-68

    1. Initial program 77.4%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*82.3%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified82.3%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num82.3%

        \[\leadsto x + \left(y - z\right) \cdot \color{blue}{\frac{1}{\frac{a - z}{t - x}}} \]
      2. un-div-inv82.4%

        \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t - x}}} \]
    6. Applied egg-rr82.4%

      \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t - x}}} \]
    7. Taylor expanded in t around inf 73.7%

      \[\leadsto x + \frac{y - z}{\color{blue}{\frac{a - z}{t}}} \]

    if -6.4999999999999997e-68 < a < 4.9999999999999998e98

    1. Initial program 61.3%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*69.1%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified69.1%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 74.9%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    6. Step-by-step derivation
      1. associate--l+74.9%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--74.9%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub75.7%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg75.7%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg75.7%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. div-sub74.9%

        \[\leadsto t - \color{blue}{\left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      7. associate-/l*76.8%

        \[\leadsto t - \left(\color{blue}{y \cdot \frac{t - x}{z}} - \frac{a \cdot \left(t - x\right)}{z}\right) \]
      8. associate-/l*75.9%

        \[\leadsto t - \left(y \cdot \frac{t - x}{z} - \color{blue}{a \cdot \frac{t - x}{z}}\right) \]
      9. distribute-rgt-out--79.0%

        \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
    7. Simplified79.0%

      \[\leadsto \color{blue}{t - \frac{t - x}{z} \cdot \left(y - a\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification81.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.6 \cdot 10^{+96}:\\ \;\;\;\;x - \frac{y - z}{a} \cdot \left(x - t\right)\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{-68}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\ \mathbf{elif}\;a \leq 5 \cdot 10^{+98}:\\ \;\;\;\;t + \left(y - a\right) \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y - z}{a} \cdot \left(x - t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 75.4% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \frac{y - z}{a} \cdot \left(x - t\right)\\ \mathbf{if}\;a \leq -5.8 \cdot 10^{+96}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -3.2 \cdot 10^{-74}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\ \mathbf{elif}\;a \leq 6 \cdot 10^{+98}:\\ \;\;\;\;t + \frac{y - a}{\frac{z}{x - t}}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (* (/ (- y z) a) (- x t)))))
   (if (<= a -5.8e+96)
     t_1
     (if (<= a -3.2e-74)
       (+ x (/ (- y z) (/ (- a z) t)))
       (if (<= a 6e+98) (+ t (/ (- y a) (/ z (- x t)))) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (((y - z) / a) * (x - t));
	double tmp;
	if (a <= -5.8e+96) {
		tmp = t_1;
	} else if (a <= -3.2e-74) {
		tmp = x + ((y - z) / ((a - z) / t));
	} else if (a <= 6e+98) {
		tmp = t + ((y - a) / (z / (x - t)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x - (((y - z) / a) * (x - t))
    if (a <= (-5.8d+96)) then
        tmp = t_1
    else if (a <= (-3.2d-74)) then
        tmp = x + ((y - z) / ((a - z) / t))
    else if (a <= 6d+98) then
        tmp = t + ((y - a) / (z / (x - t)))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (((y - z) / a) * (x - t));
	double tmp;
	if (a <= -5.8e+96) {
		tmp = t_1;
	} else if (a <= -3.2e-74) {
		tmp = x + ((y - z) / ((a - z) / t));
	} else if (a <= 6e+98) {
		tmp = t + ((y - a) / (z / (x - t)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (((y - z) / a) * (x - t))
	tmp = 0
	if a <= -5.8e+96:
		tmp = t_1
	elif a <= -3.2e-74:
		tmp = x + ((y - z) / ((a - z) / t))
	elif a <= 6e+98:
		tmp = t + ((y - a) / (z / (x - t)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(Float64(Float64(y - z) / a) * Float64(x - t)))
	tmp = 0.0
	if (a <= -5.8e+96)
		tmp = t_1;
	elseif (a <= -3.2e-74)
		tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / t)));
	elseif (a <= 6e+98)
		tmp = Float64(t + Float64(Float64(y - a) / Float64(z / Float64(x - t))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (((y - z) / a) * (x - t));
	tmp = 0.0;
	if (a <= -5.8e+96)
		tmp = t_1;
	elseif (a <= -3.2e-74)
		tmp = x + ((y - z) / ((a - z) / t));
	elseif (a <= 6e+98)
		tmp = t + ((y - a) / (z / (x - t)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.8e+96], t$95$1, If[LessEqual[a, -3.2e-74], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6e+98], N[(t + N[(N[(y - a), $MachinePrecision] / N[(z / N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x - \frac{y - z}{a} \cdot \left(x - t\right)\\
\mathbf{if}\;a \leq -5.8 \cdot 10^{+96}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -3.2 \cdot 10^{-74}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\

\mathbf{elif}\;a \leq 6 \cdot 10^{+98}:\\
\;\;\;\;t + \frac{y - a}{\frac{z}{x - t}}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -5.79999999999999955e96 or 6.0000000000000003e98 < a

    1. Initial program 73.3%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*92.0%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified92.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 67.2%

      \[\leadsto \color{blue}{x + \frac{\left(t - x\right) \cdot \left(y - z\right)}{a}} \]
    6. Step-by-step derivation
      1. associate-/l*88.6%

        \[\leadsto x + \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a}} \]
    7. Simplified88.6%

      \[\leadsto \color{blue}{x + \left(t - x\right) \cdot \frac{y - z}{a}} \]

    if -5.79999999999999955e96 < a < -3.1999999999999999e-74

    1. Initial program 77.4%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*82.3%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified82.3%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num82.3%

        \[\leadsto x + \left(y - z\right) \cdot \color{blue}{\frac{1}{\frac{a - z}{t - x}}} \]
      2. un-div-inv82.4%

        \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t - x}}} \]
    6. Applied egg-rr82.4%

      \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t - x}}} \]
    7. Taylor expanded in t around inf 73.7%

      \[\leadsto x + \frac{y - z}{\color{blue}{\frac{a - z}{t}}} \]

    if -3.1999999999999999e-74 < a < 6.0000000000000003e98

    1. Initial program 61.3%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*69.1%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified69.1%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 74.9%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    6. Step-by-step derivation
      1. associate--l+74.9%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--74.9%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub75.7%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg75.7%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg75.7%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. div-sub74.9%

        \[\leadsto t - \color{blue}{\left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      7. associate-/l*76.8%

        \[\leadsto t - \left(\color{blue}{y \cdot \frac{t - x}{z}} - \frac{a \cdot \left(t - x\right)}{z}\right) \]
      8. associate-/l*75.9%

        \[\leadsto t - \left(y \cdot \frac{t - x}{z} - \color{blue}{a \cdot \frac{t - x}{z}}\right) \]
      9. distribute-rgt-out--79.0%

        \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
    7. Simplified79.0%

      \[\leadsto \color{blue}{t - \frac{t - x}{z} \cdot \left(y - a\right)} \]
    8. Step-by-step derivation
      1. *-commutative79.0%

        \[\leadsto t - \color{blue}{\left(y - a\right) \cdot \frac{t - x}{z}} \]
      2. clear-num79.1%

        \[\leadsto t - \left(y - a\right) \cdot \color{blue}{\frac{1}{\frac{z}{t - x}}} \]
      3. un-div-inv79.1%

        \[\leadsto t - \color{blue}{\frac{y - a}{\frac{z}{t - x}}} \]
    9. Applied egg-rr79.1%

      \[\leadsto t - \color{blue}{\frac{y - a}{\frac{z}{t - x}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification81.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.8 \cdot 10^{+96}:\\ \;\;\;\;x - \frac{y - z}{a} \cdot \left(x - t\right)\\ \mathbf{elif}\;a \leq -3.2 \cdot 10^{-74}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\ \mathbf{elif}\;a \leq 6 \cdot 10^{+98}:\\ \;\;\;\;t + \frac{y - a}{\frac{z}{x - t}}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y - z}{a} \cdot \left(x - t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 65.3% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;z \leq -3.6 \cdot 10^{+19}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-72}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 310000:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) (- a z)))))
   (if (<= z -3.6e+19)
     t_1
     (if (<= z 1.7e-72)
       (+ x (* y (/ (- t x) a)))
       (if (<= z 310000.0) (* y (/ (- t x) (- a 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.6e+19) {
		tmp = t_1;
	} else if (z <= 1.7e-72) {
		tmp = x + (y * ((t - x) / a));
	} else if (z <= 310000.0) {
		tmp = y * ((t - x) / (a - z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t * ((y - z) / (a - z))
    if (z <= (-3.6d+19)) then
        tmp = t_1
    else if (z <= 1.7d-72) then
        tmp = x + (y * ((t - x) / a))
    else if (z <= 310000.0d0) then
        tmp = y * ((t - x) / (a - z))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -3.6e+19) {
		tmp = t_1;
	} else if (z <= 1.7e-72) {
		tmp = x + (y * ((t - x) / a));
	} else if (z <= 310000.0) {
		tmp = y * ((t - x) / (a - 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.6e+19:
		tmp = t_1
	elif z <= 1.7e-72:
		tmp = x + (y * ((t - x) / a))
	elif z <= 310000.0:
		tmp = y * ((t - x) / (a - 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.6e+19)
		tmp = t_1;
	elseif (z <= 1.7e-72)
		tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a)));
	elseif (z <= 310000.0)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((y - z) / (a - z));
	tmp = 0.0;
	if (z <= -3.6e+19)
		tmp = t_1;
	elseif (z <= 1.7e-72)
		tmp = x + (y * ((t - x) / a));
	elseif (z <= 310000.0)
		tmp = y * ((t - x) / (a - z));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.6e+19], t$95$1, If[LessEqual[z, 1.7e-72], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 310000.0], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $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.6 \cdot 10^{+19}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.7 \cdot 10^{-72}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\

\mathbf{elif}\;z \leq 310000:\\
\;\;\;\;y \cdot \frac{t - x}{a - z}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.6e19 or 3.1e5 < z

    1. Initial program 50.4%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*66.7%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified66.7%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 48.0%

      \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
    6. Step-by-step derivation
      1. associate-/l*63.3%

        \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    7. Simplified63.3%

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]

    if -3.6e19 < z < 1.6999999999999999e-72

    1. Initial program 84.0%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*90.4%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified90.4%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 67.6%

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
    6. Step-by-step derivation
      1. associate-/l*74.4%

        \[\leadsto x + \color{blue}{y \cdot \frac{t - x}{a}} \]
    7. Simplified74.4%

      \[\leadsto \color{blue}{x + y \cdot \frac{t - x}{a}} \]

    if 1.6999999999999999e-72 < z < 3.1e5

    1. Initial program 79.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 y around inf 63.6%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
    6. Step-by-step derivation
      1. div-sub63.6%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    7. Simplified63.6%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification68.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.6 \cdot 10^{+19}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-72}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 310000:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 65.3% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;z \leq -8 \cdot 10^{+24}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{-72}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 146000:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) (- a z)))))
   (if (<= z -8e+24)
     t_1
     (if (<= z 3.5e-72)
       (+ x (/ y (/ a (- t x))))
       (if (<= z 146000.0) (* y (/ (- t x) (- a 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 <= -8e+24) {
		tmp = t_1;
	} else if (z <= 3.5e-72) {
		tmp = x + (y / (a / (t - x)));
	} else if (z <= 146000.0) {
		tmp = y * ((t - x) / (a - z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t * ((y - z) / (a - z))
    if (z <= (-8d+24)) then
        tmp = t_1
    else if (z <= 3.5d-72) then
        tmp = x + (y / (a / (t - x)))
    else if (z <= 146000.0d0) then
        tmp = y * ((t - x) / (a - z))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -8e+24) {
		tmp = t_1;
	} else if (z <= 3.5e-72) {
		tmp = x + (y / (a / (t - x)));
	} else if (z <= 146000.0) {
		tmp = y * ((t - x) / (a - 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 <= -8e+24:
		tmp = t_1
	elif z <= 3.5e-72:
		tmp = x + (y / (a / (t - x)))
	elif z <= 146000.0:
		tmp = y * ((t - x) / (a - 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 <= -8e+24)
		tmp = t_1;
	elseif (z <= 3.5e-72)
		tmp = Float64(x + Float64(y / Float64(a / Float64(t - x))));
	elseif (z <= 146000.0)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((y - z) / (a - z));
	tmp = 0.0;
	if (z <= -8e+24)
		tmp = t_1;
	elseif (z <= 3.5e-72)
		tmp = x + (y / (a / (t - x)));
	elseif (z <= 146000.0)
		tmp = y * ((t - x) / (a - z));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8e+24], t$95$1, If[LessEqual[z, 3.5e-72], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 146000.0], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;z \leq -8 \cdot 10^{+24}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 3.5 \cdot 10^{-72}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\

\mathbf{elif}\;z \leq 146000:\\
\;\;\;\;y \cdot \frac{t - x}{a - z}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -7.9999999999999999e24 or 146000 < z

    1. Initial program 50.4%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*66.7%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified66.7%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 48.0%

      \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
    6. Step-by-step derivation
      1. associate-/l*63.3%

        \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    7. Simplified63.3%

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]

    if -7.9999999999999999e24 < z < 3.5e-72

    1. Initial program 84.0%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*90.4%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified90.4%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 67.6%

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
    6. Step-by-step derivation
      1. associate-/l*74.4%

        \[\leadsto x + \color{blue}{y \cdot \frac{t - x}{a}} \]
    7. Simplified74.4%

      \[\leadsto \color{blue}{x + y \cdot \frac{t - x}{a}} \]
    8. Step-by-step derivation
      1. clear-num74.3%

        \[\leadsto x + y \cdot \color{blue}{\frac{1}{\frac{a}{t - x}}} \]
      2. un-div-inv74.4%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    9. Applied egg-rr74.4%

      \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]

    if 3.5e-72 < z < 146000

    1. Initial program 79.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 y around inf 63.6%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
    6. Step-by-step derivation
      1. div-sub63.6%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    7. Simplified63.6%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification68.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8 \cdot 10^{+24}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{-72}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 146000:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 86.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -8.2 \cdot 10^{+88}:\\ \;\;\;\;t + \frac{y - a}{\frac{z}{x - t}}\\ \mathbf{elif}\;z \leq 2.15 \cdot 10^{+117}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t + \left(y - a\right) \cdot \frac{x - t}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -8.2e+88)
   (+ t (/ (- y a) (/ z (- x t))))
   (if (<= z 2.15e+117)
     (+ 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 (z <= -8.2e+88) {
		tmp = t + ((y - a) / (z / (x - t)));
	} else if (z <= 2.15e+117) {
		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 (z <= (-8.2d+88)) then
        tmp = t + ((y - a) / (z / (x - t)))
    else if (z <= 2.15d+117) 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 (z <= -8.2e+88) {
		tmp = t + ((y - a) / (z / (x - t)));
	} else if (z <= 2.15e+117) {
		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 z <= -8.2e+88:
		tmp = t + ((y - a) / (z / (x - t)))
	elif z <= 2.15e+117:
		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 (z <= -8.2e+88)
		tmp = Float64(t + Float64(Float64(y - a) / Float64(z / Float64(x - t))));
	elseif (z <= 2.15e+117)
		tmp = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z))));
	else
		tmp = Float64(t + Float64(Float64(y - a) * Float64(Float64(x - t) / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -8.2e+88)
		tmp = t + ((y - a) / (z / (x - t)));
	elseif (z <= 2.15e+117)
		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[LessEqual[z, -8.2e+88], N[(t + N[(N[(y - a), $MachinePrecision] / N[(z / N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.15e+117], N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(y - a), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.2 \cdot 10^{+88}:\\
\;\;\;\;t + \frac{y - a}{\frac{z}{x - t}}\\

\mathbf{elif}\;z \leq 2.15 \cdot 10^{+117}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\

\mathbf{else}:\\
\;\;\;\;t + \left(y - a\right) \cdot \frac{x - t}{z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -8.20000000000000055e88

    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*53.8%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified53.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 84.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+84.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. distribute-lft-out--84.5%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub84.5%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg84.5%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg84.5%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. div-sub84.5%

        \[\leadsto t - \color{blue}{\left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      7. associate-/l*89.2%

        \[\leadsto t - \left(\color{blue}{y \cdot \frac{t - x}{z}} - \frac{a \cdot \left(t - x\right)}{z}\right) \]
      8. associate-/l*93.2%

        \[\leadsto t - \left(y \cdot \frac{t - x}{z} - \color{blue}{a \cdot \frac{t - x}{z}}\right) \]
      9. distribute-rgt-out--93.2%

        \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
    7. Simplified93.2%

      \[\leadsto \color{blue}{t - \frac{t - x}{z} \cdot \left(y - a\right)} \]
    8. Step-by-step derivation
      1. *-commutative93.2%

        \[\leadsto t - \color{blue}{\left(y - a\right) \cdot \frac{t - x}{z}} \]
      2. clear-num93.2%

        \[\leadsto t - \left(y - a\right) \cdot \color{blue}{\frac{1}{\frac{z}{t - x}}} \]
      3. un-div-inv93.3%

        \[\leadsto t - \color{blue}{\frac{y - a}{\frac{z}{t - x}}} \]
    9. Applied egg-rr93.3%

      \[\leadsto t - \color{blue}{\frac{y - a}{\frac{z}{t - x}}} \]

    if -8.20000000000000055e88 < z < 2.14999999999999999e117

    1. Initial program 80.8%

      \[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

    if 2.14999999999999999e117 < z

    1. Initial program 38.6%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*60.9%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified60.9%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 61.3%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    6. Step-by-step derivation
      1. associate--l+61.3%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--61.3%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub61.3%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg61.3%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg61.3%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. div-sub61.3%

        \[\leadsto t - \color{blue}{\left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      7. associate-/l*70.1%

        \[\leadsto t - \left(\color{blue}{y \cdot \frac{t - x}{z}} - \frac{a \cdot \left(t - x\right)}{z}\right) \]
      8. associate-/l*79.4%

        \[\leadsto t - \left(y \cdot \frac{t - x}{z} - \color{blue}{a \cdot \frac{t - x}{z}}\right) \]
      9. distribute-rgt-out--79.4%

        \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
    7. Simplified79.4%

      \[\leadsto \color{blue}{t - \frac{t - x}{z} \cdot \left(y - a\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification87.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.2 \cdot 10^{+88}:\\ \;\;\;\;t + \frac{y - a}{\frac{z}{x - t}}\\ \mathbf{elif}\;z \leq 2.15 \cdot 10^{+117}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t + \left(y - a\right) \cdot \frac{x - t}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 40.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{z}{z - a}\\ \mathbf{if}\;z \leq -3.5 \cdot 10^{+19}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-74}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 28500:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ z (- z a)))))
   (if (<= z -3.5e+19)
     t_1
     (if (<= z 1.7e-74) x (if (<= z 28500.0) (* x (/ y z)) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (z / (z - a));
	double tmp;
	if (z <= -3.5e+19) {
		tmp = t_1;
	} else if (z <= 1.7e-74) {
		tmp = x;
	} else if (z <= 28500.0) {
		tmp = x * (y / 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 * (z / (z - a))
    if (z <= (-3.5d+19)) then
        tmp = t_1
    else if (z <= 1.7d-74) then
        tmp = x
    else if (z <= 28500.0d0) then
        tmp = x * (y / 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 * (z / (z - a));
	double tmp;
	if (z <= -3.5e+19) {
		tmp = t_1;
	} else if (z <= 1.7e-74) {
		tmp = x;
	} else if (z <= 28500.0) {
		tmp = x * (y / z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (z / (z - a))
	tmp = 0
	if z <= -3.5e+19:
		tmp = t_1
	elif z <= 1.7e-74:
		tmp = x
	elif z <= 28500.0:
		tmp = x * (y / z)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(z / Float64(z - a)))
	tmp = 0.0
	if (z <= -3.5e+19)
		tmp = t_1;
	elseif (z <= 1.7e-74)
		tmp = x;
	elseif (z <= 28500.0)
		tmp = Float64(x * Float64(y / z));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (z / (z - a));
	tmp = 0.0;
	if (z <= -3.5e+19)
		tmp = t_1;
	elseif (z <= 1.7e-74)
		tmp = x;
	elseif (z <= 28500.0)
		tmp = x * (y / z);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.5e+19], t$95$1, If[LessEqual[z, 1.7e-74], x, If[LessEqual[z, 28500.0], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t \cdot \frac{z}{z - a}\\
\mathbf{if}\;z \leq -3.5 \cdot 10^{+19}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.7 \cdot 10^{-74}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 28500:\\
\;\;\;\;x \cdot \frac{y}{z}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.5e19 or 28500 < z

    1. Initial program 50.4%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*66.7%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified66.7%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/50.4%

        \[\leadsto x + \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}} \]
      2. clear-num50.2%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{a - z}{\left(y - z\right) \cdot \left(t - x\right)}}} \]
      3. associate-/r*70.6%

        \[\leadsto x + \frac{1}{\color{blue}{\frac{\frac{a - z}{y - z}}{t - x}}} \]
    6. Applied egg-rr70.6%

      \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - z}{y - z}}{t - x}}} \]
    7. Taylor expanded in y around 0 49.5%

      \[\leadsto x + \frac{1}{\frac{\color{blue}{-1 \cdot \frac{a - z}{z}}}{t - x}} \]
    8. Step-by-step derivation
      1. associate-*r/49.5%

        \[\leadsto x + \frac{1}{\frac{\color{blue}{\frac{-1 \cdot \left(a - z\right)}{z}}}{t - x}} \]
      2. neg-mul-149.5%

        \[\leadsto x + \frac{1}{\frac{\frac{\color{blue}{-\left(a - z\right)}}{z}}{t - x}} \]
    9. Simplified49.5%

      \[\leadsto x + \frac{1}{\frac{\color{blue}{\frac{-\left(a - z\right)}{z}}}{t - x}} \]
    10. Taylor expanded in x around 0 36.9%

      \[\leadsto \color{blue}{\frac{t \cdot z}{z - a}} \]
    11. Step-by-step derivation
      1. associate-/l*48.6%

        \[\leadsto \color{blue}{t \cdot \frac{z}{z - a}} \]
    12. Simplified48.6%

      \[\leadsto \color{blue}{t \cdot \frac{z}{z - a}} \]

    if -3.5e19 < z < 1.7e-74

    1. Initial program 83.6%

      \[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 a around inf 31.8%

      \[\leadsto \color{blue}{x} \]

    if 1.7e-74 < z < 28500

    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*85.6%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified85.6%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 56.3%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    6. Step-by-step derivation
      1. associate--l+56.3%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--56.3%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub60.1%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg60.1%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg60.1%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. div-sub56.3%

        \[\leadsto t - \color{blue}{\left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      7. associate-/l*56.2%

        \[\leadsto t - \left(\color{blue}{y \cdot \frac{t - x}{z}} - \frac{a \cdot \left(t - x\right)}{z}\right) \]
      8. associate-/l*56.3%

        \[\leadsto t - \left(y \cdot \frac{t - x}{z} - \color{blue}{a \cdot \frac{t - x}{z}}\right) \]
      9. distribute-rgt-out--60.1%

        \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
    7. Simplified60.1%

      \[\leadsto \color{blue}{t - \frac{t - x}{z} \cdot \left(y - a\right)} \]
    8. Taylor expanded in t around 0 45.7%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - a\right)}{z}} \]
    9. Taylor expanded in y around inf 42.6%

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
    10. Step-by-step derivation
      1. associate-/l*46.1%

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    11. Simplified46.1%

      \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification41.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.5 \cdot 10^{+19}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-74}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 28500:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 25: 59.4% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -8.8 \cdot 10^{+21}:\\ \;\;\;\;x - y \cdot \frac{x}{a}\\ \mathbf{elif}\;x \leq 1.18 \cdot 10^{+66}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= x -8.8e+21)
   (- x (* y (/ x a)))
   (if (<= x 1.18e+66) (* t (/ (- y z) (- a z))) (* x (- 1.0 (/ y a))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (x <= -8.8e+21) {
		tmp = x - (y * (x / a));
	} else if (x <= 1.18e+66) {
		tmp = t * ((y - z) / (a - z));
	} else {
		tmp = x * (1.0 - (y / a));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (x <= (-8.8d+21)) then
        tmp = x - (y * (x / a))
    else if (x <= 1.18d+66) then
        tmp = t * ((y - z) / (a - z))
    else
        tmp = x * (1.0d0 - (y / a))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (x <= -8.8e+21) {
		tmp = x - (y * (x / a));
	} else if (x <= 1.18e+66) {
		tmp = t * ((y - z) / (a - z));
	} else {
		tmp = x * (1.0 - (y / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if x <= -8.8e+21:
		tmp = x - (y * (x / a))
	elif x <= 1.18e+66:
		tmp = t * ((y - z) / (a - z))
	else:
		tmp = x * (1.0 - (y / a))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (x <= -8.8e+21)
		tmp = Float64(x - Float64(y * Float64(x / a)));
	elseif (x <= 1.18e+66)
		tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z)));
	else
		tmp = Float64(x * Float64(1.0 - Float64(y / a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (x <= -8.8e+21)
		tmp = x - (y * (x / a));
	elseif (x <= 1.18e+66)
		tmp = t * ((y - z) / (a - z));
	else
		tmp = x * (1.0 - (y / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -8.8e+21], N[(x - N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.18e+66], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.8 \cdot 10^{+21}:\\
\;\;\;\;x - y \cdot \frac{x}{a}\\

\mathbf{elif}\;x \leq 1.18 \cdot 10^{+66}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -8.8e21

    1. Initial program 55.9%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*72.4%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified72.4%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 44.9%

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
    6. Step-by-step derivation
      1. associate-/l*51.2%

        \[\leadsto x + \color{blue}{y \cdot \frac{t - x}{a}} \]
    7. Simplified51.2%

      \[\leadsto \color{blue}{x + y \cdot \frac{t - x}{a}} \]
    8. Taylor expanded in t around 0 47.9%

      \[\leadsto x + y \cdot \color{blue}{\left(-1 \cdot \frac{x}{a}\right)} \]
    9. Step-by-step derivation
      1. neg-mul-147.9%

        \[\leadsto x + y \cdot \color{blue}{\left(-\frac{x}{a}\right)} \]
      2. distribute-neg-frac247.9%

        \[\leadsto x + y \cdot \color{blue}{\frac{x}{-a}} \]
    10. Simplified47.9%

      \[\leadsto x + y \cdot \color{blue}{\frac{x}{-a}} \]

    if -8.8e21 < x < 1.1800000000000001e66

    1. Initial program 75.4%

      \[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 x around 0 60.5%

      \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
    6. Step-by-step derivation
      1. associate-/l*72.2%

        \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    7. Simplified72.2%

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]

    if 1.1800000000000001e66 < x

    1. Initial program 57.7%

      \[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 0 46.4%

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
    6. Step-by-step derivation
      1. associate-/l*53.8%

        \[\leadsto x + \color{blue}{y \cdot \frac{t - x}{a}} \]
    7. Simplified53.8%

      \[\leadsto \color{blue}{x + y \cdot \frac{t - x}{a}} \]
    8. Taylor expanded in x around inf 51.8%

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{y}{a}\right)} \]
    9. Step-by-step derivation
      1. mul-1-neg51.8%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{y}{a}\right)}\right) \]
      2. unsub-neg51.8%

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{y}{a}\right)} \]
    10. Simplified51.8%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{y}{a}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification62.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -8.8 \cdot 10^{+21}:\\ \;\;\;\;x - y \cdot \frac{x}{a}\\ \mathbf{elif}\;x \leq 1.18 \cdot 10^{+66}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 26: 38.3% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -5.6 \cdot 10^{+94}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{+63}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -5.6e+94) x (if (<= a 2.3e+63) t x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -5.6e+94) {
		tmp = x;
	} else if (a <= 2.3e+63) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (a <= (-5.6d+94)) then
        tmp = x
    else if (a <= 2.3d+63) then
        tmp = t
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -5.6e+94) {
		tmp = x;
	} else if (a <= 2.3e+63) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -5.6e+94:
		tmp = x
	elif a <= 2.3e+63:
		tmp = t
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -5.6e+94)
		tmp = x;
	elseif (a <= 2.3e+63)
		tmp = t;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -5.6e+94)
		tmp = x;
	elseif (a <= 2.3e+63)
		tmp = t;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5.6e+94], x, If[LessEqual[a, 2.3e+63], t, x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.6 \cdot 10^{+94}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 2.3 \cdot 10^{+63}:\\
\;\;\;\;t\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.59999999999999997e94 or 2.29999999999999993e63 < a

    1. Initial program 72.1%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*89.4%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified89.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 48.5%

      \[\leadsto \color{blue}{x} \]

    if -5.59999999999999997e94 < a < 2.29999999999999993e63

    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*72.5%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified72.5%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 34.4%

      \[\leadsto \color{blue}{t} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification39.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.6 \cdot 10^{+94}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{+63}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 27: 24.2% 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 67.5%

    \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
  2. Step-by-step derivation
    1. associate-/l*78.4%

      \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
  3. Simplified78.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 24.9%

    \[\leadsto \color{blue}{t} \]
  6. Final simplification24.9%

    \[\leadsto t \]
  7. Add Preprocessing

Developer target: 84.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 2024045 
(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))))