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

Percentage Accurate: 97.1% → 99.6%
Time: 12.2s
Alternatives: 17
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 17 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: 97.1% 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.6% accurate, 1.0× speedup?

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

\\
x + a \cdot \frac{y - z}{-1 - \left(t - z\right)}
\end{array}
Derivation
  1. Initial program 96.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. Final simplification99.9%

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

Alternative 2: 73.6% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;z \leq -1.95 \cdot 10^{-264}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.8 \cdot 10^{-296}:\\
\;\;\;\;\frac{a}{\frac{-1 - t}{y}}\\

\mathbf{elif}\;z \leq 2.15 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.14999999999999997e54 or 2.15e16 < z

    1. Initial program 91.9%

      \[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 inf 81.2%

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

    if -1.14999999999999997e54 < z < -0.089999999999999997

    1. Initial program 99.9%

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

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

      \[\leadsto x - \color{blue}{\frac{a \cdot y}{t}} \]
    5. Step-by-step derivation
      1. *-commutative60.4%

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

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

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

    if -0.089999999999999997 < z < -1.9499999999999999e-264 or 2.7999999999999999e-296 < z < 2.15e16

    1. Initial program 99.0%

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

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

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

    if -1.9499999999999999e-264 < z < 2.7999999999999999e-296

    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 0 99.9%

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

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

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

        \[\leadsto -\color{blue}{a \cdot \frac{y}{1 + t}} \]
      3. distribute-rgt-neg-in82.8%

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

        \[\leadsto a \cdot \color{blue}{\frac{y}{-\left(1 + t\right)}} \]
      5. distribute-neg-in82.8%

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

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

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

      \[\leadsto \color{blue}{a \cdot \frac{y}{-1 - t}} \]
    7. Step-by-step derivation
      1. clear-num82.9%

        \[\leadsto a \cdot \color{blue}{\frac{1}{\frac{-1 - t}{y}}} \]
      2. un-div-inv83.2%

        \[\leadsto \color{blue}{\frac{a}{\frac{-1 - t}{y}}} \]
    8. Applied egg-rr83.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{+54}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq -0.09:\\ \;\;\;\;x - y \cdot \frac{a}{t}\\ \mathbf{elif}\;z \leq -1.95 \cdot 10^{-264}:\\ \;\;\;\;x + a \cdot \left(z - y\right)\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-296}:\\ \;\;\;\;\frac{a}{\frac{-1 - t}{y}}\\ \mathbf{elif}\;z \leq 2.15 \cdot 10^{+16}:\\ \;\;\;\;x + a \cdot \left(z - y\right)\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 73.6% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;z \leq -6.2 \cdot 10^{-266}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 2.15 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.19999999999999999e53 or 2.15e16 < z

    1. Initial program 91.9%

      \[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 inf 81.2%

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

    if -2.19999999999999999e53 < z < -0.065000000000000002

    1. Initial program 99.9%

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

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

      \[\leadsto x - \color{blue}{\frac{a \cdot y}{t}} \]
    5. Step-by-step derivation
      1. *-commutative60.4%

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

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

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

    if -0.065000000000000002 < z < -6.1999999999999999e-266 or 4.00000000000000024e-295 < z < 2.15e16

    1. Initial program 99.0%

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

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

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

    if -6.1999999999999999e-266 < z < 4.00000000000000024e-295

    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 0 99.9%

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

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

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

        \[\leadsto -\color{blue}{a \cdot \frac{y}{1 + t}} \]
      3. distribute-rgt-neg-in82.8%

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

        \[\leadsto a \cdot \color{blue}{\frac{y}{-\left(1 + t\right)}} \]
      5. distribute-neg-in82.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{+53}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq -0.065:\\ \;\;\;\;x - y \cdot \frac{a}{t}\\ \mathbf{elif}\;z \leq -6.2 \cdot 10^{-266}:\\ \;\;\;\;x + a \cdot \left(z - y\right)\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-295}:\\ \;\;\;\;a \cdot \frac{y}{-1 - t}\\ \mathbf{elif}\;z \leq 2.15 \cdot 10^{+16}:\\ \;\;\;\;x + a \cdot \left(z - y\right)\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 61.3% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;z \leq 2.9 \cdot 10^{-279}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 4 \cdot 10^{-148}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 4.1 \cdot 10^{-74}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -4.39999999999999984e-184 or 1.99999999999999989e34 < z

    1. Initial program 93.7%

      \[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 inf 72.2%

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

    if -4.39999999999999984e-184 < z < 2.9e-279 or 3.99999999999999974e-148 < z < 4.10000000000000032e-74

    1. Initial program 98.4%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{a \cdot y}{1 + t}} \]
    5. Step-by-step derivation
      1. mul-1-neg56.8%

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

        \[\leadsto -\color{blue}{a \cdot \frac{y}{1 + t}} \]
      3. distribute-rgt-neg-in68.0%

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

        \[\leadsto a \cdot \color{blue}{\frac{y}{-\left(1 + t\right)}} \]
      5. distribute-neg-in68.0%

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

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

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

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

    if 2.9e-279 < z < 3.99999999999999974e-148

    1. Initial program 99.9%

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

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

    if 4.10000000000000032e-74 < z < 1.99999999999999989e34

    1. Initial program 99.8%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{a \cdot \frac{z}{t}} \]
    6. Simplified68.6%

      \[\leadsto \color{blue}{x + a \cdot \frac{z}{t}} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 5: 61.1% accurate, 0.5× speedup?

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

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

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

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

\mathbf{elif}\;z \leq 5.3 \cdot 10^{-74}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.7 \cdot 10^{+36}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.0500000000000001e-183 or 1.6999999999999999e36 < z

    1. Initial program 93.7%

      \[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 inf 72.2%

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

    if -3.0500000000000001e-183 < z < 4.20000000000000011e-279 or 2.2e-146 < z < 5.29999999999999987e-74

    1. Initial program 98.4%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{a \cdot y}{1 + t}} \]
    5. Step-by-step derivation
      1. mul-1-neg56.8%

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

        \[\leadsto -\color{blue}{a \cdot \frac{y}{1 + t}} \]
      3. distribute-rgt-neg-in68.0%

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

        \[\leadsto a \cdot \color{blue}{\frac{y}{-\left(1 + t\right)}} \]
      5. distribute-neg-in68.0%

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

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

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

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

    if 4.20000000000000011e-279 < z < 2.2e-146 or 5.29999999999999987e-74 < z < 1.6999999999999999e36

    1. Initial program 99.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 x around inf 64.6%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 6: 73.6% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := x + a \cdot \left(z - y\right)\\
\mathbf{if}\;z \leq -460:\\
\;\;\;\;x - a\\

\mathbf{elif}\;z \leq -6.2 \cdot 10^{-266}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 2.15 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -460 or 2.15e16 < z

    1. Initial program 92.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 inf 78.8%

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

    if -460 < z < -6.1999999999999999e-266 or 1.70000000000000004e-295 < z < 2.15e16

    1. Initial program 99.0%

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

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

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

    if -6.1999999999999999e-266 < z < 1.70000000000000004e-295

    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 0 99.9%

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

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

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

        \[\leadsto -\color{blue}{a \cdot \frac{y}{1 + t}} \]
      3. distribute-rgt-neg-in82.8%

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

        \[\leadsto a \cdot \color{blue}{\frac{y}{-\left(1 + t\right)}} \]
      5. distribute-neg-in82.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -460:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq -6.2 \cdot 10^{-266}:\\ \;\;\;\;x + a \cdot \left(z - y\right)\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-295}:\\ \;\;\;\;a \cdot \frac{y}{-1 - t}\\ \mathbf{elif}\;z \leq 2.15 \cdot 10^{+16}:\\ \;\;\;\;x + a \cdot \left(z - y\right)\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 86.7% accurate, 0.5× speedup?

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

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

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

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

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


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

    1. Initial program 93.5%

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

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

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

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

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

    if -1.25e17 < z < 3.70000000000000029e-27

    1. Initial program 99.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. *-commutative99.9%

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

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

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

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

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

    if 3.70000000000000029e-27 < z < 7.50000000000000026e156

    1. Initial program 92.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.50000000000000026e156 < z

    1. Initial program 92.5%

      \[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 inf 89.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.25 \cdot 10^{+17}:\\ \;\;\;\;x + \frac{y - z}{\frac{z}{a}}\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{-27}:\\ \;\;\;\;x + \frac{a}{\frac{-1 - t}{y}}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{+156}:\\ \;\;\;\;x + \frac{z \cdot a}{t - \left(z + -1\right)}\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 64.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{+17}:\\
\;\;\;\;x - a\\

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

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

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

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


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

    1. Initial program 91.7%

      \[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 inf 81.2%

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

    if -1.2e17 < z < -2.10000000000000004e-265 or 1.00000000000000004e-297 < z < 1.3e37

    1. Initial program 99.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 x around inf 52.7%

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

    if -2.10000000000000004e-265 < z < 1.00000000000000004e-297

    1. Initial program 99.8%

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

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

      \[\leadsto x - \color{blue}{\frac{a \cdot y}{t}} \]
    5. Step-by-step derivation
      1. *-commutative31.8%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{a \cdot y}{t}} \]
    8. Step-by-step derivation
      1. mul-1-neg23.6%

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

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

        \[\leadsto -\color{blue}{y \cdot \frac{a}{t}} \]
      4. *-commutative55.9%

        \[\leadsto -\color{blue}{\frac{a}{t} \cdot y} \]
      5. distribute-rgt-neg-in55.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.2 \cdot 10^{+17}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{-265}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 10^{-297}:\\ \;\;\;\;y \cdot \frac{-a}{t}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{+37}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 64.7% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq -2.2 \cdot 10^{-265}:\\
\;\;\;\;x\\

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

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

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


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

    1. Initial program 91.7%

      \[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 inf 81.2%

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

    if -6.8e16 < z < -2.2000000000000001e-265 or 3.4500000000000001e-299 < z < 1.3e37

    1. Initial program 99.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 x around inf 52.7%

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

    if -2.2000000000000001e-265 < z < 3.4500000000000001e-299

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \color{blue}{\frac{-1 \cdot y}{t}} \]
      2. neg-mul-155.6%

        \[\leadsto a \cdot \frac{\color{blue}{-y}}{t} \]
    10. Simplified55.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.8 \cdot 10^{+16}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{-265}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.45 \cdot 10^{-299}:\\ \;\;\;\;a \cdot \frac{y}{-t}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{+37}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 63.3% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -6.8 \cdot 10^{+16}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq -2.45 \cdot 10^{-194}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-306}:\\ \;\;\;\;y \cdot \left(-a\right)\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{+34}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -6.8e+16)
   (- x a)
   (if (<= z -2.45e-194)
     x
     (if (<= z 9e-306) (* y (- a)) (if (<= z 1.85e+34) x (- x a))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -6.8e+16) {
		tmp = x - a;
	} else if (z <= -2.45e-194) {
		tmp = x;
	} else if (z <= 9e-306) {
		tmp = y * -a;
	} else if (z <= 1.85e+34) {
		tmp = x;
	} 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) :: tmp
    if (z <= (-6.8d+16)) then
        tmp = x - a
    else if (z <= (-2.45d-194)) then
        tmp = x
    else if (z <= 9d-306) then
        tmp = y * -a
    else if (z <= 1.85d+34) then
        tmp = x
    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 tmp;
	if (z <= -6.8e+16) {
		tmp = x - a;
	} else if (z <= -2.45e-194) {
		tmp = x;
	} else if (z <= 9e-306) {
		tmp = y * -a;
	} else if (z <= 1.85e+34) {
		tmp = x;
	} else {
		tmp = x - a;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -6.8e+16:
		tmp = x - a
	elif z <= -2.45e-194:
		tmp = x
	elif z <= 9e-306:
		tmp = y * -a
	elif z <= 1.85e+34:
		tmp = x
	else:
		tmp = x - a
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -6.8e+16)
		tmp = Float64(x - a);
	elseif (z <= -2.45e-194)
		tmp = x;
	elseif (z <= 9e-306)
		tmp = Float64(y * Float64(-a));
	elseif (z <= 1.85e+34)
		tmp = x;
	else
		tmp = Float64(x - a);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -6.8e+16)
		tmp = x - a;
	elseif (z <= -2.45e-194)
		tmp = x;
	elseif (z <= 9e-306)
		tmp = y * -a;
	elseif (z <= 1.85e+34)
		tmp = x;
	else
		tmp = x - a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.8e+16], N[(x - a), $MachinePrecision], If[LessEqual[z, -2.45e-194], x, If[LessEqual[z, 9e-306], N[(y * (-a)), $MachinePrecision], If[LessEqual[z, 1.85e+34], x, N[(x - a), $MachinePrecision]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq 9 \cdot 10^{-306}:\\
\;\;\;\;y \cdot \left(-a\right)\\

\mathbf{elif}\;z \leq 1.85 \cdot 10^{+34}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.8e16 or 1.85000000000000004e34 < z

    1. Initial program 91.7%

      \[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 inf 81.2%

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

    if -6.8e16 < z < -2.45000000000000002e-194 or 9.00000000000000009e-306 < z < 1.85000000000000004e34

    1. Initial program 99.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. Taylor expanded in x around inf 53.6%

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

    if -2.45000000000000002e-194 < z < 9.00000000000000009e-306

    1. Initial program 99.8%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{a \cdot y}{1 + t}} \]
    5. Step-by-step derivation
      1. mul-1-neg59.2%

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

        \[\leadsto -\color{blue}{a \cdot \frac{y}{1 + t}} \]
      3. distribute-rgt-neg-in76.4%

        \[\leadsto \color{blue}{a \cdot \left(-\frac{y}{1 + t}\right)} \]
      4. distribute-neg-frac276.4%

        \[\leadsto a \cdot \color{blue}{\frac{y}{-\left(1 + t\right)}} \]
      5. distribute-neg-in76.4%

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

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

        \[\leadsto a \cdot \frac{y}{\color{blue}{-1 - t}} \]
    6. Simplified76.4%

      \[\leadsto \color{blue}{a \cdot \frac{y}{-1 - t}} \]
    7. Taylor expanded in t around 0 45.6%

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

        \[\leadsto \color{blue}{-a \cdot y} \]
      2. distribute-rgt-neg-in45.6%

        \[\leadsto \color{blue}{a \cdot \left(-y\right)} \]
    9. Simplified45.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.8 \cdot 10^{+16}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq -2.45 \cdot 10^{-194}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-306}:\\ \;\;\;\;y \cdot \left(-a\right)\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{+34}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 89.3% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 93.0%

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

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

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

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

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

    if -3.8000000000000001e31 < z < 7.00000000000000047e42

    1. Initial program 99.2%

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

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

    if 7.00000000000000047e42 < z

    1. Initial program 88.5%

      \[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 inf 84.3%

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

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

Alternative 12: 84.6% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+52} \lor \neg \left(z \leq 3.2 \cdot 10^{+76}\right):\\
\;\;\;\;x - a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.49999999999999994e52 or 3.19999999999999976e76 < z

    1. Initial program 90.3%

      \[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 inf 85.2%

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

    if -8.49999999999999994e52 < z < 3.19999999999999976e76

    1. Initial program 99.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. Step-by-step derivation
      1. *-commutative99.8%

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

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

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

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

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

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

Alternative 13: 86.2% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 93.5%

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

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

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

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

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

    if -8.5e16 < z < 6.90000000000000034e72

    1. Initial program 99.2%

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

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

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

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

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

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

    if 6.90000000000000034e72 < z

    1. Initial program 86.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 z around inf 84.4%

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

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

Alternative 14: 66.3% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{+18} \lor \neg \left(z \leq 1.35 \cdot 10^{+34}\right):\\
\;\;\;\;x - a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.7e18 or 1.35e34 < z

    1. Initial program 91.7%

      \[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 inf 81.2%

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

    if -1.7e18 < z < 1.35e34

    1. Initial program 99.2%

      \[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 x around inf 47.3%

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

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

Alternative 15: 97.3% accurate, 1.0× speedup?

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

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

    \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. clear-num96.0%

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

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

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

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

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

Alternative 16: 55.2% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.75 \cdot 10^{+100} \lor \neg \left(a \leq 5.2 \cdot 10^{+180}\right):\\
\;\;\;\;-a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.7500000000000001e100 or 5.20000000000000042e180 < a

    1. Initial program 99.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. Taylor expanded in x around 0 48.7%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot a} \]
    9. Step-by-step derivation
      1. neg-mul-131.8%

        \[\leadsto \color{blue}{-a} \]
    10. Simplified31.8%

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

    if -2.7500000000000001e100 < a < 5.20000000000000042e180

    1. Initial program 94.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 x around inf 59.5%

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

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

Alternative 17: 54.1% 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 96.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 x around inf 47.5%

    \[\leadsto \color{blue}{x} \]
  6. Add Preprocessing

Developer target: 99.6% 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 2024085 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"
  :precision binary64

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

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