Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 80.4% → 94.2%
Time: 19.3s
Alternatives: 22
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 22 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: 80.4% 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: 94.2% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(z - y\right) \cdot \frac{x - t}{a - z}\\ \mathbf{if}\;t_1 \leq -1 \cdot 10^{-235} \lor \neg \left(t_1 \leq 0\right):\\ \;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\ \mathbf{else}:\\ \;\;\;\;t + \frac{x}{-z} \cdot \left(a - y\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (- z y) (/ (- x t) (- a z))))))
   (if (or (<= t_1 -1e-235) (not (<= t_1 0.0)))
     (fma (- t x) (/ (- y z) (- a z)) x)
     (+ t (* (/ x (- z)) (- a y))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((z - y) * ((x - t) / (a - z)));
	double tmp;
	if ((t_1 <= -1e-235) || !(t_1 <= 0.0)) {
		tmp = fma((t - x), ((y - z) / (a - z)), x);
	} else {
		tmp = t + ((x / -z) * (a - y));
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(z - y) * Float64(Float64(x - t) / Float64(a - z))))
	tmp = 0.0
	if ((t_1 <= -1e-235) || !(t_1 <= 0.0))
		tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x);
	else
		tmp = Float64(t + Float64(Float64(x / Float64(-z)) * Float64(a - y)));
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(z - y), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e-235], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(t + N[(N[(x / (-z)), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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


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

    1. Initial program 94.3%

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

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

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

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

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

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

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

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

    1. Initial program 3.3%

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

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

        \[\leadsto x + \frac{t - x}{a - z} \cdot \color{blue}{\frac{y \cdot y - z \cdot z}{y + z}} \]
      3. associate-*r/2.6%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
      7. associate-/r/99.8%

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

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

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

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

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

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

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

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

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

Alternative 2: 90.7% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 94.3%

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

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

    1. Initial program 3.3%

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

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

        \[\leadsto x + \frac{t - x}{a - z} \cdot \color{blue}{\frac{y \cdot y - z \cdot z}{y + z}} \]
      3. associate-*r/2.6%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
      7. associate-/r/99.8%

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

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

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

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

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

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

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

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

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

Alternative 3: 45.3% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq -7.8 \cdot 10^{-32}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq -1.42 \cdot 10^{-216}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 3.5 \cdot 10^{+85}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 2.5 \cdot 10^{+116}:\\
\;\;\;\;\frac{y}{\frac{z}{x}}\\

\mathbf{elif}\;z \leq 10^{+129}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -4.8000000000000004e122 or 1e129 < z

    1. Initial program 62.2%

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

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

    if -4.8000000000000004e122 < z < -7.8000000000000003e-32 or -5.0000000000000002e-135 < z < -1.42000000000000004e-216 or -4.50000000000000029e-253 < z < 3.50000000000000005e85 or 2.50000000000000013e116 < z < 1e129

    1. Initial program 92.5%

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

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

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

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

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

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

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

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

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

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

    if -7.8000000000000003e-32 < z < -5.0000000000000002e-135

    1. Initial program 83.5%

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

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

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

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

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

    if -1.42000000000000004e-216 < z < -4.50000000000000029e-253

    1. Initial program 91.6%

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

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

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

    if 3.50000000000000005e85 < z < 2.50000000000000013e116

    1. Initial program 73.1%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}}} \]
    7. Simplified61.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.8 \cdot 10^{+122}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -7.8 \cdot 10^{-32}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -5 \cdot 10^{-135}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -1.42 \cdot 10^{-216}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{-253}:\\ \;\;\;\;\frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{+85}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{+116}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;z \leq 10^{+129}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 4: 48.1% accurate, 0.6× speedup?

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

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

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if z < -8.00000000000000012e122 or 4.1999999999999998e126 < z

    1. Initial program 62.2%

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

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

    if -8.00000000000000012e122 < z < -7.8000000000000003e-32

    1. Initial program 94.3%

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

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

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

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

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

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

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

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

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

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

    if -7.8000000000000003e-32 < z < -4.5000000000000005e-134

    1. Initial program 83.5%

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

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

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

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

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

    if -4.5000000000000005e-134 < z < -3.19999999999999973e-144

    1. Initial program 100.0%

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    4. Simplified100.0%

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

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

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

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

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

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

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

    if -3.19999999999999973e-144 < z < -4.8e-174

    1. Initial program 88.1%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t - x}{a}} \cdot y \]
      2. *-commutative88.1%

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

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

    if -4.8e-174 < z < 9.49999999999999984e-76

    1. Initial program 95.1%

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

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

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

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

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

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

    if 9.49999999999999984e-76 < z < 4.1999999999999998e126

    1. Initial program 81.6%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8 \cdot 10^{+122}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -7.8 \cdot 10^{-32}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{-134}:\\ \;\;\;\;\frac{t}{\frac{a}{y - z}}\\ \mathbf{elif}\;z \leq -3.2 \cdot 10^{-144}:\\ \;\;\;\;x - \frac{y}{\frac{a}{x}}\\ \mathbf{elif}\;z \leq -4.8 \cdot 10^{-174}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{-76}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{+126}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 5: 66.3% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + y \cdot \frac{x - t}{z}\\ t_2 := x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{if}\;a \leq -2.5 \cdot 10^{+93}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -4.7 \cdot 10^{-27}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -3 \cdot 10^{-124}:\\ \;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a}\\ \mathbf{elif}\;a \leq 7 \cdot 10^{-135}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{+23}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{+49}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ t (* y (/ (- x t) z)))) (t_2 (+ x (/ y (/ a (- t x))))))
   (if (<= a -2.5e+93)
     t_2
     (if (<= a -4.7e-27)
       t_1
       (if (<= a -3e-124)
         (+ x (/ (* y (- t x)) a))
         (if (<= a 7e-135)
           t_1
           (if (<= a 1.55e+23)
             (* t (/ (- y z) (- a z)))
             (if (<= a 1.25e+49) (* y (/ (- t x) (- a z))) t_2))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t + (y * ((x - t) / z));
	double t_2 = x + (y / (a / (t - x)));
	double tmp;
	if (a <= -2.5e+93) {
		tmp = t_2;
	} else if (a <= -4.7e-27) {
		tmp = t_1;
	} else if (a <= -3e-124) {
		tmp = x + ((y * (t - x)) / a);
	} else if (a <= 7e-135) {
		tmp = t_1;
	} else if (a <= 1.55e+23) {
		tmp = t * ((y - z) / (a - z));
	} else if (a <= 1.25e+49) {
		tmp = y * ((t - x) / (a - z));
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t + (y * ((x - t) / z))
    t_2 = x + (y / (a / (t - x)))
    if (a <= (-2.5d+93)) then
        tmp = t_2
    else if (a <= (-4.7d-27)) then
        tmp = t_1
    else if (a <= (-3d-124)) then
        tmp = x + ((y * (t - x)) / a)
    else if (a <= 7d-135) then
        tmp = t_1
    else if (a <= 1.55d+23) then
        tmp = t * ((y - z) / (a - z))
    else if (a <= 1.25d+49) then
        tmp = y * ((t - x) / (a - z))
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t + (y * ((x - t) / z));
	double t_2 = x + (y / (a / (t - x)));
	double tmp;
	if (a <= -2.5e+93) {
		tmp = t_2;
	} else if (a <= -4.7e-27) {
		tmp = t_1;
	} else if (a <= -3e-124) {
		tmp = x + ((y * (t - x)) / a);
	} else if (a <= 7e-135) {
		tmp = t_1;
	} else if (a <= 1.55e+23) {
		tmp = t * ((y - z) / (a - z));
	} else if (a <= 1.25e+49) {
		tmp = y * ((t - x) / (a - z));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t + (y * ((x - t) / z))
	t_2 = x + (y / (a / (t - x)))
	tmp = 0
	if a <= -2.5e+93:
		tmp = t_2
	elif a <= -4.7e-27:
		tmp = t_1
	elif a <= -3e-124:
		tmp = x + ((y * (t - x)) / a)
	elif a <= 7e-135:
		tmp = t_1
	elif a <= 1.55e+23:
		tmp = t * ((y - z) / (a - z))
	elif a <= 1.25e+49:
		tmp = y * ((t - x) / (a - z))
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t + Float64(y * Float64(Float64(x - t) / z)))
	t_2 = Float64(x + Float64(y / Float64(a / Float64(t - x))))
	tmp = 0.0
	if (a <= -2.5e+93)
		tmp = t_2;
	elseif (a <= -4.7e-27)
		tmp = t_1;
	elseif (a <= -3e-124)
		tmp = Float64(x + Float64(Float64(y * Float64(t - x)) / a));
	elseif (a <= 7e-135)
		tmp = t_1;
	elseif (a <= 1.55e+23)
		tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z)));
	elseif (a <= 1.25e+49)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t + (y * ((x - t) / z));
	t_2 = x + (y / (a / (t - x)));
	tmp = 0.0;
	if (a <= -2.5e+93)
		tmp = t_2;
	elseif (a <= -4.7e-27)
		tmp = t_1;
	elseif (a <= -3e-124)
		tmp = x + ((y * (t - x)) / a);
	elseif (a <= 7e-135)
		tmp = t_1;
	elseif (a <= 1.55e+23)
		tmp = t * ((y - z) / (a - z));
	elseif (a <= 1.25e+49)
		tmp = y * ((t - x) / (a - z));
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.5e+93], t$95$2, If[LessEqual[a, -4.7e-27], t$95$1, If[LessEqual[a, -3e-124], N[(x + N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7e-135], t$95$1, If[LessEqual[a, 1.55e+23], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.25e+49], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -4.7 \cdot 10^{-27}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 7 \cdot 10^{-135}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -2.5000000000000001e93 or 1.2500000000000001e49 < a

    1. Initial program 88.7%

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

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

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

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

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

    if -2.5000000000000001e93 < a < -4.70000000000000032e-27 or -3e-124 < a < 6.9999999999999997e-135

    1. Initial program 74.2%

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

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

        \[\leadsto x + \frac{t - x}{a - z} \cdot \color{blue}{\frac{y \cdot y - z \cdot z}{y + z}} \]
      3. associate-*r/44.9%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
      7. associate-/r/86.4%

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

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

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

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

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

    if -4.70000000000000032e-27 < a < -3e-124

    1. Initial program 83.8%

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

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

    if 6.9999999999999997e-135 < a < 1.54999999999999985e23

    1. Initial program 86.2%

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

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

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

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

    if 1.54999999999999985e23 < a < 1.2500000000000001e49

    1. Initial program 99.7%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative65.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.5 \cdot 10^{+93}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;a \leq -4.7 \cdot 10^{-27}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq -3 \cdot 10^{-124}:\\ \;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a}\\ \mathbf{elif}\;a \leq 7 \cdot 10^{-135}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{+23}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{+49}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \end{array} \]

Alternative 6: 66.3% accurate, 0.6× speedup?

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

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if a < -2.5000000000000001e93 or 1.29999999999999994e49 < a

    1. Initial program 88.7%

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

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

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

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

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

    if -2.5000000000000001e93 < a < -5.00000000000000019e-26

    1. Initial program 77.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.00000000000000019e-26 < a < -8.1999999999999995e-126

    1. Initial program 83.8%

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

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

    if -8.1999999999999995e-126 < a < 1.40000000000000012e-135

    1. Initial program 73.1%

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

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

        \[\leadsto x + \frac{t - x}{a - z} \cdot \color{blue}{\frac{y \cdot y - z \cdot z}{y + z}} \]
      3. associate-*r/46.7%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
      7. associate-/r/89.6%

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

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

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

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

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

    if 1.40000000000000012e-135 < a < 7.3999999999999996e22

    1. Initial program 86.2%

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

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

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

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

    if 7.3999999999999996e22 < a < 1.29999999999999994e49

    1. Initial program 99.7%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative65.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.5 \cdot 10^{+93}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;a \leq -5 \cdot 10^{-26}:\\ \;\;\;\;t - \frac{y}{\frac{z}{t - x}}\\ \mathbf{elif}\;a \leq -8.2 \cdot 10^{-126}:\\ \;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a}\\ \mathbf{elif}\;a \leq 1.4 \cdot 10^{-135}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 7.4 \cdot 10^{+22}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{+49}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \end{array} \]

Alternative 7: 69.6% accurate, 0.7× speedup?

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

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

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

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

\mathbf{elif}\;a \leq 8 \cdot 10^{-22}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.5000000000000001e93 or 8.0000000000000004e-22 < a

    1. Initial program 89.9%

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

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

    if -2.5000000000000001e93 < a < -6.00000000000000023e-26 or -2.70000000000000018e-124 < a < 8.0000000000000004e-22

    1. Initial program 75.5%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + t\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    3. Step-by-step derivation
      1. +-commutative75.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} \]
      2. associate--l+75.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)} \]
      3. associate-*r/75.4%

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.00000000000000023e-26 < a < -2.70000000000000018e-124

    1. Initial program 83.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.5 \cdot 10^{+93}:\\ \;\;\;\;x - \frac{t - x}{a} \cdot \left(z - y\right)\\ \mathbf{elif}\;a \leq -6 \cdot 10^{-26}:\\ \;\;\;\;t - \frac{y}{\frac{z}{t - x}}\\ \mathbf{elif}\;a \leq -2.7 \cdot 10^{-124}:\\ \;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a}\\ \mathbf{elif}\;a \leq 8 \cdot 10^{-22}:\\ \;\;\;\;t - \frac{y}{\frac{z}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{t - x}{a} \cdot \left(z - y\right)\\ \end{array} \]

Alternative 8: 50.6% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;z \leq -5 \cdot 10^{-100}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.8e109 or -6.1999999999999996e-47 < z < -5.0000000000000001e-100 or 8.19999999999999983e125 < z

    1. Initial program 64.2%

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

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

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

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

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

        \[\leadsto t \cdot \color{blue}{\left(-\frac{z}{a - z}\right)} \]
      2. distribute-neg-frac65.0%

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

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

    if -1.8e109 < z < -6.1999999999999996e-47

    1. Initial program 94.5%

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

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

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

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

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

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

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

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

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

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

    if -5.0000000000000001e-100 < z < 4.2999999999999999e-76

    1. Initial program 94.0%

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

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

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

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

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

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

    if 4.2999999999999999e-76 < z < 8.19999999999999983e125

    1. Initial program 81.6%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.8 \cdot 10^{+109}:\\ \;\;\;\;t \cdot \left(-\frac{z}{a - z}\right)\\ \mathbf{elif}\;z \leq -6.2 \cdot 10^{-47}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -5 \cdot 10^{-100}:\\ \;\;\;\;t \cdot \left(-\frac{z}{a - z}\right)\\ \mathbf{elif}\;z \leq 4.3 \cdot 10^{-76}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{+125}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(-\frac{z}{a - z}\right)\\ \end{array} \]

Alternative 9: 50.6% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;z \leq -5 \cdot 10^{-100}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -4.29999999999999998e117 or -6.60000000000000007e-47 < z < -5.0000000000000001e-100

    1. Initial program 61.5%

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

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

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

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

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

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

        \[\leadsto t \cdot \color{blue}{\frac{-z}{a - z}} \]
    7. Simplified67.5%

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

    if -4.29999999999999998e117 < z < -6.60000000000000007e-47

    1. Initial program 94.5%

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

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

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

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

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

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

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

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

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

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

    if -5.0000000000000001e-100 < z < 3.8000000000000002e-76

    1. Initial program 94.0%

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

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

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

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

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

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

    if 3.8000000000000002e-76 < z < 1.59999999999999992e125

    1. Initial program 81.6%

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

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

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

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

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

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

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

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

    if 1.59999999999999992e125 < z

    1. Initial program 66.7%

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

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

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

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

        \[\leadsto -\color{blue}{\frac{t}{\frac{z}{y - z}}} \]
      3. distribute-neg-frac63.4%

        \[\leadsto \color{blue}{\frac{-t}{\frac{z}{y - z}}} \]
    5. Simplified63.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.3 \cdot 10^{+117}:\\ \;\;\;\;t \cdot \left(-\frac{z}{a - z}\right)\\ \mathbf{elif}\;z \leq -6.6 \cdot 10^{-47}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -5 \cdot 10^{-100}:\\ \;\;\;\;t \cdot \left(-\frac{z}{a - z}\right)\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-76}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+125}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{-t}{\frac{z}{y - z}}\\ \end{array} \]

Alternative 10: 50.7% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.65 \cdot 10^{+109}:\\
\;\;\;\;\frac{-t}{\frac{a - z}{z}}\\

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -1.6499999999999999e109

    1. Initial program 57.7%

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{t}{\frac{a - z}{z}}} \]
      3. distribute-neg-frac71.4%

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

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

    if -1.6499999999999999e109 < z < -5.59999999999999986e-47

    1. Initial program 94.5%

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

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

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

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

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

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

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

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

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

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

    if -5.59999999999999986e-47 < z < -1.64999999999999998e-100

    1. Initial program 76.8%

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

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

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

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

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

        \[\leadsto t \cdot \color{blue}{\left(-\frac{z}{a - z}\right)} \]
      2. distribute-neg-frac52.4%

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

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

    if -1.64999999999999998e-100 < z < 3.70000000000000024e-75

    1. Initial program 94.0%

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

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

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

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

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

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

    if 3.70000000000000024e-75 < z < 1.59999999999999992e125

    1. Initial program 81.6%

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

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

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

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

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

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

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

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

    if 1.59999999999999992e125 < z

    1. Initial program 66.7%

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

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

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

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

        \[\leadsto -\color{blue}{\frac{t}{\frac{z}{y - z}}} \]
      3. distribute-neg-frac63.4%

        \[\leadsto \color{blue}{\frac{-t}{\frac{z}{y - z}}} \]
    5. Simplified63.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.65 \cdot 10^{+109}:\\ \;\;\;\;\frac{-t}{\frac{a - z}{z}}\\ \mathbf{elif}\;z \leq -5.6 \cdot 10^{-47}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -1.65 \cdot 10^{-100}:\\ \;\;\;\;t \cdot \left(-\frac{z}{a - z}\right)\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{-75}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+125}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{-t}{\frac{z}{y - z}}\\ \end{array} \]

Alternative 11: 41.3% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \leq -3.2 \cdot 10^{-176}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -1.05 \cdot 10^{-307}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 3.4 \cdot 10^{+67}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 85.7%

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

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

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

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

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

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

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

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

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

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

    if -0.00619999999999999978 < a < -3.19999999999999985e-176 or 5.6000000000000002e-157 < a < 3.4000000000000002e67

    1. Initial program 86.1%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t - x}{a}} \cdot y \]
      2. *-commutative42.9%

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

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

    if -3.19999999999999985e-176 < a < -1.0500000000000001e-307

    1. Initial program 73.9%

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

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

    if -1.0500000000000001e-307 < a < 5.6000000000000002e-157

    1. Initial program 72.1%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}}} \]
    7. Simplified51.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.0062:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;a \leq -3.2 \cdot 10^{-176}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq -1.05 \cdot 10^{-307}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 5.6 \cdot 10^{-157}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;a \leq 3.4 \cdot 10^{+67}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \end{array} \]

Alternative 12: 49.6% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;z \leq -3.2 \cdot 10^{-105}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 4.5 \cdot 10^{+127}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.9000000000000001e122 or 4.50000000000000034e127 < z

    1. Initial program 62.2%

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

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

    if -2.9000000000000001e122 < z < -6.00000000000000033e-47

    1. Initial program 94.7%

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

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

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

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

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

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

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

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

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

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

    if -6.00000000000000033e-47 < z < -3.19999999999999981e-105 or 9.99999999999999958e-75 < z < 4.50000000000000034e127

    1. Initial program 81.5%

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

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

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

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

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

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

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

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

    if -3.19999999999999981e-105 < z < 9.99999999999999958e-75

    1. Initial program 93.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{+122}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -6 \cdot 10^{-47}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -3.2 \cdot 10^{-105}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;z \leq 10^{-74}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{+127}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 13: 64.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{+55} \lor \neg \left(z \leq -3.5 \cdot 10^{+29}\right) \land \left(z \leq -3.3 \cdot 10^{-133} \lor \neg \left(z \leq 5.5 \cdot 10^{-64}\right)\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.5000000000000004e55 or -3.49999999999999979e29 < z < -3.30000000000000009e-133 or 5.4999999999999999e-64 < z

    1. Initial program 75.0%

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

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

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

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

    if -5.5000000000000004e55 < z < -3.49999999999999979e29 or -3.30000000000000009e-133 < z < 5.4999999999999999e-64

    1. Initial program 94.1%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.5 \cdot 10^{+55} \lor \neg \left(z \leq -3.5 \cdot 10^{+29}\right) \land \left(z \leq -3.3 \cdot 10^{-133} \lor \neg \left(z \leq 5.5 \cdot 10^{-64}\right)\right):\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \end{array} \]

Alternative 14: 57.7% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t \leq 6.7 \cdot 10^{-186}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\

\mathbf{elif}\;t \leq 1.45 \cdot 10^{-117} \lor \neg \left(t \leq 1.95 \cdot 10^{+83}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.8999999999999999e-24 or 6.70000000000000034e-186 < t < 1.45e-117 or 1.9500000000000001e83 < t

    1. Initial program 88.1%

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

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

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

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

    if -2.8999999999999999e-24 < t < 6.70000000000000034e-186

    1. Initial program 70.2%

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

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

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

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

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

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

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

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

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

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

    if 1.45e-117 < t < 1.9500000000000001e83

    1. Initial program 90.5%

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    4. Simplified68.9%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot x}{a} + x} \]
    6. Step-by-step derivation
      1. +-commutative54.4%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.9 \cdot 10^{-24}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;t \leq 6.7 \cdot 10^{-186}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;t \leq 1.45 \cdot 10^{-117} \lor \neg \left(t \leq 1.95 \cdot 10^{+83}\right):\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{\frac{a}{x}}\\ \end{array} \]

Alternative 15: 58.7% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.65 \cdot 10^{-15}:\\ \;\;\;\;x - \frac{y}{\frac{a}{x}}\\ \mathbf{elif}\;x \leq 1.45 \cdot 10^{-6}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;x \leq 2.7 \cdot 10^{+171} \lor \neg \left(x \leq 4.1 \cdot 10^{+298}\right):\\ \;\;\;\;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
 (if (<= x -1.65e-15)
   (- x (/ y (/ a x)))
   (if (<= x 1.45e-6)
     (* t (/ (- y z) (- a z)))
     (if (or (<= x 2.7e+171) (not (<= x 4.1e+298)))
       (* y (/ (- t x) (- a z)))
       (* x (- 1.0 (/ y a)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (x <= -1.65e-15) {
		tmp = x - (y / (a / x));
	} else if (x <= 1.45e-6) {
		tmp = t * ((y - z) / (a - z));
	} else if ((x <= 2.7e+171) || !(x <= 4.1e+298)) {
		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) :: tmp
    if (x <= (-1.65d-15)) then
        tmp = x - (y / (a / x))
    else if (x <= 1.45d-6) then
        tmp = t * ((y - z) / (a - z))
    else if ((x <= 2.7d+171) .or. (.not. (x <= 4.1d+298))) 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 tmp;
	if (x <= -1.65e-15) {
		tmp = x - (y / (a / x));
	} else if (x <= 1.45e-6) {
		tmp = t * ((y - z) / (a - z));
	} else if ((x <= 2.7e+171) || !(x <= 4.1e+298)) {
		tmp = y * ((t - x) / (a - z));
	} else {
		tmp = x * (1.0 - (y / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if x <= -1.65e-15:
		tmp = x - (y / (a / x))
	elif x <= 1.45e-6:
		tmp = t * ((y - z) / (a - z))
	elif (x <= 2.7e+171) or not (x <= 4.1e+298):
		tmp = y * ((t - x) / (a - z))
	else:
		tmp = x * (1.0 - (y / a))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (x <= -1.65e-15)
		tmp = Float64(x - Float64(y / Float64(a / x)));
	elseif (x <= 1.45e-6)
		tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z)));
	elseif ((x <= 2.7e+171) || !(x <= 4.1e+298))
		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)
	tmp = 0.0;
	if (x <= -1.65e-15)
		tmp = x - (y / (a / x));
	elseif (x <= 1.45e-6)
		tmp = t * ((y - z) / (a - z));
	elseif ((x <= 2.7e+171) || ~((x <= 4.1e+298)))
		tmp = y * ((t - x) / (a - z));
	else
		tmp = x * (1.0 - (y / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.65e-15], N[(x - N[(y / N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.45e-6], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, 2.7e+171], N[Not[LessEqual[x, 4.1e+298]], $MachinePrecision]], 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}
\mathbf{if}\;x \leq -1.65 \cdot 10^{-15}:\\
\;\;\;\;x - \frac{y}{\frac{a}{x}}\\

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

\mathbf{elif}\;x \leq 2.7 \cdot 10^{+171} \lor \neg \left(x \leq 4.1 \cdot 10^{+298}\right):\\
\;\;\;\;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 4 regimes
  2. if x < -1.65e-15

    1. Initial program 72.9%

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

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

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

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

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

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

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

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

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

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

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

    if -1.65e-15 < x < 1.4500000000000001e-6

    1. Initial program 87.7%

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

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

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

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

    if 1.4500000000000001e-6 < x < 2.6999999999999998e171 or 4.10000000000000016e298 < x

    1. Initial program 89.5%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative69.0%

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

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

    if 2.6999999999999998e171 < x < 4.10000000000000016e298

    1. Initial program 67.7%

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    4. Simplified63.5%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.65 \cdot 10^{-15}:\\ \;\;\;\;x - \frac{y}{\frac{a}{x}}\\ \mathbf{elif}\;x \leq 1.45 \cdot 10^{-6}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;x \leq 2.7 \cdot 10^{+171} \lor \neg \left(x \leq 4.1 \cdot 10^{+298}\right):\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \end{array} \]

Alternative 16: 36.1% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq -4.7 \cdot 10^{-32}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 4.1 \cdot 10^{-246}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 1.15 \cdot 10^{-122}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 4.8 \cdot 10^{-33}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.49999999999999994e122 or 4.8e-33 < z

    1. Initial program 68.2%

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

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

    if -2.49999999999999994e122 < z < -4.70000000000000019e-32 or 4.09999999999999986e-246 < z < 1.15000000000000003e-122

    1. Initial program 94.7%

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

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

    if -4.70000000000000019e-32 < z < 4.09999999999999986e-246 or 1.15000000000000003e-122 < z < 4.8e-33

    1. Initial program 91.6%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.5 \cdot 10^{+122}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -4.7 \cdot 10^{-32}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4.1 \cdot 10^{-246}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{-122}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{-33}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 17: 44.5% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;a \leq -7 \cdot 10^{-245}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 6.3 \cdot 10^{-308}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 3.2 \cdot 10^{+28}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.7999999999999998e-123 or 3.2e28 < a

    1. Initial program 86.5%

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    4. Simplified62.9%

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

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

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

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

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

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

    if -1.7999999999999998e-123 < a < -7.00000000000000033e-245 or 6.2999999999999995e-308 < a < 3.2e28

    1. Initial program 79.0%

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

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

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

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

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

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

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

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

    if -7.00000000000000033e-245 < a < 6.2999999999999995e-308

    1. Initial program 63.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.8 \cdot 10^{-123}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;a \leq -7 \cdot 10^{-245}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 6.3 \cdot 10^{-308}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{+28}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \end{array} \]

Alternative 18: 44.6% accurate, 0.9× speedup?

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

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

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

\mathbf{elif}\;a \leq 3.35 \cdot 10^{-307}:\\
\;\;\;\;t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -5.0000000000000003e-123 or 5.6e23 < a

    1. Initial program 86.5%

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    4. Simplified62.9%

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

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

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

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

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

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

    if -5.0000000000000003e-123 < a < -8.99999999999999937e-245

    1. Initial program 80.3%

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

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

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

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

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

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

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

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

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

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

    if -8.99999999999999937e-245 < a < 3.3499999999999999e-307

    1. Initial program 63.1%

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

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

    if 3.3499999999999999e-307 < a < 5.6e23

    1. Initial program 78.5%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5 \cdot 10^{-123}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;a \leq -9 \cdot 10^{-245}:\\ \;\;\;\;\left(x - t\right) \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 3.35 \cdot 10^{-307}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 5.6 \cdot 10^{+23}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \end{array} \]

Alternative 19: 73.3% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.05e93 or 2.19999999999999991e-20 < a

    1. Initial program 89.9%

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

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

    if -3.05e93 < a < 2.19999999999999991e-20

    1. Initial program 76.6%

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

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

        \[\leadsto x + \frac{t - x}{a - z} \cdot \color{blue}{\frac{y \cdot y - z \cdot z}{y + z}} \]
      3. associate-*r/49.0%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
      7. associate-/r/79.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.05 \cdot 10^{+93} \lor \neg \left(a \leq 2.2 \cdot 10^{-20}\right):\\ \;\;\;\;x - \frac{t - x}{a} \cdot \left(z - y\right)\\ \mathbf{else}:\\ \;\;\;\;t + \left(y - a\right) \cdot \frac{x - t}{z}\\ \end{array} \]

Alternative 20: 33.0% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;z \leq -1.05 \cdot 10^{-31}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 9.5 \cdot 10^{+125}:\\
\;\;\;\;\frac{y}{\frac{z}{x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.4000000000000002e122 or 9.50000000000000041e125 < z

    1. Initial program 62.2%

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

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

    if -2.4000000000000002e122 < z < -1.04999999999999996e-31

    1. Initial program 94.3%

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

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

    if -1.04999999999999996e-31 < z < 5.79999999999999964e-233

    1. Initial program 93.8%

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

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

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

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

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

    if 5.79999999999999964e-233 < z < 9.50000000000000041e125

    1. Initial program 85.4%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}}} \]
    7. Simplified33.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.4 \cdot 10^{+122}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.05 \cdot 10^{-31}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-233}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{+125}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 21: 38.8% accurate, 2.5× speedup?

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

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

\mathbf{elif}\;a \leq 2 \cdot 10^{+49}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.75000000000000015e93 or 1.99999999999999989e49 < a

    1. Initial program 88.7%

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

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

    if -2.75000000000000015e93 < a < 1.99999999999999989e49

    1. Initial program 78.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.75 \cdot 10^{+93}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2 \cdot 10^{+49}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 22: 25.2% accurate, 13.0× speedup?

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

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

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

    \[\leadsto \color{blue}{t} \]
  3. Final simplification25.3%

    \[\leadsto t \]

Reproduce

?
herbie shell --seed 2023192 
(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)))))