Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3

Percentage Accurate: 96.7% → 99.5%
Time: 16.7s
Alternatives: 16
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))
double code(double x, double y, double z, double t, double a) {
	return x - ((y - z) / (((t - z) + 1.0) / a));
}
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 - z) + 1.0d0) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x - ((y - z) / (((t - z) + 1.0) / a));
}
def code(x, y, z, t, a):
	return x - ((y - z) / (((t - z) + 1.0) / a))
function code(x, y, z, t, a)
	return Float64(x - Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a)))
end
function tmp = code(x, y, z, t, a)
	tmp = x - ((y - z) / (((t - z) + 1.0) / a));
end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 16 alternatives:

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

Initial Program: 96.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))
double code(double x, double y, double z, double t, double a) {
	return x - ((y - z) / (((t - z) + 1.0) / a));
}
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 - z) + 1.0d0) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x - ((y - z) / (((t - z) + 1.0) / a));
}
def code(x, y, z, t, a):
	return x - ((y - z) / (((t - z) + 1.0) / a))
function code(x, y, z, t, a)
	return Float64(x - Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a)))
end
function tmp = code(x, y, z, t, a)
	tmp = x - ((y - z) / (((t - z) + 1.0) / a));
end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 99.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + a \cdot \frac{z - y}{\left(t - z\right) + 1} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (+ x (* a (/ (- z y) (+ (- t z) 1.0)))))
double code(double x, double y, double z, double t, double a) {
	return x + (a * ((z - y) / ((t - z) + 1.0)));
}
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 + (a * ((z - y) / ((t - z) + 1.0d0)))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + (a * ((z - y) / ((t - z) + 1.0)));
}
def code(x, y, z, t, a):
	return x + (a * ((z - y) / ((t - z) + 1.0)))
function code(x, y, z, t, a)
	return Float64(x + Float64(a * Float64(Float64(z - y) / Float64(Float64(t - z) + 1.0))))
end
function tmp = code(x, y, z, t, a)
	tmp = x + (a * ((z - y) / ((t - z) + 1.0)));
end
code[x_, y_, z_, t_, a_] := N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + a \cdot \frac{z - y}{\left(t - z\right) + 1}
\end{array}
Derivation
  1. Initial program 98.3%

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

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

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

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

Alternative 2: 70.4% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{a}{-1 + \frac{1}{z}}\\ \mathbf{if}\;t \leq -3.5 \cdot 10^{-5}:\\ \;\;\;\;x - y \cdot \frac{a}{t}\\ \mathbf{elif}\;t \leq -1.2 \cdot 10^{-301}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 5.7 \cdot 10^{-263}:\\ \;\;\;\;x - y \cdot a\\ \mathbf{elif}\;t \leq 3.9 \cdot 10^{-212}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{-185}:\\ \;\;\;\;\frac{a \cdot \left(-y\right)}{1 - z}\\ \mathbf{elif}\;t \leq 0.00013:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2 \cdot 10^{+110}:\\ \;\;\;\;x - \frac{y \cdot a}{t}\\ \mathbf{elif}\;t \leq 4 \cdot 10^{+156}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x + \frac{a}{\frac{t}{z}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ a (+ -1.0 (/ 1.0 z))))))
   (if (<= t -3.5e-5)
     (- x (* y (/ a t)))
     (if (<= t -1.2e-301)
       t_1
       (if (<= t 5.7e-263)
         (- x (* y a))
         (if (<= t 3.9e-212)
           t_1
           (if (<= t 1.15e-185)
             (/ (* a (- y)) (- 1.0 z))
             (if (<= t 0.00013)
               t_1
               (if (<= t 2e+110)
                 (- x (/ (* y a) t))
                 (if (<= t 4e+156) t_1 (+ x (/ a (/ t z)))))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (a / (-1.0 + (1.0 / z)));
	double tmp;
	if (t <= -3.5e-5) {
		tmp = x - (y * (a / t));
	} else if (t <= -1.2e-301) {
		tmp = t_1;
	} else if (t <= 5.7e-263) {
		tmp = x - (y * a);
	} else if (t <= 3.9e-212) {
		tmp = t_1;
	} else if (t <= 1.15e-185) {
		tmp = (a * -y) / (1.0 - z);
	} else if (t <= 0.00013) {
		tmp = t_1;
	} else if (t <= 2e+110) {
		tmp = x - ((y * a) / t);
	} else if (t <= 4e+156) {
		tmp = t_1;
	} else {
		tmp = x + (a / (t / z));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x + (a / ((-1.0d0) + (1.0d0 / z)))
    if (t <= (-3.5d-5)) then
        tmp = x - (y * (a / t))
    else if (t <= (-1.2d-301)) then
        tmp = t_1
    else if (t <= 5.7d-263) then
        tmp = x - (y * a)
    else if (t <= 3.9d-212) then
        tmp = t_1
    else if (t <= 1.15d-185) then
        tmp = (a * -y) / (1.0d0 - z)
    else if (t <= 0.00013d0) then
        tmp = t_1
    else if (t <= 2d+110) then
        tmp = x - ((y * a) / t)
    else if (t <= 4d+156) then
        tmp = t_1
    else
        tmp = x + (a / (t / z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (a / (-1.0 + (1.0 / z)));
	double tmp;
	if (t <= -3.5e-5) {
		tmp = x - (y * (a / t));
	} else if (t <= -1.2e-301) {
		tmp = t_1;
	} else if (t <= 5.7e-263) {
		tmp = x - (y * a);
	} else if (t <= 3.9e-212) {
		tmp = t_1;
	} else if (t <= 1.15e-185) {
		tmp = (a * -y) / (1.0 - z);
	} else if (t <= 0.00013) {
		tmp = t_1;
	} else if (t <= 2e+110) {
		tmp = x - ((y * a) / t);
	} else if (t <= 4e+156) {
		tmp = t_1;
	} else {
		tmp = x + (a / (t / z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (a / (-1.0 + (1.0 / z)))
	tmp = 0
	if t <= -3.5e-5:
		tmp = x - (y * (a / t))
	elif t <= -1.2e-301:
		tmp = t_1
	elif t <= 5.7e-263:
		tmp = x - (y * a)
	elif t <= 3.9e-212:
		tmp = t_1
	elif t <= 1.15e-185:
		tmp = (a * -y) / (1.0 - z)
	elif t <= 0.00013:
		tmp = t_1
	elif t <= 2e+110:
		tmp = x - ((y * a) / t)
	elif t <= 4e+156:
		tmp = t_1
	else:
		tmp = x + (a / (t / z))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(a / Float64(-1.0 + Float64(1.0 / z))))
	tmp = 0.0
	if (t <= -3.5e-5)
		tmp = Float64(x - Float64(y * Float64(a / t)));
	elseif (t <= -1.2e-301)
		tmp = t_1;
	elseif (t <= 5.7e-263)
		tmp = Float64(x - Float64(y * a));
	elseif (t <= 3.9e-212)
		tmp = t_1;
	elseif (t <= 1.15e-185)
		tmp = Float64(Float64(a * Float64(-y)) / Float64(1.0 - z));
	elseif (t <= 0.00013)
		tmp = t_1;
	elseif (t <= 2e+110)
		tmp = Float64(x - Float64(Float64(y * a) / t));
	elseif (t <= 4e+156)
		tmp = t_1;
	else
		tmp = Float64(x + Float64(a / Float64(t / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (a / (-1.0 + (1.0 / z)));
	tmp = 0.0;
	if (t <= -3.5e-5)
		tmp = x - (y * (a / t));
	elseif (t <= -1.2e-301)
		tmp = t_1;
	elseif (t <= 5.7e-263)
		tmp = x - (y * a);
	elseif (t <= 3.9e-212)
		tmp = t_1;
	elseif (t <= 1.15e-185)
		tmp = (a * -y) / (1.0 - z);
	elseif (t <= 0.00013)
		tmp = t_1;
	elseif (t <= 2e+110)
		tmp = x - ((y * a) / t);
	elseif (t <= 4e+156)
		tmp = t_1;
	else
		tmp = x + (a / (t / z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(a / N[(-1.0 + N[(1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.5e-5], N[(x - N[(y * N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.2e-301], t$95$1, If[LessEqual[t, 5.7e-263], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.9e-212], t$95$1, If[LessEqual[t, 1.15e-185], N[(N[(a * (-y)), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.00013], t$95$1, If[LessEqual[t, 2e+110], N[(x - N[(N[(y * a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4e+156], t$95$1, N[(x + N[(a / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -1.2 \cdot 10^{-301}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 5.7 \cdot 10^{-263}:\\
\;\;\;\;x - y \cdot a\\

\mathbf{elif}\;t \leq 3.9 \cdot 10^{-212}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 1.15 \cdot 10^{-185}:\\
\;\;\;\;\frac{a \cdot \left(-y\right)}{1 - z}\\

\mathbf{elif}\;t \leq 0.00013:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 4 \cdot 10^{+156}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -3.4999999999999997e-5

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.4999999999999997e-5 < t < -1.19999999999999996e-301 or 5.6999999999999997e-263 < t < 3.9e-212 or 1.15e-185 < t < 1.29999999999999989e-4 or 2e110 < t < 3.9999999999999999e156

    1. Initial program 98.3%

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

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot \frac{a \cdot z}{1 - z}} \]
    7. Step-by-step derivation
      1. sub-neg68.5%

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

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

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

        \[\leadsto x + \color{blue}{\frac{a}{\frac{1 - z}{z}}} \]
      5. div-sub81.4%

        \[\leadsto x + \frac{a}{\color{blue}{\frac{1}{z} - \frac{z}{z}}} \]
      6. *-inverses81.4%

        \[\leadsto x + \frac{a}{\frac{1}{z} - \color{blue}{1}} \]
    8. Simplified81.4%

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

    if -1.19999999999999996e-301 < t < 5.6999999999999997e-263

    1. Initial program 99.6%

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

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

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

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

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

    if 3.9e-212 < t < 1.15e-185

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

    if 1.29999999999999989e-4 < t < 2e110

    1. Initial program 99.9%

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

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

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

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

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

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

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

    if 3.9999999999999999e156 < t

    1. Initial program 96.5%

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

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot \frac{a \cdot z}{t}} \]
    7. Step-by-step derivation
      1. cancel-sign-sub-inv79.1%

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

        \[\leadsto x + \color{blue}{1} \cdot \frac{a \cdot z}{t} \]
      3. *-lft-identity79.1%

        \[\leadsto x + \color{blue}{\frac{a \cdot z}{t}} \]
      4. +-commutative79.1%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.5 \cdot 10^{-5}:\\ \;\;\;\;x - y \cdot \frac{a}{t}\\ \mathbf{elif}\;t \leq -1.2 \cdot 10^{-301}:\\ \;\;\;\;x + \frac{a}{-1 + \frac{1}{z}}\\ \mathbf{elif}\;t \leq 5.7 \cdot 10^{-263}:\\ \;\;\;\;x - y \cdot a\\ \mathbf{elif}\;t \leq 3.9 \cdot 10^{-212}:\\ \;\;\;\;x + \frac{a}{-1 + \frac{1}{z}}\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{-185}:\\ \;\;\;\;\frac{a \cdot \left(-y\right)}{1 - z}\\ \mathbf{elif}\;t \leq 0.00013:\\ \;\;\;\;x + \frac{a}{-1 + \frac{1}{z}}\\ \mathbf{elif}\;t \leq 2 \cdot 10^{+110}:\\ \;\;\;\;x - \frac{y \cdot a}{t}\\ \mathbf{elif}\;t \leq 4 \cdot 10^{+156}:\\ \;\;\;\;x + \frac{a}{-1 + \frac{1}{z}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{a}{\frac{t}{z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 71.5% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t \leq -1.7 \cdot 10^{-302}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 3.9 \cdot 10^{-212}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 1.15 \cdot 10^{-185}:\\
\;\;\;\;\frac{a \cdot \left(-y\right)}{1 - z}\\

\mathbf{elif}\;t \leq 2.3 \cdot 10^{-5}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -3.4999999999999997e-5

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.4999999999999997e-5 < t < -1.7e-302 or 5.80000000000000007e-263 < t < 3.9e-212 or 1.15e-185 < t < 2.3e-5

    1. Initial program 98.3%

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

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot \frac{a \cdot z}{1 - z}} \]
    7. Step-by-step derivation
      1. sub-neg68.2%

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

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

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

        \[\leadsto x + \color{blue}{\frac{a}{\frac{1 - z}{z}}} \]
      5. div-sub80.9%

        \[\leadsto x + \frac{a}{\color{blue}{\frac{1}{z} - \frac{z}{z}}} \]
      6. *-inverses80.9%

        \[\leadsto x + \frac{a}{\frac{1}{z} - \color{blue}{1}} \]
    8. Simplified80.9%

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

    if -1.7e-302 < t < 5.80000000000000007e-263

    1. Initial program 99.6%

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

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

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

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

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

    if 3.9e-212 < t < 1.15e-185

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

    if 2.3e-5 < t < 3.5e121

    1. Initial program 99.9%

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

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

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

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

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

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

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

    if 3.5e121 < t

    1. Initial program 97.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{a}{\color{blue}{\frac{1 + t}{z} - \frac{z}{z}}} \]
      6. *-inverses94.3%

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

      \[\leadsto \color{blue}{x + \frac{a}{\frac{1 + t}{z} - 1}} \]
    10. Taylor expanded in t around inf 94.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.5 \cdot 10^{-5}:\\ \;\;\;\;x - y \cdot \frac{a}{t}\\ \mathbf{elif}\;t \leq -1.7 \cdot 10^{-302}:\\ \;\;\;\;x + \frac{a}{-1 + \frac{1}{z}}\\ \mathbf{elif}\;t \leq 5.8 \cdot 10^{-263}:\\ \;\;\;\;x - y \cdot a\\ \mathbf{elif}\;t \leq 3.9 \cdot 10^{-212}:\\ \;\;\;\;x + \frac{a}{-1 + \frac{1}{z}}\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{-185}:\\ \;\;\;\;\frac{a \cdot \left(-y\right)}{1 - z}\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{-5}:\\ \;\;\;\;x + \frac{a}{-1 + \frac{1}{z}}\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{+121}:\\ \;\;\;\;x - \frac{y \cdot a}{t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{a}{\frac{t}{z} + -1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 69.2% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t \leq -4 \cdot 10^{-277}:\\
\;\;\;\;x - a\\

\mathbf{elif}\;t \leq 1.8 \cdot 10^{-134}:\\
\;\;\;\;x - y \cdot a\\

\mathbf{elif}\;t \leq 0.000106:\\
\;\;\;\;x - a\\

\mathbf{elif}\;t \leq 3.8 \cdot 10^{+162}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.59999999999999997e-14 or 1.06e-4 < t < 3.80000000000000024e162

    1. Initial program 98.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.59999999999999997e-14 < t < -3.99999999999999988e-277 or 1.79999999999999995e-134 < t < 1.06e-4

    1. Initial program 97.8%

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

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

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

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

    if -3.99999999999999988e-277 < t < 1.79999999999999995e-134

    1. Initial program 99.8%

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

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

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

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

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

    if 3.80000000000000024e162 < t

    1. Initial program 96.3%

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

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot \frac{a \cdot z}{t}} \]
    7. Step-by-step derivation
      1. cancel-sign-sub-inv81.2%

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

        \[\leadsto x + \color{blue}{1} \cdot \frac{a \cdot z}{t} \]
      3. *-lft-identity81.2%

        \[\leadsto x + \color{blue}{\frac{a \cdot z}{t}} \]
      4. +-commutative81.2%

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

        \[\leadsto \color{blue}{\frac{a}{\frac{t}{z}}} + x \]
    8. Simplified92.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.6 \cdot 10^{-14}:\\ \;\;\;\;x - y \cdot \frac{a}{t}\\ \mathbf{elif}\;t \leq -4 \cdot 10^{-277}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{-134}:\\ \;\;\;\;x - y \cdot a\\ \mathbf{elif}\;t \leq 0.000106:\\ \;\;\;\;x - a\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{+162}:\\ \;\;\;\;x - y \cdot \frac{a}{t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{a}{\frac{t}{z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 68.7% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t \leq -7.8 \cdot 10^{-278}:\\
\;\;\;\;x - a\\

\mathbf{elif}\;t \leq 2.1 \cdot 10^{-134}:\\
\;\;\;\;x - y \cdot a\\

\mathbf{elif}\;t \leq 0.000106:\\
\;\;\;\;x - a\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -2.59999999999999997e-14

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{a \cdot y}{t}} \]
      3. *-commutative70.4%

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

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

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

    if -2.59999999999999997e-14 < t < -7.8000000000000002e-278 or 2.0999999999999999e-134 < t < 1.06e-4

    1. Initial program 97.8%

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

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

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

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

    if -7.8000000000000002e-278 < t < 2.0999999999999999e-134

    1. Initial program 99.8%

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

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

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

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

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

    if 1.06e-4 < t < 4.2000000000000001e162

    1. Initial program 99.5%

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

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

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

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

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

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

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

    if 4.2000000000000001e162 < t

    1. Initial program 96.3%

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

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot \frac{a \cdot z}{t}} \]
    7. Step-by-step derivation
      1. cancel-sign-sub-inv81.2%

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

        \[\leadsto x + \color{blue}{1} \cdot \frac{a \cdot z}{t} \]
      3. *-lft-identity81.2%

        \[\leadsto x + \color{blue}{\frac{a \cdot z}{t}} \]
      4. +-commutative81.2%

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

        \[\leadsto \color{blue}{\frac{a}{\frac{t}{z}}} + x \]
    8. Simplified92.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.6 \cdot 10^{-14}:\\ \;\;\;\;x - y \cdot \frac{a}{t}\\ \mathbf{elif}\;t \leq -7.8 \cdot 10^{-278}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{-134}:\\ \;\;\;\;x - y \cdot a\\ \mathbf{elif}\;t \leq 0.000106:\\ \;\;\;\;x - a\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{+162}:\\ \;\;\;\;x - \frac{y \cdot a}{t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{a}{\frac{t}{z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 88.6% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;z \leq -2700:\\
\;\;\;\;x + \frac{a}{-1 + \frac{t + 1}{z}}\\

\mathbf{elif}\;z \leq 105:\\
\;\;\;\;x - a \cdot \frac{y}{t + 1}\\

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


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

    1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{a}{\color{blue}{\frac{1 + t}{z} - \frac{z}{z}}} \]
      6. *-inverses100.0%

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

      \[\leadsto \color{blue}{x + \frac{a}{\frac{1 + t}{z} - 1}} \]
    10. Taylor expanded in t around inf 100.0%

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

    if -1.11999999999999999e167 < z < -7.5000000000000005e64 or 105 < z

    1. Initial program 96.6%

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

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

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

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

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

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

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

    if -7.5000000000000005e64 < z < -2700

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{a}{\color{blue}{\frac{1 + t}{z} - \frac{z}{z}}} \]
      6. *-inverses99.8%

        \[\leadsto x + \frac{a}{\frac{1 + t}{z} - \color{blue}{1}} \]
    9. Simplified99.8%

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

    if -2700 < z < 105

    1. Initial program 99.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.12 \cdot 10^{+167}:\\ \;\;\;\;x + \frac{a}{\frac{t}{z} + -1}\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{+64}:\\ \;\;\;\;x - a \cdot \left(\left(y - z\right) \cdot \frac{-1}{z}\right)\\ \mathbf{elif}\;z \leq -2700:\\ \;\;\;\;x + \frac{a}{-1 + \frac{t + 1}{z}}\\ \mathbf{elif}\;z \leq 105:\\ \;\;\;\;x - a \cdot \frac{y}{t + 1}\\ \mathbf{else}:\\ \;\;\;\;x - a \cdot \left(\left(y - z\right) \cdot \frac{-1}{z}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 87.4% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;z \leq -1820000:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 1550:\\
\;\;\;\;x - a \cdot \frac{y}{t + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.0999999999999997e193 or -4.49999999999999973e64 < z < -1.82e6

    1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{a}{\color{blue}{\frac{1 + t}{z} - \frac{z}{z}}} \]
      6. *-inverses99.9%

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

      \[\leadsto \color{blue}{x + \frac{a}{\frac{1 + t}{z} - 1}} \]
    10. Taylor expanded in t around inf 98.1%

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

    if -4.0999999999999997e193 < z < -4.49999999999999973e64 or 1550 < z

    1. Initial program 96.9%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 84.3%

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

        \[\leadsto x - \frac{y - z}{\color{blue}{-\frac{z}{a}}} \]
      2. distribute-neg-frac84.3%

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

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

    if -1.82e6 < z < 1550

    1. Initial program 99.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.1 \cdot 10^{+193}:\\ \;\;\;\;x + \frac{a}{\frac{t}{z} + -1}\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{+64}:\\ \;\;\;\;x - \frac{y - z}{\frac{-z}{a}}\\ \mathbf{elif}\;z \leq -1820000:\\ \;\;\;\;x + \frac{a}{\frac{t}{z} + -1}\\ \mathbf{elif}\;z \leq 1550:\\ \;\;\;\;x - a \cdot \frac{y}{t + 1}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y - z}{\frac{-z}{a}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 87.4% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;z \leq -1.95 \cdot 10^{+65}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -7500:\\
\;\;\;\;x + \frac{a}{-1 + \frac{t + 1}{z}}\\

\mathbf{elif}\;z \leq 1450:\\
\;\;\;\;x - a \cdot \frac{y}{t + 1}\\

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


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

    1. Initial program 96.3%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{a}{\color{blue}{\frac{1 + t}{z} - \frac{z}{z}}} \]
      6. *-inverses99.9%

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

      \[\leadsto \color{blue}{x + \frac{a}{\frac{1 + t}{z} - 1}} \]
    10. Taylor expanded in t around inf 99.9%

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

    if -9.99999999999999945e193 < z < -1.9499999999999999e65 or 1450 < z

    1. Initial program 96.9%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 84.3%

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

        \[\leadsto x - \frac{y - z}{\color{blue}{-\frac{z}{a}}} \]
      2. distribute-neg-frac84.3%

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

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

    if -1.9499999999999999e65 < z < -7500

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{a}{\color{blue}{\frac{1 + t}{z} - \frac{z}{z}}} \]
      6. *-inverses99.8%

        \[\leadsto x + \frac{a}{\frac{1 + t}{z} - \color{blue}{1}} \]
    9. Simplified99.8%

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

    if -7500 < z < 1450

    1. Initial program 99.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{+194}:\\ \;\;\;\;x + \frac{a}{\frac{t}{z} + -1}\\ \mathbf{elif}\;z \leq -1.95 \cdot 10^{+65}:\\ \;\;\;\;x - \frac{y - z}{\frac{-z}{a}}\\ \mathbf{elif}\;z \leq -7500:\\ \;\;\;\;x + \frac{a}{-1 + \frac{t + 1}{z}}\\ \mathbf{elif}\;z \leq 1450:\\ \;\;\;\;x - a \cdot \frac{y}{t + 1}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y - z}{\frac{-z}{a}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 86.9% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;z \leq 1.05:\\
\;\;\;\;x - a \cdot \frac{y}{t + 1}\\

\mathbf{elif}\;z \leq 7.8 \cdot 10^{+67} \lor \neg \left(z \leq 2.8 \cdot 10^{+153}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.55e6 or 1.05000000000000004 < z < 7.80000000000000013e67 or 2.79999999999999985e153 < z

    1. Initial program 96.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{a}{\color{blue}{\frac{1 + t}{z} - \frac{z}{z}}} \]
      6. *-inverses87.5%

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

      \[\leadsto \color{blue}{x + \frac{a}{\frac{1 + t}{z} - 1}} \]
    10. Taylor expanded in t around inf 86.9%

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

    if -1.55e6 < z < 1.05000000000000004

    1. Initial program 99.8%

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

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

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

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

    if 7.80000000000000013e67 < z < 2.79999999999999985e153

    1. Initial program 99.9%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 86.4%

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

        \[\leadsto x - \frac{y - z}{\color{blue}{-\frac{z}{a}}} \]
      2. distribute-neg-frac86.4%

        \[\leadsto x - \frac{y - z}{\color{blue}{\frac{-z}{a}}} \]
    5. Simplified86.4%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1550000:\\ \;\;\;\;x + \frac{a}{\frac{t}{z} + -1}\\ \mathbf{elif}\;z \leq 1.05:\\ \;\;\;\;x - a \cdot \frac{y}{t + 1}\\ \mathbf{elif}\;z \leq 7.8 \cdot 10^{+67} \lor \neg \left(z \leq 2.8 \cdot 10^{+153}\right):\\ \;\;\;\;x + \frac{a}{\frac{t}{z} + -1}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{a}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 87.0% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;z \leq 110:\\
\;\;\;\;x - a \cdot \frac{y}{t + 1}\\

\mathbf{elif}\;z \leq 10^{+68} \lor \neg \left(z \leq 2.9 \cdot 10^{+153}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -16500 or 110 < z < 9.99999999999999953e67 or 2.90000000000000002e153 < z

    1. Initial program 96.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{a}{\color{blue}{\frac{1 + t}{z} - \frac{z}{z}}} \]
      6. *-inverses87.5%

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

      \[\leadsto \color{blue}{x + \frac{a}{\frac{1 + t}{z} - 1}} \]
    10. Taylor expanded in t around inf 86.9%

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

    if -16500 < z < 110

    1. Initial program 99.8%

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

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

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

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

    if 9.99999999999999953e67 < z < 2.90000000000000002e153

    1. Initial program 99.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -16500:\\ \;\;\;\;x + \frac{a}{\frac{t}{z} + -1}\\ \mathbf{elif}\;z \leq 110:\\ \;\;\;\;x - a \cdot \frac{y}{t + 1}\\ \mathbf{elif}\;z \leq 10^{+68} \lor \neg \left(z \leq 2.9 \cdot 10^{+153}\right):\\ \;\;\;\;x + \frac{a}{\frac{t}{z} + -1}\\ \mathbf{else}:\\ \;\;\;\;x - a \cdot \frac{y}{1 - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 89.5% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t \leq 0.00013:\\
\;\;\;\;x + a \cdot \frac{z - y}{1 - z}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -7.5e7

    1. Initial program 98.2%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 92.4%

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

    if -7.5e7 < t < 1.29999999999999989e-4

    1. Initial program 98.4%

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

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

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

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

    if 1.29999999999999989e-4 < t < 2.8000000000000001e112

    1. Initial program 99.9%

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

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

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

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

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

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

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

    if 2.8000000000000001e112 < t

    1. Initial program 97.3%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{a}{\color{blue}{\frac{1 + t}{z} - \frac{z}{z}}} \]
      6. *-inverses92.6%

        \[\leadsto x + \frac{a}{\frac{1 + t}{z} - \color{blue}{1}} \]
    9. Simplified92.6%

      \[\leadsto \color{blue}{x + \frac{a}{\frac{1 + t}{z} - 1}} \]
    10. Taylor expanded in t around inf 92.6%

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

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

Alternative 12: 71.2% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := x - y \cdot a\\
\mathbf{if}\;z \leq -3.5 \cdot 10^{-33}:\\
\;\;\;\;x - a\\

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

\mathbf{elif}\;z \leq 6.2 \cdot 10^{-65}:\\
\;\;\;\;x + z \cdot a\\

\mathbf{elif}\;z \leq 13:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 97.1%

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

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

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

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

    if -3.4999999999999999e-33 < z < 8.00000000000000016e-169 or 6.20000000000000032e-65 < z < 13

    1. Initial program 99.7%

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

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

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

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

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

    if 8.00000000000000016e-169 < z < 6.20000000000000032e-65

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{a}{\color{blue}{\frac{1 + t}{z} - \frac{z}{z}}} \]
      6. *-inverses89.2%

        \[\leadsto x + \frac{a}{\frac{1 + t}{z} - \color{blue}{1}} \]
    9. Simplified89.2%

      \[\leadsto \color{blue}{x + \frac{a}{\frac{1 + t}{z} - 1}} \]
    10. Taylor expanded in z around 0 89.2%

      \[\leadsto x + \color{blue}{\frac{a \cdot z}{1 + t}} \]
    11. Taylor expanded in t around 0 89.2%

      \[\leadsto x + \color{blue}{a \cdot z} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification74.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.5 \cdot 10^{-33}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-169}:\\ \;\;\;\;x - y \cdot a\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{-65}:\\ \;\;\;\;x + z \cdot a\\ \mathbf{elif}\;z \leq 13:\\ \;\;\;\;x - y \cdot a\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 89.1% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.6e5

    1. Initial program 98.2%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 92.4%

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

    if -4.6e5 < t < 1.5000000000000001e47

    1. Initial program 98.5%

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

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

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

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

    if 1.5000000000000001e47 < t

    1. Initial program 97.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{a}{\color{blue}{\frac{1 + t}{z} - \frac{z}{z}}} \]
      6. *-inverses86.8%

        \[\leadsto x + \frac{a}{\frac{1 + t}{z} - \color{blue}{1}} \]
    9. Simplified86.8%

      \[\leadsto \color{blue}{x + \frac{a}{\frac{1 + t}{z} - 1}} \]
    10. Taylor expanded in t around inf 86.8%

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

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

Alternative 14: 65.8% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \lor \neg \left(z \leq 1.12 \cdot 10^{-33}\right):\\
\;\;\;\;x - a\\

\mathbf{else}:\\
\;\;\;\;x + z \cdot a\\


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

    1. Initial program 97.1%

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

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

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

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

    if -1 < z < 1.11999999999999999e-33

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{a}{\color{blue}{\frac{1 + t}{z} - \frac{z}{z}}} \]
      6. *-inverses70.1%

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

      \[\leadsto \color{blue}{x + \frac{a}{\frac{1 + t}{z} - 1}} \]
    10. Taylor expanded in z around 0 70.1%

      \[\leadsto x + \color{blue}{\frac{a \cdot z}{1 + t}} \]
    11. Taylor expanded in t around 0 66.2%

      \[\leadsto x + \color{blue}{a \cdot z} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification69.1%

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

Alternative 15: 65.6% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -26000 \lor \neg \left(z \leq 1.05 \cdot 10^{-33}\right):\\
\;\;\;\;x - a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -26000 or 1.05e-33 < z

    1. Initial program 97.1%

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

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

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

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

    if -26000 < z < 1.05e-33

    1. Initial program 99.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -26000 \lor \neg \left(z \leq 1.05 \cdot 10^{-33}\right):\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 53.0% accurate, 13.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
	return x;
}
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
end function
public static double code(double x, double y, double z, double t, double a) {
	return x;
}
def code(x, y, z, t, a):
	return x
function code(x, y, z, t, a)
	return x
end
function tmp = code(x, y, z, t, a)
	tmp = x;
end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 98.3%

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Final simplification56.7%

    \[\leadsto x \]
  7. Add Preprocessing

Developer target: 99.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x - \frac{y - z}{\left(t - z\right) + 1} \cdot a \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (- x (* (/ (- y z) (+ (- t z) 1.0)) a)))
double code(double x, double y, double z, double t, double a) {
	return x - (((y - z) / ((t - z) + 1.0)) * a);
}
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 - z) + 1.0d0)) * a)
end function
public static double code(double x, double y, double z, double t, double a) {
	return x - (((y - z) / ((t - z) + 1.0)) * a);
}
def code(x, y, z, t, a):
	return x - (((y - z) / ((t - z) + 1.0)) * a)
function code(x, y, z, t, a)
	return Float64(x - Float64(Float64(Float64(y - z) / Float64(Float64(t - z) + 1.0)) * a))
end
function tmp = code(x, y, z, t, a)
	tmp = x - (((y - z) / ((t - z) + 1.0)) * a);
end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(N[(y - z), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Reproduce

?
herbie shell --seed 2024019 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"
  :precision binary64

  :herbie-target
  (- x (* (/ (- y z) (+ (- t z) 1.0)) a))

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