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

Percentage Accurate: 69.3% → 91.1%
Time: 20.1s
Alternatives: 16
Speedup: 0.7×

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

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

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

Alternative 1: 91.1% 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^{-274} \lor \neg \left(t\_1 \leq 10^{-282}\right):\\ \;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\ \mathbf{else}:\\ \;\;\;\;t - \frac{x \cdot \left(a - y\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-274) (not (<= t_1 1e-282)))
     (fma (- t x) (/ (- y z) (- a z)) x)
     (- t (/ (* x (- a y)) z)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (((y - z) * (t - x)) / (a - z));
	double tmp;
	if ((t_1 <= -1e-274) || !(t_1 <= 1e-282)) {
		tmp = fma((t - x), ((y - z) / (a - z)), x);
	} else {
		tmp = t - ((x * (a - 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-274) || !(t_1 <= 1e-282))
		tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x);
	else
		tmp = Float64(t - Float64(Float64(x * Float64(a - 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[Or[LessEqual[t$95$1, -1e-274], N[Not[LessEqual[t$95$1, 1e-282]], $MachinePrecision]], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(t - N[(N[(x * N[(a - y), $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^{-274} \lor \neg \left(t\_1 \leq 10^{-282}\right):\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\

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


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

    1. Initial program 72.4%

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

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

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

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

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

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

    if -9.99999999999999966e-275 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 1e-282

    1. Initial program 5.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 88.3% accurate, 0.2× speedup?

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

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

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

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+304}:\\
\;\;\;\;t\_2\\

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


\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))) < -4.99999999999999977e-163 or 4.9999999999999997e304 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

    1. Initial program 61.4%

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

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

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

    if -4.99999999999999977e-163 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 1e-282

    1. Initial program 19.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1e-282 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 4.9999999999999997e304

    1. Initial program 97.0%

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

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

Alternative 3: 58.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(\frac{-y}{a} - -1\right)\\ t_2 := t \cdot \frac{y - z}{a - z}\\ t_3 := t + x \cdot \frac{y}{z}\\ \mathbf{if}\;t \leq -6.2 \cdot 10^{-22}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -4.5 \cdot 10^{-169}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -2.4 \cdot 10^{-211}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{-273}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 6.3 \cdot 10^{-134}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t \leq 2.75 \cdot 10^{-80}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- (/ (- y) a) -1.0)))
        (t_2 (* t (/ (- y z) (- a z))))
        (t_3 (+ t (* x (/ y z)))))
   (if (<= t -6.2e-22)
     t_2
     (if (<= t -4.5e-169)
       t_1
       (if (<= t -2.4e-211)
         t_3
         (if (<= t 5.2e-273)
           t_1
           (if (<= t 6.3e-134) t_3 (if (<= t 2.75e-80) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * ((-y / a) - -1.0);
	double t_2 = t * ((y - z) / (a - z));
	double t_3 = t + (x * (y / z));
	double tmp;
	if (t <= -6.2e-22) {
		tmp = t_2;
	} else if (t <= -4.5e-169) {
		tmp = t_1;
	} else if (t <= -2.4e-211) {
		tmp = t_3;
	} else if (t <= 5.2e-273) {
		tmp = t_1;
	} else if (t <= 6.3e-134) {
		tmp = t_3;
	} else if (t <= 2.75e-80) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = x * ((-y / a) - (-1.0d0))
    t_2 = t * ((y - z) / (a - z))
    t_3 = t + (x * (y / z))
    if (t <= (-6.2d-22)) then
        tmp = t_2
    else if (t <= (-4.5d-169)) then
        tmp = t_1
    else if (t <= (-2.4d-211)) then
        tmp = t_3
    else if (t <= 5.2d-273) then
        tmp = t_1
    else if (t <= 6.3d-134) then
        tmp = t_3
    else if (t <= 2.75d-80) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * ((-y / a) - -1.0);
	double t_2 = t * ((y - z) / (a - z));
	double t_3 = t + (x * (y / z));
	double tmp;
	if (t <= -6.2e-22) {
		tmp = t_2;
	} else if (t <= -4.5e-169) {
		tmp = t_1;
	} else if (t <= -2.4e-211) {
		tmp = t_3;
	} else if (t <= 5.2e-273) {
		tmp = t_1;
	} else if (t <= 6.3e-134) {
		tmp = t_3;
	} else if (t <= 2.75e-80) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * ((-y / a) - -1.0)
	t_2 = t * ((y - z) / (a - z))
	t_3 = t + (x * (y / z))
	tmp = 0
	if t <= -6.2e-22:
		tmp = t_2
	elif t <= -4.5e-169:
		tmp = t_1
	elif t <= -2.4e-211:
		tmp = t_3
	elif t <= 5.2e-273:
		tmp = t_1
	elif t <= 6.3e-134:
		tmp = t_3
	elif t <= 2.75e-80:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(Float64(Float64(-y) / a) - -1.0))
	t_2 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	t_3 = Float64(t + Float64(x * Float64(y / z)))
	tmp = 0.0
	if (t <= -6.2e-22)
		tmp = t_2;
	elseif (t <= -4.5e-169)
		tmp = t_1;
	elseif (t <= -2.4e-211)
		tmp = t_3;
	elseif (t <= 5.2e-273)
		tmp = t_1;
	elseif (t <= 6.3e-134)
		tmp = t_3;
	elseif (t <= 2.75e-80)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * ((-y / a) - -1.0);
	t_2 = t * ((y - z) / (a - z));
	t_3 = t + (x * (y / z));
	tmp = 0.0;
	if (t <= -6.2e-22)
		tmp = t_2;
	elseif (t <= -4.5e-169)
		tmp = t_1;
	elseif (t <= -2.4e-211)
		tmp = t_3;
	elseif (t <= 5.2e-273)
		tmp = t_1;
	elseif (t <= 6.3e-134)
		tmp = t_3;
	elseif (t <= 2.75e-80)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(N[((-y) / a), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t + N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.2e-22], t$95$2, If[LessEqual[t, -4.5e-169], t$95$1, If[LessEqual[t, -2.4e-211], t$95$3, If[LessEqual[t, 5.2e-273], t$95$1, If[LessEqual[t, 6.3e-134], t$95$3, If[LessEqual[t, 2.75e-80], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -4.5 \cdot 10^{-169}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -2.4 \cdot 10^{-211}:\\
\;\;\;\;t\_3\\

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

\mathbf{elif}\;t \leq 6.3 \cdot 10^{-134}:\\
\;\;\;\;t\_3\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -6.20000000000000025e-22 or 2.7499999999999998e-80 < t

    1. Initial program 62.5%

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

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

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

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

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

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

    if -6.20000000000000025e-22 < t < -4.4999999999999999e-169 or -2.4000000000000002e-211 < t < 5.19999999999999967e-273 or 6.2999999999999997e-134 < t < 2.7499999999999998e-80

    1. Initial program 74.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.4999999999999999e-169 < t < -2.4000000000000002e-211 or 5.19999999999999967e-273 < t < 6.2999999999999997e-134

    1. Initial program 70.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.2 \cdot 10^{-22}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;t \leq -4.5 \cdot 10^{-169}:\\ \;\;\;\;x \cdot \left(\frac{-y}{a} - -1\right)\\ \mathbf{elif}\;t \leq -2.4 \cdot 10^{-211}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{-273}:\\ \;\;\;\;x \cdot \left(\frac{-y}{a} - -1\right)\\ \mathbf{elif}\;t \leq 6.3 \cdot 10^{-134}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \mathbf{elif}\;t \leq 2.75 \cdot 10^{-80}:\\ \;\;\;\;x \cdot \left(\frac{-y}{a} - -1\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 38.6% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;z \leq -3.4 \cdot 10^{-236}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 4.8 \cdot 10^{+85}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.7000000000000001e72 or 4.79999999999999993e85 < z

    1. Initial program 35.9%

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

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

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

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

    if -2.7000000000000001e72 < z < -4.69999999999999994e-58 or -3.3999999999999998e-236 < z < 1.15e-111

    1. Initial program 88.1%

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

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

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

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

    if -4.69999999999999994e-58 < z < -3.3999999999999998e-236 or 1.15e-111 < z < 4.79999999999999993e85

    1. Initial program 87.5%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{a - z}} \]
    10. Simplified46.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.7 \cdot 10^{+72}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -4.7 \cdot 10^{-58}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -3.4 \cdot 10^{-236}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{-111}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{+85}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 37.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y}{a}\\ \mathbf{if}\;z \leq -6.4 \cdot 10^{+71}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.05 \cdot 10^{-55}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-236}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-111}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-28}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{+14}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ y a))))
   (if (<= z -6.4e+71)
     t
     (if (<= z -1.05e-55)
       x
       (if (<= z -4.2e-236)
         t_1
         (if (<= z 1.6e-111)
           x
           (if (<= z 1.1e-28) t_1 (if (<= z 7.5e+14) x t))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (y / a);
	double tmp;
	if (z <= -6.4e+71) {
		tmp = t;
	} else if (z <= -1.05e-55) {
		tmp = x;
	} else if (z <= -4.2e-236) {
		tmp = t_1;
	} else if (z <= 1.6e-111) {
		tmp = x;
	} else if (z <= 1.1e-28) {
		tmp = t_1;
	} else if (z <= 7.5e+14) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t * (y / a)
    if (z <= (-6.4d+71)) then
        tmp = t
    else if (z <= (-1.05d-55)) then
        tmp = x
    else if (z <= (-4.2d-236)) then
        tmp = t_1
    else if (z <= 1.6d-111) then
        tmp = x
    else if (z <= 1.1d-28) then
        tmp = t_1
    else if (z <= 7.5d+14) then
        tmp = x
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (y / a);
	double tmp;
	if (z <= -6.4e+71) {
		tmp = t;
	} else if (z <= -1.05e-55) {
		tmp = x;
	} else if (z <= -4.2e-236) {
		tmp = t_1;
	} else if (z <= 1.6e-111) {
		tmp = x;
	} else if (z <= 1.1e-28) {
		tmp = t_1;
	} else if (z <= 7.5e+14) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (y / a)
	tmp = 0
	if z <= -6.4e+71:
		tmp = t
	elif z <= -1.05e-55:
		tmp = x
	elif z <= -4.2e-236:
		tmp = t_1
	elif z <= 1.6e-111:
		tmp = x
	elif z <= 1.1e-28:
		tmp = t_1
	elif z <= 7.5e+14:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(y / a))
	tmp = 0.0
	if (z <= -6.4e+71)
		tmp = t;
	elseif (z <= -1.05e-55)
		tmp = x;
	elseif (z <= -4.2e-236)
		tmp = t_1;
	elseif (z <= 1.6e-111)
		tmp = x;
	elseif (z <= 1.1e-28)
		tmp = t_1;
	elseif (z <= 7.5e+14)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (y / a);
	tmp = 0.0;
	if (z <= -6.4e+71)
		tmp = t;
	elseif (z <= -1.05e-55)
		tmp = x;
	elseif (z <= -4.2e-236)
		tmp = t_1;
	elseif (z <= 1.6e-111)
		tmp = x;
	elseif (z <= 1.1e-28)
		tmp = t_1;
	elseif (z <= 7.5e+14)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.4e+71], t, If[LessEqual[z, -1.05e-55], x, If[LessEqual[z, -4.2e-236], t$95$1, If[LessEqual[z, 1.6e-111], x, If[LessEqual[z, 1.1e-28], t$95$1, If[LessEqual[z, 7.5e+14], x, t]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -4.2 \cdot 10^{-236}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.6 \cdot 10^{-111}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 1.1 \cdot 10^{-28}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 7.5 \cdot 10^{+14}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.40000000000000046e71 or 7.5e14 < z

    1. Initial program 39.5%

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

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

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

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

    if -6.40000000000000046e71 < z < -1.0500000000000001e-55 or -4.19999999999999958e-236 < z < 1.5999999999999999e-111 or 1.09999999999999998e-28 < z < 7.5e14

    1. Initial program 88.9%

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

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

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

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

    if -1.0500000000000001e-55 < z < -4.19999999999999958e-236 or 1.5999999999999999e-111 < z < 1.09999999999999998e-28

    1. Initial program 93.8%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    11. Simplified45.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.4 \cdot 10^{+71}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.05 \cdot 10^{-55}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-236}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-111}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-28}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{+14}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 37.1% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;z \leq -8.5 \cdot 10^{-60}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 6.6 \cdot 10^{-63}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 2.2 \cdot 10^{+54}:\\
\;\;\;\;t \cdot \frac{y}{-z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -5.60000000000000004e71 or 2.1999999999999999e54 < z

    1. Initial program 36.6%

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

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

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

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

    if -5.60000000000000004e71 < z < -8.50000000000000044e-60 or -1.4999999999999999e-239 < z < 6.59999999999999987e-63

    1. Initial program 88.7%

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

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

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

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

    if -8.50000000000000044e-60 < z < -1.4999999999999999e-239

    1. Initial program 93.3%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    11. Simplified46.6%

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

    if 6.59999999999999987e-63 < z < 2.1999999999999999e54

    1. Initial program 86.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.6 \cdot 10^{+71}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -8.5 \cdot 10^{-60}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.5 \cdot 10^{-239}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 6.6 \cdot 10^{-63}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{+54}:\\ \;\;\;\;t \cdot \frac{y}{-z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 56.5% accurate, 0.4× speedup?

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

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

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

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

\mathbf{elif}\;z \leq 1.65 \cdot 10^{-132}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 43.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t - x \cdot \color{blue}{\frac{y}{-z}} \]
    11. Simplified61.1%

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

    if -3.00000000000000006e25 < z < -1.9999999999999999e-60 or -1.2500000000000001e-237 < z < 1.6499999999999999e-132

    1. Initial program 94.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.9999999999999999e-60 < z < -1.2500000000000001e-237

    1. Initial program 93.3%

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

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

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

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

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

    if 1.6499999999999999e-132 < z

    1. Initial program 57.4%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{+25}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -2 \cdot 10^{-60}:\\ \;\;\;\;x \cdot \left(\frac{-y}{a} - -1\right)\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{-237}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{-132}:\\ \;\;\;\;x \cdot \left(\frac{-y}{a} - -1\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 50.6% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq -8.1 \cdot 10^{-178}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 4.9 \cdot 10^{-29}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -4.1000000000000003e38 or 4.8999999999999998e-29 < a

    1. Initial program 64.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.1000000000000003e38 < a < -8.0999999999999997e-178 or -3.69999999999999991e-259 < a < 4.8999999999999998e-29

    1. Initial program 68.2%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{z - y}{z}} \]
    13. Simplified65.3%

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

    if -8.0999999999999997e-178 < a < -3.69999999999999991e-259

    1. Initial program 79.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.1 \cdot 10^{+38}:\\ \;\;\;\;x \cdot \left(\frac{-y}{a} - -1\right)\\ \mathbf{elif}\;a \leq -8.1 \cdot 10^{-178}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;a \leq -3.7 \cdot 10^{-259}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 4.9 \cdot 10^{-29}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\frac{-y}{a} - -1\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 51.4% accurate, 0.5× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.2999999999999999e38 or 5.4999999999999999e-29 < a

    1. Initial program 64.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.2999999999999999e38 < a < -3.9999999999999998e-178 or -9.0000000000000003e-295 < a < 5.4999999999999999e-29

    1. Initial program 68.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.9999999999999998e-178 < a < -9.0000000000000003e-295

    1. Initial program 75.0%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.3 \cdot 10^{+38}:\\ \;\;\;\;x \cdot \left(\frac{-y}{a} - -1\right)\\ \mathbf{elif}\;a \leq -4 \cdot 10^{-178}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;a \leq -9 \cdot 10^{-295}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{-29}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\frac{-y}{a} - -1\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 53.4% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq -5.7 \cdot 10^{-173}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.99999999999999991e38 or 1.05000000000000003e-28 < a

    1. Initial program 64.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.99999999999999991e38 < a < -5.7000000000000001e-173 or -2.94999999999999984e-298 < a < 1.05000000000000003e-28

    1. Initial program 68.1%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{z - y}{z}} \]
    13. Simplified66.8%

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

    if -5.7000000000000001e-173 < a < -2.94999999999999984e-298

    1. Initial program 74.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4 \cdot 10^{+38}:\\ \;\;\;\;x \cdot \left(\frac{-y}{a} - -1\right)\\ \mathbf{elif}\;a \leq -5.7 \cdot 10^{-173}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;a \leq -2.95 \cdot 10^{-298}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 1.05 \cdot 10^{-28}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\frac{-y}{a} - -1\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 48.0% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq -3.6 \cdot 10^{-178}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 2.4 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.2999999999999999e38 or 2.3999999999999999e78 < a

    1. Initial program 66.3%

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

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

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

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

    if -3.2999999999999999e38 < a < -3.59999999999999994e-178 or -3.19999999999999988e-259 < a < 2.3999999999999999e78

    1. Initial program 66.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.59999999999999994e-178 < a < -3.19999999999999988e-259

    1. Initial program 79.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.3 \cdot 10^{+38}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -3.6 \cdot 10^{-178}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;a \leq -3.2 \cdot 10^{-259}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{+78}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 81.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.2 \cdot 10^{+33} \lor \neg \left(a \leq 4.2 \cdot 10^{-159}\right):\\
\;\;\;\;x + \left(z - y\right) \cdot \frac{t - x}{z - a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -6.2e33 or 4.1999999999999998e-159 < a

    1. Initial program 64.1%

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

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

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

    if -6.2e33 < a < 4.1999999999999998e-159

    1. Initial program 70.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 69.5% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -125 \lor \neg \left(z \leq 2.5 \cdot 10^{+21}\right):\\
\;\;\;\;t - y \cdot \frac{t - x}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -125 or 2.5e21 < z

    1. Initial program 43.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -125 < z < 2.5e21

    1. Initial program 93.0%

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

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

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

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

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

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

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

Alternative 14: 65.9% accurate, 0.7× speedup?

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

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

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


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

    1. Initial program 46.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -140 < z < 2.8e21

    1. Initial program 93.0%

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

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

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

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

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

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

    if 2.8e21 < 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*68.6%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -140:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{+21}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 38.8% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;z \leq 8 \cdot 10^{+14}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.9500000000000001e72 or 8e14 < z

    1. Initial program 39.5%

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

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

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

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

    if -2.9500000000000001e72 < z < 8e14

    1. Initial program 91.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.95 \cdot 10^{+72}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 8 \cdot 10^{+14}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 24.8% accurate, 13.0× speedup?

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

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

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

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

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

    \[\leadsto \color{blue}{t} \]
  6. Final simplification24.7%

    \[\leadsto t \]
  7. Add Preprocessing

Developer target: 84.5% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}

Reproduce

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

  :alt
  (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))))