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

Percentage Accurate: 67.7% → 90.2%
Time: 24.1s
Alternatives: 20
Speedup: 0.9×

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: 67.7% accurate, 1.0× speedup?

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

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

Alternative 1: 90.2% accurate, 0.1× speedup?

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

\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\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.9999999999999996e-281

    1. Initial program 74.9%

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

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

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

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

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

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

    1. Initial program 4.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 90.2% accurate, 0.3× speedup?

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

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

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

    1. Initial program 73.4%

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

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

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

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

    1. Initial program 4.9%

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

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

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

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

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

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

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

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

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

Alternative 3: 90.2% accurate, 0.3× speedup?

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

\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\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.9999999999999996e-281

    1. Initial program 74.9%

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

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

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

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

    1. Initial program 4.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 47.1% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq -9.2 \cdot 10^{-113}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 4.6 \cdot 10^{-175}:\\
\;\;\;\;t_1\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if a < -9.8e19

    1. Initial program 65.9%

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

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

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

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

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

    if -9.8e19 < a < -9.20000000000000032e-113

    1. Initial program 63.2%

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

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

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

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

    if -9.20000000000000032e-113 < a < -1.3500000000000001e-200

    1. Initial program 81.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{z}{y - a}}} \]
      3. un-div-inv49.5%

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - a}}} \]
    11. Applied egg-rr49.5%

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - a}}} \]
    12. Step-by-step derivation
      1. associate-/r/53.7%

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

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

    if -1.3500000000000001e-200 < a < 4.6e-175 or 1.3200000000000001e-70 < a < 5.5000000000000001e-22

    1. Initial program 60.3%

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

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

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

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

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

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

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

    if 4.6e-175 < a < 4.50000000000000023e-162

    1. Initial program 50.9%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-1 \cdot y}{a - z}} \cdot x \]
      2. neg-mul-1100.0%

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

      \[\leadsto \color{blue}{\frac{-y}{a - z}} \cdot x \]
    10. Taylor expanded in y around 0 100.0%

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot x}{a - z}} \]
    11. Step-by-step derivation
      1. mul-1-neg100.0%

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

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

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

    if 4.50000000000000023e-162 < a < 1.3200000000000001e-70

    1. Initial program 84.6%

      \[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 x around 0 65.2%

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

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

    if 5.5000000000000001e-22 < a

    1. Initial program 72.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.8 \cdot 10^{+19}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;a \leq -9.2 \cdot 10^{-113}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq -1.35 \cdot 10^{-200}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 4.6 \cdot 10^{-175}:\\ \;\;\;\;\frac{t \cdot \left(z - y\right)}{z}\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{-162}:\\ \;\;\;\;\frac{-y}{\frac{a - z}{x}}\\ \mathbf{elif}\;a \leq 1.32 \cdot 10^{-70}:\\ \;\;\;\;\frac{y \cdot t}{a - z}\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{-22}:\\ \;\;\;\;\frac{t \cdot \left(z - y\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \end{array} \]

Alternative 5: 38.4% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{t - x}{a}\\ \mathbf{if}\;a \leq -5.1 \cdot 10^{+113}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -9.2 \cdot 10^{+21}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.2 \cdot 10^{-113}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq -3.4 \cdot 10^{-304}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;a \leq 2.05 \cdot 10^{-177}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 3.1 \cdot 10^{+31}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- t x) a))))
   (if (<= a -5.1e+113)
     x
     (if (<= a -9.2e+21)
       t_1
       (if (<= a -1.2e-113)
         t
         (if (<= a -3.4e-304)
           (/ y (/ z x))
           (if (<= a 2.05e-177) t (if (<= a 3.1e+31) t_1 x))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((t - x) / a);
	double tmp;
	if (a <= -5.1e+113) {
		tmp = x;
	} else if (a <= -9.2e+21) {
		tmp = t_1;
	} else if (a <= -1.2e-113) {
		tmp = t;
	} else if (a <= -3.4e-304) {
		tmp = y / (z / x);
	} else if (a <= 2.05e-177) {
		tmp = t;
	} else if (a <= 3.1e+31) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y * ((t - x) / a)
    if (a <= (-5.1d+113)) then
        tmp = x
    else if (a <= (-9.2d+21)) then
        tmp = t_1
    else if (a <= (-1.2d-113)) then
        tmp = t
    else if (a <= (-3.4d-304)) then
        tmp = y / (z / x)
    else if (a <= 2.05d-177) then
        tmp = t
    else if (a <= 3.1d+31) then
        tmp = t_1
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((t - x) / a);
	double tmp;
	if (a <= -5.1e+113) {
		tmp = x;
	} else if (a <= -9.2e+21) {
		tmp = t_1;
	} else if (a <= -1.2e-113) {
		tmp = t;
	} else if (a <= -3.4e-304) {
		tmp = y / (z / x);
	} else if (a <= 2.05e-177) {
		tmp = t;
	} else if (a <= 3.1e+31) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((t - x) / a)
	tmp = 0
	if a <= -5.1e+113:
		tmp = x
	elif a <= -9.2e+21:
		tmp = t_1
	elif a <= -1.2e-113:
		tmp = t
	elif a <= -3.4e-304:
		tmp = y / (z / x)
	elif a <= 2.05e-177:
		tmp = t
	elif a <= 3.1e+31:
		tmp = t_1
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(t - x) / a))
	tmp = 0.0
	if (a <= -5.1e+113)
		tmp = x;
	elseif (a <= -9.2e+21)
		tmp = t_1;
	elseif (a <= -1.2e-113)
		tmp = t;
	elseif (a <= -3.4e-304)
		tmp = Float64(y / Float64(z / x));
	elseif (a <= 2.05e-177)
		tmp = t;
	elseif (a <= 3.1e+31)
		tmp = t_1;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((t - x) / a);
	tmp = 0.0;
	if (a <= -5.1e+113)
		tmp = x;
	elseif (a <= -9.2e+21)
		tmp = t_1;
	elseif (a <= -1.2e-113)
		tmp = t;
	elseif (a <= -3.4e-304)
		tmp = y / (z / x);
	elseif (a <= 2.05e-177)
		tmp = t;
	elseif (a <= 3.1e+31)
		tmp = t_1;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.1e+113], x, If[LessEqual[a, -9.2e+21], t$95$1, If[LessEqual[a, -1.2e-113], t, If[LessEqual[a, -3.4e-304], N[(y / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.05e-177], t, If[LessEqual[a, 3.1e+31], t$95$1, x]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -9.2 \cdot 10^{+21}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;a \leq 2.05 \cdot 10^{-177}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 3.1 \cdot 10^{+31}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -5.09999999999999994e113 or 3.1000000000000002e31 < a

    1. Initial program 69.0%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/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 a around inf 57.3%

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

    if -5.09999999999999994e113 < a < -9.2e21 or 2.05e-177 < a < 3.1000000000000002e31

    1. Initial program 74.8%

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

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

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

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

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

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

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

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

    if -9.2e21 < a < -1.20000000000000006e-113 or -3.3999999999999999e-304 < a < 2.05e-177

    1. Initial program 56.3%

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

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

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

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

    if -1.20000000000000006e-113 < a < -3.3999999999999999e-304

    1. Initial program 73.7%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.1 \cdot 10^{+113}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -9.2 \cdot 10^{+21}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq -1.2 \cdot 10^{-113}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq -3.4 \cdot 10^{-304}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;a \leq 2.05 \cdot 10^{-177}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 3.1 \cdot 10^{+31}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 6: 44.6% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;a \leq -4.1 \cdot 10^{-114}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 1.95 \cdot 10^{-181}:\\
\;\;\;\;t\\

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

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

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


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

    1. Initial program 65.9%

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

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

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

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

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

    if -4.8e18 < a < -4.0999999999999997e-114 or -1.84999999999999989e-305 < a < 1.95e-181

    1. Initial program 54.5%

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

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

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

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

    if -4.0999999999999997e-114 < a < -1.84999999999999989e-305

    1. Initial program 73.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y - a}{z}} \]
      2. clear-num45.8%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{z}{y - a}}} \]
      3. un-div-inv45.9%

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - a}}} \]
    11. Applied egg-rr45.9%

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - a}}} \]
    12. Step-by-step derivation
      1. associate-/r/48.1%

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

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

    if 1.95e-181 < a < 7.60000000000000041e-157

    1. Initial program 58.6%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-1 \cdot y}{a - z}} \cdot x \]
      2. neg-mul-172.4%

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

      \[\leadsto \color{blue}{\frac{-y}{a - z}} \cdot x \]
    10. Taylor expanded in y around 0 72.4%

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot x}{a - z}} \]
    11. Step-by-step derivation
      1. mul-1-neg72.4%

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

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

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

    if 7.60000000000000041e-157 < a < 2.99999999999999973e-8

    1. Initial program 81.5%

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

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

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

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

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

    if 2.99999999999999973e-8 < a

    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/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. Taylor expanded in z around 0 70.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.8 \cdot 10^{+18}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;a \leq -4.1 \cdot 10^{-114}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq -1.85 \cdot 10^{-305}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 1.95 \cdot 10^{-181}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 7.6 \cdot 10^{-157}:\\ \;\;\;\;\frac{-y}{\frac{a - z}{x}}\\ \mathbf{elif}\;a \leq 3 \cdot 10^{-8}:\\ \;\;\;\;\frac{y \cdot t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \end{array} \]

Alternative 7: 69.0% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;a \leq 40000000000:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -7.2e18 or 6.4999999999999998e37 < a

    1. Initial program 69.2%

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

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

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

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

    if -7.2e18 < a < 9.49999999999999953e-144

    1. Initial program 63.1%

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

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

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

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

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

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

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

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

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

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

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

    if 9.49999999999999953e-144 < a < 4e10

    1. Initial program 83.7%

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

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

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

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

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

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

    if 4e10 < a < 6.4999999999999998e37

    1. Initial program 52.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y - a}{z}} \]
      2. clear-num67.4%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{z}{y - a}}} \]
      3. un-div-inv67.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.2 \cdot 10^{+18}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{-144}:\\ \;\;\;\;t - \frac{y}{\frac{z}{t - x}}\\ \mathbf{elif}\;a \leq 40000000000:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{+37}:\\ \;\;\;\;\frac{x}{\frac{z}{y - a}}\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \end{array} \]

Alternative 8: 69.0% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;a \leq 195000000000:\\
\;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -9.8000000000000006e23 or 1.85e37 < a

    1. Initial program 69.2%

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

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

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

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

    if -9.8000000000000006e23 < a < 5.8000000000000004e-144

    1. Initial program 63.1%

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

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

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

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

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

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

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

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

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

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

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

    if 5.8000000000000004e-144 < a < 1.95e11

    1. Initial program 83.7%

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{t \cdot \left(y - z\right)}{a - z}\right)\right)} \]
      2. expm1-udef21.1%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{t \cdot \left(y - z\right)}{a - z}\right)} - 1} \]
      3. associate-/l*24.9%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{t}{\frac{a - z}{y - z}}}\right)} - 1 \]
    6. Applied egg-rr24.9%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{t}{\frac{a - z}{y - z}}\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-def36.5%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{t}{\frac{a - z}{y - z}}\right)\right)} \]
      2. expm1-log1p69.9%

        \[\leadsto \color{blue}{\frac{t}{\frac{a - z}{y - z}}} \]
    8. Simplified69.9%

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

    if 1.95e11 < a < 1.85e37

    1. Initial program 52.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y - a}{z}} \]
      2. clear-num67.4%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{z}{y - a}}} \]
      3. un-div-inv67.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.8 \cdot 10^{+23}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 5.8 \cdot 10^{-144}:\\ \;\;\;\;t - \frac{y}{\frac{z}{t - x}}\\ \mathbf{elif}\;a \leq 195000000000:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \mathbf{elif}\;a \leq 1.85 \cdot 10^{+37}:\\ \;\;\;\;\frac{x}{\frac{z}{y - a}}\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \end{array} \]

Alternative 9: 69.3% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;a \leq 155000000000:\\
\;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.45999999999999996e23 or 1.7e60 < a

    1. Initial program 69.5%

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

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

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

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

    if -1.45999999999999996e23 < a < 9.49999999999999953e-144

    1. Initial program 63.1%

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

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

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

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

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

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

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

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

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

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

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

    if 9.49999999999999953e-144 < a < 1.55e11

    1. Initial program 83.7%

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{t \cdot \left(y - z\right)}{a - z}\right)\right)} \]
      2. expm1-udef21.1%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{t \cdot \left(y - z\right)}{a - z}\right)} - 1} \]
      3. associate-/l*24.9%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{t}{\frac{a - z}{y - z}}}\right)} - 1 \]
    6. Applied egg-rr24.9%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{t}{\frac{a - z}{y - z}}\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-def36.5%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{t}{\frac{a - z}{y - z}}\right)\right)} \]
      2. expm1-log1p69.9%

        \[\leadsto \color{blue}{\frac{t}{\frac{a - z}{y - z}}} \]
    8. Simplified69.9%

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

    if 1.55e11 < a < 1.7e60

    1. Initial program 52.2%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.46 \cdot 10^{+23}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{-144}:\\ \;\;\;\;t - \frac{y}{\frac{z}{t - x}}\\ \mathbf{elif}\;a \leq 155000000000:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{+60}:\\ \;\;\;\;t + \frac{y - a}{\frac{z}{x}}\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \end{array} \]

Alternative 10: 53.1% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \leq -2 \cdot 10^{-115}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 8.5 \cdot 10^{-23}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 65.9%

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

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

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

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

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

    if -3.1999999999999997e24 < a < -2.0000000000000001e-115 or -6.80000000000000003e-195 < a < 8.4999999999999996e-23

    1. Initial program 65.9%

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

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

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

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

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

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

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

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

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

    if -2.0000000000000001e-115 < a < -6.80000000000000003e-195

    1. Initial program 81.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{z}{y - a}}} \]
      3. un-div-inv49.5%

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - a}}} \]
    11. Applied egg-rr49.5%

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - a}}} \]
    12. Step-by-step derivation
      1. associate-/r/53.7%

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

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

    if 8.4999999999999996e-23 < a

    1. Initial program 72.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.2 \cdot 10^{+24}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;a \leq -2 \cdot 10^{-115}:\\ \;\;\;\;\frac{-t}{\frac{z}{y - z}}\\ \mathbf{elif}\;a \leq -6.8 \cdot 10^{-195}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 8.5 \cdot 10^{-23}:\\ \;\;\;\;\frac{-t}{\frac{z}{y - z}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \end{array} \]

Alternative 11: 37.4% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.4 \cdot 10^{-8}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-228}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -3.4 \cdot 10^{-279}:\\ \;\;\;\;\frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{-146}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{-60}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{+130}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -4.4e-8)
   t
   (if (<= z -4.2e-228)
     x
     (if (<= z -3.4e-279)
       (/ y (/ a t))
       (if (<= z 4.2e-146)
         x
         (if (<= z 2.2e-60) (* x (/ y z)) (if (<= z 2.5e+130) x t)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -4.4e-8) {
		tmp = t;
	} else if (z <= -4.2e-228) {
		tmp = x;
	} else if (z <= -3.4e-279) {
		tmp = y / (a / t);
	} else if (z <= 4.2e-146) {
		tmp = x;
	} else if (z <= 2.2e-60) {
		tmp = x * (y / z);
	} else if (z <= 2.5e+130) {
		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 <= (-4.4d-8)) then
        tmp = t
    else if (z <= (-4.2d-228)) then
        tmp = x
    else if (z <= (-3.4d-279)) then
        tmp = y / (a / t)
    else if (z <= 4.2d-146) then
        tmp = x
    else if (z <= 2.2d-60) then
        tmp = x * (y / z)
    else if (z <= 2.5d+130) 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 <= -4.4e-8) {
		tmp = t;
	} else if (z <= -4.2e-228) {
		tmp = x;
	} else if (z <= -3.4e-279) {
		tmp = y / (a / t);
	} else if (z <= 4.2e-146) {
		tmp = x;
	} else if (z <= 2.2e-60) {
		tmp = x * (y / z);
	} else if (z <= 2.5e+130) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -4.4e-8:
		tmp = t
	elif z <= -4.2e-228:
		tmp = x
	elif z <= -3.4e-279:
		tmp = y / (a / t)
	elif z <= 4.2e-146:
		tmp = x
	elif z <= 2.2e-60:
		tmp = x * (y / z)
	elif z <= 2.5e+130:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -4.4e-8)
		tmp = t;
	elseif (z <= -4.2e-228)
		tmp = x;
	elseif (z <= -3.4e-279)
		tmp = Float64(y / Float64(a / t));
	elseif (z <= 4.2e-146)
		tmp = x;
	elseif (z <= 2.2e-60)
		tmp = Float64(x * Float64(y / z));
	elseif (z <= 2.5e+130)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -4.4e-8)
		tmp = t;
	elseif (z <= -4.2e-228)
		tmp = x;
	elseif (z <= -3.4e-279)
		tmp = y / (a / t);
	elseif (z <= 4.2e-146)
		tmp = x;
	elseif (z <= 2.2e-60)
		tmp = x * (y / z);
	elseif (z <= 2.5e+130)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.4e-8], t, If[LessEqual[z, -4.2e-228], x, If[LessEqual[z, -3.4e-279], N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e-146], x, If[LessEqual[z, 2.2e-60], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e+130], x, t]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -4.2 \cdot 10^{-228}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 4.2 \cdot 10^{-146}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 2.5 \cdot 10^{+130}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -4.3999999999999997e-8 or 2.4999999999999998e130 < z

    1. Initial program 41.0%

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

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

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

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

    if -4.3999999999999997e-8 < z < -4.19999999999999982e-228 or -3.40000000000000015e-279 < z < 4.1999999999999998e-146 or 2.1999999999999999e-60 < z < 2.4999999999999998e130

    1. Initial program 84.1%

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

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

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

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

    if -4.19999999999999982e-228 < z < -3.40000000000000015e-279

    1. Initial program 78.3%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} \]
    7. Simplified67.9%

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

    if 4.1999999999999998e-146 < z < 2.1999999999999999e-60

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.4 \cdot 10^{-8}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-228}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -3.4 \cdot 10^{-279}:\\ \;\;\;\;\frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{-146}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{-60}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{+130}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 12: 37.4% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.03:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq -1 \cdot 10^{-228}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 4.6 \cdot 10^{-146}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 2.5 \cdot 10^{+130}:\\
\;\;\;\;x\\

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


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

    1. Initial program 41.0%

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

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

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

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

    if -0.029999999999999999 < z < -1.00000000000000003e-228 or -2.99999999999999975e-281 < z < 4.6000000000000001e-146 or 2.6999999999999999e-65 < z < 2.4999999999999998e130

    1. Initial program 84.1%

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

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

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

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

    if -1.00000000000000003e-228 < z < -2.99999999999999975e-281

    1. Initial program 78.3%

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

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

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

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

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

    if 4.6000000000000001e-146 < z < 2.6999999999999999e-65

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.03:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1 \cdot 10^{-228}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -3 \cdot 10^{-281}:\\ \;\;\;\;\frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{-146}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{-65}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{+130}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 13: 47.3% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;z \leq -0.4:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{-229}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.12 \cdot 10^{-277}:\\ \;\;\;\;\frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 4 \cdot 10^{+130}:\\ \;\;\;\;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 -0.4)
     t
     (if (<= z -2.7e-229)
       t_1
       (if (<= z -1.12e-277) (/ (* y t) a) (if (<= z 4e+130) 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 <= -0.4) {
		tmp = t;
	} else if (z <= -2.7e-229) {
		tmp = t_1;
	} else if (z <= -1.12e-277) {
		tmp = (y * t) / a;
	} else if (z <= 4e+130) {
		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 <= (-0.4d0)) then
        tmp = t
    else if (z <= (-2.7d-229)) then
        tmp = t_1
    else if (z <= (-1.12d-277)) then
        tmp = (y * t) / a
    else if (z <= 4d+130) 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 <= -0.4) {
		tmp = t;
	} else if (z <= -2.7e-229) {
		tmp = t_1;
	} else if (z <= -1.12e-277) {
		tmp = (y * t) / a;
	} else if (z <= 4e+130) {
		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 <= -0.4:
		tmp = t
	elif z <= -2.7e-229:
		tmp = t_1
	elif z <= -1.12e-277:
		tmp = (y * t) / a
	elif z <= 4e+130:
		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 <= -0.4)
		tmp = t;
	elseif (z <= -2.7e-229)
		tmp = t_1;
	elseif (z <= -1.12e-277)
		tmp = Float64(Float64(y * t) / a);
	elseif (z <= 4e+130)
		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 <= -0.4)
		tmp = t;
	elseif (z <= -2.7e-229)
		tmp = t_1;
	elseif (z <= -1.12e-277)
		tmp = (y * t) / a;
	elseif (z <= 4e+130)
		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, -0.4], t, If[LessEqual[z, -2.7e-229], t$95$1, If[LessEqual[z, -1.12e-277], N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 4e+130], t$95$1, t]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -2.7 \cdot 10^{-229}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 4 \cdot 10^{+130}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -0.40000000000000002 or 4.0000000000000002e130 < z

    1. Initial program 41.0%

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

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

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

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

    if -0.40000000000000002 < z < -2.6999999999999998e-229 or -1.12000000000000003e-277 < z < 4.0000000000000002e130

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

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

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

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

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

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

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

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

    if -2.6999999999999998e-229 < z < -1.12000000000000003e-277

    1. Initial program 78.3%

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

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

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

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

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

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

Alternative 14: 77.3% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8:\\
\;\;\;\;t - \frac{y}{\frac{z}{t - x}}\\

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

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


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

    1. Initial program 47.9%

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

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

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

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

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

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

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

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

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

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

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

    if -2.7999999999999998 < z < 8.9999999999999994e106

    1. Initial program 87.7%

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

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

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

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

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

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

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

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

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

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

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

    if 8.9999999999999994e106 < z

    1. Initial program 29.9%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.8:\\ \;\;\;\;t - \frac{y}{\frac{z}{t - x}}\\ \mathbf{elif}\;z \leq 9 \cdot 10^{+106}:\\ \;\;\;\;x + \frac{t - x}{\frac{a - z}{y}}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{y - a}{\frac{z}{x}}\\ \end{array} \]

Alternative 15: 50.7% accurate, 1.0× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.80000000000000008e43 or 4.0000000000000002e130 < z

    1. Initial program 37.6%

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

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

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

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

    if -3.80000000000000008e43 < z < -5.5000000000000003e-281

    1. Initial program 85.1%

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

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

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

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

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

    if -5.5000000000000003e-281 < z < 4.0000000000000002e130

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

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

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

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

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

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

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

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

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

Alternative 16: 61.0% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -9 \cdot 10^{+91} \lor \neg \left(x \leq 5.9 \cdot 10^{+82}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -9e91 or 5.8999999999999997e82 < x

    1. Initial program 60.8%

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

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

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

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

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

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

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

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

    if -9e91 < x < 5.8999999999999997e82

    1. Initial program 73.9%

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

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

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

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

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

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

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

Alternative 17: 66.2% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{-14} \lor \neg \left(z \leq 3.2 \cdot 10^{+130}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.5000000000000002e-14 or 3.2e130 < z

    1. Initial program 41.6%

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

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

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

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

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

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

    if -3.5000000000000002e-14 < z < 3.2e130

    1. Initial program 85.7%

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

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

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

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

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

Alternative 18: 37.9% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.35 \cdot 10^{-9}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{-144}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{-64}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{+130}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -1.35e-9)
   t
   (if (<= z 3.7e-144)
     x
     (if (<= z 2.05e-64) (* x (/ y z)) (if (<= z 2.5e+130) x t)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.35e-9) {
		tmp = t;
	} else if (z <= 3.7e-144) {
		tmp = x;
	} else if (z <= 2.05e-64) {
		tmp = x * (y / z);
	} else if (z <= 2.5e+130) {
		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 <= (-1.35d-9)) then
        tmp = t
    else if (z <= 3.7d-144) then
        tmp = x
    else if (z <= 2.05d-64) then
        tmp = x * (y / z)
    else if (z <= 2.5d+130) 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 <= -1.35e-9) {
		tmp = t;
	} else if (z <= 3.7e-144) {
		tmp = x;
	} else if (z <= 2.05e-64) {
		tmp = x * (y / z);
	} else if (z <= 2.5e+130) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -1.35e-9:
		tmp = t
	elif z <= 3.7e-144:
		tmp = x
	elif z <= 2.05e-64:
		tmp = x * (y / z)
	elif z <= 2.5e+130:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -1.35e-9)
		tmp = t;
	elseif (z <= 3.7e-144)
		tmp = x;
	elseif (z <= 2.05e-64)
		tmp = Float64(x * Float64(y / z));
	elseif (z <= 2.5e+130)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -1.35e-9)
		tmp = t;
	elseif (z <= 3.7e-144)
		tmp = x;
	elseif (z <= 2.05e-64)
		tmp = x * (y / z);
	elseif (z <= 2.5e+130)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.35e-9], t, If[LessEqual[z, 3.7e-144], x, If[LessEqual[z, 2.05e-64], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e+130], x, t]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 3.7 \cdot 10^{-144}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 2.5 \cdot 10^{+130}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.3500000000000001e-9 or 2.4999999999999998e130 < z

    1. Initial program 41.0%

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

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

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

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

    if -1.3500000000000001e-9 < z < 3.7000000000000003e-144 or 2.05e-64 < z < 2.4999999999999998e130

    1. Initial program 83.8%

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

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

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

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

    if 3.7000000000000003e-144 < z < 2.05e-64

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.35 \cdot 10^{-9}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{-144}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{-64}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{+130}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 19: 38.8% accurate, 2.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.03:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 7.4 \cdot 10^{+130}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -0.029999999999999999 or 7.4000000000000003e130 < z

    1. Initial program 41.0%

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

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

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

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

    if -0.029999999999999999 < z < 7.4000000000000003e130

    1. Initial program 85.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.03:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 7.4 \cdot 10^{+130}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 20: 25.2% accurate, 13.0× speedup?

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

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

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

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

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

    \[\leadsto \color{blue}{t} \]
  5. Final simplification23.1%

    \[\leadsto t \]

Developer target: 84.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 2023274 
(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))))