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

Percentage Accurate: 67.8% → 90.7%
Time: 25.4s
Alternatives: 26
Speedup: 0.6×

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 26 alternatives:

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

Initial Program: 67.8% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\

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


\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))) < -1e-296

    1. Initial program 72.2%

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

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

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

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

    1. Initial program 3.9%

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

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

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

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

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

        \[\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.8%

        \[\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. div-sub99.8%

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

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

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

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

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

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

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

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

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

    1. Initial program 76.0%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. 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 -1 \cdot 10^{-296}:\\ \;\;\;\;x + \left(x - t\right) \cdot \frac{z - y}{a - z}\\ \mathbf{elif}\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \leq 0:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 59.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(t - x\right) \cdot \frac{y}{a - z}\\ t_2 := x + \frac{t}{\frac{a}{y}}\\ t_3 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;a \leq -1.6 \cdot 10^{+35}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -7.4 \cdot 10^{-89}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -4.7 \cdot 10^{-181}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;a \leq -2.4 \cdot 10^{-198}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{-24}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{+72}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.24 \cdot 10^{+225} \lor \neg \left(a \leq 4.6 \cdot 10^{+241}\right):\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* (- t x) (/ y (- a z))))
        (t_2 (+ x (/ t (/ a y))))
        (t_3 (* t (/ (- y z) (- a z)))))
   (if (<= a -1.6e+35)
     t_2
     (if (<= a -7.4e-89)
       t_1
       (if (<= a -4.7e-181)
         t_3
         (if (<= a -2.4e-198)
           (* y (/ (- t x) (- a z)))
           (if (<= a 2.3e-24)
             t_3
             (if (<= a 3.2e+72)
               t_1
               (if (or (<= a 1.24e+225) (not (<= a 4.6e+241))) t_2 t_3)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (t - x) * (y / (a - z));
	double t_2 = x + (t / (a / y));
	double t_3 = t * ((y - z) / (a - z));
	double tmp;
	if (a <= -1.6e+35) {
		tmp = t_2;
	} else if (a <= -7.4e-89) {
		tmp = t_1;
	} else if (a <= -4.7e-181) {
		tmp = t_3;
	} else if (a <= -2.4e-198) {
		tmp = y * ((t - x) / (a - z));
	} else if (a <= 2.3e-24) {
		tmp = t_3;
	} else if (a <= 3.2e+72) {
		tmp = t_1;
	} else if ((a <= 1.24e+225) || !(a <= 4.6e+241)) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	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 = (t - x) * (y / (a - z))
    t_2 = x + (t / (a / y))
    t_3 = t * ((y - z) / (a - z))
    if (a <= (-1.6d+35)) then
        tmp = t_2
    else if (a <= (-7.4d-89)) then
        tmp = t_1
    else if (a <= (-4.7d-181)) then
        tmp = t_3
    else if (a <= (-2.4d-198)) then
        tmp = y * ((t - x) / (a - z))
    else if (a <= 2.3d-24) then
        tmp = t_3
    else if (a <= 3.2d+72) then
        tmp = t_1
    else if ((a <= 1.24d+225) .or. (.not. (a <= 4.6d+241))) then
        tmp = t_2
    else
        tmp = t_3
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (t - x) * (y / (a - z));
	double t_2 = x + (t / (a / y));
	double t_3 = t * ((y - z) / (a - z));
	double tmp;
	if (a <= -1.6e+35) {
		tmp = t_2;
	} else if (a <= -7.4e-89) {
		tmp = t_1;
	} else if (a <= -4.7e-181) {
		tmp = t_3;
	} else if (a <= -2.4e-198) {
		tmp = y * ((t - x) / (a - z));
	} else if (a <= 2.3e-24) {
		tmp = t_3;
	} else if (a <= 3.2e+72) {
		tmp = t_1;
	} else if ((a <= 1.24e+225) || !(a <= 4.6e+241)) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (t - x) * (y / (a - z))
	t_2 = x + (t / (a / y))
	t_3 = t * ((y - z) / (a - z))
	tmp = 0
	if a <= -1.6e+35:
		tmp = t_2
	elif a <= -7.4e-89:
		tmp = t_1
	elif a <= -4.7e-181:
		tmp = t_3
	elif a <= -2.4e-198:
		tmp = y * ((t - x) / (a - z))
	elif a <= 2.3e-24:
		tmp = t_3
	elif a <= 3.2e+72:
		tmp = t_1
	elif (a <= 1.24e+225) or not (a <= 4.6e+241):
		tmp = t_2
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(t - x) * Float64(y / Float64(a - z)))
	t_2 = Float64(x + Float64(t / Float64(a / y)))
	t_3 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	tmp = 0.0
	if (a <= -1.6e+35)
		tmp = t_2;
	elseif (a <= -7.4e-89)
		tmp = t_1;
	elseif (a <= -4.7e-181)
		tmp = t_3;
	elseif (a <= -2.4e-198)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (a <= 2.3e-24)
		tmp = t_3;
	elseif (a <= 3.2e+72)
		tmp = t_1;
	elseif ((a <= 1.24e+225) || !(a <= 4.6e+241))
		tmp = t_2;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (t - x) * (y / (a - z));
	t_2 = x + (t / (a / y));
	t_3 = t * ((y - z) / (a - z));
	tmp = 0.0;
	if (a <= -1.6e+35)
		tmp = t_2;
	elseif (a <= -7.4e-89)
		tmp = t_1;
	elseif (a <= -4.7e-181)
		tmp = t_3;
	elseif (a <= -2.4e-198)
		tmp = y * ((t - x) / (a - z));
	elseif (a <= 2.3e-24)
		tmp = t_3;
	elseif (a <= 3.2e+72)
		tmp = t_1;
	elseif ((a <= 1.24e+225) || ~((a <= 4.6e+241)))
		tmp = t_2;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.6e+35], t$95$2, If[LessEqual[a, -7.4e-89], t$95$1, If[LessEqual[a, -4.7e-181], t$95$3, If[LessEqual[a, -2.4e-198], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.3e-24], t$95$3, If[LessEqual[a, 3.2e+72], t$95$1, If[Or[LessEqual[a, 1.24e+225], N[Not[LessEqual[a, 4.6e+241]], $MachinePrecision]], t$95$2, t$95$3]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -7.4 \cdot 10^{-89}:\\
\;\;\;\;t\_1\\

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

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

\mathbf{elif}\;a \leq 2.3 \cdot 10^{-24}:\\
\;\;\;\;t\_3\\

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

\mathbf{elif}\;a \leq 1.24 \cdot 10^{+225} \lor \neg \left(a \leq 4.6 \cdot 10^{+241}\right):\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.59999999999999991e35 or 3.2000000000000001e72 < a < 1.24e225 or 4.5999999999999999e241 < a

    1. Initial program 72.1%

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

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

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

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

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

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

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

    if -1.59999999999999991e35 < a < -7.3999999999999995e-89 or 2.3000000000000001e-24 < a < 3.2000000000000001e72

    1. Initial program 75.1%

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

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

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

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

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

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

    if -7.3999999999999995e-89 < a < -4.6999999999999998e-181 or -2.39999999999999986e-198 < a < 2.3000000000000001e-24 or 1.24e225 < a < 4.5999999999999999e241

    1. Initial program 63.1%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t}{\frac{a - z}{y - z}}} \]
    8. Step-by-step derivation
      1. clear-num75.0%

        \[\leadsto \color{blue}{\frac{1}{\frac{\frac{a - z}{y - z}}{t}}} \]
      2. associate-/r/75.0%

        \[\leadsto \color{blue}{\frac{1}{\frac{a - z}{y - z}} \cdot t} \]
      3. clear-num75.1%

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

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

    if -4.6999999999999998e-181 < a < -2.39999999999999986e-198

    1. Initial program 72.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.6 \cdot 10^{+35}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq -7.4 \cdot 10^{-89}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq -4.7 \cdot 10^{-181}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq -2.4 \cdot 10^{-198}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{-24}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{+72}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 1.24 \cdot 10^{+225} \lor \neg \left(a \leq 4.6 \cdot 10^{+241}\right):\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 56.7% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(t - x\right) \cdot \frac{y}{a - z}\\ t_2 := x + \frac{t}{\frac{a}{y}}\\ \mathbf{if}\;a \leq -2.9 \cdot 10^{+35}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -2 \cdot 10^{-91}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -4.8 \cdot 10^{-170}:\\ \;\;\;\;t - \frac{y}{\frac{z}{t}}\\ \mathbf{elif}\;a \leq -3.2 \cdot 10^{-197}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 6.6 \cdot 10^{-175}:\\ \;\;\;\;\frac{-t}{\frac{z}{y - z}}\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{+73}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.12 \cdot 10^{+228} \lor \neg \left(a \leq 4.6 \cdot 10^{+241}\right):\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;\frac{-t}{-1 + \frac{a}{z}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* (- t x) (/ y (- a z)))) (t_2 (+ x (/ t (/ a y)))))
   (if (<= a -2.9e+35)
     t_2
     (if (<= a -2e-91)
       t_1
       (if (<= a -4.8e-170)
         (- t (/ y (/ z t)))
         (if (<= a -3.2e-197)
           (* y (/ (- t x) (- a z)))
           (if (<= a 6.6e-175)
             (/ (- t) (/ z (- y z)))
             (if (<= a 1.7e+73)
               t_1
               (if (or (<= a 1.12e+228) (not (<= a 4.6e+241)))
                 t_2
                 (/ (- t) (+ -1.0 (/ a z))))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (t - x) * (y / (a - z));
	double t_2 = x + (t / (a / y));
	double tmp;
	if (a <= -2.9e+35) {
		tmp = t_2;
	} else if (a <= -2e-91) {
		tmp = t_1;
	} else if (a <= -4.8e-170) {
		tmp = t - (y / (z / t));
	} else if (a <= -3.2e-197) {
		tmp = y * ((t - x) / (a - z));
	} else if (a <= 6.6e-175) {
		tmp = -t / (z / (y - z));
	} else if (a <= 1.7e+73) {
		tmp = t_1;
	} else if ((a <= 1.12e+228) || !(a <= 4.6e+241)) {
		tmp = t_2;
	} else {
		tmp = -t / (-1.0 + (a / z));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (t - x) * (y / (a - z))
    t_2 = x + (t / (a / y))
    if (a <= (-2.9d+35)) then
        tmp = t_2
    else if (a <= (-2d-91)) then
        tmp = t_1
    else if (a <= (-4.8d-170)) then
        tmp = t - (y / (z / t))
    else if (a <= (-3.2d-197)) then
        tmp = y * ((t - x) / (a - z))
    else if (a <= 6.6d-175) then
        tmp = -t / (z / (y - z))
    else if (a <= 1.7d+73) then
        tmp = t_1
    else if ((a <= 1.12d+228) .or. (.not. (a <= 4.6d+241))) then
        tmp = t_2
    else
        tmp = -t / ((-1.0d0) + (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 = (t - x) * (y / (a - z));
	double t_2 = x + (t / (a / y));
	double tmp;
	if (a <= -2.9e+35) {
		tmp = t_2;
	} else if (a <= -2e-91) {
		tmp = t_1;
	} else if (a <= -4.8e-170) {
		tmp = t - (y / (z / t));
	} else if (a <= -3.2e-197) {
		tmp = y * ((t - x) / (a - z));
	} else if (a <= 6.6e-175) {
		tmp = -t / (z / (y - z));
	} else if (a <= 1.7e+73) {
		tmp = t_1;
	} else if ((a <= 1.12e+228) || !(a <= 4.6e+241)) {
		tmp = t_2;
	} else {
		tmp = -t / (-1.0 + (a / z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (t - x) * (y / (a - z))
	t_2 = x + (t / (a / y))
	tmp = 0
	if a <= -2.9e+35:
		tmp = t_2
	elif a <= -2e-91:
		tmp = t_1
	elif a <= -4.8e-170:
		tmp = t - (y / (z / t))
	elif a <= -3.2e-197:
		tmp = y * ((t - x) / (a - z))
	elif a <= 6.6e-175:
		tmp = -t / (z / (y - z))
	elif a <= 1.7e+73:
		tmp = t_1
	elif (a <= 1.12e+228) or not (a <= 4.6e+241):
		tmp = t_2
	else:
		tmp = -t / (-1.0 + (a / z))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(t - x) * Float64(y / Float64(a - z)))
	t_2 = Float64(x + Float64(t / Float64(a / y)))
	tmp = 0.0
	if (a <= -2.9e+35)
		tmp = t_2;
	elseif (a <= -2e-91)
		tmp = t_1;
	elseif (a <= -4.8e-170)
		tmp = Float64(t - Float64(y / Float64(z / t)));
	elseif (a <= -3.2e-197)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (a <= 6.6e-175)
		tmp = Float64(Float64(-t) / Float64(z / Float64(y - z)));
	elseif (a <= 1.7e+73)
		tmp = t_1;
	elseif ((a <= 1.12e+228) || !(a <= 4.6e+241))
		tmp = t_2;
	else
		tmp = Float64(Float64(-t) / Float64(-1.0 + Float64(a / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (t - x) * (y / (a - z));
	t_2 = x + (t / (a / y));
	tmp = 0.0;
	if (a <= -2.9e+35)
		tmp = t_2;
	elseif (a <= -2e-91)
		tmp = t_1;
	elseif (a <= -4.8e-170)
		tmp = t - (y / (z / t));
	elseif (a <= -3.2e-197)
		tmp = y * ((t - x) / (a - z));
	elseif (a <= 6.6e-175)
		tmp = -t / (z / (y - z));
	elseif (a <= 1.7e+73)
		tmp = t_1;
	elseif ((a <= 1.12e+228) || ~((a <= 4.6e+241)))
		tmp = t_2;
	else
		tmp = -t / (-1.0 + (a / z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.9e+35], t$95$2, If[LessEqual[a, -2e-91], t$95$1, If[LessEqual[a, -4.8e-170], N[(t - N[(y / N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -3.2e-197], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.6e-175], N[((-t) / N[(z / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.7e+73], t$95$1, If[Or[LessEqual[a, 1.12e+228], N[Not[LessEqual[a, 4.6e+241]], $MachinePrecision]], t$95$2, N[((-t) / N[(-1.0 + N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -2 \cdot 10^{-91}:\\
\;\;\;\;t\_1\\

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

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

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

\mathbf{elif}\;a \leq 1.7 \cdot 10^{+73}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 1.12 \cdot 10^{+228} \lor \neg \left(a \leq 4.6 \cdot 10^{+241}\right):\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if a < -2.89999999999999995e35 or 1.7000000000000001e73 < a < 1.11999999999999994e228 or 4.5999999999999999e241 < a

    1. Initial program 72.4%

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

        \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t - x}}} \]
    3. Simplified91.5%

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

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

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

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

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

    if -2.89999999999999995e35 < a < -2.00000000000000004e-91 or 6.59999999999999997e-175 < a < 1.7000000000000001e73

    1. Initial program 72.0%

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

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

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

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

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

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

    if -2.00000000000000004e-91 < a < -4.7999999999999999e-170

    1. Initial program 50.1%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-t}{\frac{z}{y - z}}} \]
    11. Taylor expanded in z around 0 74.5%

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

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

        \[\leadsto \color{blue}{t - \frac{t \cdot y}{z}} \]
      3. *-commutative74.5%

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

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

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

    if -4.7999999999999999e-170 < a < -3.1999999999999997e-197

    1. Initial program 73.7%

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

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

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

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

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

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

    if -3.1999999999999997e-197 < a < 6.59999999999999997e-175

    1. Initial program 62.1%

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

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

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

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

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

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

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

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

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

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

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

    if 1.11999999999999994e228 < a < 4.5999999999999999e241

    1. Initial program 81.1%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-t}{\color{blue}{\frac{a}{z} + \left(-\frac{z}{z}\right)}} \]
      6. *-inverses99.7%

        \[\leadsto \frac{-t}{\frac{a}{z} + \left(-\color{blue}{1}\right)} \]
      7. metadata-eval99.7%

        \[\leadsto \frac{-t}{\frac{a}{z} + \color{blue}{-1}} \]
    10. Simplified99.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.9 \cdot 10^{+35}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq -2 \cdot 10^{-91}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq -4.8 \cdot 10^{-170}:\\ \;\;\;\;t - \frac{y}{\frac{z}{t}}\\ \mathbf{elif}\;a \leq -3.2 \cdot 10^{-197}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 6.6 \cdot 10^{-175}:\\ \;\;\;\;\frac{-t}{\frac{z}{y - z}}\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{+73}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 1.12 \cdot 10^{+228} \lor \neg \left(a \leq 4.6 \cdot 10^{+241}\right):\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-t}{-1 + \frac{a}{z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 90.6% accurate, 0.3× speedup?

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

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

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


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

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

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

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

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

    1. Initial program 3.9%

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

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

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

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

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

        \[\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.8%

        \[\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. div-sub99.8%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
  3. Recombined 2 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 -1 \cdot 10^{-296} \lor \neg \left(x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \leq 0\right):\\ \;\;\;\;x + \left(x - t\right) \cdot \frac{z - y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 75.9% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + \frac{x - t}{\frac{z}{y - a}}\\ \mathbf{if}\;z \leq -1.12 \cdot 10^{-38}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{-87}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y - z}}\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{-31} \lor \neg \left(z \leq 3.9 \cdot 10^{+58}\right):\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ t (/ (- x t) (/ z (- y a))))))
   (if (<= z -1.12e-38)
     t_1
     (if (<= z 4.8e-87)
       (+ x (/ (- t x) (/ a (- y z))))
       (if (or (<= z 2.3e-31) (not (<= z 3.9e+58)))
         t_1
         (+ x (/ (- y z) (/ (- a z) t))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t + ((x - t) / (z / (y - a)));
	double tmp;
	if (z <= -1.12e-38) {
		tmp = t_1;
	} else if (z <= 4.8e-87) {
		tmp = x + ((t - x) / (a / (y - z)));
	} else if ((z <= 2.3e-31) || !(z <= 3.9e+58)) {
		tmp = t_1;
	} else {
		tmp = x + ((y - z) / ((a - z) / 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 + ((x - t) / (z / (y - a)))
    if (z <= (-1.12d-38)) then
        tmp = t_1
    else if (z <= 4.8d-87) then
        tmp = x + ((t - x) / (a / (y - z)))
    else if ((z <= 2.3d-31) .or. (.not. (z <= 3.9d+58))) then
        tmp = t_1
    else
        tmp = x + ((y - z) / ((a - z) / 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 + ((x - t) / (z / (y - a)));
	double tmp;
	if (z <= -1.12e-38) {
		tmp = t_1;
	} else if (z <= 4.8e-87) {
		tmp = x + ((t - x) / (a / (y - z)));
	} else if ((z <= 2.3e-31) || !(z <= 3.9e+58)) {
		tmp = t_1;
	} else {
		tmp = x + ((y - z) / ((a - z) / t));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t + ((x - t) / (z / (y - a)))
	tmp = 0
	if z <= -1.12e-38:
		tmp = t_1
	elif z <= 4.8e-87:
		tmp = x + ((t - x) / (a / (y - z)))
	elif (z <= 2.3e-31) or not (z <= 3.9e+58):
		tmp = t_1
	else:
		tmp = x + ((y - z) / ((a - z) / t))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t + Float64(Float64(x - t) / Float64(z / Float64(y - a))))
	tmp = 0.0
	if (z <= -1.12e-38)
		tmp = t_1;
	elseif (z <= 4.8e-87)
		tmp = Float64(x + Float64(Float64(t - x) / Float64(a / Float64(y - z))));
	elseif ((z <= 2.3e-31) || !(z <= 3.9e+58))
		tmp = t_1;
	else
		tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t + ((x - t) / (z / (y - a)));
	tmp = 0.0;
	if (z <= -1.12e-38)
		tmp = t_1;
	elseif (z <= 4.8e-87)
		tmp = x + ((t - x) / (a / (y - z)));
	elseif ((z <= 2.3e-31) || ~((z <= 3.9e+58)))
		tmp = t_1;
	else
		tmp = x + ((y - z) / ((a - z) / t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.12e-38], t$95$1, If[LessEqual[z, 4.8e-87], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 2.3e-31], N[Not[LessEqual[z, 3.9e+58]], $MachinePrecision]], t$95$1, N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq 2.3 \cdot 10^{-31} \lor \neg \left(z \leq 3.9 \cdot 10^{+58}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.1200000000000001e-38 or 4.7999999999999999e-87 < z < 2.2999999999999998e-31 or 3.9000000000000001e58 < z

    1. Initial program 48.4%

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

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

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

      \[\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+68.7%

        \[\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/68.7%

        \[\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/68.7%

        \[\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. div-sub68.7%

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

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

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

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

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

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

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

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

    if -1.1200000000000001e-38 < z < 4.7999999999999999e-87

    1. Initial program 91.3%

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

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

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

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

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

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

    if 2.2999999999999998e-31 < z < 3.9000000000000001e58

    1. Initial program 81.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.12 \cdot 10^{-38}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{-87}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y - z}}\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{-31} \lor \neg \left(z \leq 3.9 \cdot 10^{+58}\right):\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 72.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \left(t - x\right) \cdot \frac{z - y}{a}\\ t_2 := t - x \cdot \frac{a - y}{z}\\ \mathbf{if}\;z \leq -1.2 \cdot 10^{-38}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{-55}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-31}:\\ \;\;\;\;\frac{y \cdot \left(t - x\right)}{a - z}\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{+37}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (* (- t x) (/ (- z y) a)))) (t_2 (- t (* x (/ (- a y) z)))))
   (if (<= z -1.2e-38)
     t_2
     (if (<= z 1.65e-55)
       t_1
       (if (<= z 7.5e-31)
         (/ (* y (- t x)) (- a z))
         (if (<= z 5.5e+37) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - ((t - x) * ((z - y) / a));
	double t_2 = t - (x * ((a - y) / z));
	double tmp;
	if (z <= -1.2e-38) {
		tmp = t_2;
	} else if (z <= 1.65e-55) {
		tmp = t_1;
	} else if (z <= 7.5e-31) {
		tmp = (y * (t - x)) / (a - z);
	} else if (z <= 5.5e+37) {
		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 = x - ((t - x) * ((z - y) / a))
    t_2 = t - (x * ((a - y) / z))
    if (z <= (-1.2d-38)) then
        tmp = t_2
    else if (z <= 1.65d-55) then
        tmp = t_1
    else if (z <= 7.5d-31) then
        tmp = (y * (t - x)) / (a - z)
    else if (z <= 5.5d+37) 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 - ((t - x) * ((z - y) / a));
	double t_2 = t - (x * ((a - y) / z));
	double tmp;
	if (z <= -1.2e-38) {
		tmp = t_2;
	} else if (z <= 1.65e-55) {
		tmp = t_1;
	} else if (z <= 7.5e-31) {
		tmp = (y * (t - x)) / (a - z);
	} else if (z <= 5.5e+37) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - ((t - x) * ((z - y) / a))
	t_2 = t - (x * ((a - y) / z))
	tmp = 0
	if z <= -1.2e-38:
		tmp = t_2
	elif z <= 1.65e-55:
		tmp = t_1
	elif z <= 7.5e-31:
		tmp = (y * (t - x)) / (a - z)
	elif z <= 5.5e+37:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(Float64(t - x) * Float64(Float64(z - y) / a)))
	t_2 = Float64(t - Float64(x * Float64(Float64(a - y) / z)))
	tmp = 0.0
	if (z <= -1.2e-38)
		tmp = t_2;
	elseif (z <= 1.65e-55)
		tmp = t_1;
	elseif (z <= 7.5e-31)
		tmp = Float64(Float64(y * Float64(t - x)) / Float64(a - z));
	elseif (z <= 5.5e+37)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - ((t - x) * ((z - y) / a));
	t_2 = t - (x * ((a - y) / z));
	tmp = 0.0;
	if (z <= -1.2e-38)
		tmp = t_2;
	elseif (z <= 1.65e-55)
		tmp = t_1;
	elseif (z <= 7.5e-31)
		tmp = (y * (t - x)) / (a - z);
	elseif (z <= 5.5e+37)
		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[(t - x), $MachinePrecision] * N[(N[(z - y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(x * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.2e-38], t$95$2, If[LessEqual[z, 1.65e-55], t$95$1, If[LessEqual[z, 7.5e-31], N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.5e+37], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;z \leq 5.5 \cdot 10^{+37}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.20000000000000011e-38 or 5.50000000000000016e37 < z

    1. Initial program 44.3%

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

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

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

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

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

        \[\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/67.3%

        \[\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. div-sub67.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.20000000000000011e-38 < z < 1.65e-55 or 7.49999999999999975e-31 < z < 5.50000000000000016e37

    1. Initial program 90.3%

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

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

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

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

    if 1.65e-55 < z < 7.49999999999999975e-31

    1. Initial program 99.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.2 \cdot 10^{-38}:\\ \;\;\;\;t - x \cdot \frac{a - y}{z}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{-55}:\\ \;\;\;\;x - \left(t - x\right) \cdot \frac{z - y}{a}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-31}:\\ \;\;\;\;\frac{y \cdot \left(t - x\right)}{a - z}\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{+37}:\\ \;\;\;\;x - \left(t - x\right) \cdot \frac{z - y}{a}\\ \mathbf{else}:\\ \;\;\;\;t - x \cdot \frac{a - y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 72.4% accurate, 0.4× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.9999999999999999e-38 or 2.05999999999999988e37 < z

    1. Initial program 44.3%

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

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

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

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

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

        \[\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/67.3%

        \[\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. div-sub67.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.9999999999999999e-38 < z < 1.69999999999999986e-55

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

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

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

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

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

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

    if 1.69999999999999986e-55 < z < 1.0500000000000001e-30

    1. Initial program 99.6%

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

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

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

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

    if 1.0500000000000001e-30 < z < 2.05999999999999988e37

    1. Initial program 82.4%

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

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

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

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

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

Alternative 8: 75.8% accurate, 0.4× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.70000000000000015e-39 or 1.00000000000000005e57 < z

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

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 67.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+67.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/67.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/67.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. div-sub67.6%

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

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

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

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

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

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

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

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

    if -3.70000000000000015e-39 < z < 4.7000000000000001e-87

    1. Initial program 91.3%

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

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

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

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

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

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

    if 4.7000000000000001e-87 < z < 3.59999999999999974e-29

    1. Initial program 92.8%

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

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

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

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

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

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

    if 3.59999999999999974e-29 < z < 1.00000000000000005e57

    1. Initial program 81.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.7 \cdot 10^{-39}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\ \mathbf{elif}\;z \leq 4.7 \cdot 10^{-87}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y - z}}\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{-29}:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \mathbf{elif}\;z \leq 10^{+57}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 66.0% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - y \cdot \frac{x - t}{a}\\ t_2 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;z \leq -6.4 \cdot 10^{-81}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{-55}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{-27}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 4.1 \cdot 10^{+37}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (* y (/ (- x t) a)))) (t_2 (* t (/ (- y z) (- a z)))))
   (if (<= z -6.4e-81)
     t_2
     (if (<= z 1.65e-55)
       t_1
       (if (<= z 1.25e-27)
         (* y (/ (- t x) (- a z)))
         (if (<= z 4.1e+37) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (y * ((x - t) / a));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -6.4e-81) {
		tmp = t_2;
	} else if (z <= 1.65e-55) {
		tmp = t_1;
	} else if (z <= 1.25e-27) {
		tmp = y * ((t - x) / (a - z));
	} else if (z <= 4.1e+37) {
		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 = x - (y * ((x - t) / a))
    t_2 = t * ((y - z) / (a - z))
    if (z <= (-6.4d-81)) then
        tmp = t_2
    else if (z <= 1.65d-55) then
        tmp = t_1
    else if (z <= 1.25d-27) then
        tmp = y * ((t - x) / (a - z))
    else if (z <= 4.1d+37) 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 * ((x - t) / a));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -6.4e-81) {
		tmp = t_2;
	} else if (z <= 1.65e-55) {
		tmp = t_1;
	} else if (z <= 1.25e-27) {
		tmp = y * ((t - x) / (a - z));
	} else if (z <= 4.1e+37) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (y * ((x - t) / a))
	t_2 = t * ((y - z) / (a - z))
	tmp = 0
	if z <= -6.4e-81:
		tmp = t_2
	elif z <= 1.65e-55:
		tmp = t_1
	elif z <= 1.25e-27:
		tmp = y * ((t - x) / (a - z))
	elif z <= 4.1e+37:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(y * Float64(Float64(x - t) / a)))
	t_2 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	tmp = 0.0
	if (z <= -6.4e-81)
		tmp = t_2;
	elseif (z <= 1.65e-55)
		tmp = t_1;
	elseif (z <= 1.25e-27)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (z <= 4.1e+37)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (y * ((x - t) / a));
	t_2 = t * ((y - z) / (a - z));
	tmp = 0.0;
	if (z <= -6.4e-81)
		tmp = t_2;
	elseif (z <= 1.65e-55)
		tmp = t_1;
	elseif (z <= 1.25e-27)
		tmp = y * ((t - x) / (a - z));
	elseif (z <= 4.1e+37)
		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[(y * N[(N[(x - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.4e-81], t$95$2, If[LessEqual[z, 1.65e-55], t$95$1, If[LessEqual[z, 1.25e-27], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.1e+37], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;z \leq 4.1 \cdot 10^{+37}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.4e-81 or 4.0999999999999998e37 < z

    1. Initial program 47.3%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t}{\frac{a - z}{y - z}}} \]
    8. Step-by-step derivation
      1. clear-num61.5%

        \[\leadsto \color{blue}{\frac{1}{\frac{\frac{a - z}{y - z}}{t}}} \]
      2. associate-/r/61.6%

        \[\leadsto \color{blue}{\frac{1}{\frac{a - z}{y - z}} \cdot t} \]
      3. clear-num61.6%

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

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

    if -6.4e-81 < z < 1.65e-55 or 1.25e-27 < z < 4.0999999999999998e37

    1. Initial program 89.7%

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

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

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

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

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

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

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

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

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

    if 1.65e-55 < z < 1.25e-27

    1. Initial program 99.6%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.4 \cdot 10^{-81}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{-55}:\\ \;\;\;\;x - y \cdot \frac{x - t}{a}\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{-27}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 4.1 \cdot 10^{+37}:\\ \;\;\;\;x - y \cdot \frac{x - t}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 67.0% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(t - x\right) \cdot \frac{y}{a}\\ t_2 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;z \leq -9.6 \cdot 10^{-80}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 1.06 \cdot 10^{-55}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{-27}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 1.28 \cdot 10^{+39}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (- t x) (/ y a)))) (t_2 (* t (/ (- y z) (- a z)))))
   (if (<= z -9.6e-80)
     t_2
     (if (<= z 1.06e-55)
       t_1
       (if (<= z 1.95e-27)
         (* y (/ (- t x) (- a z)))
         (if (<= z 1.28e+39) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((t - x) * (y / a));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -9.6e-80) {
		tmp = t_2;
	} else if (z <= 1.06e-55) {
		tmp = t_1;
	} else if (z <= 1.95e-27) {
		tmp = y * ((t - x) / (a - z));
	} else if (z <= 1.28e+39) {
		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 = x + ((t - x) * (y / a))
    t_2 = t * ((y - z) / (a - z))
    if (z <= (-9.6d-80)) then
        tmp = t_2
    else if (z <= 1.06d-55) then
        tmp = t_1
    else if (z <= 1.95d-27) then
        tmp = y * ((t - x) / (a - z))
    else if (z <= 1.28d+39) 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 + ((t - x) * (y / a));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -9.6e-80) {
		tmp = t_2;
	} else if (z <= 1.06e-55) {
		tmp = t_1;
	} else if (z <= 1.95e-27) {
		tmp = y * ((t - x) / (a - z));
	} else if (z <= 1.28e+39) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((t - x) * (y / a))
	t_2 = t * ((y - z) / (a - z))
	tmp = 0
	if z <= -9.6e-80:
		tmp = t_2
	elif z <= 1.06e-55:
		tmp = t_1
	elif z <= 1.95e-27:
		tmp = y * ((t - x) / (a - z))
	elif z <= 1.28e+39:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(t - x) * Float64(y / a)))
	t_2 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	tmp = 0.0
	if (z <= -9.6e-80)
		tmp = t_2;
	elseif (z <= 1.06e-55)
		tmp = t_1;
	elseif (z <= 1.95e-27)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (z <= 1.28e+39)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((t - x) * (y / a));
	t_2 = t * ((y - z) / (a - z));
	tmp = 0.0;
	if (z <= -9.6e-80)
		tmp = t_2;
	elseif (z <= 1.06e-55)
		tmp = t_1;
	elseif (z <= 1.95e-27)
		tmp = y * ((t - x) / (a - z));
	elseif (z <= 1.28e+39)
		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[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9.6e-80], t$95$2, If[LessEqual[z, 1.06e-55], t$95$1, If[LessEqual[z, 1.95e-27], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.28e+39], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 1.06 \cdot 10^{-55}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 1.28 \cdot 10^{+39}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -9.5999999999999996e-80 or 1.27999999999999994e39 < z

    1. Initial program 47.3%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t}{\frac{a - z}{y - z}}} \]
    8. Step-by-step derivation
      1. clear-num61.5%

        \[\leadsto \color{blue}{\frac{1}{\frac{\frac{a - z}{y - z}}{t}}} \]
      2. associate-/r/61.6%

        \[\leadsto \color{blue}{\frac{1}{\frac{a - z}{y - z}} \cdot t} \]
      3. clear-num61.6%

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

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

    if -9.5999999999999996e-80 < z < 1.06e-55 or 1.94999999999999986e-27 < z < 1.27999999999999994e39

    1. Initial program 89.7%

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

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

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

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

    if 1.06e-55 < z < 1.94999999999999986e-27

    1. Initial program 99.6%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.6 \cdot 10^{-80}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 1.06 \cdot 10^{-55}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{-27}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 1.28 \cdot 10^{+39}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 67.0% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(t - x\right) \cdot \frac{y}{a}\\ t_2 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;z \leq -4.2 \cdot 10^{-80}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-55}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{-31}:\\ \;\;\;\;\frac{y \cdot \left(t - x\right)}{a - z}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{+37}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (- t x) (/ y a)))) (t_2 (* t (/ (- y z) (- a z)))))
   (if (<= z -4.2e-80)
     t_2
     (if (<= z 1.7e-55)
       t_1
       (if (<= z 1.35e-31)
         (/ (* y (- t x)) (- a z))
         (if (<= z 1.3e+37) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((t - x) * (y / a));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -4.2e-80) {
		tmp = t_2;
	} else if (z <= 1.7e-55) {
		tmp = t_1;
	} else if (z <= 1.35e-31) {
		tmp = (y * (t - x)) / (a - z);
	} else if (z <= 1.3e+37) {
		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 = x + ((t - x) * (y / a))
    t_2 = t * ((y - z) / (a - z))
    if (z <= (-4.2d-80)) then
        tmp = t_2
    else if (z <= 1.7d-55) then
        tmp = t_1
    else if (z <= 1.35d-31) then
        tmp = (y * (t - x)) / (a - z)
    else if (z <= 1.3d+37) 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 + ((t - x) * (y / a));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -4.2e-80) {
		tmp = t_2;
	} else if (z <= 1.7e-55) {
		tmp = t_1;
	} else if (z <= 1.35e-31) {
		tmp = (y * (t - x)) / (a - z);
	} else if (z <= 1.3e+37) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((t - x) * (y / a))
	t_2 = t * ((y - z) / (a - z))
	tmp = 0
	if z <= -4.2e-80:
		tmp = t_2
	elif z <= 1.7e-55:
		tmp = t_1
	elif z <= 1.35e-31:
		tmp = (y * (t - x)) / (a - z)
	elif z <= 1.3e+37:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(t - x) * Float64(y / a)))
	t_2 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	tmp = 0.0
	if (z <= -4.2e-80)
		tmp = t_2;
	elseif (z <= 1.7e-55)
		tmp = t_1;
	elseif (z <= 1.35e-31)
		tmp = Float64(Float64(y * Float64(t - x)) / Float64(a - z));
	elseif (z <= 1.3e+37)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((t - x) * (y / a));
	t_2 = t * ((y - z) / (a - z));
	tmp = 0.0;
	if (z <= -4.2e-80)
		tmp = t_2;
	elseif (z <= 1.7e-55)
		tmp = t_1;
	elseif (z <= 1.35e-31)
		tmp = (y * (t - x)) / (a - z);
	elseif (z <= 1.3e+37)
		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[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.2e-80], t$95$2, If[LessEqual[z, 1.7e-55], t$95$1, If[LessEqual[z, 1.35e-31], N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.3e+37], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 1.7 \cdot 10^{-55}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 1.3 \cdot 10^{+37}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.20000000000000003e-80 or 1.3e37 < z

    1. Initial program 47.3%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t}{\frac{a - z}{y - z}}} \]
    8. Step-by-step derivation
      1. clear-num61.5%

        \[\leadsto \color{blue}{\frac{1}{\frac{\frac{a - z}{y - z}}{t}}} \]
      2. associate-/r/61.6%

        \[\leadsto \color{blue}{\frac{1}{\frac{a - z}{y - z}} \cdot t} \]
      3. clear-num61.6%

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

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

    if -4.20000000000000003e-80 < z < 1.69999999999999986e-55 or 1.35000000000000007e-31 < z < 1.3e37

    1. Initial program 89.7%

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

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

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

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

    if 1.69999999999999986e-55 < z < 1.35000000000000007e-31

    1. Initial program 99.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{-80}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-55}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{-31}:\\ \;\;\;\;\frac{y \cdot \left(t - x\right)}{a - z}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{+37}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 64.8% accurate, 0.4× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -9.5999999999999996e-80 or 1.9999999999999999e175 < z

    1. Initial program 46.6%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t}{\frac{a - z}{y - z}}} \]
    8. Step-by-step derivation
      1. clear-num65.0%

        \[\leadsto \color{blue}{\frac{1}{\frac{\frac{a - z}{y - z}}{t}}} \]
      2. associate-/r/65.1%

        \[\leadsto \color{blue}{\frac{1}{\frac{a - z}{y - z}} \cdot t} \]
      3. clear-num65.1%

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

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

    if -9.5999999999999996e-80 < z < 1.45e-55

    1. Initial program 90.4%

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

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

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

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

    if 1.45e-55 < z < 2.39999999999999998e82

    1. Initial program 79.5%

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

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

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

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

    if 2.39999999999999998e82 < z < 1.9999999999999999e175

    1. Initial program 40.4%

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

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

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

      \[\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+73.7%

        \[\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/73.7%

        \[\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/73.7%

        \[\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. div-sub73.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 70.3% accurate, 0.4× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.66000000000000006e-38 or 2.30000000000000002e58 < z

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

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 67.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+67.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/67.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/67.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. div-sub67.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.66000000000000006e-38 < z < 1.42e-56

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

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

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

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

    if 1.42e-56 < z < 1.85e35

    1. Initial program 87.7%

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

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

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

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

    if 1.85e35 < z < 2.30000000000000002e58

    1. Initial program 85.6%

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

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

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

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

      \[\leadsto x + \color{blue}{-1 \cdot \frac{t \cdot z}{a - z}} \]
    7. Step-by-step derivation
      1. *-commutative69.2%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.66 \cdot 10^{-38}:\\ \;\;\;\;t - x \cdot \frac{a - y}{z}\\ \mathbf{elif}\;z \leq 1.42 \cdot 10^{-56}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{+35}:\\ \;\;\;\;\frac{y \cdot \left(t - x\right)}{a - z}\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{+58}:\\ \;\;\;\;x - t \cdot \frac{z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t - x \cdot \frac{a - y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 39.1% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq -2.3 \cdot 10^{-47}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 1.06 \cdot 10^{-148}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 1.28 \cdot 10^{+73}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.49999999999999995e35 or 1.2800000000000001e73 < a

    1. Initial program 72.8%

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

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

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

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

    if -1.49999999999999995e35 < a < -2.29999999999999982e-47 or 1.06000000000000003e-148 < a < 1.2800000000000001e73

    1. Initial program 73.2%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
      2. associate-/r/44.0%

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

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

    if -2.29999999999999982e-47 < a < 1.06000000000000003e-148

    1. Initial program 61.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.5 \cdot 10^{+35}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -2.3 \cdot 10^{-47}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 1.06 \cdot 10^{-148}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.28 \cdot 10^{+73}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 55.4% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{t}{\frac{a}{y}}\\ t_2 := t - \frac{y}{\frac{z}{t}}\\ \mathbf{if}\;z \leq -13000:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-75}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{-29}:\\ \;\;\;\;\frac{y}{\frac{z}{x - t}}\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{+38}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ t (/ a y)))) (t_2 (- t (/ y (/ z t)))))
   (if (<= z -13000.0)
     t_2
     (if (<= z 4e-75)
       t_1
       (if (<= z 1.45e-29) (/ y (/ z (- x t))) (if (<= z 3.1e+38) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (t / (a / y));
	double t_2 = t - (y / (z / t));
	double tmp;
	if (z <= -13000.0) {
		tmp = t_2;
	} else if (z <= 4e-75) {
		tmp = t_1;
	} else if (z <= 1.45e-29) {
		tmp = y / (z / (x - t));
	} else if (z <= 3.1e+38) {
		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 = x + (t / (a / y))
    t_2 = t - (y / (z / t))
    if (z <= (-13000.0d0)) then
        tmp = t_2
    else if (z <= 4d-75) then
        tmp = t_1
    else if (z <= 1.45d-29) then
        tmp = y / (z / (x - t))
    else if (z <= 3.1d+38) 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 + (t / (a / y));
	double t_2 = t - (y / (z / t));
	double tmp;
	if (z <= -13000.0) {
		tmp = t_2;
	} else if (z <= 4e-75) {
		tmp = t_1;
	} else if (z <= 1.45e-29) {
		tmp = y / (z / (x - t));
	} else if (z <= 3.1e+38) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (t / (a / y))
	t_2 = t - (y / (z / t))
	tmp = 0
	if z <= -13000.0:
		tmp = t_2
	elif z <= 4e-75:
		tmp = t_1
	elif z <= 1.45e-29:
		tmp = y / (z / (x - t))
	elif z <= 3.1e+38:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(t / Float64(a / y)))
	t_2 = Float64(t - Float64(y / Float64(z / t)))
	tmp = 0.0
	if (z <= -13000.0)
		tmp = t_2;
	elseif (z <= 4e-75)
		tmp = t_1;
	elseif (z <= 1.45e-29)
		tmp = Float64(y / Float64(z / Float64(x - t)));
	elseif (z <= 3.1e+38)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (t / (a / y));
	t_2 = t - (y / (z / t));
	tmp = 0.0;
	if (z <= -13000.0)
		tmp = t_2;
	elseif (z <= 4e-75)
		tmp = t_1;
	elseif (z <= 1.45e-29)
		tmp = y / (z / (x - t));
	elseif (z <= 3.1e+38)
		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[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(y / N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -13000.0], t$95$2, If[LessEqual[z, 4e-75], t$95$1, If[LessEqual[z, 1.45e-29], N[(y / N[(z / N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.1e+38], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 4 \cdot 10^{-75}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 3.1 \cdot 10^{+38}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -13000 or 3.10000000000000018e38 < z

    1. Initial program 41.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t - \frac{t \cdot y}{z}} \]
      3. *-commutative52.5%

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

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

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

    if -13000 < z < 3.9999999999999998e-75 or 1.45000000000000012e-29 < z < 3.10000000000000018e38

    1. Initial program 89.3%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t}{\frac{a}{y}}} \]
    8. Simplified68.5%

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

    if 3.9999999999999998e-75 < z < 1.45000000000000012e-29

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -13000:\\ \;\;\;\;t - \frac{y}{\frac{z}{t}}\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-75}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{-29}:\\ \;\;\;\;\frac{y}{\frac{z}{x - t}}\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{+38}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t - \frac{y}{\frac{z}{t}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 55.4% accurate, 0.5× speedup?

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

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

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

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

\mathbf{elif}\;z \leq 2.2 \cdot 10^{+37}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 47.9%

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

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

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

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

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

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

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

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

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

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

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

    if -7e6 < z < 3.3999999999999999e-76 or 1.4999999999999999e-25 < z < 2.2000000000000001e37

    1. Initial program 89.3%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t}{\frac{a}{y}}} \]
    8. Simplified68.5%

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

    if 3.3999999999999999e-76 < z < 1.4999999999999999e-25

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.2000000000000001e37 < z

    1. Initial program 35.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t - \frac{t \cdot y}{z}} \]
      3. *-commutative55.6%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7000000:\\ \;\;\;\;\frac{-t}{\frac{z}{y - z}}\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{-76}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{-25}:\\ \;\;\;\;\frac{y}{\frac{z}{x - t}}\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{+37}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t - \frac{y}{\frac{z}{t}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 56.1% accurate, 0.5× speedup?

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

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

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

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

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


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

    1. Initial program 47.9%

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

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

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

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

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

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

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

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

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

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

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

    if -2.9e6 < z < 4.2e-125

    1. Initial program 89.5%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t}{\frac{a}{y}}} \]
    8. Simplified70.2%

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

    if 4.2e-125 < z < 1.50000000000000002e149

    1. Initial program 79.5%

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

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

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

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

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

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

    if 1.50000000000000002e149 < z

    1. Initial program 28.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-t}{\frac{a - z}{z}}} \]
      4. div-sub72.5%

        \[\leadsto \frac{-t}{\color{blue}{\frac{a}{z} - \frac{z}{z}}} \]
      5. sub-neg72.5%

        \[\leadsto \frac{-t}{\color{blue}{\frac{a}{z} + \left(-\frac{z}{z}\right)}} \]
      6. *-inverses72.5%

        \[\leadsto \frac{-t}{\frac{a}{z} + \left(-\color{blue}{1}\right)} \]
      7. metadata-eval72.5%

        \[\leadsto \frac{-t}{\frac{a}{z} + \color{blue}{-1}} \]
    10. Simplified72.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2900000:\\ \;\;\;\;\frac{-t}{\frac{z}{y - z}}\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{-125}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{+149}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{-t}{-1 + \frac{a}{z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 70.5% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.16000000000000005e-27

    1. Initial program 72.7%

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

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

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

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

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

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

    if -1.16000000000000005e-27 < a < 5.79999999999999971e-99

    1. Initial program 64.9%

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

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

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

      \[\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.2%

        \[\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.2%

        \[\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.2%

        \[\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. div-sub79.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.79999999999999971e-99 < a

    1. Initial program 71.3%

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

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

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

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

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

Alternative 19: 37.1% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;a \leq 3.2 \cdot 10^{-172}:\\
\;\;\;\;t\\

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


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

    1. Initial program 72.2%

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

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

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

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

    if -4.2e21 < a < -4.69999999999999966e-46

    1. Initial program 84.4%

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.69999999999999966e-46 < a < 3.2000000000000001e-172

    1. Initial program 60.6%

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

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

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

    if 3.2000000000000001e-172 < a

    1. Initial program 71.0%

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

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

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

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

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

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

Alternative 20: 36.5% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;a \leq 2.9 \cdot 10^{-174}:\\
\;\;\;\;t\\

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


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

    1. Initial program 72.7%

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

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

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

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

    if -2.05e21 < a < -1.99999999999999999e-90

    1. Initial program 79.1%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    13. Simplified46.7%

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

    if -1.99999999999999999e-90 < a < 2.9000000000000001e-174

    1. Initial program 60.1%

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

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

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

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

    if 2.9000000000000001e-174 < a

    1. Initial program 71.0%

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

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

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

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

      \[\leadsto x + \color{blue}{t} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification44.5%

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

Alternative 21: 36.8% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;a \leq 3.2 \cdot 10^{-172}:\\
\;\;\;\;t\\

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


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

    1. Initial program 72.5%

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

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

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

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

    if -1.9999999999999999e31 < a < -2.69999999999999985e-45

    1. Initial program 81.7%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    10. Simplified60.9%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{a}} \]
    12. Step-by-step derivation
      1. mul-1-neg33.7%

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

        \[\leadsto -\color{blue}{\frac{x}{\frac{a}{y}}} \]
    13. Simplified42.6%

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

    if -2.69999999999999985e-45 < a < 3.2000000000000001e-172

    1. Initial program 60.6%

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

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

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

    if 3.2000000000000001e-172 < a

    1. Initial program 71.0%

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

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

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

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

      \[\leadsto x + \color{blue}{t} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification44.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2 \cdot 10^{+31}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -2.7 \cdot 10^{-45}:\\ \;\;\;\;\frac{-x}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{-172}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 56.4% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4500000 \lor \neg \left(z \leq 10^{+39}\right):\\
\;\;\;\;t - \frac{y}{\frac{z}{t}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.5e6 or 9.9999999999999994e38 < z

    1. Initial program 41.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t - \frac{t \cdot y}{z}} \]
      3. *-commutative52.5%

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

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

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

    if -4.5e6 < z < 9.9999999999999994e38

    1. Initial program 90.0%

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

        \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t - x}}} \]
    3. Simplified91.0%

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

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

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

        \[\leadsto x + \color{blue}{\frac{t}{\frac{a}{y}}} \]
    8. Simplified66.0%

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

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

Alternative 23: 53.1% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.8e14 or 8.5000000000000005e86 < z

    1. Initial program 37.9%

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

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

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

    if -2.8e14 < z < 8.5000000000000005e86

    1. Initial program 87.9%

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

        \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t - x}}} \]
    3. Simplified90.2%

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

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

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

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

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

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

Alternative 24: 37.4% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;a \leq 3.2 \cdot 10^{-172}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -4.69999999999999965e28

    1. Initial program 73.1%

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

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

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

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

    if -4.69999999999999965e28 < a < 3.2000000000000001e-172

    1. Initial program 64.6%

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

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

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

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

    if 3.2000000000000001e-172 < a

    1. Initial program 71.0%

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

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

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

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

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

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

Alternative 25: 37.8% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq 1.52 \cdot 10^{-46}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -9.49999999999999927e28 or 1.52000000000000006e-46 < a

    1. Initial program 73.3%

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

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

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

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

    if -9.49999999999999927e28 < a < 1.52000000000000006e-46

    1. Initial program 64.5%

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

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

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

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

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

Alternative 26: 25.0% 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 69.0%

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

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

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

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

    \[\leadsto t \]
  7. Add Preprocessing

Developer target: 84.8% 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 2024031 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
  :precision binary64

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

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