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

Percentage Accurate: 68.3% → 88.9%
Time: 14.4s
Alternatives: 20
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 20 alternatives:

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

Initial Program: 68.3% accurate, 1.0× speedup?

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

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

Alternative 1: 88.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{+215} \lor \neg \left(z \leq 1.38 \cdot 10^{+129}\right):\\
\;\;\;\;\left(t + \frac{y}{z} \cdot \left(x - t\right)\right) + \frac{a}{\frac{z}{t - x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.99999999999999954e215 or 1.3800000000000001e129 < z

    1. Initial program 18.9%

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

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

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

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

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

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

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

      \[\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}} \]
    7. Step-by-step derivation
      1. sub-neg69.5%

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

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

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

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

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

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

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

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

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

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

    if -6.99999999999999954e215 < z < 1.3800000000000001e129

    1. Initial program 80.7%

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    6. Step-by-step derivation
      1. div-inv89.9%

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

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

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

Alternative 2: 90.8% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 71.5%

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

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

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

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

    1. Initial program 4.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 90.8% accurate, 0.3× speedup?

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

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

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

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


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

    1. Initial program 70.1%

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

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

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

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

    1. Initial program 4.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 72.6%

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

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

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

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

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

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

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

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

Alternative 4: 90.7% accurate, 0.3× speedup?

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

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

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

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


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

    1. Initial program 70.1%

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    6. Step-by-step derivation
      1. div-inv90.1%

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

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

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

    1. Initial program 4.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 72.6%

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

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

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

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

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

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

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

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

Alternative 5: 63.2% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq -1.55 \cdot 10^{-29}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -1.4 \cdot 10^{-115}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq -1.9 \cdot 10^{-147}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 3.3 \cdot 10^{-53}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 9 \cdot 10^{+44}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 37.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{a}{\frac{z}{t - x}}} \]
    9. Simplified66.0%

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

    if -7.0000000000000002e124 < z < -1.55000000000000013e-29 or -1.39999999999999994e-115 < z < -1.90000000000000014e-147 or 3.30000000000000004e-53 < z < 9e44

    1. Initial program 74.3%

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

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

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

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

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

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

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

    if -1.55000000000000013e-29 < z < -1.39999999999999994e-115 or 3.0000000000000001e-282 < z < 3.30000000000000004e-53

    1. Initial program 85.2%

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

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

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

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

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

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

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

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

    if -1.90000000000000014e-147 < z < 3.0000000000000001e-282

    1. Initial program 98.8%

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

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

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

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

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

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

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

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

    if 9e44 < z

    1. Initial program 30.2%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7 \cdot 10^{+124}:\\ \;\;\;\;t + \frac{a}{\frac{z}{t - x}}\\ \mathbf{elif}\;z \leq -1.55 \cdot 10^{-29}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq -1.4 \cdot 10^{-115}:\\ \;\;\;\;x - \frac{x - t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq -1.9 \cdot 10^{-147}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-282}:\\ \;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a}\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{-53}:\\ \;\;\;\;x - \frac{x - t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 9 \cdot 10^{+44}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]

Alternative 6: 36.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -6.8 \cdot 10^{-16}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -6.4 \cdot 10^{-110}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-279}:\\ \;\;\;\;\frac{t \cdot y}{a}\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-150}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-99}:\\ \;\;\;\;\frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-53}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 185000000:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -6.8e-16)
   t
   (if (<= z -6.4e-110)
     x
     (if (<= z 5.2e-279)
       (/ (* t y) a)
       (if (<= z 2.4e-150)
         x
         (if (<= z 7.5e-99)
           (/ y (/ a t))
           (if (<= z 2.1e-53) x (if (<= z 185000000.0) (/ (* y x) z) t))))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -6.8e-16) {
		tmp = t;
	} else if (z <= -6.4e-110) {
		tmp = x;
	} else if (z <= 5.2e-279) {
		tmp = (t * y) / a;
	} else if (z <= 2.4e-150) {
		tmp = x;
	} else if (z <= 7.5e-99) {
		tmp = y / (a / t);
	} else if (z <= 2.1e-53) {
		tmp = x;
	} else if (z <= 185000000.0) {
		tmp = (y * x) / 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 <= (-6.8d-16)) then
        tmp = t
    else if (z <= (-6.4d-110)) then
        tmp = x
    else if (z <= 5.2d-279) then
        tmp = (t * y) / a
    else if (z <= 2.4d-150) then
        tmp = x
    else if (z <= 7.5d-99) then
        tmp = y / (a / t)
    else if (z <= 2.1d-53) then
        tmp = x
    else if (z <= 185000000.0d0) then
        tmp = (y * x) / 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 <= -6.8e-16) {
		tmp = t;
	} else if (z <= -6.4e-110) {
		tmp = x;
	} else if (z <= 5.2e-279) {
		tmp = (t * y) / a;
	} else if (z <= 2.4e-150) {
		tmp = x;
	} else if (z <= 7.5e-99) {
		tmp = y / (a / t);
	} else if (z <= 2.1e-53) {
		tmp = x;
	} else if (z <= 185000000.0) {
		tmp = (y * x) / z;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -6.8e-16:
		tmp = t
	elif z <= -6.4e-110:
		tmp = x
	elif z <= 5.2e-279:
		tmp = (t * y) / a
	elif z <= 2.4e-150:
		tmp = x
	elif z <= 7.5e-99:
		tmp = y / (a / t)
	elif z <= 2.1e-53:
		tmp = x
	elif z <= 185000000.0:
		tmp = (y * x) / z
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -6.8e-16)
		tmp = t;
	elseif (z <= -6.4e-110)
		tmp = x;
	elseif (z <= 5.2e-279)
		tmp = Float64(Float64(t * y) / a);
	elseif (z <= 2.4e-150)
		tmp = x;
	elseif (z <= 7.5e-99)
		tmp = Float64(y / Float64(a / t));
	elseif (z <= 2.1e-53)
		tmp = x;
	elseif (z <= 185000000.0)
		tmp = Float64(Float64(y * x) / z);
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -6.8e-16)
		tmp = t;
	elseif (z <= -6.4e-110)
		tmp = x;
	elseif (z <= 5.2e-279)
		tmp = (t * y) / a;
	elseif (z <= 2.4e-150)
		tmp = x;
	elseif (z <= 7.5e-99)
		tmp = y / (a / t);
	elseif (z <= 2.1e-53)
		tmp = x;
	elseif (z <= 185000000.0)
		tmp = (y * x) / z;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.8e-16], t, If[LessEqual[z, -6.4e-110], x, If[LessEqual[z, 5.2e-279], N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 2.4e-150], x, If[LessEqual[z, 7.5e-99], N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e-53], x, If[LessEqual[z, 185000000.0], N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision], t]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -6.4 \cdot 10^{-110}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 2.4 \cdot 10^{-150}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 2.1 \cdot 10^{-53}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 185000000:\\
\;\;\;\;\frac{y \cdot x}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -6.8e-16 or 1.85e8 < z

    1. Initial program 40.9%

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

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

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

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

    if -6.8e-16 < z < -6.40000000000000056e-110 or 5.2000000000000004e-279 < z < 2.4e-150 or 7.4999999999999999e-99 < z < 2.09999999999999977e-53

    1. Initial program 84.9%

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

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

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

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

    if -6.40000000000000056e-110 < z < 5.2000000000000004e-279

    1. Initial program 97.2%

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

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

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

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

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

    if 2.4e-150 < z < 7.4999999999999999e-99

    1. Initial program 86.5%

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

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

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

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

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

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

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

    if 2.09999999999999977e-53 < z < 1.85e8

    1. Initial program 86.2%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.8 \cdot 10^{-16}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -6.4 \cdot 10^{-110}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-279}:\\ \;\;\;\;\frac{t \cdot y}{a}\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-150}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-99}:\\ \;\;\;\;\frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-53}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 185000000:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 7: 56.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{t \cdot y}{a}\\ t_2 := y \cdot \frac{t - x}{a - z}\\ t_3 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;y \leq -9.2 \cdot 10^{-58}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -9 \cdot 10^{-250}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 3 \cdot 10^{-283}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{-206}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 2.12 \cdot 10^{+55}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ (* t y) a)))
        (t_2 (* y (/ (- t x) (- a z))))
        (t_3 (* t (/ (- y z) (- a z)))))
   (if (<= y -9.2e-58)
     t_2
     (if (<= y -9e-250)
       t_1
       (if (<= y 3e-283)
         t_3
         (if (<= y 1.05e-206) t_1 (if (<= y 2.12e+55) t_3 t_2)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((t * y) / a);
	double t_2 = y * ((t - x) / (a - z));
	double t_3 = t * ((y - z) / (a - z));
	double tmp;
	if (y <= -9.2e-58) {
		tmp = t_2;
	} else if (y <= -9e-250) {
		tmp = t_1;
	} else if (y <= 3e-283) {
		tmp = t_3;
	} else if (y <= 1.05e-206) {
		tmp = t_1;
	} else if (y <= 2.12e+55) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = x + ((t * y) / a)
    t_2 = y * ((t - x) / (a - z))
    t_3 = t * ((y - z) / (a - z))
    if (y <= (-9.2d-58)) then
        tmp = t_2
    else if (y <= (-9d-250)) then
        tmp = t_1
    else if (y <= 3d-283) then
        tmp = t_3
    else if (y <= 1.05d-206) then
        tmp = t_1
    else if (y <= 2.12d+55) then
        tmp = t_3
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((t * y) / a);
	double t_2 = y * ((t - x) / (a - z));
	double t_3 = t * ((y - z) / (a - z));
	double tmp;
	if (y <= -9.2e-58) {
		tmp = t_2;
	} else if (y <= -9e-250) {
		tmp = t_1;
	} else if (y <= 3e-283) {
		tmp = t_3;
	} else if (y <= 1.05e-206) {
		tmp = t_1;
	} else if (y <= 2.12e+55) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((t * y) / a)
	t_2 = y * ((t - x) / (a - z))
	t_3 = t * ((y - z) / (a - z))
	tmp = 0
	if y <= -9.2e-58:
		tmp = t_2
	elif y <= -9e-250:
		tmp = t_1
	elif y <= 3e-283:
		tmp = t_3
	elif y <= 1.05e-206:
		tmp = t_1
	elif y <= 2.12e+55:
		tmp = t_3
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(t * y) / a))
	t_2 = Float64(y * Float64(Float64(t - x) / Float64(a - z)))
	t_3 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	tmp = 0.0
	if (y <= -9.2e-58)
		tmp = t_2;
	elseif (y <= -9e-250)
		tmp = t_1;
	elseif (y <= 3e-283)
		tmp = t_3;
	elseif (y <= 1.05e-206)
		tmp = t_1;
	elseif (y <= 2.12e+55)
		tmp = t_3;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((t * y) / a);
	t_2 = y * ((t - x) / (a - z));
	t_3 = t * ((y - z) / (a - z));
	tmp = 0.0;
	if (y <= -9.2e-58)
		tmp = t_2;
	elseif (y <= -9e-250)
		tmp = t_1;
	elseif (y <= 3e-283)
		tmp = t_3;
	elseif (y <= 1.05e-206)
		tmp = t_1;
	elseif (y <= 2.12e+55)
		tmp = t_3;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9.2e-58], t$95$2, If[LessEqual[y, -9e-250], t$95$1, If[LessEqual[y, 3e-283], t$95$3, If[LessEqual[y, 1.05e-206], t$95$1, If[LessEqual[y, 2.12e+55], t$95$3, t$95$2]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -9 \cdot 10^{-250}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 3 \cdot 10^{-283}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;y \leq 1.05 \cdot 10^{-206}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 2.12 \cdot 10^{+55}:\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -9.1999999999999995e-58 or 2.12000000000000007e55 < y

    1. Initial program 68.0%

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

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

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

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

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

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

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

    if -9.1999999999999995e-58 < y < -8.99999999999999987e-250 or 2.99999999999999996e-283 < y < 1.05000000000000005e-206

    1. Initial program 71.5%

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

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

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

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

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

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

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

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

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

    if -8.99999999999999987e-250 < y < 2.99999999999999996e-283 or 1.05000000000000005e-206 < y < 2.12000000000000007e55

    1. Initial program 56.4%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9.2 \cdot 10^{-58}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;y \leq -9 \cdot 10^{-250}:\\ \;\;\;\;x + \frac{t \cdot y}{a}\\ \mathbf{elif}\;y \leq 3 \cdot 10^{-283}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{-206}:\\ \;\;\;\;x + \frac{t \cdot y}{a}\\ \mathbf{elif}\;y \leq 2.12 \cdot 10^{+55}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \end{array} \]

Alternative 8: 53.2% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq 1.6 \cdot 10^{-306}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 1.4 \cdot 10^{-14}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 2700000000:\\
\;\;\;\;\frac{y \cdot x}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -4.5999999999999998e-16 or 2.7e9 < z

    1. Initial program 40.9%

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

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

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

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

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

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

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

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

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

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

    if -4.5999999999999998e-16 < z < 1.59999999999999985e-306 or 9.4999999999999996e-151 < z < 1.4e-14

    1. Initial program 89.5%

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

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

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

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

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

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

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

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

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

    if 1.59999999999999985e-306 < z < 9.4999999999999996e-151

    1. Initial program 96.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.4e-14 < z < 2.7e9

    1. Initial program 80.9%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.6 \cdot 10^{-16}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-306}:\\ \;\;\;\;x + \frac{t \cdot y}{a}\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{-151}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-14}:\\ \;\;\;\;x + \frac{t \cdot y}{a}\\ \mathbf{elif}\;z \leq 2700000000:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \]

Alternative 9: 53.6% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq 6.2 \cdot 10^{-307}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 2.9 \cdot 10^{-14}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 18000:\\
\;\;\;\;x \cdot \frac{y - a}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.3500000000000001e-14 or 18000 < z

    1. Initial program 40.9%

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

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

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

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

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

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

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

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

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

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

    if -2.3500000000000001e-14 < z < 6.1999999999999996e-307 or 1.25000000000000001e-151 < z < 2.9000000000000003e-14

    1. Initial program 89.5%

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

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

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

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

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

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

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

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

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

    if 6.1999999999999996e-307 < z < 1.25000000000000001e-151

    1. Initial program 96.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.9000000000000003e-14 < z < 18000

    1. Initial program 80.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.35 \cdot 10^{-14}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{-307}:\\ \;\;\;\;x + \frac{t \cdot y}{a}\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{-151}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-14}:\\ \;\;\;\;x + \frac{t \cdot y}{a}\\ \mathbf{elif}\;z \leq 18000:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \]

Alternative 10: 63.8% accurate, 0.8× speedup?

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

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

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

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

\mathbf{elif}\;z \leq 1.8 \cdot 10^{+30}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 37.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{a}{\frac{z}{t - x}}} \]
    9. Simplified66.0%

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

    if -1.3999999999999999e130 < z < -4.2e-33 or 1.4500000000000001e-48 < z < 1.8000000000000001e30

    1. Initial program 70.5%

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

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

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

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

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

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

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

    if -4.2e-33 < z < 1.4500000000000001e-48

    1. Initial program 91.6%

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

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

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

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

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

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

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

    if 1.8000000000000001e30 < z

    1. Initial program 30.2%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.4 \cdot 10^{+130}:\\ \;\;\;\;t + \frac{a}{\frac{z}{t - x}}\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-33}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{-48}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{+30}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]

Alternative 11: 64.9% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq -2.5 \cdot 10^{-30}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 7.5 \cdot 10^{+43}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 37.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{a}{\frac{z}{t - x}}} \]
    9. Simplified66.0%

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

    if -2.8e122 < z < -2.49999999999999986e-30 or 1.2999999999999999e-52 < z < 7.49999999999999967e43

    1. Initial program 70.5%

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

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

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

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

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

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

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

    if -2.49999999999999986e-30 < z < 1.2999999999999999e-52

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

    if 7.49999999999999967e43 < z

    1. Initial program 30.2%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{+122}:\\ \;\;\;\;t + \frac{a}{\frac{z}{t - x}}\\ \mathbf{elif}\;z \leq -2.5 \cdot 10^{-30}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-52}:\\ \;\;\;\;x - \frac{x - t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{+43}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]

Alternative 12: 37.4% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y}{a}\\ \mathbf{if}\;z \leq -1.95 \cdot 10^{-14}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -4.9 \cdot 10^{-71}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-279}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{-149}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-96}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-18}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ y a))))
   (if (<= z -1.95e-14)
     t
     (if (<= z -4.9e-71)
       x
       (if (<= z 6.5e-279)
         t_1
         (if (<= z 2.45e-149)
           x
           (if (<= z 3e-96) t_1 (if (<= z 3e-18) x t))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (y / a);
	double tmp;
	if (z <= -1.95e-14) {
		tmp = t;
	} else if (z <= -4.9e-71) {
		tmp = x;
	} else if (z <= 6.5e-279) {
		tmp = t_1;
	} else if (z <= 2.45e-149) {
		tmp = x;
	} else if (z <= 3e-96) {
		tmp = t_1;
	} else if (z <= 3e-18) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t * (y / a)
    if (z <= (-1.95d-14)) then
        tmp = t
    else if (z <= (-4.9d-71)) then
        tmp = x
    else if (z <= 6.5d-279) then
        tmp = t_1
    else if (z <= 2.45d-149) then
        tmp = x
    else if (z <= 3d-96) then
        tmp = t_1
    else if (z <= 3d-18) then
        tmp = x
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (y / a);
	double tmp;
	if (z <= -1.95e-14) {
		tmp = t;
	} else if (z <= -4.9e-71) {
		tmp = x;
	} else if (z <= 6.5e-279) {
		tmp = t_1;
	} else if (z <= 2.45e-149) {
		tmp = x;
	} else if (z <= 3e-96) {
		tmp = t_1;
	} else if (z <= 3e-18) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (y / a)
	tmp = 0
	if z <= -1.95e-14:
		tmp = t
	elif z <= -4.9e-71:
		tmp = x
	elif z <= 6.5e-279:
		tmp = t_1
	elif z <= 2.45e-149:
		tmp = x
	elif z <= 3e-96:
		tmp = t_1
	elif z <= 3e-18:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(y / a))
	tmp = 0.0
	if (z <= -1.95e-14)
		tmp = t;
	elseif (z <= -4.9e-71)
		tmp = x;
	elseif (z <= 6.5e-279)
		tmp = t_1;
	elseif (z <= 2.45e-149)
		tmp = x;
	elseif (z <= 3e-96)
		tmp = t_1;
	elseif (z <= 3e-18)
		tmp = x;
	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 <= -1.95e-14)
		tmp = t;
	elseif (z <= -4.9e-71)
		tmp = x;
	elseif (z <= 6.5e-279)
		tmp = t_1;
	elseif (z <= 2.45e-149)
		tmp = x;
	elseif (z <= 3e-96)
		tmp = t_1;
	elseif (z <= 3e-18)
		tmp = x;
	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, -1.95e-14], t, If[LessEqual[z, -4.9e-71], x, If[LessEqual[z, 6.5e-279], t$95$1, If[LessEqual[z, 2.45e-149], x, If[LessEqual[z, 3e-96], t$95$1, If[LessEqual[z, 3e-18], x, t]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -4.9 \cdot 10^{-71}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 6.5 \cdot 10^{-279}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 2.45 \cdot 10^{-149}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 3 \cdot 10^{-96}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 3 \cdot 10^{-18}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.9499999999999999e-14 or 2.99999999999999983e-18 < z

    1. Initial program 42.8%

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

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

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

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

    if -1.9499999999999999e-14 < z < -4.8999999999999997e-71 or 6.4999999999999997e-279 < z < 2.4500000000000002e-149 or 3e-96 < z < 2.99999999999999983e-18

    1. Initial program 86.3%

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

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

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

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

    if -4.8999999999999997e-71 < z < 6.4999999999999997e-279 or 2.4500000000000002e-149 < z < 3e-96

    1. Initial program 93.5%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} \]
    7. Simplified41.0%

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

        \[\leadsto \color{blue}{\frac{y}{a} \cdot t} \]
    9. Applied egg-rr39.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.95 \cdot 10^{-14}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -4.9 \cdot 10^{-71}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-279}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{-149}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-96}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-18}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 13: 37.2% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{\frac{a}{t}}\\ \mathbf{if}\;z \leq -3.4 \cdot 10^{-15}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -6.8 \cdot 10^{-108}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-282}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-149}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-102}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-15}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ y (/ a t))))
   (if (<= z -3.4e-15)
     t
     (if (<= z -6.8e-108)
       x
       (if (<= z 8e-282)
         t_1
         (if (<= z 1.7e-149)
           x
           (if (<= z 4e-102) t_1 (if (<= z 2.9e-15) x t))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y / (a / t);
	double tmp;
	if (z <= -3.4e-15) {
		tmp = t;
	} else if (z <= -6.8e-108) {
		tmp = x;
	} else if (z <= 8e-282) {
		tmp = t_1;
	} else if (z <= 1.7e-149) {
		tmp = x;
	} else if (z <= 4e-102) {
		tmp = t_1;
	} else if (z <= 2.9e-15) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y / (a / t)
    if (z <= (-3.4d-15)) then
        tmp = t
    else if (z <= (-6.8d-108)) then
        tmp = x
    else if (z <= 8d-282) then
        tmp = t_1
    else if (z <= 1.7d-149) then
        tmp = x
    else if (z <= 4d-102) then
        tmp = t_1
    else if (z <= 2.9d-15) then
        tmp = x
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y / (a / t);
	double tmp;
	if (z <= -3.4e-15) {
		tmp = t;
	} else if (z <= -6.8e-108) {
		tmp = x;
	} else if (z <= 8e-282) {
		tmp = t_1;
	} else if (z <= 1.7e-149) {
		tmp = x;
	} else if (z <= 4e-102) {
		tmp = t_1;
	} else if (z <= 2.9e-15) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y / (a / t)
	tmp = 0
	if z <= -3.4e-15:
		tmp = t
	elif z <= -6.8e-108:
		tmp = x
	elif z <= 8e-282:
		tmp = t_1
	elif z <= 1.7e-149:
		tmp = x
	elif z <= 4e-102:
		tmp = t_1
	elif z <= 2.9e-15:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y / Float64(a / t))
	tmp = 0.0
	if (z <= -3.4e-15)
		tmp = t;
	elseif (z <= -6.8e-108)
		tmp = x;
	elseif (z <= 8e-282)
		tmp = t_1;
	elseif (z <= 1.7e-149)
		tmp = x;
	elseif (z <= 4e-102)
		tmp = t_1;
	elseif (z <= 2.9e-15)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y / (a / t);
	tmp = 0.0;
	if (z <= -3.4e-15)
		tmp = t;
	elseif (z <= -6.8e-108)
		tmp = x;
	elseif (z <= 8e-282)
		tmp = t_1;
	elseif (z <= 1.7e-149)
		tmp = x;
	elseif (z <= 4e-102)
		tmp = t_1;
	elseif (z <= 2.9e-15)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.4e-15], t, If[LessEqual[z, -6.8e-108], x, If[LessEqual[z, 8e-282], t$95$1, If[LessEqual[z, 1.7e-149], x, If[LessEqual[z, 4e-102], t$95$1, If[LessEqual[z, 2.9e-15], x, t]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -6.8 \cdot 10^{-108}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 8 \cdot 10^{-282}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 1.7 \cdot 10^{-149}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 4 \cdot 10^{-102}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.4e-15 or 2.90000000000000019e-15 < z

    1. Initial program 42.8%

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

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

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

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

    if -3.4e-15 < z < -6.80000000000000004e-108 or 8.0000000000000001e-282 < z < 1.6999999999999999e-149 or 3.99999999999999973e-102 < z < 2.90000000000000019e-15

    1. Initial program 85.3%

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

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

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

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

    if -6.80000000000000004e-108 < z < 8.0000000000000001e-282 or 1.6999999999999999e-149 < z < 3.99999999999999973e-102

    1. Initial program 95.1%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} \]
    7. Simplified42.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.4 \cdot 10^{-15}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -6.8 \cdot 10^{-108}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-282}:\\ \;\;\;\;\frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-149}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-102}:\\ \;\;\;\;\frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-15}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 14: 37.0% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.25 \cdot 10^{-14}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -6 \cdot 10^{-110}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{-277}:\\ \;\;\;\;\frac{t \cdot y}{a}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-150}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-99}:\\ \;\;\;\;\frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 2.15 \cdot 10^{-15}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -2.25e-14)
   t
   (if (<= z -6e-110)
     x
     (if (<= z 1.55e-277)
       (/ (* t y) a)
       (if (<= z 1.4e-150)
         x
         (if (<= z 1.8e-99) (/ y (/ a t)) (if (<= z 2.15e-15) x t)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -2.25e-14) {
		tmp = t;
	} else if (z <= -6e-110) {
		tmp = x;
	} else if (z <= 1.55e-277) {
		tmp = (t * y) / a;
	} else if (z <= 1.4e-150) {
		tmp = x;
	} else if (z <= 1.8e-99) {
		tmp = y / (a / t);
	} else if (z <= 2.15e-15) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-2.25d-14)) then
        tmp = t
    else if (z <= (-6d-110)) then
        tmp = x
    else if (z <= 1.55d-277) then
        tmp = (t * y) / a
    else if (z <= 1.4d-150) then
        tmp = x
    else if (z <= 1.8d-99) then
        tmp = y / (a / t)
    else if (z <= 2.15d-15) then
        tmp = x
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -2.25e-14) {
		tmp = t;
	} else if (z <= -6e-110) {
		tmp = x;
	} else if (z <= 1.55e-277) {
		tmp = (t * y) / a;
	} else if (z <= 1.4e-150) {
		tmp = x;
	} else if (z <= 1.8e-99) {
		tmp = y / (a / t);
	} else if (z <= 2.15e-15) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -2.25e-14:
		tmp = t
	elif z <= -6e-110:
		tmp = x
	elif z <= 1.55e-277:
		tmp = (t * y) / a
	elif z <= 1.4e-150:
		tmp = x
	elif z <= 1.8e-99:
		tmp = y / (a / t)
	elif z <= 2.15e-15:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -2.25e-14)
		tmp = t;
	elseif (z <= -6e-110)
		tmp = x;
	elseif (z <= 1.55e-277)
		tmp = Float64(Float64(t * y) / a);
	elseif (z <= 1.4e-150)
		tmp = x;
	elseif (z <= 1.8e-99)
		tmp = Float64(y / Float64(a / t));
	elseif (z <= 2.15e-15)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -2.25e-14)
		tmp = t;
	elseif (z <= -6e-110)
		tmp = x;
	elseif (z <= 1.55e-277)
		tmp = (t * y) / a;
	elseif (z <= 1.4e-150)
		tmp = x;
	elseif (z <= 1.8e-99)
		tmp = y / (a / t);
	elseif (z <= 2.15e-15)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.25e-14], t, If[LessEqual[z, -6e-110], x, If[LessEqual[z, 1.55e-277], N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 1.4e-150], x, If[LessEqual[z, 1.8e-99], N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.15e-15], x, t]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -6 \cdot 10^{-110}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 1.4 \cdot 10^{-150}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 2.15 \cdot 10^{-15}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.2499999999999999e-14 or 2.1499999999999998e-15 < z

    1. Initial program 42.8%

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

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

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

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

    if -2.2499999999999999e-14 < z < -5.99999999999999972e-110 or 1.5499999999999999e-277 < z < 1.39999999999999998e-150 or 1.8e-99 < z < 2.1499999999999998e-15

    1. Initial program 85.3%

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

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

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

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

    if -5.99999999999999972e-110 < z < 1.5499999999999999e-277

    1. Initial program 97.2%

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

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

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

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

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

    if 1.39999999999999998e-150 < z < 1.8e-99

    1. Initial program 86.5%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.25 \cdot 10^{-14}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -6 \cdot 10^{-110}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{-277}:\\ \;\;\;\;\frac{t \cdot y}{a}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-150}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-99}:\\ \;\;\;\;\frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 2.15 \cdot 10^{-15}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 15: 48.0% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;z \leq -6.6 \cdot 10^{+97}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{-46}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 14500:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{+50}:\\ \;\;\;\;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 -6.6e+97)
     t
     (if (<= z 1.2e-46)
       t_1
       (if (<= z 14500.0) (/ (* y x) z) (if (<= z 4.2e+50) 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 <= -6.6e+97) {
		tmp = t;
	} else if (z <= 1.2e-46) {
		tmp = t_1;
	} else if (z <= 14500.0) {
		tmp = (y * x) / z;
	} else if (z <= 4.2e+50) {
		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 <= (-6.6d+97)) then
        tmp = t
    else if (z <= 1.2d-46) then
        tmp = t_1
    else if (z <= 14500.0d0) then
        tmp = (y * x) / z
    else if (z <= 4.2d+50) 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 <= -6.6e+97) {
		tmp = t;
	} else if (z <= 1.2e-46) {
		tmp = t_1;
	} else if (z <= 14500.0) {
		tmp = (y * x) / z;
	} else if (z <= 4.2e+50) {
		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 <= -6.6e+97:
		tmp = t
	elif z <= 1.2e-46:
		tmp = t_1
	elif z <= 14500.0:
		tmp = (y * x) / z
	elif z <= 4.2e+50:
		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 <= -6.6e+97)
		tmp = t;
	elseif (z <= 1.2e-46)
		tmp = t_1;
	elseif (z <= 14500.0)
		tmp = Float64(Float64(y * x) / z);
	elseif (z <= 4.2e+50)
		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 <= -6.6e+97)
		tmp = t;
	elseif (z <= 1.2e-46)
		tmp = t_1;
	elseif (z <= 14500.0)
		tmp = (y * x) / z;
	elseif (z <= 4.2e+50)
		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, -6.6e+97], t, If[LessEqual[z, 1.2e-46], t$95$1, If[LessEqual[z, 14500.0], N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 4.2e+50], t$95$1, t]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 1.2 \cdot 10^{-46}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 14500:\\
\;\;\;\;\frac{y \cdot x}{z}\\

\mathbf{elif}\;z \leq 4.2 \cdot 10^{+50}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.6000000000000003e97 or 4.1999999999999999e50 < z

    1. Initial program 33.2%

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

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

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

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

    if -6.6000000000000003e97 < z < 1.20000000000000007e-46 or 14500 < z < 4.1999999999999999e50

    1. Initial program 86.8%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(1 + -1 \cdot \frac{y}{a}\right) \cdot x} \]
    8. 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)} \]
    9. Simplified52.2%

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

    if 1.20000000000000007e-46 < z < 14500

    1. Initial program 86.2%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.6 \cdot 10^{+97}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{-46}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 14500:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{+50}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 16: 57.0% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;x \leq 2.05 \cdot 10^{+157}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.09999999999999995e183 or 7.2000000000000002e-24 < x < 2.05000000000000008e157

    1. Initial program 59.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.09999999999999995e183 < x < 7.2000000000000002e-24

    1. Initial program 71.7%

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

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

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

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

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

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

    if 2.05000000000000008e157 < x

    1. Initial program 52.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.1 \cdot 10^{+183}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;x \leq 7.2 \cdot 10^{-24}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;x \leq 2.05 \cdot 10^{+157}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \end{array} \]

Alternative 17: 70.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.6 \cdot 10^{-15} \lor \neg \left(z \leq 5 \cdot 10^{-14}\right):\\
\;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.6000000000000004e-15 or 5.0000000000000002e-14 < z

    1. Initial program 42.4%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \color{blue}{\frac{y}{\frac{z}{t - x}}} \]
      5. associate-/r/75.2%

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

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

    if -7.6000000000000004e-15 < z < 5.0000000000000002e-14

    1. Initial program 90.8%

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

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

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

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

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

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

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

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

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

Alternative 18: 51.9% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{+26} \lor \neg \left(z \leq 2.4 \cdot 10^{-50}\right):\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.20000000000000007e26 or 2.40000000000000002e-50 < z

    1. Initial program 45.0%

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

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

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

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

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

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

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

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

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

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

    if -2.20000000000000007e26 < z < 2.40000000000000002e-50

    1. Initial program 88.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 19: 38.7% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -7.9 \cdot 10^{-16}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.22 \cdot 10^{-24}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -7.9e-16) t (if (<= z 1.22e-24) x t)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -7.9e-16) {
		tmp = t;
	} else if (z <= 1.22e-24) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-7.9d-16)) then
        tmp = t
    else if (z <= 1.22d-24) then
        tmp = x
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -7.9e-16) {
		tmp = t;
	} else if (z <= 1.22e-24) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -7.9e-16:
		tmp = t
	elif z <= 1.22e-24:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -7.9e-16)
		tmp = t;
	elseif (z <= 1.22e-24)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -7.9e-16)
		tmp = t;
	elseif (z <= 1.22e-24)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7.9e-16], t, If[LessEqual[z, 1.22e-24], x, t]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 1.22 \cdot 10^{-24}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.9000000000000002e-16 or 1.22000000000000004e-24 < z

    1. Initial program 42.8%

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

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

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

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

    if -7.9000000000000002e-16 < z < 1.22000000000000004e-24

    1. Initial program 90.8%

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

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

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification38.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.9 \cdot 10^{-16}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.22 \cdot 10^{-24}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 20: 25.3% 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 66.2%

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

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

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

    \[\leadsto \color{blue}{t} \]
  5. Final simplification24.8%

    \[\leadsto t \]

Developer target: 83.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
\mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023208 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
  :precision binary64

  :herbie-target
  (if (< z -1.2536131056095036e+188) (- t (* (/ y z) (- t x))) (if (< z 4.446702369113811e+64) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x)))))

  (+ x (/ (* (- y z) (- t x)) (- a z))))