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

Percentage Accurate: 97.1% → 99.6%
Time: 11.0s
Alternatives: 13
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 13 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(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.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. Final simplification99.9%

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

Alternative 2: 72.5% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - y \cdot a\\ \mathbf{if}\;z \leq -2.8 \cdot 10^{+81}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq -5.6 \cdot 10^{-27}:\\ \;\;\;\;x + \frac{y \cdot a}{z}\\ \mathbf{elif}\;z \leq -2.15 \cdot 10^{-120}:\\ \;\;\;\;x - y \cdot \frac{a}{t}\\ \mathbf{elif}\;z \leq -6.8 \cdot 10^{-233}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-260}:\\ \;\;\;\;x - \frac{a}{\frac{t}{y}}\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-82}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 51:\\ \;\;\;\;x - \frac{y}{\frac{t}{a}}\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (* y a))))
   (if (<= z -2.8e+81)
     (- x a)
     (if (<= z -5.6e-27)
       (+ x (/ (* y a) z))
       (if (<= z -2.15e-120)
         (- x (* y (/ a t)))
         (if (<= z -6.8e-233)
           t_1
           (if (<= z 8e-260)
             (- x (/ a (/ t y)))
             (if (<= z 4.5e-82)
               t_1
               (if (<= z 51.0) (- x (/ y (/ t a))) (- x a))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (y * a);
	double tmp;
	if (z <= -2.8e+81) {
		tmp = x - a;
	} else if (z <= -5.6e-27) {
		tmp = x + ((y * a) / z);
	} else if (z <= -2.15e-120) {
		tmp = x - (y * (a / t));
	} else if (z <= -6.8e-233) {
		tmp = t_1;
	} else if (z <= 8e-260) {
		tmp = x - (a / (t / y));
	} else if (z <= 4.5e-82) {
		tmp = t_1;
	} else if (z <= 51.0) {
		tmp = x - (y / (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) :: t_1
    real(8) :: tmp
    t_1 = x - (y * a)
    if (z <= (-2.8d+81)) then
        tmp = x - a
    else if (z <= (-5.6d-27)) then
        tmp = x + ((y * a) / z)
    else if (z <= (-2.15d-120)) then
        tmp = x - (y * (a / t))
    else if (z <= (-6.8d-233)) then
        tmp = t_1
    else if (z <= 8d-260) then
        tmp = x - (a / (t / y))
    else if (z <= 4.5d-82) then
        tmp = t_1
    else if (z <= 51.0d0) then
        tmp = x - (y / (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 t_1 = x - (y * a);
	double tmp;
	if (z <= -2.8e+81) {
		tmp = x - a;
	} else if (z <= -5.6e-27) {
		tmp = x + ((y * a) / z);
	} else if (z <= -2.15e-120) {
		tmp = x - (y * (a / t));
	} else if (z <= -6.8e-233) {
		tmp = t_1;
	} else if (z <= 8e-260) {
		tmp = x - (a / (t / y));
	} else if (z <= 4.5e-82) {
		tmp = t_1;
	} else if (z <= 51.0) {
		tmp = x - (y / (t / a));
	} else {
		tmp = x - a;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (y * a)
	tmp = 0
	if z <= -2.8e+81:
		tmp = x - a
	elif z <= -5.6e-27:
		tmp = x + ((y * a) / z)
	elif z <= -2.15e-120:
		tmp = x - (y * (a / t))
	elif z <= -6.8e-233:
		tmp = t_1
	elif z <= 8e-260:
		tmp = x - (a / (t / y))
	elif z <= 4.5e-82:
		tmp = t_1
	elif z <= 51.0:
		tmp = x - (y / (t / a))
	else:
		tmp = x - a
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(y * a))
	tmp = 0.0
	if (z <= -2.8e+81)
		tmp = Float64(x - a);
	elseif (z <= -5.6e-27)
		tmp = Float64(x + Float64(Float64(y * a) / z));
	elseif (z <= -2.15e-120)
		tmp = Float64(x - Float64(y * Float64(a / t)));
	elseif (z <= -6.8e-233)
		tmp = t_1;
	elseif (z <= 8e-260)
		tmp = Float64(x - Float64(a / Float64(t / y)));
	elseif (z <= 4.5e-82)
		tmp = t_1;
	elseif (z <= 51.0)
		tmp = Float64(x - Float64(y / Float64(t / a)));
	else
		tmp = Float64(x - a);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (y * a);
	tmp = 0.0;
	if (z <= -2.8e+81)
		tmp = x - a;
	elseif (z <= -5.6e-27)
		tmp = x + ((y * a) / z);
	elseif (z <= -2.15e-120)
		tmp = x - (y * (a / t));
	elseif (z <= -6.8e-233)
		tmp = t_1;
	elseif (z <= 8e-260)
		tmp = x - (a / (t / y));
	elseif (z <= 4.5e-82)
		tmp = t_1;
	elseif (z <= 51.0)
		tmp = x - (y / (t / a));
	else
		tmp = x - a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.8e+81], N[(x - a), $MachinePrecision], If[LessEqual[z, -5.6e-27], N[(x + N[(N[(y * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.15e-120], N[(x - N[(y * N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.8e-233], t$95$1, If[LessEqual[z, 8e-260], N[(x - N[(a / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.5e-82], t$95$1, If[LessEqual[z, 51.0], N[(x - N[(y / N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;z \leq -6.8 \cdot 10^{-233}:\\
\;\;\;\;t\_1\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -2.79999999999999995e81 or 51 < z

    1. Initial program 92.6%

      \[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 -2.79999999999999995e81 < z < -5.5999999999999999e-27

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{a \cdot \frac{y}{z}} \]
      4. div-inv68.0%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{-a \cdot y}{z}} \]
      12. add-sqr-sqrt33.3%

        \[\leadsto x + \frac{\color{blue}{\sqrt{-a \cdot y} \cdot \sqrt{-a \cdot y}}}{z} \]
      13. sqrt-unprod49.3%

        \[\leadsto x + \frac{\color{blue}{\sqrt{\left(-a \cdot y\right) \cdot \left(-a \cdot y\right)}}}{z} \]
      14. sqr-neg49.3%

        \[\leadsto x + \frac{\sqrt{\color{blue}{\left(a \cdot y\right) \cdot \left(a \cdot y\right)}}}{z} \]
      15. sqrt-unprod31.0%

        \[\leadsto x + \frac{\color{blue}{\sqrt{a \cdot y} \cdot \sqrt{a \cdot y}}}{z} \]
      16. add-sqr-sqrt68.1%

        \[\leadsto x + \frac{\color{blue}{a \cdot y}}{z} \]
      17. *-commutative68.1%

        \[\leadsto x + \frac{\color{blue}{y \cdot a}}{z} \]
    10. Applied egg-rr68.1%

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

    if -5.5999999999999999e-27 < z < -2.14999999999999991e-120

    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 t around inf 72.6%

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

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

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

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

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

      \[\leadsto x - \color{blue}{\frac{a}{\frac{t}{y}}} \]
    9. Step-by-step derivation
      1. associate-/r/68.4%

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

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

    if -2.14999999999999991e-120 < z < -6.8000000000000004e-233 or 7.99999999999999969e-260 < z < 4.4999999999999998e-82

    1. Initial program 98.4%

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

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

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

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

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

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

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

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

    if -6.8000000000000004e-233 < z < 7.99999999999999969e-260

    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. Taylor expanded in t around inf 99.8%

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

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

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

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

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

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

    if 4.4999999999999998e-82 < z < 51

    1. Initial program 100.0%

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

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

        \[\leadsto x - \frac{y - z}{\color{blue}{\frac{t}{a} - \frac{z - 1}{a}}} \]
      3. sub-neg100.0%

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

        \[\leadsto x - \frac{y - z}{\frac{t}{a} - \frac{z + \color{blue}{-1}}{a}} \]
    4. Applied egg-rr100.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{+81}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq -5.6 \cdot 10^{-27}:\\ \;\;\;\;x + \frac{y \cdot a}{z}\\ \mathbf{elif}\;z \leq -2.15 \cdot 10^{-120}:\\ \;\;\;\;x - y \cdot \frac{a}{t}\\ \mathbf{elif}\;z \leq -6.8 \cdot 10^{-233}:\\ \;\;\;\;x - y \cdot a\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-260}:\\ \;\;\;\;x - \frac{a}{\frac{t}{y}}\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-82}:\\ \;\;\;\;x - y \cdot a\\ \mathbf{elif}\;z \leq 51:\\ \;\;\;\;x - \frac{y}{\frac{t}{a}}\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 72.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - y \cdot a\\ \mathbf{if}\;z \leq -3 \cdot 10^{+84}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq -3.7 \cdot 10^{-25}:\\ \;\;\;\;x + \frac{y \cdot a}{z}\\ \mathbf{elif}\;z \leq -2.65 \cdot 10^{-117}:\\ \;\;\;\;x - y \cdot \frac{a}{t}\\ \mathbf{elif}\;z \leq -1.65 \cdot 10^{-232}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{-260}:\\ \;\;\;\;x - \frac{a}{\frac{t}{y}}\\ \mathbf{elif}\;z \leq 4.7 \cdot 10^{-82}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 8.5:\\ \;\;\;\;x - a \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (* y a))))
   (if (<= z -3e+84)
     (- x a)
     (if (<= z -3.7e-25)
       (+ x (/ (* y a) z))
       (if (<= z -2.65e-117)
         (- x (* y (/ a t)))
         (if (<= z -1.65e-232)
           t_1
           (if (<= z 1.35e-260)
             (- x (/ a (/ t y)))
             (if (<= z 4.7e-82)
               t_1
               (if (<= z 8.5) (- x (* a (/ y t))) (- x a))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (y * a);
	double tmp;
	if (z <= -3e+84) {
		tmp = x - a;
	} else if (z <= -3.7e-25) {
		tmp = x + ((y * a) / z);
	} else if (z <= -2.65e-117) {
		tmp = x - (y * (a / t));
	} else if (z <= -1.65e-232) {
		tmp = t_1;
	} else if (z <= 1.35e-260) {
		tmp = x - (a / (t / y));
	} else if (z <= 4.7e-82) {
		tmp = t_1;
	} else if (z <= 8.5) {
		tmp = x - (a * (y / 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 = x - (y * a)
    if (z <= (-3d+84)) then
        tmp = x - a
    else if (z <= (-3.7d-25)) then
        tmp = x + ((y * a) / z)
    else if (z <= (-2.65d-117)) then
        tmp = x - (y * (a / t))
    else if (z <= (-1.65d-232)) then
        tmp = t_1
    else if (z <= 1.35d-260) then
        tmp = x - (a / (t / y))
    else if (z <= 4.7d-82) then
        tmp = t_1
    else if (z <= 8.5d0) then
        tmp = x - (a * (y / 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 = x - (y * a);
	double tmp;
	if (z <= -3e+84) {
		tmp = x - a;
	} else if (z <= -3.7e-25) {
		tmp = x + ((y * a) / z);
	} else if (z <= -2.65e-117) {
		tmp = x - (y * (a / t));
	} else if (z <= -1.65e-232) {
		tmp = t_1;
	} else if (z <= 1.35e-260) {
		tmp = x - (a / (t / y));
	} else if (z <= 4.7e-82) {
		tmp = t_1;
	} else if (z <= 8.5) {
		tmp = x - (a * (y / t));
	} else {
		tmp = x - a;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (y * a)
	tmp = 0
	if z <= -3e+84:
		tmp = x - a
	elif z <= -3.7e-25:
		tmp = x + ((y * a) / z)
	elif z <= -2.65e-117:
		tmp = x - (y * (a / t))
	elif z <= -1.65e-232:
		tmp = t_1
	elif z <= 1.35e-260:
		tmp = x - (a / (t / y))
	elif z <= 4.7e-82:
		tmp = t_1
	elif z <= 8.5:
		tmp = x - (a * (y / t))
	else:
		tmp = x - a
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(y * a))
	tmp = 0.0
	if (z <= -3e+84)
		tmp = Float64(x - a);
	elseif (z <= -3.7e-25)
		tmp = Float64(x + Float64(Float64(y * a) / z));
	elseif (z <= -2.65e-117)
		tmp = Float64(x - Float64(y * Float64(a / t)));
	elseif (z <= -1.65e-232)
		tmp = t_1;
	elseif (z <= 1.35e-260)
		tmp = Float64(x - Float64(a / Float64(t / y)));
	elseif (z <= 4.7e-82)
		tmp = t_1;
	elseif (z <= 8.5)
		tmp = Float64(x - Float64(a * Float64(y / t)));
	else
		tmp = Float64(x - a);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (y * a);
	tmp = 0.0;
	if (z <= -3e+84)
		tmp = x - a;
	elseif (z <= -3.7e-25)
		tmp = x + ((y * a) / z);
	elseif (z <= -2.65e-117)
		tmp = x - (y * (a / t));
	elseif (z <= -1.65e-232)
		tmp = t_1;
	elseif (z <= 1.35e-260)
		tmp = x - (a / (t / y));
	elseif (z <= 4.7e-82)
		tmp = t_1;
	elseif (z <= 8.5)
		tmp = x - (a * (y / t));
	else
		tmp = x - a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3e+84], N[(x - a), $MachinePrecision], If[LessEqual[z, -3.7e-25], N[(x + N[(N[(y * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.65e-117], N[(x - N[(y * N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.65e-232], t$95$1, If[LessEqual[z, 1.35e-260], N[(x - N[(a / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.7e-82], t$95$1, If[LessEqual[z, 8.5], N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

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

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

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

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

\mathbf{elif}\;z \leq 4.7 \cdot 10^{-82}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -2.99999999999999996e84 or 8.5 < z

    1. Initial program 92.6%

      \[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 -2.99999999999999996e84 < z < -3.70000000000000009e-25

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{a \cdot \frac{y}{z}} \]
      4. div-inv68.0%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{-a \cdot y}{z}} \]
      12. add-sqr-sqrt33.3%

        \[\leadsto x + \frac{\color{blue}{\sqrt{-a \cdot y} \cdot \sqrt{-a \cdot y}}}{z} \]
      13. sqrt-unprod49.3%

        \[\leadsto x + \frac{\color{blue}{\sqrt{\left(-a \cdot y\right) \cdot \left(-a \cdot y\right)}}}{z} \]
      14. sqr-neg49.3%

        \[\leadsto x + \frac{\sqrt{\color{blue}{\left(a \cdot y\right) \cdot \left(a \cdot y\right)}}}{z} \]
      15. sqrt-unprod31.0%

        \[\leadsto x + \frac{\color{blue}{\sqrt{a \cdot y} \cdot \sqrt{a \cdot y}}}{z} \]
      16. add-sqr-sqrt68.1%

        \[\leadsto x + \frac{\color{blue}{a \cdot y}}{z} \]
      17. *-commutative68.1%

        \[\leadsto x + \frac{\color{blue}{y \cdot a}}{z} \]
    10. Applied egg-rr68.1%

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

    if -3.70000000000000009e-25 < z < -2.64999999999999993e-117

    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 t around inf 72.6%

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

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

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

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

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

      \[\leadsto x - \color{blue}{\frac{a}{\frac{t}{y}}} \]
    9. Step-by-step derivation
      1. associate-/r/68.4%

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

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

    if -2.64999999999999993e-117 < z < -1.64999999999999993e-232 or 1.35000000000000003e-260 < z < 4.7000000000000001e-82

    1. Initial program 98.4%

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

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

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

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

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

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

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

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

    if -1.64999999999999993e-232 < z < 1.35000000000000003e-260

    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. Taylor expanded in t around inf 99.8%

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

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

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

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

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

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

    if 4.7000000000000001e-82 < z < 8.5

    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.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{+84}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq -3.7 \cdot 10^{-25}:\\ \;\;\;\;x + \frac{y \cdot a}{z}\\ \mathbf{elif}\;z \leq -2.65 \cdot 10^{-117}:\\ \;\;\;\;x - y \cdot \frac{a}{t}\\ \mathbf{elif}\;z \leq -1.65 \cdot 10^{-232}:\\ \;\;\;\;x - y \cdot a\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{-260}:\\ \;\;\;\;x - \frac{a}{\frac{t}{y}}\\ \mathbf{elif}\;z \leq 4.7 \cdot 10^{-82}:\\ \;\;\;\;x - y \cdot a\\ \mathbf{elif}\;z \leq 8.5:\\ \;\;\;\;x - a \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 72.7% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - y \cdot \frac{a}{t}\\ t_2 := x - y \cdot a\\ \mathbf{if}\;z \leq -8.2 \cdot 10^{+83}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq -3.8 \cdot 10^{-25}:\\ \;\;\;\;x + \frac{y \cdot a}{z}\\ \mathbf{elif}\;z \leq -2.65 \cdot 10^{-117}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{-263}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 1.36 \cdot 10^{-260}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{-85}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 210:\\ \;\;\;\;x - a \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (* y (/ a t)))) (t_2 (- x (* y a))))
   (if (<= z -8.2e+83)
     (- x a)
     (if (<= z -3.8e-25)
       (+ x (/ (* y a) z))
       (if (<= z -2.65e-117)
         t_1
         (if (<= z -1.25e-263)
           t_2
           (if (<= z 1.36e-260)
             t_1
             (if (<= z 1.55e-85)
               t_2
               (if (<= z 210.0) (- x (* a (/ y t))) (- x a))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (y * (a / t));
	double t_2 = x - (y * a);
	double tmp;
	if (z <= -8.2e+83) {
		tmp = x - a;
	} else if (z <= -3.8e-25) {
		tmp = x + ((y * a) / z);
	} else if (z <= -2.65e-117) {
		tmp = t_1;
	} else if (z <= -1.25e-263) {
		tmp = t_2;
	} else if (z <= 1.36e-260) {
		tmp = t_1;
	} else if (z <= 1.55e-85) {
		tmp = t_2;
	} else if (z <= 210.0) {
		tmp = x - (a * (y / 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) :: t_2
    real(8) :: tmp
    t_1 = x - (y * (a / t))
    t_2 = x - (y * a)
    if (z <= (-8.2d+83)) then
        tmp = x - a
    else if (z <= (-3.8d-25)) then
        tmp = x + ((y * a) / z)
    else if (z <= (-2.65d-117)) then
        tmp = t_1
    else if (z <= (-1.25d-263)) then
        tmp = t_2
    else if (z <= 1.36d-260) then
        tmp = t_1
    else if (z <= 1.55d-85) then
        tmp = t_2
    else if (z <= 210.0d0) then
        tmp = x - (a * (y / 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 = x - (y * (a / t));
	double t_2 = x - (y * a);
	double tmp;
	if (z <= -8.2e+83) {
		tmp = x - a;
	} else if (z <= -3.8e-25) {
		tmp = x + ((y * a) / z);
	} else if (z <= -2.65e-117) {
		tmp = t_1;
	} else if (z <= -1.25e-263) {
		tmp = t_2;
	} else if (z <= 1.36e-260) {
		tmp = t_1;
	} else if (z <= 1.55e-85) {
		tmp = t_2;
	} else if (z <= 210.0) {
		tmp = x - (a * (y / t));
	} else {
		tmp = x - a;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (y * (a / t))
	t_2 = x - (y * a)
	tmp = 0
	if z <= -8.2e+83:
		tmp = x - a
	elif z <= -3.8e-25:
		tmp = x + ((y * a) / z)
	elif z <= -2.65e-117:
		tmp = t_1
	elif z <= -1.25e-263:
		tmp = t_2
	elif z <= 1.36e-260:
		tmp = t_1
	elif z <= 1.55e-85:
		tmp = t_2
	elif z <= 210.0:
		tmp = x - (a * (y / t))
	else:
		tmp = x - a
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(y * Float64(a / t)))
	t_2 = Float64(x - Float64(y * a))
	tmp = 0.0
	if (z <= -8.2e+83)
		tmp = Float64(x - a);
	elseif (z <= -3.8e-25)
		tmp = Float64(x + Float64(Float64(y * a) / z));
	elseif (z <= -2.65e-117)
		tmp = t_1;
	elseif (z <= -1.25e-263)
		tmp = t_2;
	elseif (z <= 1.36e-260)
		tmp = t_1;
	elseif (z <= 1.55e-85)
		tmp = t_2;
	elseif (z <= 210.0)
		tmp = Float64(x - Float64(a * Float64(y / t)));
	else
		tmp = Float64(x - a);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (y * (a / t));
	t_2 = x - (y * a);
	tmp = 0.0;
	if (z <= -8.2e+83)
		tmp = x - a;
	elseif (z <= -3.8e-25)
		tmp = x + ((y * a) / z);
	elseif (z <= -2.65e-117)
		tmp = t_1;
	elseif (z <= -1.25e-263)
		tmp = t_2;
	elseif (z <= 1.36e-260)
		tmp = t_1;
	elseif (z <= 1.55e-85)
		tmp = t_2;
	elseif (z <= 210.0)
		tmp = x - (a * (y / t));
	else
		tmp = x - a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y * N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.2e+83], N[(x - a), $MachinePrecision], If[LessEqual[z, -3.8e-25], N[(x + N[(N[(y * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.65e-117], t$95$1, If[LessEqual[z, -1.25e-263], t$95$2, If[LessEqual[z, 1.36e-260], t$95$1, If[LessEqual[z, 1.55e-85], t$95$2, If[LessEqual[z, 210.0], N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -2.65 \cdot 10^{-117}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -1.25 \cdot 10^{-263}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq 1.36 \cdot 10^{-260}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.55 \cdot 10^{-85}:\\
\;\;\;\;t\_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -8.2000000000000002e83 or 210 < z

    1. Initial program 92.6%

      \[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 -8.2000000000000002e83 < z < -3.7999999999999998e-25

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{a \cdot \frac{y}{z}} \]
      4. div-inv68.0%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{-a \cdot y}{z}} \]
      12. add-sqr-sqrt33.3%

        \[\leadsto x + \frac{\color{blue}{\sqrt{-a \cdot y} \cdot \sqrt{-a \cdot y}}}{z} \]
      13. sqrt-unprod49.3%

        \[\leadsto x + \frac{\color{blue}{\sqrt{\left(-a \cdot y\right) \cdot \left(-a \cdot y\right)}}}{z} \]
      14. sqr-neg49.3%

        \[\leadsto x + \frac{\sqrt{\color{blue}{\left(a \cdot y\right) \cdot \left(a \cdot y\right)}}}{z} \]
      15. sqrt-unprod31.0%

        \[\leadsto x + \frac{\color{blue}{\sqrt{a \cdot y} \cdot \sqrt{a \cdot y}}}{z} \]
      16. add-sqr-sqrt68.1%

        \[\leadsto x + \frac{\color{blue}{a \cdot y}}{z} \]
      17. *-commutative68.1%

        \[\leadsto x + \frac{\color{blue}{y \cdot a}}{z} \]
    10. Applied egg-rr68.1%

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

    if -3.7999999999999998e-25 < z < -2.64999999999999993e-117 or -1.25000000000000002e-263 < z < 1.36e-260

    1. Initial program 99.9%

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

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

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

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

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

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

      \[\leadsto x - \color{blue}{\frac{a}{\frac{t}{y}}} \]
    9. Step-by-step derivation
      1. associate-/r/79.2%

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

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

    if -2.64999999999999993e-117 < z < -1.25000000000000002e-263 or 1.36e-260 < z < 1.5500000000000001e-85

    1. Initial program 98.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 0 94.4%

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

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

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

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

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

    if 1.5500000000000001e-85 < z < 210

    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.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.2 \cdot 10^{+83}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq -3.8 \cdot 10^{-25}:\\ \;\;\;\;x + \frac{y \cdot a}{z}\\ \mathbf{elif}\;z \leq -2.65 \cdot 10^{-117}:\\ \;\;\;\;x - y \cdot \frac{a}{t}\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{-263}:\\ \;\;\;\;x - y \cdot a\\ \mathbf{elif}\;z \leq 1.36 \cdot 10^{-260}:\\ \;\;\;\;x - y \cdot \frac{a}{t}\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{-85}:\\ \;\;\;\;x - y \cdot a\\ \mathbf{elif}\;z \leq 210:\\ \;\;\;\;x - a \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 72.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - y \cdot \frac{a}{t}\\ t_2 := x - y \cdot a\\ \mathbf{if}\;z \leq -2.05 \cdot 10^{+83}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq -1.55 \cdot 10^{-25}:\\ \;\;\;\;x + \frac{y \cdot a}{z}\\ \mathbf{elif}\;z \leq -3.5 \cdot 10^{-118}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.52 \cdot 10^{-263}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 10^{-259}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-78}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 175:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (* y (/ a t)))) (t_2 (- x (* y a))))
   (if (<= z -2.05e+83)
     (- x a)
     (if (<= z -1.55e-25)
       (+ x (/ (* y a) z))
       (if (<= z -3.5e-118)
         t_1
         (if (<= z -1.52e-263)
           t_2
           (if (<= z 1e-259)
             t_1
             (if (<= z 3e-78) t_2 (if (<= z 175.0) t_1 (- x a))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (y * (a / t));
	double t_2 = x - (y * a);
	double tmp;
	if (z <= -2.05e+83) {
		tmp = x - a;
	} else if (z <= -1.55e-25) {
		tmp = x + ((y * a) / z);
	} else if (z <= -3.5e-118) {
		tmp = t_1;
	} else if (z <= -1.52e-263) {
		tmp = t_2;
	} else if (z <= 1e-259) {
		tmp = t_1;
	} else if (z <= 3e-78) {
		tmp = t_2;
	} else if (z <= 175.0) {
		tmp = t_1;
	} else {
		tmp = x - a;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x - (y * (a / t))
    t_2 = x - (y * a)
    if (z <= (-2.05d+83)) then
        tmp = x - a
    else if (z <= (-1.55d-25)) then
        tmp = x + ((y * a) / z)
    else if (z <= (-3.5d-118)) then
        tmp = t_1
    else if (z <= (-1.52d-263)) then
        tmp = t_2
    else if (z <= 1d-259) then
        tmp = t_1
    else if (z <= 3d-78) then
        tmp = t_2
    else if (z <= 175.0d0) then
        tmp = t_1
    else
        tmp = x - a
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (y * (a / t));
	double t_2 = x - (y * a);
	double tmp;
	if (z <= -2.05e+83) {
		tmp = x - a;
	} else if (z <= -1.55e-25) {
		tmp = x + ((y * a) / z);
	} else if (z <= -3.5e-118) {
		tmp = t_1;
	} else if (z <= -1.52e-263) {
		tmp = t_2;
	} else if (z <= 1e-259) {
		tmp = t_1;
	} else if (z <= 3e-78) {
		tmp = t_2;
	} else if (z <= 175.0) {
		tmp = t_1;
	} else {
		tmp = x - a;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (y * (a / t))
	t_2 = x - (y * a)
	tmp = 0
	if z <= -2.05e+83:
		tmp = x - a
	elif z <= -1.55e-25:
		tmp = x + ((y * a) / z)
	elif z <= -3.5e-118:
		tmp = t_1
	elif z <= -1.52e-263:
		tmp = t_2
	elif z <= 1e-259:
		tmp = t_1
	elif z <= 3e-78:
		tmp = t_2
	elif z <= 175.0:
		tmp = t_1
	else:
		tmp = x - a
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(y * Float64(a / t)))
	t_2 = Float64(x - Float64(y * a))
	tmp = 0.0
	if (z <= -2.05e+83)
		tmp = Float64(x - a);
	elseif (z <= -1.55e-25)
		tmp = Float64(x + Float64(Float64(y * a) / z));
	elseif (z <= -3.5e-118)
		tmp = t_1;
	elseif (z <= -1.52e-263)
		tmp = t_2;
	elseif (z <= 1e-259)
		tmp = t_1;
	elseif (z <= 3e-78)
		tmp = t_2;
	elseif (z <= 175.0)
		tmp = t_1;
	else
		tmp = Float64(x - a);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (y * (a / t));
	t_2 = x - (y * a);
	tmp = 0.0;
	if (z <= -2.05e+83)
		tmp = x - a;
	elseif (z <= -1.55e-25)
		tmp = x + ((y * a) / z);
	elseif (z <= -3.5e-118)
		tmp = t_1;
	elseif (z <= -1.52e-263)
		tmp = t_2;
	elseif (z <= 1e-259)
		tmp = t_1;
	elseif (z <= 3e-78)
		tmp = t_2;
	elseif (z <= 175.0)
		tmp = t_1;
	else
		tmp = x - a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y * N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.05e+83], N[(x - a), $MachinePrecision], If[LessEqual[z, -1.55e-25], N[(x + N[(N[(y * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.5e-118], t$95$1, If[LessEqual[z, -1.52e-263], t$95$2, If[LessEqual[z, 1e-259], t$95$1, If[LessEqual[z, 3e-78], t$95$2, If[LessEqual[z, 175.0], t$95$1, N[(x - a), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -3.5 \cdot 10^{-118}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -1.52 \cdot 10^{-263}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq 10^{-259}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 3 \cdot 10^{-78}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq 175:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.05e83 or 175 < z

    1. Initial program 92.6%

      \[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 -2.05e83 < z < -1.54999999999999997e-25

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{a \cdot \frac{y}{z}} \]
      4. div-inv68.0%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{-a \cdot y}{z}} \]
      12. add-sqr-sqrt33.3%

        \[\leadsto x + \frac{\color{blue}{\sqrt{-a \cdot y} \cdot \sqrt{-a \cdot y}}}{z} \]
      13. sqrt-unprod49.3%

        \[\leadsto x + \frac{\color{blue}{\sqrt{\left(-a \cdot y\right) \cdot \left(-a \cdot y\right)}}}{z} \]
      14. sqr-neg49.3%

        \[\leadsto x + \frac{\sqrt{\color{blue}{\left(a \cdot y\right) \cdot \left(a \cdot y\right)}}}{z} \]
      15. sqrt-unprod31.0%

        \[\leadsto x + \frac{\color{blue}{\sqrt{a \cdot y} \cdot \sqrt{a \cdot y}}}{z} \]
      16. add-sqr-sqrt68.1%

        \[\leadsto x + \frac{\color{blue}{a \cdot y}}{z} \]
      17. *-commutative68.1%

        \[\leadsto x + \frac{\color{blue}{y \cdot a}}{z} \]
    10. Applied egg-rr68.1%

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

    if -1.54999999999999997e-25 < z < -3.5e-118 or -1.52000000000000005e-263 < z < 1.0000000000000001e-259 or 2.99999999999999988e-78 < z < 175

    1. Initial program 99.9%

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

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

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

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

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

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

      \[\leadsto x - \color{blue}{\frac{a}{\frac{t}{y}}} \]
    9. Step-by-step derivation
      1. associate-/r/83.2%

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

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

    if -3.5e-118 < z < -1.52000000000000005e-263 or 1.0000000000000001e-259 < z < 2.99999999999999988e-78

    1. Initial program 98.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 0 94.4%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.05 \cdot 10^{+83}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq -1.55 \cdot 10^{-25}:\\ \;\;\;\;x + \frac{y \cdot a}{z}\\ \mathbf{elif}\;z \leq -3.5 \cdot 10^{-118}:\\ \;\;\;\;x - y \cdot \frac{a}{t}\\ \mathbf{elif}\;z \leq -1.52 \cdot 10^{-263}:\\ \;\;\;\;x - y \cdot a\\ \mathbf{elif}\;z \leq 10^{-259}:\\ \;\;\;\;x - y \cdot \frac{a}{t}\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-78}:\\ \;\;\;\;x - y \cdot a\\ \mathbf{elif}\;z \leq 175:\\ \;\;\;\;x - y \cdot \frac{a}{t}\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 91.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4 \cdot 10^{+27} \lor \neg \left(t \leq 6 \cdot 10^{+89}\right):\\
\;\;\;\;x + a \cdot \frac{z - y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.0000000000000001e27 or 6.00000000000000025e89 < t

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

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

    if -4.0000000000000001e27 < t < 6.00000000000000025e89

    1. Initial program 97.5%

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

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

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

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

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

Alternative 7: 88.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+70} \lor \neg \left(z \leq 2.9 \cdot 10^{+155}\right):\\
\;\;\;\;x - \left(a - y \cdot \frac{a}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.00000000000000029e70 or 2.8999999999999999e155 < z

    1. Initial program 90.7%

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

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

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

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

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

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

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

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

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

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

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

    if -4.00000000000000029e70 < z < 2.8999999999999999e155

    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.9%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 88.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{+72}:\\
\;\;\;\;x - \left(a - y \cdot \frac{a}{z}\right)\\

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

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


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

    1. Initial program 90.2%

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

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

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

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

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

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

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

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

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

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

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

    if -2.3e72 < z < 3.99999999999999998e89

    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.9%

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

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

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

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

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

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

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

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

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

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

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

    if 3.99999999999999998e89 < z

    1. Initial program 94.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 88.9% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{+18} \lor \neg \left(z \leq 7.8\right):\\
\;\;\;\;x - \left(a - y \cdot \frac{a}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.1e18 or 7.79999999999999982 < z

    1. Initial program 93.8%

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

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

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

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

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

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

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

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

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

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

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

    if -1.1e18 < z < 7.79999999999999982

    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.9%

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

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

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

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

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

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

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

Alternative 10: 83.9% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.6 \cdot 10^{+84} \lor \neg \left(z \leq 210\right):\\
\;\;\;\;x - a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.5999999999999999e84 or 210 < z

    1. Initial program 92.6%

      \[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 -3.5999999999999999e84 < z < 210

    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.9%

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

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

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

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

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

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

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

Alternative 11: 72.6% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{+82} \lor \neg \left(z \leq 3.6 \cdot 10^{-11}\right):\\
\;\;\;\;x - a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.59999999999999987e82 or 3.59999999999999985e-11 < z

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

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

    if -1.59999999999999987e82 < z < 3.59999999999999985e-11

    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.9%

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

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

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

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

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

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

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

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

Alternative 12: 66.2% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.05 \cdot 10^{+15} \lor \neg \left(z \leq 1600000000\right):\\
\;\;\;\;x - a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.05e15 or 1.6e9 < z

    1. Initial program 93.6%

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

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

    if -2.05e15 < z < 1.6e9

    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.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 53.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.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 y around inf 75.4%

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  9. 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 2024086 
(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))))