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

Percentage Accurate: 97.6% → 99.5%
Time: 12.3s
Alternatives: 18
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 18 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.6% accurate, 1.0× speedup?

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

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

Alternative 1: 99.5% accurate, 1.0× speedup?

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

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

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

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

Alternative 2: 69.4% accurate, 0.4× speedup?

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.05000000000000001e168 or 8.6000000000000003e105 < z

    1. Initial program 94.1%

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

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

    if -1.05000000000000001e168 < z < -5.4999999999999999e-56

    1. Initial program 97.8%

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

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

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

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

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

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

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

        \[\leadsto x - \frac{\color{blue}{-y \cdot a}}{z} \]
      4. distribute-lft-neg-in52.3%

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

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

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

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

        \[\leadsto x - \frac{\color{blue}{-y}}{z} \cdot \frac{a}{1} \]
      9. /-rgt-identity59.9%

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

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

    if -5.4999999999999999e-56 < z < -7.59999999999999957e-91

    1. Initial program 77.0%

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

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

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

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

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

    if -7.59999999999999957e-91 < z < -6.19999999999999999e-183

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

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

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

    if -6.19999999999999999e-183 < z < 8.6000000000000003e105

    1. Initial program 98.1%

      \[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 y around inf 91.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.05 \cdot 10^{+168}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq -5.5 \cdot 10^{-56}:\\ \;\;\;\;x + a \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -7.6 \cdot 10^{-91}:\\ \;\;\;\;x - a \cdot \frac{y}{t}\\ \mathbf{elif}\;z \leq -6.2 \cdot 10^{-183}:\\ \;\;\;\;x - a \cdot y\\ \mathbf{elif}\;z \leq 8.6 \cdot 10^{+105}:\\ \;\;\;\;x - \frac{a}{\frac{t}{y}}\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 70.1% accurate, 0.4× speedup?

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

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

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

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

\mathbf{elif}\;z \leq -1.35 \cdot 10^{-175}:\\
\;\;\;\;x - a \cdot y\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -2.0999999999999999e25 or 2.29999999999999985e104 < z

    1. Initial program 95.9%

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

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

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

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

    if -2.0999999999999999e25 < z < -3.6500000000000002e-109

    1. Initial program 90.2%

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

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

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

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

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

    if -3.6500000000000002e-109 < z < -3.49999999999999993e-121

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

    if -3.49999999999999993e-121 < z < -1.34999999999999999e-175

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

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

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

    if -1.34999999999999999e-175 < z < 2.29999999999999985e104

    1. Initial program 98.1%

      \[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 y around inf 91.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.1 \cdot 10^{+25}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq -3.65 \cdot 10^{-109}:\\ \;\;\;\;x - a \cdot \frac{y}{t}\\ \mathbf{elif}\;z \leq -3.5 \cdot 10^{-121}:\\ \;\;\;\;x + a \cdot \frac{z}{1 - z}\\ \mathbf{elif}\;z \leq -1.35 \cdot 10^{-175}:\\ \;\;\;\;x - a \cdot y\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{+104}:\\ \;\;\;\;x - \frac{a}{\frac{t}{y}}\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 83.7% accurate, 0.4× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.45e100 or 9.599999999999999e105 < z

    1. Initial program 94.8%

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

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

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

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

    if -1.45e100 < z < -1.32000000000000001e57

    1. Initial program 100.0%

      \[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 t around inf 76.8%

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

    if -1.32000000000000001e57 < z < -1.54999999999999989e34

    1. Initial program 99.7%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Step-by-step derivation
      1. associate-/r/99.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 70.0%

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

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

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

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

        \[\leadsto x - \frac{\color{blue}{-y \cdot a}}{z} \]
      4. distribute-lft-neg-in70.4%

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

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

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

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

        \[\leadsto x - \frac{\color{blue}{-y}}{z} \cdot \frac{a}{1} \]
      9. /-rgt-identity70.4%

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

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

    if -1.54999999999999989e34 < z < 9.599999999999999e105

    1. Initial program 97.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.45 \cdot 10^{+100}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq -1.32 \cdot 10^{+57}:\\ \;\;\;\;x + \frac{a}{\frac{t}{z - y}}\\ \mathbf{elif}\;z \leq -1.55 \cdot 10^{+34}:\\ \;\;\;\;x + a \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 9.6 \cdot 10^{+105}:\\ \;\;\;\;x + a \cdot \frac{y}{-1 - t}\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 83.8% accurate, 0.4× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.45e100 or 2.2499999999999999e104 < z

    1. Initial program 94.8%

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

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

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

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

    if -1.45e100 < z < -2.9000000000000002e57

    1. Initial program 100.0%

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

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

    if -2.9000000000000002e57 < z < -3.3999999999999999e33

    1. Initial program 99.7%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Step-by-step derivation
      1. associate-/r/99.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 70.0%

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

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

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

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

        \[\leadsto x - \frac{\color{blue}{-y \cdot a}}{z} \]
      4. distribute-lft-neg-in70.4%

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

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

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

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

        \[\leadsto x - \frac{\color{blue}{-y}}{z} \cdot \frac{a}{1} \]
      9. /-rgt-identity70.4%

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

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

    if -3.3999999999999999e33 < z < 2.2499999999999999e104

    1. Initial program 97.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.45 \cdot 10^{+100}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq -2.9 \cdot 10^{+57}:\\ \;\;\;\;x + \frac{z - y}{\frac{t}{a}}\\ \mathbf{elif}\;z \leq -3.4 \cdot 10^{+33}:\\ \;\;\;\;x + a \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 2.25 \cdot 10^{+104}:\\ \;\;\;\;x + a \cdot \frac{y}{-1 - t}\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 90.1% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.50000000000000012e46 or 7.49999999999999941e26 < y

    1. Initial program 95.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 y around inf 87.8%

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

    if -1.50000000000000012e46 < y < 7.49999999999999941e26

    1. Initial program 97.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 y around 0 92.6%

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

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

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

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

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

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

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

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

        \[\leadsto x - \frac{z}{\color{blue}{-1 - \left(t - z\right)}} \cdot a \]
      9. associate--r-92.6%

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

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

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

Alternative 7: 89.2% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 93.7%

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

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

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

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

    if -3.8999999999999998e24 < z < 2e104

    1. Initial program 97.3%

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

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

    if 2e104 < z

    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 z around inf 97.9%

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

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

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

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

Alternative 8: 83.7% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{+93} \lor \neg \left(z \leq 1.04 \cdot 10^{+108}\right):\\
\;\;\;\;x - a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.5000000000000003e93 or 1.04e108 < z

    1. Initial program 94.9%

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

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

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

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

    if -5.5000000000000003e93 < z < 1.04e108

    1. Initial program 97.6%

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

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

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

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

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

Alternative 9: 87.3% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{+22} \lor \neg \left(z \leq 2.5 \cdot 10^{+104}\right):\\
\;\;\;\;x - a \cdot \frac{z - y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8e22 or 2.4999999999999998e104 < z

    1. Initial program 95.9%

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

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

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

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

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

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

    if -8e22 < z < 2.4999999999999998e104

    1. Initial program 97.3%

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

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

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

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

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

Alternative 10: 87.3% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 93.7%

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

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

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

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

    if -2.4999999999999999e30 < z < 2e104

    1. Initial program 97.3%

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

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

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

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

    if 2e104 < z

    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 z around inf 97.9%

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

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

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

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

Alternative 11: 69.6% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.25 \cdot 10^{+26} \lor \neg \left(z \leq 2.5 \cdot 10^{+104}\right):\\
\;\;\;\;x - a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.24999999999999989e26 or 2.4999999999999998e104 < z

    1. Initial program 95.9%

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

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

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

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

    if -2.24999999999999989e26 < z < 2.4999999999999998e104

    1. Initial program 97.3%

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

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

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

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

Alternative 12: 69.7% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.15000000000000014e33 or 5.1000000000000002e104 < z

    1. Initial program 95.9%

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

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

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

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

    if -2.15000000000000014e33 < z < 5.1000000000000002e104

    1. Initial program 97.3%

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

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

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

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

        \[\leadsto x - a \cdot \color{blue}{\frac{1}{\frac{t}{y}}} \]
      3. un-div-inv78.4%

        \[\leadsto x - \color{blue}{\frac{a}{\frac{t}{y}}} \]
    8. Applied egg-rr78.4%

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

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

Alternative 13: 72.0% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{+14} \lor \neg \left(z \leq 1.62 \cdot 10^{+97}\right):\\
\;\;\;\;x - a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.5e14 or 1.62e97 < z

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

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

    if -4.5e14 < z < 1.62e97

    1. Initial program 97.2%

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

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

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

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

Alternative 14: 65.2% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{+16} \lor \neg \left(z \leq 2 \cdot 10^{+104}\right):\\
\;\;\;\;x - a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.2e16 or 2e104 < z

    1. Initial program 95.9%

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

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

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

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

    if -1.2e16 < z < 2e104

    1. Initial program 97.3%

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

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

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

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

Alternative 15: 97.8% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

Alternative 16: 99.6% accurate, 1.0× speedup?

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

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

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

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

Alternative 17: 55.2% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.3 \cdot 10^{+162} \lor \neg \left(a \leq 2.7 \cdot 10^{+143}\right):\\
\;\;\;\;-a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.3e162 or 2.7000000000000002e143 < a

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

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

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

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

        \[\leadsto -\color{blue}{a \cdot \frac{y - z}{1 - z}} \]
      3. distribute-rgt-neg-in60.1%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot a} \]
    8. Step-by-step derivation
      1. mul-1-neg32.2%

        \[\leadsto \color{blue}{-a} \]
    9. Simplified32.2%

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

    if -1.3e162 < a < 2.7000000000000002e143

    1. Initial program 95.5%

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

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

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

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

Alternative 18: 53.9% 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.7%

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

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification53.2%

    \[\leadsto 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 2024055 
(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))))