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

Percentage Accurate: 67.8% → 90.6%
Time: 23.3s
Alternatives: 23
Speedup: 0.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 23 alternatives:

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

Initial Program: 67.8% 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 -1 \cdot 10^{-296}:\\ \;\;\;\;x + \left(x - t\right) \cdot \frac{z - y}{a - z}\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;t + \frac{x}{\frac{z}{y - a}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)\\ \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 -1e-296)
     (+ x (* (- x t) (/ (- z y) (- a z))))
     (if (<= t_1 0.0)
       (+ t (/ x (/ z (- y a))))
       (fma (/ (- y z) (- a z)) (- t x) x)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (((y - z) * (t - x)) / (a - z));
	double tmp;
	if (t_1 <= -1e-296) {
		tmp = x + ((x - t) * ((z - y) / (a - z)));
	} else if (t_1 <= 0.0) {
		tmp = t + (x / (z / (y - a)));
	} else {
		tmp = fma(((y - z) / (a - z)), (t - x), x);
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z)))
	tmp = 0.0
	if (t_1 <= -1e-296)
		tmp = Float64(x + Float64(Float64(x - t) * Float64(Float64(z - y) / Float64(a - z))));
	elseif (t_1 <= 0.0)
		tmp = Float64(t + Float64(x / Float64(z / Float64(y - a))));
	else
		tmp = fma(Float64(Float64(y - z) / Float64(a - z)), Float64(t - x), x);
	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, -1e-296], N[(x + N[(N[(x - t), $MachinePrecision] * N[(N[(z - y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(t + N[(x / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]]]]
\begin{array}{l}

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

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)\\


\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))) < -1e-296

    1. Initial program 72.2%

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

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

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

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

    1. Initial program 3.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 76.0%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Add Preprocessing
  3. Recombined 3 regimes into one program.
  4. Final simplification90.0%

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

Alternative 2: 90.6% accurate, 0.3× speedup?

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

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


\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))) < -1e-296 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

    1. Initial program 74.2%

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

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

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

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

    1. Initial program 3.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 51.5% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\ t_2 := x + t \cdot \frac{y}{a}\\ \mathbf{if}\;z \leq -3 \cdot 10^{+14}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.1 \cdot 10^{-23}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -9.6 \cdot 10^{-80}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -2.4 \cdot 10^{-143}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -3.9 \cdot 10^{-238}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-305}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{+80}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y a)))) (t_2 (+ x (* t (/ y a)))))
   (if (<= z -3e+14)
     t
     (if (<= z -1.1e-23)
       t_2
       (if (<= z -9.6e-80)
         (+ x t)
         (if (<= z -2.4e-143)
           t_1
           (if (<= z -3.9e-238)
             t_2
             (if (<= z 5e-305) t_1 (if (<= z 3.2e+80) t_2 t)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double t_2 = x + (t * (y / a));
	double tmp;
	if (z <= -3e+14) {
		tmp = t;
	} else if (z <= -1.1e-23) {
		tmp = t_2;
	} else if (z <= -9.6e-80) {
		tmp = x + t;
	} else if (z <= -2.4e-143) {
		tmp = t_1;
	} else if (z <= -3.9e-238) {
		tmp = t_2;
	} else if (z <= 5e-305) {
		tmp = t_1;
	} else if (z <= 3.2e+80) {
		tmp = t_2;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x * (1.0d0 - (y / a))
    t_2 = x + (t * (y / a))
    if (z <= (-3d+14)) then
        tmp = t
    else if (z <= (-1.1d-23)) then
        tmp = t_2
    else if (z <= (-9.6d-80)) then
        tmp = x + t
    else if (z <= (-2.4d-143)) then
        tmp = t_1
    else if (z <= (-3.9d-238)) then
        tmp = t_2
    else if (z <= 5d-305) then
        tmp = t_1
    else if (z <= 3.2d+80) then
        tmp = t_2
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double t_2 = x + (t * (y / a));
	double tmp;
	if (z <= -3e+14) {
		tmp = t;
	} else if (z <= -1.1e-23) {
		tmp = t_2;
	} else if (z <= -9.6e-80) {
		tmp = x + t;
	} else if (z <= -2.4e-143) {
		tmp = t_1;
	} else if (z <= -3.9e-238) {
		tmp = t_2;
	} else if (z <= 5e-305) {
		tmp = t_1;
	} else if (z <= 3.2e+80) {
		tmp = t_2;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (y / a))
	t_2 = x + (t * (y / a))
	tmp = 0
	if z <= -3e+14:
		tmp = t
	elif z <= -1.1e-23:
		tmp = t_2
	elif z <= -9.6e-80:
		tmp = x + t
	elif z <= -2.4e-143:
		tmp = t_1
	elif z <= -3.9e-238:
		tmp = t_2
	elif z <= 5e-305:
		tmp = t_1
	elif z <= 3.2e+80:
		tmp = t_2
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(y / a)))
	t_2 = Float64(x + Float64(t * Float64(y / a)))
	tmp = 0.0
	if (z <= -3e+14)
		tmp = t;
	elseif (z <= -1.1e-23)
		tmp = t_2;
	elseif (z <= -9.6e-80)
		tmp = Float64(x + t);
	elseif (z <= -2.4e-143)
		tmp = t_1;
	elseif (z <= -3.9e-238)
		tmp = t_2;
	elseif (z <= 5e-305)
		tmp = t_1;
	elseif (z <= 3.2e+80)
		tmp = t_2;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (y / a));
	t_2 = x + (t * (y / a));
	tmp = 0.0;
	if (z <= -3e+14)
		tmp = t;
	elseif (z <= -1.1e-23)
		tmp = t_2;
	elseif (z <= -9.6e-80)
		tmp = x + t;
	elseif (z <= -2.4e-143)
		tmp = t_1;
	elseif (z <= -3.9e-238)
		tmp = t_2;
	elseif (z <= 5e-305)
		tmp = t_1;
	elseif (z <= 3.2e+80)
		tmp = t_2;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3e+14], t, If[LessEqual[z, -1.1e-23], t$95$2, If[LessEqual[z, -9.6e-80], N[(x + t), $MachinePrecision], If[LessEqual[z, -2.4e-143], t$95$1, If[LessEqual[z, -3.9e-238], t$95$2, If[LessEqual[z, 5e-305], t$95$1, If[LessEqual[z, 3.2e+80], t$95$2, t]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -1.1 \cdot 10^{-23}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq -9.6 \cdot 10^{-80}:\\
\;\;\;\;x + t\\

\mathbf{elif}\;z \leq -2.4 \cdot 10^{-143}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -3.9 \cdot 10^{-238}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;z \leq 3.2 \cdot 10^{+80}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3e14 or 3.1999999999999999e80 < z

    1. Initial program 37.9%

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

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

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

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

    if -3e14 < z < -1.1e-23 or -2.3999999999999999e-143 < z < -3.8999999999999998e-238 or 4.99999999999999985e-305 < z < 3.1999999999999999e80

    1. Initial program 88.8%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    10. Simplified67.2%

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

    if -1.1e-23 < z < -9.5999999999999996e-80

    1. Initial program 82.5%

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

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

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

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

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

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

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

    if -9.5999999999999996e-80 < z < -2.3999999999999999e-143 or -3.8999999999999998e-238 < z < 4.99999999999999985e-305

    1. Initial program 85.8%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{+14}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.1 \cdot 10^{-23}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -9.6 \cdot 10^{-80}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -2.4 \cdot 10^{-143}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -3.9 \cdot 10^{-238}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-305}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{+80}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 51.3% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{t}{\frac{a}{y}}\\ t_2 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;z \leq -2.8 \cdot 10^{+14}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.22 \cdot 10^{-21}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -1.06 \cdot 10^{-79}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{-143}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -2.75 \cdot 10^{-238}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-305}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+87}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ t (/ a y)))) (t_2 (* x (- 1.0 (/ y a)))))
   (if (<= z -2.8e+14)
     t
     (if (<= z -1.22e-21)
       (+ x (* t (/ y a)))
       (if (<= z -1.06e-79)
         (+ x t)
         (if (<= z -2.1e-143)
           t_2
           (if (<= z -2.75e-238)
             t_1
             (if (<= z 2.1e-305) t_2 (if (<= z 2e+87) t_1 t)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (t / (a / y));
	double t_2 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -2.8e+14) {
		tmp = t;
	} else if (z <= -1.22e-21) {
		tmp = x + (t * (y / a));
	} else if (z <= -1.06e-79) {
		tmp = x + t;
	} else if (z <= -2.1e-143) {
		tmp = t_2;
	} else if (z <= -2.75e-238) {
		tmp = t_1;
	} else if (z <= 2.1e-305) {
		tmp = t_2;
	} else if (z <= 2e+87) {
		tmp = t_1;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x + (t / (a / y))
    t_2 = x * (1.0d0 - (y / a))
    if (z <= (-2.8d+14)) then
        tmp = t
    else if (z <= (-1.22d-21)) then
        tmp = x + (t * (y / a))
    else if (z <= (-1.06d-79)) then
        tmp = x + t
    else if (z <= (-2.1d-143)) then
        tmp = t_2
    else if (z <= (-2.75d-238)) then
        tmp = t_1
    else if (z <= 2.1d-305) then
        tmp = t_2
    else if (z <= 2d+87) then
        tmp = t_1
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (t / (a / y));
	double t_2 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -2.8e+14) {
		tmp = t;
	} else if (z <= -1.22e-21) {
		tmp = x + (t * (y / a));
	} else if (z <= -1.06e-79) {
		tmp = x + t;
	} else if (z <= -2.1e-143) {
		tmp = t_2;
	} else if (z <= -2.75e-238) {
		tmp = t_1;
	} else if (z <= 2.1e-305) {
		tmp = t_2;
	} else if (z <= 2e+87) {
		tmp = t_1;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (t / (a / y))
	t_2 = x * (1.0 - (y / a))
	tmp = 0
	if z <= -2.8e+14:
		tmp = t
	elif z <= -1.22e-21:
		tmp = x + (t * (y / a))
	elif z <= -1.06e-79:
		tmp = x + t
	elif z <= -2.1e-143:
		tmp = t_2
	elif z <= -2.75e-238:
		tmp = t_1
	elif z <= 2.1e-305:
		tmp = t_2
	elif z <= 2e+87:
		tmp = t_1
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(t / Float64(a / y)))
	t_2 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (z <= -2.8e+14)
		tmp = t;
	elseif (z <= -1.22e-21)
		tmp = Float64(x + Float64(t * Float64(y / a)));
	elseif (z <= -1.06e-79)
		tmp = Float64(x + t);
	elseif (z <= -2.1e-143)
		tmp = t_2;
	elseif (z <= -2.75e-238)
		tmp = t_1;
	elseif (z <= 2.1e-305)
		tmp = t_2;
	elseif (z <= 2e+87)
		tmp = t_1;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (t / (a / y));
	t_2 = x * (1.0 - (y / a));
	tmp = 0.0;
	if (z <= -2.8e+14)
		tmp = t;
	elseif (z <= -1.22e-21)
		tmp = x + (t * (y / a));
	elseif (z <= -1.06e-79)
		tmp = x + t;
	elseif (z <= -2.1e-143)
		tmp = t_2;
	elseif (z <= -2.75e-238)
		tmp = t_1;
	elseif (z <= 2.1e-305)
		tmp = t_2;
	elseif (z <= 2e+87)
		tmp = t_1;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.8e+14], t, If[LessEqual[z, -1.22e-21], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.06e-79], N[(x + t), $MachinePrecision], If[LessEqual[z, -2.1e-143], t$95$2, If[LessEqual[z, -2.75e-238], t$95$1, If[LessEqual[z, 2.1e-305], t$95$2, If[LessEqual[z, 2e+87], t$95$1, t]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -1.06 \cdot 10^{-79}:\\
\;\;\;\;x + t\\

\mathbf{elif}\;z \leq -2.1 \cdot 10^{-143}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq -2.75 \cdot 10^{-238}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.1 \cdot 10^{-305}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq 2 \cdot 10^{+87}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -2.8e14 or 1.9999999999999999e87 < z

    1. Initial program 37.9%

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

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

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

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

    if -2.8e14 < z < -1.21999999999999991e-21

    1. Initial program 88.9%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    10. Simplified57.3%

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

    if -1.21999999999999991e-21 < z < -1.06000000000000005e-79

    1. Initial program 82.5%

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

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

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

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

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

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

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

    if -1.06000000000000005e-79 < z < -2.1000000000000001e-143 or -2.74999999999999997e-238 < z < 2.1e-305

    1. Initial program 85.8%

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

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

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

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

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

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

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

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

    if -2.1000000000000001e-143 < z < -2.74999999999999997e-238 or 2.1e-305 < z < 1.9999999999999999e87

    1. Initial program 88.8%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{+14}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.22 \cdot 10^{-21}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -1.06 \cdot 10^{-79}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{-143}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -2.75 \cdot 10^{-238}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-305}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+87}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 70.7% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;z \leq 2.25 \cdot 10^{+69} \lor \neg \left(z \leq 1.05 \cdot 10^{+161}\right) \land z \leq 8.6 \cdot 10^{+216}:\\
\;\;\;\;x - t \cdot \frac{z - y}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.24999999999999999e-71

    1. Initial program 55.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.24999999999999999e-71 < z < 5.4e-242

    1. Initial program 87.7%

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

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

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

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

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

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

    if 5.4e-242 < z < 2.25e69 or 1.05e161 < z < 8.59999999999999939e216

    1. Initial program 86.3%

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

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

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

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

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

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

    if 2.25e69 < z < 1.05e161 or 8.59999999999999939e216 < z

    1. Initial program 26.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.25 \cdot 10^{-71}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{-242}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 2.25 \cdot 10^{+69} \lor \neg \left(z \leq 1.05 \cdot 10^{+161}\right) \land z \leq 8.6 \cdot 10^{+216}:\\ \;\;\;\;x - t \cdot \frac{z - y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{x}{\frac{z}{y - a}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 73.5% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;z \leq 1.55 \cdot 10^{+161} \lor \neg \left(z \leq 7.6 \cdot 10^{+216}\right):\\
\;\;\;\;t + \frac{x}{\frac{z}{y - a}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3e14

    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/71.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3e14 < z < 2.2499999999999999e67

    1. Initial program 89.4%

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

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

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

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

    if 2.2499999999999999e67 < z < 1.55000000000000003e161 or 7.60000000000000029e216 < z

    1. Initial program 26.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.55000000000000003e161 < z < 7.60000000000000029e216

    1. Initial program 48.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{+14}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;z \leq 2.25 \cdot 10^{+67}:\\ \;\;\;\;x - \frac{y \cdot \left(x - t\right)}{a - z}\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{+161} \lor \neg \left(z \leq 7.6 \cdot 10^{+216}\right):\\ \;\;\;\;t + \frac{x}{\frac{z}{y - a}}\\ \mathbf{else}:\\ \;\;\;\;x - t \cdot \frac{z - y}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 73.3% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;z \leq 1.1 \cdot 10^{+161} \lor \neg \left(z \leq 7.6 \cdot 10^{+216}\right):\\
\;\;\;\;t + \frac{x}{\frac{z}{y - a}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.15e14

    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/71.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.15e14 < z < 3.69999999999999983e64

    1. Initial program 89.4%

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

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

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

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

    if 3.69999999999999983e64 < z < 1.1e161 or 7.60000000000000029e216 < z

    1. Initial program 26.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.1e161 < z < 7.60000000000000029e216

    1. Initial program 48.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.15 \cdot 10^{+14}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{+64}:\\ \;\;\;\;x - \frac{y \cdot \left(x - t\right)}{a - z}\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{+161} \lor \neg \left(z \leq 7.6 \cdot 10^{+216}\right):\\ \;\;\;\;t + \frac{x}{\frac{z}{y - a}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 69.6% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;z \leq 2.3 \cdot 10^{-29} \lor \neg \left(z \leq 2.5 \cdot 10^{+39}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -9.9999999999999992e-72 or 1.4999999999999999e-75 < z < 2.29999999999999991e-29 or 2.50000000000000008e39 < 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/72.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.9999999999999992e-72 < z < 1.4999999999999999e-75

    1. Initial program 90.4%

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

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

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

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

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

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

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

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

    if 2.29999999999999991e-29 < z < 2.50000000000000008e39

    1. Initial program 82.4%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{-71}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{-75}:\\ \;\;\;\;x - \frac{x - t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{-29} \lor \neg \left(z \leq 2.5 \cdot 10^{+39}\right):\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;x - t \cdot \frac{z - y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 62.3% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;z \leq -5.3 \cdot 10^{-238}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 3.2 \cdot 10^{+69}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.4e14

    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/71.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \color{blue}{\frac{y}{\frac{z}{-x}}} \]
    11. Simplified63.6%

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

    if -2.4e14 < z < -5.29999999999999968e-238 or 2.49999999999999998e-300 < z < 3.19999999999999985e69

    1. Initial program 89.0%

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

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

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

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

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

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

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

    if -5.29999999999999968e-238 < z < 2.49999999999999998e-300

    1. Initial program 86.6%

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

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

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

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

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

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

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

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

    if 3.19999999999999985e69 < z

    1. Initial program 31.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto t - \color{blue}{-1 \cdot \frac{x \cdot y}{z}} \]
    10. Step-by-step derivation
      1. mul-1-neg67.7%

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

        \[\leadsto t - \left(-\color{blue}{\frac{x}{\frac{z}{y}}}\right) \]
    11. Simplified71.1%

      \[\leadsto t - \color{blue}{\left(-\frac{x}{\frac{z}{y}}\right)} \]
    12. Step-by-step derivation
      1. clear-num71.2%

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

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

        \[\leadsto t - \left(-\color{blue}{\frac{y}{z}} \cdot x\right) \]
    13. Applied egg-rr71.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.4 \cdot 10^{+14}:\\ \;\;\;\;t - \frac{y}{\frac{z}{-x}}\\ \mathbf{elif}\;z \leq -5.3 \cdot 10^{-238}:\\ \;\;\;\;x + t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{-300}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{+69}:\\ \;\;\;\;x + t \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 67.5% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;z \leq -2 \cdot 10^{-38}:\\
\;\;\;\;t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -2.8e14

    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/71.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \color{blue}{\frac{y}{\frac{z}{-x}}} \]
    11. Simplified63.6%

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

    if -2.8e14 < z < -3.6999999999999998e-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/90.4%

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

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

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

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

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

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

    if -3.6999999999999998e-31 < z < -1.9999999999999999e-38

    1. Initial program 67.6%

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

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

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

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

    if -1.9999999999999999e-38 < z < 6.20000000000000035e38

    1. Initial program 90.8%

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

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

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

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

    if 6.20000000000000035e38 < z

    1. Initial program 35.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto t - \color{blue}{-1 \cdot \frac{x \cdot y}{z}} \]
    10. Step-by-step derivation
      1. mul-1-neg63.0%

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

        \[\leadsto t - \left(-\color{blue}{\frac{x}{\frac{z}{y}}}\right) \]
    11. Simplified66.1%

      \[\leadsto t - \color{blue}{\left(-\frac{x}{\frac{z}{y}}\right)} \]
    12. Step-by-step derivation
      1. clear-num66.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{+14}:\\ \;\;\;\;t - \frac{y}{\frac{z}{-x}}\\ \mathbf{elif}\;z \leq -3.7 \cdot 10^{-31}:\\ \;\;\;\;x + t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq -2 \cdot 10^{-38}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+38}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 67.5% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;z \leq -2 \cdot 10^{-38}:\\
\;\;\;\;t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -2.3e14

    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/71.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \color{blue}{\frac{y}{\frac{z}{-x}}} \]
    11. Simplified63.6%

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

    if -2.3e14 < z < -3.6999999999999998e-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/90.4%

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

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

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

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

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

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

    if -3.6999999999999998e-31 < z < -1.9999999999999999e-38

    1. Initial program 67.6%

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

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

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

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

    if -1.9999999999999999e-38 < z < 6.5e38

    1. Initial program 90.8%

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

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

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

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

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

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

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

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

    if 6.5e38 < z

    1. Initial program 35.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto t - \color{blue}{-1 \cdot \frac{x \cdot y}{z}} \]
    10. Step-by-step derivation
      1. mul-1-neg63.0%

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

        \[\leadsto t - \left(-\color{blue}{\frac{x}{\frac{z}{y}}}\right) \]
    11. Simplified66.1%

      \[\leadsto t - \color{blue}{\left(-\frac{x}{\frac{z}{y}}\right)} \]
    12. Step-by-step derivation
      1. clear-num66.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{+14}:\\ \;\;\;\;t - \frac{y}{\frac{z}{-x}}\\ \mathbf{elif}\;z \leq -3.7 \cdot 10^{-31}:\\ \;\;\;\;x + t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq -2 \cdot 10^{-38}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+38}:\\ \;\;\;\;x - \frac{x - t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 69.5% accurate, 0.4× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.24999999999999999e-71 or 1.40000000000000001e39 < z

    1. Initial program 46.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.24999999999999999e-71 < z < 4.6000000000000003e-87

    1. Initial program 90.9%

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

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

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

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

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

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

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

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

    if 4.6000000000000003e-87 < z < 1.4000000000000001e-29

    1. Initial program 92.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.4000000000000001e-29 < z < 1.40000000000000001e39

    1. Initial program 82.4%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.25 \cdot 10^{-71}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{-87}:\\ \;\;\;\;x - \frac{x - t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-29}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+39}:\\ \;\;\;\;x - t \cdot \frac{z - y}{a}\\ \mathbf{else}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 69.5% accurate, 0.4× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.2e-71

    1. Initial program 55.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.2e-71 < z < 4.39999999999999976e-87

    1. Initial program 90.9%

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

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

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

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

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

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

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

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

    if 4.39999999999999976e-87 < z < 2.59999999999999987e-30

    1. Initial program 92.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.59999999999999987e-30 < z < 1.1e37

    1. Initial program 82.4%

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

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

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

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

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

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

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

    if 1.1e37 < z

    1. Initial program 35.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.2 \cdot 10^{-71}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{-87}:\\ \;\;\;\;x - \frac{x - t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-30}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{+37}:\\ \;\;\;\;x - t \cdot \frac{z - y}{a}\\ \mathbf{else}:\\ \;\;\;\;t + \left(y - a\right) \cdot \frac{x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 69.5% accurate, 0.4× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.24999999999999999e-71

    1. Initial program 55.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.24999999999999999e-71 < z < 4.7999999999999999e-87

    1. Initial program 90.9%

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

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

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

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

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

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

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

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

    if 4.7999999999999999e-87 < z < 1.80000000000000002e-31

    1. Initial program 92.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.80000000000000002e-31 < z < 1.65e37

    1. Initial program 82.4%

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

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

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

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

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

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

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

    if 1.65e37 < z

    1. Initial program 35.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.25 \cdot 10^{-71}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{-87}:\\ \;\;\;\;x - \frac{x - t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-31}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{+37}:\\ \;\;\;\;x - t \cdot \frac{z - y}{a}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{x}{\frac{z}{y - a}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 55.8% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq -2.25 \cdot 10^{-238}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 3.1 \cdot 10^{+38}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.8e6 or 3.10000000000000018e38 < z

    1. Initial program 41.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto t - \color{blue}{\frac{t}{\frac{z}{y}}} \]
    12. Step-by-step derivation
      1. clear-num56.0%

        \[\leadsto t - \color{blue}{\frac{1}{\frac{\frac{z}{y}}{t}}} \]
      2. associate-/r/56.1%

        \[\leadsto t - \color{blue}{\frac{1}{\frac{z}{y}} \cdot t} \]
      3. clear-num56.1%

        \[\leadsto t - \color{blue}{\frac{y}{z}} \cdot t \]
    13. Applied egg-rr56.1%

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

    if -5.8e6 < z < -2.24999999999999998e-238 or 1.35000000000000005e-304 < z < 3.10000000000000018e38

    1. Initial program 90.4%

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

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

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

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

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

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

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

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

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

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

    if -2.24999999999999998e-238 < z < 1.35000000000000005e-304

    1. Initial program 86.6%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5800000:\\ \;\;\;\;t - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -2.25 \cdot 10^{-238}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{-304}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{+38}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t - t \cdot \frac{y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 59.5% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq -2.7 \cdot 10^{-238}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 3.15 \cdot 10^{+38}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.2e14 or 3.15000000000000001e38 < z

    1. Initial program 40.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto t - \color{blue}{-1 \cdot \frac{x \cdot y}{z}} \]
    10. Step-by-step derivation
      1. mul-1-neg61.4%

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

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

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

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

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

    if -2.2e14 < z < -2.69999999999999991e-238 or 7.50000000000000038e-293 < z < 3.15000000000000001e38

    1. Initial program 89.9%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t}{\frac{a}{y - z}}} \]
    10. Simplified68.6%

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

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

    if -2.69999999999999991e-238 < z < 7.50000000000000038e-293

    1. Initial program 86.6%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{+14}:\\ \;\;\;\;t + y \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{-238}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-293}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 3.15 \cdot 10^{+38}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t + y \cdot \frac{x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 59.9% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq -3.75 \cdot 10^{-238}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 1.65 \cdot 10^{+37}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.9e14

    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/71.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto t - \color{blue}{-1 \cdot \frac{x \cdot y}{z}} \]
    10. Step-by-step derivation
      1. mul-1-neg59.6%

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

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

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

        \[\leadsto t - \left(-\color{blue}{\frac{x}{z} \cdot y}\right) \]
    13. Applied egg-rr63.5%

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

    if -2.9e14 < z < -3.75000000000000031e-238 or 1.02e-306 < z < 1.65e37

    1. Initial program 89.9%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t}{\frac{a}{y - z}}} \]
    10. Simplified68.6%

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

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

    if -3.75000000000000031e-238 < z < 1.02e-306

    1. Initial program 86.6%

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

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified93.0%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 93.0%

      \[\leadsto x + \color{blue}{\frac{y}{a}} \cdot \left(t - x\right) \]
    6. Taylor expanded in x around inf 93.0%

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{y}{a}\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg93.0%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{y}{a}\right)}\right) \]
      2. unsub-neg93.0%

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{y}{a}\right)} \]
    8. Simplified93.0%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{y}{a}\right)} \]

    if 1.65e37 < z

    1. Initial program 35.4%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/67.1%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified67.1%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 69.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+69.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. associate-*r/69.8%

        \[\leadsto t + \left(\color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z}} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right) \]
      3. associate-*r/69.8%

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \color{blue}{\frac{-1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}}\right) \]
      4. div-sub69.8%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right) - -1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}} \]
      5. distribute-lft-out--69.8%

        \[\leadsto t + \frac{\color{blue}{-1 \cdot \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right)}}{z} \]
      6. associate-*r/69.8%

        \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      7. distribute-rgt-out--69.9%

        \[\leadsto t + -1 \cdot \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      8. mul-1-neg69.9%

        \[\leadsto t + \color{blue}{\left(-\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\right)} \]
      9. unsub-neg69.9%

        \[\leadsto \color{blue}{t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}} \]
      10. associate-/l*83.2%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    7. Simplified83.2%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    8. Taylor expanded in y around inf 64.3%

      \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]
    9. Taylor expanded in t around 0 63.0%

      \[\leadsto t - \color{blue}{-1 \cdot \frac{x \cdot y}{z}} \]
    10. Step-by-step derivation
      1. mul-1-neg63.0%

        \[\leadsto t - \color{blue}{\left(-\frac{x \cdot y}{z}\right)} \]
      2. associate-/l*66.1%

        \[\leadsto t - \left(-\color{blue}{\frac{x}{\frac{z}{y}}}\right) \]
    11. Simplified66.1%

      \[\leadsto t - \color{blue}{\left(-\frac{x}{\frac{z}{y}}\right)} \]
    12. Step-by-step derivation
      1. clear-num66.1%

        \[\leadsto t - \left(-\color{blue}{\frac{1}{\frac{\frac{z}{y}}{x}}}\right) \]
      2. associate-/r/66.1%

        \[\leadsto t - \left(-\color{blue}{\frac{1}{\frac{z}{y}} \cdot x}\right) \]
      3. clear-num66.1%

        \[\leadsto t - \left(-\color{blue}{\frac{y}{z}} \cdot x\right) \]
    13. Applied egg-rr66.1%

      \[\leadsto t - \left(-\color{blue}{\frac{y}{z} \cdot x}\right) \]
  3. Recombined 4 regimes into one program.
  4. Final simplification66.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{+14}:\\ \;\;\;\;t + y \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq -3.75 \cdot 10^{-238}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 1.02 \cdot 10^{-306}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{+37}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 59.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{t}{\frac{a}{y}}\\ \mathbf{if}\;z \leq -2.3 \cdot 10^{+14}:\\ \;\;\;\;t - \frac{y}{\frac{z}{-x}}\\ \mathbf{elif}\;z \leq -6.2 \cdot 10^{-238}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-306}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 7.8 \cdot 10^{+38}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ t (/ a y)))))
   (if (<= z -2.3e+14)
     (- t (/ y (/ z (- x))))
     (if (<= z -6.2e-238)
       t_1
       (if (<= z 1.1e-306)
         (* x (- 1.0 (/ y a)))
         (if (<= z 7.8e+38) t_1 (+ t (* x (/ y z)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (t / (a / y));
	double tmp;
	if (z <= -2.3e+14) {
		tmp = t - (y / (z / -x));
	} else if (z <= -6.2e-238) {
		tmp = t_1;
	} else if (z <= 1.1e-306) {
		tmp = x * (1.0 - (y / a));
	} else if (z <= 7.8e+38) {
		tmp = t_1;
	} else {
		tmp = t + (x * (y / z));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x + (t / (a / y))
    if (z <= (-2.3d+14)) then
        tmp = t - (y / (z / -x))
    else if (z <= (-6.2d-238)) then
        tmp = t_1
    else if (z <= 1.1d-306) then
        tmp = x * (1.0d0 - (y / a))
    else if (z <= 7.8d+38) then
        tmp = t_1
    else
        tmp = t + (x * (y / z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (t / (a / y));
	double tmp;
	if (z <= -2.3e+14) {
		tmp = t - (y / (z / -x));
	} else if (z <= -6.2e-238) {
		tmp = t_1;
	} else if (z <= 1.1e-306) {
		tmp = x * (1.0 - (y / a));
	} else if (z <= 7.8e+38) {
		tmp = t_1;
	} else {
		tmp = t + (x * (y / z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (t / (a / y))
	tmp = 0
	if z <= -2.3e+14:
		tmp = t - (y / (z / -x))
	elif z <= -6.2e-238:
		tmp = t_1
	elif z <= 1.1e-306:
		tmp = x * (1.0 - (y / a))
	elif z <= 7.8e+38:
		tmp = t_1
	else:
		tmp = t + (x * (y / z))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(t / Float64(a / y)))
	tmp = 0.0
	if (z <= -2.3e+14)
		tmp = Float64(t - Float64(y / Float64(z / Float64(-x))));
	elseif (z <= -6.2e-238)
		tmp = t_1;
	elseif (z <= 1.1e-306)
		tmp = Float64(x * Float64(1.0 - Float64(y / a)));
	elseif (z <= 7.8e+38)
		tmp = t_1;
	else
		tmp = Float64(t + Float64(x * Float64(y / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (t / (a / y));
	tmp = 0.0;
	if (z <= -2.3e+14)
		tmp = t - (y / (z / -x));
	elseif (z <= -6.2e-238)
		tmp = t_1;
	elseif (z <= 1.1e-306)
		tmp = x * (1.0 - (y / a));
	elseif (z <= 7.8e+38)
		tmp = t_1;
	else
		tmp = t + (x * (y / z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.3e+14], N[(t - N[(y / N[(z / (-x)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.2e-238], t$95$1, If[LessEqual[z, 1.1e-306], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.8e+38], t$95$1, N[(t + N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \frac{t}{\frac{a}{y}}\\
\mathbf{if}\;z \leq -2.3 \cdot 10^{+14}:\\
\;\;\;\;t - \frac{y}{\frac{z}{-x}}\\

\mathbf{elif}\;z \leq -6.2 \cdot 10^{-238}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.1 \cdot 10^{-306}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\

\mathbf{elif}\;z \leq 7.8 \cdot 10^{+38}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t + x \cdot \frac{y}{z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.3e14

    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/71.6%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified71.6%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 63.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+63.7%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. associate-*r/63.7%

        \[\leadsto t + \left(\color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z}} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right) \]
      3. associate-*r/63.7%

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \color{blue}{\frac{-1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}}\right) \]
      4. div-sub63.7%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right) - -1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}} \]
      5. distribute-lft-out--63.7%

        \[\leadsto t + \frac{\color{blue}{-1 \cdot \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right)}}{z} \]
      6. associate-*r/63.7%

        \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      7. distribute-rgt-out--63.9%

        \[\leadsto t + -1 \cdot \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      8. mul-1-neg63.9%

        \[\leadsto t + \color{blue}{\left(-\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\right)} \]
      9. unsub-neg63.9%

        \[\leadsto \color{blue}{t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}} \]
      10. associate-/l*75.7%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    7. Simplified75.7%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    8. Taylor expanded in y around inf 62.7%

      \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]
    9. Taylor expanded in t around 0 59.6%

      \[\leadsto t - \color{blue}{-1 \cdot \frac{x \cdot y}{z}} \]
    10. Step-by-step derivation
      1. associate-*r/59.6%

        \[\leadsto t - \color{blue}{\frac{-1 \cdot \left(x \cdot y\right)}{z}} \]
      2. mul-1-neg59.6%

        \[\leadsto t - \frac{\color{blue}{-x \cdot y}}{z} \]
      3. distribute-lft-neg-out59.6%

        \[\leadsto t - \frac{\color{blue}{\left(-x\right) \cdot y}}{z} \]
      4. *-commutative59.6%

        \[\leadsto t - \frac{\color{blue}{y \cdot \left(-x\right)}}{z} \]
      5. associate-/l*63.6%

        \[\leadsto t - \color{blue}{\frac{y}{\frac{z}{-x}}} \]
    11. Simplified63.6%

      \[\leadsto t - \color{blue}{\frac{y}{\frac{z}{-x}}} \]

    if -2.3e14 < z < -6.2000000000000002e-238 or 1.10000000000000008e-306 < z < 7.80000000000000047e38

    1. Initial program 89.9%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/92.6%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified92.6%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 76.6%

      \[\leadsto x + \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
    6. Step-by-step derivation
      1. associate-*r/78.5%

        \[\leadsto x + \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    7. Simplified78.5%

      \[\leadsto x + \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    8. Taylor expanded in a around inf 66.5%

      \[\leadsto x + \color{blue}{\frac{t \cdot \left(y - z\right)}{a}} \]
    9. Step-by-step derivation
      1. associate-/l*68.6%

        \[\leadsto x + \color{blue}{\frac{t}{\frac{a}{y - z}}} \]
    10. Simplified68.6%

      \[\leadsto x + \color{blue}{\frac{t}{\frac{a}{y - z}}} \]
    11. Taylor expanded in y around inf 65.6%

      \[\leadsto x + \frac{t}{\color{blue}{\frac{a}{y}}} \]

    if -6.2000000000000002e-238 < z < 1.10000000000000008e-306

    1. Initial program 86.6%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/93.0%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified93.0%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 93.0%

      \[\leadsto x + \color{blue}{\frac{y}{a}} \cdot \left(t - x\right) \]
    6. Taylor expanded in x around inf 93.0%

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{y}{a}\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg93.0%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{y}{a}\right)}\right) \]
      2. unsub-neg93.0%

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{y}{a}\right)} \]
    8. Simplified93.0%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{y}{a}\right)} \]

    if 7.80000000000000047e38 < z

    1. Initial program 35.4%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/67.1%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified67.1%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 69.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+69.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. associate-*r/69.8%

        \[\leadsto t + \left(\color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z}} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right) \]
      3. associate-*r/69.8%

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \color{blue}{\frac{-1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}}\right) \]
      4. div-sub69.8%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right) - -1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}} \]
      5. distribute-lft-out--69.8%

        \[\leadsto t + \frac{\color{blue}{-1 \cdot \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right)}}{z} \]
      6. associate-*r/69.8%

        \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      7. distribute-rgt-out--69.9%

        \[\leadsto t + -1 \cdot \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      8. mul-1-neg69.9%

        \[\leadsto t + \color{blue}{\left(-\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\right)} \]
      9. unsub-neg69.9%

        \[\leadsto \color{blue}{t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}} \]
      10. associate-/l*83.2%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    7. Simplified83.2%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    8. Taylor expanded in y around inf 64.3%

      \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]
    9. Taylor expanded in t around 0 63.0%

      \[\leadsto t - \color{blue}{-1 \cdot \frac{x \cdot y}{z}} \]
    10. Step-by-step derivation
      1. mul-1-neg63.0%

        \[\leadsto t - \color{blue}{\left(-\frac{x \cdot y}{z}\right)} \]
      2. associate-/l*66.1%

        \[\leadsto t - \left(-\color{blue}{\frac{x}{\frac{z}{y}}}\right) \]
    11. Simplified66.1%

      \[\leadsto t - \color{blue}{\left(-\frac{x}{\frac{z}{y}}\right)} \]
    12. Step-by-step derivation
      1. clear-num66.1%

        \[\leadsto t - \left(-\color{blue}{\frac{1}{\frac{\frac{z}{y}}{x}}}\right) \]
      2. associate-/r/66.1%

        \[\leadsto t - \left(-\color{blue}{\frac{1}{\frac{z}{y}} \cdot x}\right) \]
      3. clear-num66.1%

        \[\leadsto t - \left(-\color{blue}{\frac{y}{z}} \cdot x\right) \]
    13. Applied egg-rr66.1%

      \[\leadsto t - \left(-\color{blue}{\frac{y}{z} \cdot x}\right) \]
  3. Recombined 4 regimes into one program.
  4. Final simplification66.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{+14}:\\ \;\;\;\;t - \frac{y}{\frac{z}{-x}}\\ \mathbf{elif}\;z \leq -6.2 \cdot 10^{-238}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-306}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 7.8 \cdot 10^{+38}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 77.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.7 \cdot 10^{-39} \lor \neg \left(z \leq 2.8 \cdot 10^{+37}\right):\\ \;\;\;\;t - \frac{t - x}{\frac{z}{y - a}}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y \cdot \left(x - t\right)}{a - z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -3.7e-39) (not (<= z 2.8e+37)))
   (- t (/ (- t x) (/ z (- y a))))
   (- x (/ (* y (- x t)) (- a z)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -3.7e-39) || !(z <= 2.8e+37)) {
		tmp = t - ((t - x) / (z / (y - a)));
	} else {
		tmp = x - ((y * (x - t)) / (a - z));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((z <= (-3.7d-39)) .or. (.not. (z <= 2.8d+37))) then
        tmp = t - ((t - x) / (z / (y - a)))
    else
        tmp = x - ((y * (x - t)) / (a - z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -3.7e-39) || !(z <= 2.8e+37)) {
		tmp = t - ((t - x) / (z / (y - a)));
	} else {
		tmp = x - ((y * (x - t)) / (a - z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -3.7e-39) or not (z <= 2.8e+37):
		tmp = t - ((t - x) / (z / (y - a)))
	else:
		tmp = x - ((y * (x - t)) / (a - z))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -3.7e-39) || !(z <= 2.8e+37))
		tmp = Float64(t - Float64(Float64(t - x) / Float64(z / Float64(y - a))));
	else
		tmp = Float64(x - Float64(Float64(y * Float64(x - t)) / Float64(a - z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -3.7e-39) || ~((z <= 2.8e+37)))
		tmp = t - ((t - x) / (z / (y - a)));
	else
		tmp = x - ((y * (x - t)) / (a - z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.7e-39], N[Not[LessEqual[z, 2.8e+37]], $MachinePrecision]], N[(t - N[(N[(t - x), $MachinePrecision] / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.7 \cdot 10^{-39} \lor \neg \left(z \leq 2.8 \cdot 10^{+37}\right):\\
\;\;\;\;t - \frac{t - x}{\frac{z}{y - a}}\\

\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot \left(x - t\right)}{a - z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.70000000000000015e-39 or 2.7999999999999998e37 < z

    1. Initial program 44.3%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/70.9%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified70.9%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 67.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+67.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. associate-*r/67.3%

        \[\leadsto t + \left(\color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z}} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right) \]
      3. associate-*r/67.3%

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \color{blue}{\frac{-1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}}\right) \]
      4. div-sub67.3%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right) - -1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}} \]
      5. distribute-lft-out--67.3%

        \[\leadsto t + \frac{\color{blue}{-1 \cdot \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right)}}{z} \]
      6. associate-*r/67.3%

        \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      7. distribute-rgt-out--67.4%

        \[\leadsto t + -1 \cdot \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      8. mul-1-neg67.4%

        \[\leadsto t + \color{blue}{\left(-\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\right)} \]
      9. unsub-neg67.4%

        \[\leadsto \color{blue}{t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}} \]
      10. associate-/l*78.6%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    7. Simplified78.6%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]

    if -3.70000000000000015e-39 < z < 2.7999999999999998e37

    1. Initial program 90.8%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 84.4%

      \[\leadsto x + \frac{\color{blue}{y \cdot \left(t - x\right)}}{a - z} \]
    4. Step-by-step derivation
      1. *-commutative84.4%

        \[\leadsto x + \frac{\color{blue}{\left(t - x\right) \cdot y}}{a - z} \]
    5. Simplified84.4%

      \[\leadsto x + \frac{\color{blue}{\left(t - x\right) \cdot y}}{a - z} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification81.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.7 \cdot 10^{-39} \lor \neg \left(z \leq 2.8 \cdot 10^{+37}\right):\\ \;\;\;\;t - \frac{t - x}{\frac{z}{y - a}}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y \cdot \left(x - t\right)}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 48.7% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{+14}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 2.25 \cdot 10^{+80}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -2.8e+14) t (if (<= z 2.25e+80) (* x (- 1.0 (/ y a))) t)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -2.8e+14) {
		tmp = t;
	} else if (z <= 2.25e+80) {
		tmp = x * (1.0 - (y / a));
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-2.8d+14)) then
        tmp = t
    else if (z <= 2.25d+80) then
        tmp = x * (1.0d0 - (y / a))
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -2.8e+14) {
		tmp = t;
	} else if (z <= 2.25e+80) {
		tmp = x * (1.0 - (y / a));
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -2.8e+14:
		tmp = t
	elif z <= 2.25e+80:
		tmp = x * (1.0 - (y / a))
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -2.8e+14)
		tmp = t;
	elseif (z <= 2.25e+80)
		tmp = Float64(x * Float64(1.0 - Float64(y / a)));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -2.8e+14)
		tmp = t;
	elseif (z <= 2.25e+80)
		tmp = x * (1.0 - (y / a));
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.8e+14], t, If[LessEqual[z, 2.25e+80], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{+14}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 2.25 \cdot 10^{+80}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\

\mathbf{else}:\\
\;\;\;\;t\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.8e14 or 2.25000000000000003e80 < z

    1. Initial program 37.9%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/68.6%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified68.6%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 53.6%

      \[\leadsto \color{blue}{t} \]

    if -2.8e14 < z < 2.25000000000000003e80

    1. Initial program 87.9%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/91.6%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified91.6%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 71.7%

      \[\leadsto x + \color{blue}{\frac{y}{a}} \cdot \left(t - x\right) \]
    6. Taylor expanded in x around inf 51.0%

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{y}{a}\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg51.0%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{y}{a}\right)}\right) \]
      2. unsub-neg51.0%

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{y}{a}\right)} \]
    8. Simplified51.0%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{y}{a}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification52.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{+14}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 2.25 \cdot 10^{+80}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 37.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -3.25 \cdot 10^{+28}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 10^{-172}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -3.25e+28) x (if (<= a 1e-172) t (+ x t))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -3.25e+28) {
		tmp = x;
	} else if (a <= 1e-172) {
		tmp = t;
	} else {
		tmp = x + t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (a <= (-3.25d+28)) then
        tmp = x
    else if (a <= 1d-172) then
        tmp = t
    else
        tmp = x + t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -3.25e+28) {
		tmp = x;
	} else if (a <= 1e-172) {
		tmp = t;
	} else {
		tmp = x + t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -3.25e+28:
		tmp = x
	elif a <= 1e-172:
		tmp = t
	else:
		tmp = x + t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -3.25e+28)
		tmp = x;
	elseif (a <= 1e-172)
		tmp = t;
	else
		tmp = Float64(x + t);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -3.25e+28)
		tmp = x;
	elseif (a <= 1e-172)
		tmp = t;
	else
		tmp = x + t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.25e+28], x, If[LessEqual[a, 1e-172], t, N[(x + t), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.25 \cdot 10^{+28}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 10^{-172}:\\
\;\;\;\;t\\

\mathbf{else}:\\
\;\;\;\;x + t\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.25e28

    1. Initial program 73.1%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/90.0%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified90.0%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 51.1%

      \[\leadsto \color{blue}{x} \]

    if -3.25e28 < a < 1e-172

    1. Initial program 64.6%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/71.8%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified71.8%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 42.1%

      \[\leadsto \color{blue}{t} \]

    if 1e-172 < a

    1. Initial program 71.0%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/89.4%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified89.4%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 60.1%

      \[\leadsto x + \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
    6. Step-by-step derivation
      1. associate-*r/72.8%

        \[\leadsto x + \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    7. Simplified72.8%

      \[\leadsto x + \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    8. Taylor expanded in z around inf 39.0%

      \[\leadsto x + \color{blue}{t} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification42.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.25 \cdot 10^{+28}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 10^{-172}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 37.9% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -7.2 \cdot 10^{+28}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{-46}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -7.2e+28) x (if (<= a 1.7e-46) t x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -7.2e+28) {
		tmp = x;
	} else if (a <= 1.7e-46) {
		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 <= (-7.2d+28)) then
        tmp = x
    else if (a <= 1.7d-46) 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 <= -7.2e+28) {
		tmp = x;
	} else if (a <= 1.7e-46) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -7.2e+28:
		tmp = x
	elif a <= 1.7e-46:
		tmp = t
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -7.2e+28)
		tmp = x;
	elseif (a <= 1.7e-46)
		tmp = t;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -7.2e+28)
		tmp = x;
	elseif (a <= 1.7e-46)
		tmp = t;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -7.2e+28], x, If[LessEqual[a, 1.7e-46], t, x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.2 \cdot 10^{+28}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 1.7 \cdot 10^{-46}:\\
\;\;\;\;t\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -7.1999999999999999e28 or 1.69999999999999998e-46 < 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.1%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified92.1%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 46.1%

      \[\leadsto \color{blue}{x} \]

    if -7.1999999999999999e28 < a < 1.69999999999999998e-46

    1. Initial program 64.5%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/73.3%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified73.3%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 38.5%

      \[\leadsto \color{blue}{t} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification42.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.2 \cdot 10^{+28}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{-46}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 25.0% accurate, 13.0× speedup?

\[\begin{array}{l} \\ t \end{array} \]
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
	return t;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = t
end function
public static double code(double x, double y, double z, double t, double a) {
	return t;
}
def code(x, y, z, t, a):
	return t
function code(x, y, z, t, a)
	return t
end
function tmp = code(x, y, z, t, a)
	tmp = t;
end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}

\\
t
\end{array}
Derivation
  1. Initial program 69.0%

    \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
  2. Step-by-step derivation
    1. associate-*l/82.9%

      \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
  3. Simplified82.9%

    \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in z around inf 25.5%

    \[\leadsto \color{blue}{t} \]
  6. Final simplification25.5%

    \[\leadsto t \]
  7. Add Preprocessing

Developer target: 84.8% 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 2024031 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
  :precision binary64

  :herbie-target
  (if (< z -1.2536131056095036e+188) (- t (* (/ y z) (- t x))) (if (< z 4.446702369113811e+64) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x)))))

  (+ x (/ (* (- y z) (- t x)) (- a z))))