Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 79.9% → 90.8%
Time: 16.9s
Alternatives: 21
Speedup: 0.3×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 21 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: 79.9% accurate, 1.0× speedup?

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

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

Alternative 1: 90.8% accurate, 0.3× speedup?

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

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

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

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


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

    1. Initial program 93.8%

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

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

    1. Initial program 6.5%

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 91.4%

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

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

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

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

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

Alternative 2: 90.8% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 92.5%

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

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

    1. Initial program 6.5%

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 59.3% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;a \leq -6.6 \cdot 10^{-226}:\\
\;\;\;\;t\_1\\

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

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

\mathbf{elif}\;a \leq 3 \cdot 10^{-26} \lor \neg \left(a \leq 6.6 \cdot 10^{+59}\right):\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.99999999999999974e-4 or 6.99999999999999989e-101 < a < 3.00000000000000012e-26 or 6.5999999999999999e59 < a

    1. Initial program 88.4%

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

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

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

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

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

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

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

    if -2.99999999999999974e-4 < a < -6.6e-226 or 3.00000000000000012e-26 < a < 6.5999999999999999e59

    1. Initial program 80.9%

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

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

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

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

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

    if -6.6e-226 < a < 3.3e-177

    1. Initial program 71.5%

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

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

        \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
      2. *-un-lft-identity71.6%

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

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

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

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

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

    if 3.3e-177 < a < 6.99999999999999989e-101

    1. Initial program 64.6%

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \frac{\color{blue}{z - y}}{z} \]
    9. Simplified72.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.0003:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq -6.6 \cdot 10^{-226}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{-177}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 7 \cdot 10^{-101}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;a \leq 3 \cdot 10^{-26} \lor \neg \left(a \leq 6.6 \cdot 10^{+59}\right):\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{else}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 52.3% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;a \leq -5.8 \cdot 10^{-111}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -4.5 \cdot 10^{-227}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;a \leq 4.7 \cdot 10^{-107}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq 1.2 \cdot 10^{+82}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 86.0%

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

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

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

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

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

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

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

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

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

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

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

    if -0.00279999999999999997 < a < -5.80000000000000003e-111 or 4.69999999999999998e-107 < a < 1.19999999999999999e82

    1. Initial program 90.0%

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

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

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

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

    if -5.80000000000000003e-111 < a < -4.49999999999999993e-227 or 5.7999999999999996e-181 < a < 4.69999999999999998e-107

    1. Initial program 66.2%

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

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

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

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

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

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

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

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

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

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

    if -4.49999999999999993e-227 < a < 5.7999999999999996e-181

    1. Initial program 72.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.19999999999999999e82 < a

    1. Initial program 89.5%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.0028:\\ \;\;\;\;x - y \cdot \frac{x}{a}\\ \mathbf{elif}\;a \leq -5.8 \cdot 10^{-111}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq -4.5 \cdot 10^{-227}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;a \leq 5.8 \cdot 10^{-181}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;a \leq 4.7 \cdot 10^{-107}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{+82}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 59.7% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y - z\right) \cdot \frac{t}{a - z}\\ t_2 := x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{if}\;a \leq -0.00086:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -1.2 \cdot 10^{-226}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 9 \cdot 10^{-179}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 1.04 \cdot 10^{-100}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{-30}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{+60}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* (- y z) (/ t (- a z)))) (t_2 (+ x (* (- t x) (/ y a)))))
   (if (<= a -0.00086)
     t_2
     (if (<= a -1.2e-226)
       t_1
       (if (<= a 9e-179)
         (* (- t x) (/ y (- a z)))
         (if (<= a 1.04e-100)
           (* t (/ (- z y) z))
           (if (<= a 2.7e-30)
             (+ x (* y (/ (- t x) a)))
             (if (<= a 1.55e+60) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y - z) * (t / (a - z));
	double t_2 = x + ((t - x) * (y / a));
	double tmp;
	if (a <= -0.00086) {
		tmp = t_2;
	} else if (a <= -1.2e-226) {
		tmp = t_1;
	} else if (a <= 9e-179) {
		tmp = (t - x) * (y / (a - z));
	} else if (a <= 1.04e-100) {
		tmp = t * ((z - y) / z);
	} else if (a <= 2.7e-30) {
		tmp = x + (y * ((t - x) / a));
	} else if (a <= 1.55e+60) {
		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 = (y - z) * (t / (a - z))
    t_2 = x + ((t - x) * (y / a))
    if (a <= (-0.00086d0)) then
        tmp = t_2
    else if (a <= (-1.2d-226)) then
        tmp = t_1
    else if (a <= 9d-179) then
        tmp = (t - x) * (y / (a - z))
    else if (a <= 1.04d-100) then
        tmp = t * ((z - y) / z)
    else if (a <= 2.7d-30) then
        tmp = x + (y * ((t - x) / a))
    else if (a <= 1.55d+60) 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 = (y - z) * (t / (a - z));
	double t_2 = x + ((t - x) * (y / a));
	double tmp;
	if (a <= -0.00086) {
		tmp = t_2;
	} else if (a <= -1.2e-226) {
		tmp = t_1;
	} else if (a <= 9e-179) {
		tmp = (t - x) * (y / (a - z));
	} else if (a <= 1.04e-100) {
		tmp = t * ((z - y) / z);
	} else if (a <= 2.7e-30) {
		tmp = x + (y * ((t - x) / a));
	} else if (a <= 1.55e+60) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (y - z) * (t / (a - z))
	t_2 = x + ((t - x) * (y / a))
	tmp = 0
	if a <= -0.00086:
		tmp = t_2
	elif a <= -1.2e-226:
		tmp = t_1
	elif a <= 9e-179:
		tmp = (t - x) * (y / (a - z))
	elif a <= 1.04e-100:
		tmp = t * ((z - y) / z)
	elif a <= 2.7e-30:
		tmp = x + (y * ((t - x) / a))
	elif a <= 1.55e+60:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(y - z) * Float64(t / Float64(a - z)))
	t_2 = Float64(x + Float64(Float64(t - x) * Float64(y / a)))
	tmp = 0.0
	if (a <= -0.00086)
		tmp = t_2;
	elseif (a <= -1.2e-226)
		tmp = t_1;
	elseif (a <= 9e-179)
		tmp = Float64(Float64(t - x) * Float64(y / Float64(a - z)));
	elseif (a <= 1.04e-100)
		tmp = Float64(t * Float64(Float64(z - y) / z));
	elseif (a <= 2.7e-30)
		tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a)));
	elseif (a <= 1.55e+60)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (y - z) * (t / (a - z));
	t_2 = x + ((t - x) * (y / a));
	tmp = 0.0;
	if (a <= -0.00086)
		tmp = t_2;
	elseif (a <= -1.2e-226)
		tmp = t_1;
	elseif (a <= 9e-179)
		tmp = (t - x) * (y / (a - z));
	elseif (a <= 1.04e-100)
		tmp = t * ((z - y) / z);
	elseif (a <= 2.7e-30)
		tmp = x + (y * ((t - x) / a));
	elseif (a <= 1.55e+60)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -0.00086], t$95$2, If[LessEqual[a, -1.2e-226], t$95$1, If[LessEqual[a, 9e-179], N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.04e-100], N[(t * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.7e-30], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.55e+60], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1.2 \cdot 10^{-226}:\\
\;\;\;\;t\_1\\

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

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

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

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

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


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

    1. Initial program 87.7%

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

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

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

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

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

    if -8.59999999999999979e-4 < a < -1.2e-226 or 2.69999999999999987e-30 < a < 1.55e60

    1. Initial program 80.9%

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

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

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

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

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

    if -1.2e-226 < a < 8.99999999999999984e-179

    1. Initial program 71.5%

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

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

        \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
      2. *-un-lft-identity71.6%

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

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

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

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

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

    if 8.99999999999999984e-179 < a < 1.04e-100

    1. Initial program 64.6%

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \frac{\color{blue}{z - y}}{z} \]
    9. Simplified72.1%

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

    if 1.04e-100 < a < 2.69999999999999987e-30

    1. Initial program 93.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.00086:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq -1.2 \cdot 10^{-226}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;a \leq 9 \cdot 10^{-179}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 1.04 \cdot 10^{-100}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{-30}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{+60}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 49.9% accurate, 0.4× speedup?

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

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

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

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

\mathbf{elif}\;a \leq 5.2 \cdot 10^{-104}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 1.15 \cdot 10^{+68}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 87.3%

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

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

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

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

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

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

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

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

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

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

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

    if -3.60000000000000023e-4 < a < -9.50000000000000024e-228 or 2.5000000000000001e-181 < a < 5.20000000000000005e-104 or 9.20000000000000007e-38 < a < 1.15e68

    1. Initial program 77.9%

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

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

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

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

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

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

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

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

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

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

    if -9.50000000000000024e-228 < a < 2.5000000000000001e-181

    1. Initial program 72.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.20000000000000005e-104 < a < 9.20000000000000007e-38

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.00036:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;a \leq -9.5 \cdot 10^{-228}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{-181}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{-104}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{-38}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{+68}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 49.8% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -2.6 \cdot 10^{-227}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 1.04 \cdot 10^{-100}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 8.8 \cdot 10^{+67}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 86.0%

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

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

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

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

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

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

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

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

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

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

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

    if -0.00169999999999999991 < a < -2.60000000000000011e-227 or 1.85000000000000008e-180 < a < 1.04e-100 or 9.20000000000000007e-38 < a < 8.8e67

    1. Initial program 77.9%

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

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

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

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

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

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

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

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

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

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

    if -2.60000000000000011e-227 < a < 1.85000000000000008e-180

    1. Initial program 72.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.04e-100 < a < 9.20000000000000007e-38

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

    if 8.8e67 < a

    1. Initial program 88.4%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.0017:\\ \;\;\;\;x - y \cdot \frac{x}{a}\\ \mathbf{elif}\;a \leq -2.6 \cdot 10^{-227}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;a \leq 1.85 \cdot 10^{-180}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;a \leq 1.04 \cdot 10^{-100}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{-38}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;a \leq 8.8 \cdot 10^{+67}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 37.1% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y}{z}\\ \mathbf{if}\;a \leq -0.00037:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.15 \cdot 10^{-110}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;a \leq -2.6 \cdot 10^{-226}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{-180}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{+60}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.32 \cdot 10^{+82}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (/ y z))))
   (if (<= a -0.00037)
     x
     (if (<= a -1.15e-110)
       (* y (/ t a))
       (if (<= a -2.6e-226)
         t
         (if (<= a 5.2e-180)
           t_1
           (if (<= a 5.5e+60) t (if (<= a 1.32e+82) t_1 x))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (y / z);
	double tmp;
	if (a <= -0.00037) {
		tmp = x;
	} else if (a <= -1.15e-110) {
		tmp = y * (t / a);
	} else if (a <= -2.6e-226) {
		tmp = t;
	} else if (a <= 5.2e-180) {
		tmp = t_1;
	} else if (a <= 5.5e+60) {
		tmp = t;
	} else if (a <= 1.32e+82) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * (y / z)
    if (a <= (-0.00037d0)) then
        tmp = x
    else if (a <= (-1.15d-110)) then
        tmp = y * (t / a)
    else if (a <= (-2.6d-226)) then
        tmp = t
    else if (a <= 5.2d-180) then
        tmp = t_1
    else if (a <= 5.5d+60) then
        tmp = t
    else if (a <= 1.32d+82) then
        tmp = t_1
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (y / z);
	double tmp;
	if (a <= -0.00037) {
		tmp = x;
	} else if (a <= -1.15e-110) {
		tmp = y * (t / a);
	} else if (a <= -2.6e-226) {
		tmp = t;
	} else if (a <= 5.2e-180) {
		tmp = t_1;
	} else if (a <= 5.5e+60) {
		tmp = t;
	} else if (a <= 1.32e+82) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (y / z)
	tmp = 0
	if a <= -0.00037:
		tmp = x
	elif a <= -1.15e-110:
		tmp = y * (t / a)
	elif a <= -2.6e-226:
		tmp = t
	elif a <= 5.2e-180:
		tmp = t_1
	elif a <= 5.5e+60:
		tmp = t
	elif a <= 1.32e+82:
		tmp = t_1
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(y / z))
	tmp = 0.0
	if (a <= -0.00037)
		tmp = x;
	elseif (a <= -1.15e-110)
		tmp = Float64(y * Float64(t / a));
	elseif (a <= -2.6e-226)
		tmp = t;
	elseif (a <= 5.2e-180)
		tmp = t_1;
	elseif (a <= 5.5e+60)
		tmp = t;
	elseif (a <= 1.32e+82)
		tmp = t_1;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (y / z);
	tmp = 0.0;
	if (a <= -0.00037)
		tmp = x;
	elseif (a <= -1.15e-110)
		tmp = y * (t / a);
	elseif (a <= -2.6e-226)
		tmp = t;
	elseif (a <= 5.2e-180)
		tmp = t_1;
	elseif (a <= 5.5e+60)
		tmp = t;
	elseif (a <= 1.32e+82)
		tmp = t_1;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -0.00037], x, If[LessEqual[a, -1.15e-110], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -2.6e-226], t, If[LessEqual[a, 5.2e-180], t$95$1, If[LessEqual[a, 5.5e+60], t, If[LessEqual[a, 1.32e+82], t$95$1, x]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \frac{y}{z}\\
\mathbf{if}\;a \leq -0.00037:\\
\;\;\;\;x\\

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

\mathbf{elif}\;a \leq -2.6 \cdot 10^{-226}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 5.2 \cdot 10^{-180}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 1.32 \cdot 10^{+82}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 87.7%

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

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

    if -3.6999999999999999e-4 < a < -1.1500000000000001e-110

    1. Initial program 88.8%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    9. Step-by-step derivation
      1. clear-num34.8%

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{a}{y}}} \]
      2. un-div-inv34.8%

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    10. Applied egg-rr34.8%

      \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    11. Step-by-step derivation
      1. associate-/r/38.9%

        \[\leadsto \color{blue}{\frac{t}{a} \cdot y} \]
    12. Simplified38.9%

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

    if -1.1500000000000001e-110 < a < -2.5999999999999998e-226 or 5.1999999999999998e-180 < a < 5.5000000000000001e60

    1. Initial program 77.0%

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

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

    if -2.5999999999999998e-226 < a < 5.1999999999999998e-180 or 5.5000000000000001e60 < a < 1.32e82

    1. Initial program 74.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    9. Simplified49.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.00037:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.15 \cdot 10^{-110}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;a \leq -2.6 \cdot 10^{-226}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{-180}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{+60}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.32 \cdot 10^{+82}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 52.4% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -5 \cdot 10^{-226}:\\
\;\;\;\;t\_1\\

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

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

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

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


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

    1. Initial program 86.0%

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

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

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

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

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

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

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

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

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

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

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

    if -7.20000000000000045e-4 < a < -4.9999999999999998e-226 or 8.0000000000000003e-172 < a < 2.9999999999999998e60

    1. Initial program 82.1%

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

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

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

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

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

    if -4.9999999999999998e-226 < a < 8.0000000000000003e-172

    1. Initial program 70.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.9999999999999998e60 < a < 1.14999999999999994e82

    1. Initial program 85.5%

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

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

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

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

    if 1.14999999999999994e82 < a

    1. Initial program 89.5%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.00072:\\ \;\;\;\;x - y \cdot \frac{x}{a}\\ \mathbf{elif}\;a \leq -5 \cdot 10^{-226}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;a \leq 8 \cdot 10^{-172}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;a \leq 3 \cdot 10^{+60}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{+82}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 37.4% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -9 \cdot 10^{-111}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -6.5 \cdot 10^{-226}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 1.65 \cdot 10^{+68}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -0.0025999999999999999 or 1.65e68 < a

    1. Initial program 87.3%

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

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

    if -0.0025999999999999999 < a < -8.99999999999999987e-111 or 1.02e-199 < a < 1.65e68

    1. Initial program 86.5%

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

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

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

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

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

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

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

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

    if -8.99999999999999987e-111 < a < -6.50000000000000033e-226

    1. Initial program 69.2%

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

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

    if -6.50000000000000033e-226 < a < 1.02e-199

    1. Initial program 70.3%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.0026:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -9 \cdot 10^{-111}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{-226}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.02 \cdot 10^{-199}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{+68}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 71.1% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;a \leq 2.4 \cdot 10^{-28} \lor \neg \left(a \leq 3.2 \cdot 10^{+65}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.8500000000000001e-54 or 1.04e-100 < a < 2.4000000000000002e-28 or 3.20000000000000007e65 < a

    1. Initial program 88.0%

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

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

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

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

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

    if -1.8500000000000001e-54 < a < 1.04e-100

    1. Initial program 72.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.4000000000000002e-28 < a < 3.20000000000000007e65

    1. Initial program 92.5%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.85 \cdot 10^{-54}:\\ \;\;\;\;x + \frac{y - z}{\frac{a}{t - x}}\\ \mathbf{elif}\;a \leq 1.04 \cdot 10^{-100}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{-28} \lor \neg \left(a \leq 3.2 \cdot 10^{+65}\right):\\ \;\;\;\;x + \frac{y - z}{\frac{a}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 38.0% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \frac{y}{z}\\
\mathbf{if}\;a \leq -0.0024:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -4 \cdot 10^{-227}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 1.26 \cdot 10^{-180}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 1.32 \cdot 10^{+82}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -0.00239999999999999979 or 1.32e82 < a

    1. Initial program 87.7%

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

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

    if -0.00239999999999999979 < a < -3.99999999999999978e-227 or 1.25999999999999997e-180 < a < 3.9999999999999998e60

    1. Initial program 80.4%

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

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

    if -3.99999999999999978e-227 < a < 1.25999999999999997e-180 or 3.9999999999999998e60 < a < 1.32e82

    1. Initial program 74.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    9. Simplified49.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.0024:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -4 \cdot 10^{-227}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.26 \cdot 10^{-180}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 4 \cdot 10^{+60}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.32 \cdot 10^{+82}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 53.6% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -4.8 \cdot 10^{-227}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 8.2 \cdot 10^{+67}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 86.0%

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

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

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

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

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

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

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

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

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

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

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

    if -0.00104999999999999994 < a < -4.7999999999999999e-227 or 2.5000000000000001e-174 < a < 8.19999999999999959e67

    1. Initial program 82.9%

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

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

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

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

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

    if -4.7999999999999999e-227 < a < 2.5000000000000001e-174

    1. Initial program 70.1%

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

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

        \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
      2. *-un-lft-identity70.3%

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

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

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

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

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

    if 8.19999999999999959e67 < a

    1. Initial program 88.4%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.00105:\\ \;\;\;\;x - y \cdot \frac{x}{a}\\ \mathbf{elif}\;a \leq -4.8 \cdot 10^{-227}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{-174}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{+67}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 68.2% accurate, 0.4× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.19999999999999999e-57 or 1.19999999999999999e82 < a

    1. Initial program 87.7%

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

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

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

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

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

    if -2.19999999999999999e-57 < a < 1.04e-100

    1. Initial program 72.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.04e-100 < a < 8.2e58

    1. Initial program 92.4%

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

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

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

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

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

    if 8.2e58 < a < 1.19999999999999999e82

    1. Initial program 85.5%

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

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

        \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
      2. *-un-lft-identity85.4%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.2 \cdot 10^{-57}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 1.04 \cdot 10^{-100}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{+58}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{+82}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 45.9% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq -8.6 \cdot 10^{-293}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 3.8 \cdot 10^{+72}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 87.1%

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

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

    if -2e-3 < a < -8.5999999999999996e-293 or 7.8000000000000001e-209 < a < 3.80000000000000006e72

    1. Initial program 82.3%

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

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

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

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

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

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

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

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

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

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

    if -8.5999999999999996e-293 < a < 7.8000000000000001e-209

    1. Initial program 61.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    9. Simplified57.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.002:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -8.6 \cdot 10^{-293}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;a \leq 7.8 \cdot 10^{-209}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{+72}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 49.5% accurate, 0.5× speedup?

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

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

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

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

\mathbf{elif}\;a \leq 1.4 \cdot 10^{+68}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -5.5999999999999995e-4 or 1.4e68 < a

    1. Initial program 87.3%

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

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

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

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

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

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

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

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

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

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

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

    if -5.5999999999999995e-4 < a < -1.24999999999999993e-284 or 7.1999999999999998e-210 < a < 1.4e68

    1. Initial program 82.1%

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

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

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

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

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

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

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

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

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

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

    if -1.24999999999999993e-284 < a < 7.1999999999999998e-210

    1. Initial program 61.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    9. Simplified57.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.00056:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;a \leq -1.25 \cdot 10^{-284}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;a \leq 7.2 \cdot 10^{-210}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 1.4 \cdot 10^{+68}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 49.8% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq -5.5 \cdot 10^{-292}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 1.02 \cdot 10^{+68}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -7.5000000000000002e-4 or 1.02e68 < a

    1. Initial program 87.3%

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

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

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

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

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

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

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

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

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

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

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

    if -7.5000000000000002e-4 < a < -5.50000000000000006e-292 or 3.50000000000000015e-210 < a < 1.02e68

    1. Initial program 82.1%

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

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

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

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

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

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

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

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

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

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

    if -5.50000000000000006e-292 < a < 3.50000000000000015e-210

    1. Initial program 61.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.00075:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;a \leq -5.5 \cdot 10^{-292}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{-210}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 1.02 \cdot 10^{+68}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 74.8% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := x + \frac{y - z}{\frac{a}{t - x}}\\
\mathbf{if}\;a \leq -0.0018:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -0.0018 or 1.14999999999999994e82 < a

    1. Initial program 87.8%

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

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

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

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

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

    if -0.0018 < a < -9.9999999999999991e-97

    1. Initial program 87.3%

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

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

    if -9.9999999999999991e-97 < a < 1.14999999999999994e82

    1. Initial program 76.4%

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

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

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

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

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

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

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

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

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

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

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

Alternative 19: 74.8% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.20000000000000006e-58 or 1.14999999999999994e82 < a

    1. Initial program 87.7%

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

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

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

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

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

    if -2.20000000000000006e-58 < a < 1.14999999999999994e82

    1. Initial program 77.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 71.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}} \]
    4. Step-by-step derivation
      1. associate--l+71.8%

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

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

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

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

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

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

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

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

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

Alternative 20: 39.1% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.00062:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 8.5 \cdot 10^{+67}:\\
\;\;\;\;t\\

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


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

    1. Initial program 87.3%

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

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

    if -6.2e-4 < a < 8.50000000000000038e67

    1. Initial program 78.4%

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

      \[\leadsto \color{blue}{t} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification40.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.00062:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 8.5 \cdot 10^{+67}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 25.6% accurate, 13.0× speedup?

\[\begin{array}{l} \\ t \end{array} \]
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
	return t;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = t
end function
public static double code(double x, double y, double z, double t, double a) {
	return t;
}
def code(x, y, z, t, a):
	return t
function code(x, y, z, t, a)
	return t
end
function tmp = code(x, y, z, t, a)
	tmp = t;
end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}

\\
t
\end{array}
Derivation
  1. Initial program 82.4%

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

    \[\leadsto \color{blue}{t} \]
  4. Final simplification21.8%

    \[\leadsto t \]
  5. Add Preprocessing

Reproduce

?
herbie shell --seed 2024115 
(FPCore (x y z t a)
  :name "Numeric.Signal:interpolate   from hsignal-0.2.7.1"
  :precision binary64
  (+ x (* (- y z) (/ (- t x) (- a z)))))