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

Percentage Accurate: 96.9% → 99.6%
Time: 14.2s
Alternatives: 14
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 14 alternatives:

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

Initial Program: 96.9% 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, 0.1× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(\frac{y - z}{\left(z - t\right) + -1}, a, x\right) \end{array} \]
(FPCore (x y z t a) :precision binary64 (fma (/ (- y z) (+ (- z t) -1.0)) a x))
double code(double x, double y, double z, double t, double a) {
	return fma(((y - z) / ((z - t) + -1.0)), a, x);
}
function code(x, y, z, t, a)
	return fma(Float64(Float64(y - z) / Float64(Float64(z - t) + -1.0)), a, x)
end
code[x_, y_, z_, t_, a_] := N[(N[(N[(y - z), $MachinePrecision] / N[(N[(z - t), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision]
\begin{array}{l}

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(-\frac{y - z}{\left(t - z\right) + 1}, a, x\right)} \]
    6. distribute-neg-frac299.7%

      \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y - z}{-\left(\left(t - z\right) + 1\right)}}, a, x\right) \]
    7. distribute-neg-in99.7%

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

      \[\leadsto \mathsf{fma}\left(\frac{y - z}{\left(-\color{blue}{\left(t + \left(-z\right)\right)}\right) + \left(-1\right)}, a, x\right) \]
    9. distribute-neg-in99.7%

      \[\leadsto \mathsf{fma}\left(\frac{y - z}{\color{blue}{\left(\left(-t\right) + \left(-\left(-z\right)\right)\right)} + \left(-1\right)}, a, x\right) \]
    10. remove-double-neg99.7%

      \[\leadsto \mathsf{fma}\left(\frac{y - z}{\left(\left(-t\right) + \color{blue}{z}\right) + \left(-1\right)}, a, x\right) \]
    11. +-commutative99.7%

      \[\leadsto \mathsf{fma}\left(\frac{y - z}{\color{blue}{\left(z + \left(-t\right)\right)} + \left(-1\right)}, a, x\right) \]
    12. sub-neg99.7%

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

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

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

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

Alternative 2: 72.6% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t \leq -3.6 \cdot 10^{-189}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 1.6 \cdot 10^{-138}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 9 \cdot 10^{-6}:\\
\;\;\;\;x - a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -14.5 or 9.00000000000000023e-6 < t

    1. Initial program 94.7%

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

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

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

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

    if -14.5 < t < -3.60000000000000017e-189 or 9.99999999999999963e-272 < t < 1.60000000000000005e-138

    1. Initial program 97.2%

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

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

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

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

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

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

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

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

    if -3.60000000000000017e-189 < t < 9.99999999999999963e-272

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \frac{y - z}{\color{blue}{\left(0 - 1\right) + z}} \]
      7. metadata-eval73.7%

        \[\leadsto a \cdot \frac{y - z}{\color{blue}{-1} + z} \]
    10. Simplified73.7%

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

    if 1.60000000000000005e-138 < t < 9.00000000000000023e-6

    1. Initial program 96.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -14.5:\\ \;\;\;\;x + a \cdot \frac{z - y}{t}\\ \mathbf{elif}\;t \leq -3.6 \cdot 10^{-189}:\\ \;\;\;\;x - y \cdot a\\ \mathbf{elif}\;t \leq 10^{-271}:\\ \;\;\;\;a \cdot \frac{y - z}{z + -1}\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{-138}:\\ \;\;\;\;x - y \cdot a\\ \mathbf{elif}\;t \leq 9 \cdot 10^{-6}:\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;x + a \cdot \frac{z - y}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 73.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - y \cdot a\\ \mathbf{if}\;z \leq -1.45 \cdot 10^{+20}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-196}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-133}:\\ \;\;\;\;x - y \cdot \frac{a}{t}\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{-7}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{+134}:\\ \;\;\;\;x + \frac{a}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (* y a))))
   (if (<= z -1.45e+20)
     (- x a)
     (if (<= z 1.1e-196)
       t_1
       (if (<= z 3e-133)
         (- x (* y (/ a t)))
         (if (<= z 1.45e-7)
           t_1
           (if (<= z 1.05e+134) (+ x (/ a (/ z y))) (- x a))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (y * a);
	double tmp;
	if (z <= -1.45e+20) {
		tmp = x - a;
	} else if (z <= 1.1e-196) {
		tmp = t_1;
	} else if (z <= 3e-133) {
		tmp = x - (y * (a / t));
	} else if (z <= 1.45e-7) {
		tmp = t_1;
	} else if (z <= 1.05e+134) {
		tmp = x + (a / (z / y));
	} else {
		tmp = x - a;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x - (y * a)
    if (z <= (-1.45d+20)) then
        tmp = x - a
    else if (z <= 1.1d-196) then
        tmp = t_1
    else if (z <= 3d-133) then
        tmp = x - (y * (a / t))
    else if (z <= 1.45d-7) then
        tmp = t_1
    else if (z <= 1.05d+134) then
        tmp = x + (a / (z / y))
    else
        tmp = x - a
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (y * a);
	double tmp;
	if (z <= -1.45e+20) {
		tmp = x - a;
	} else if (z <= 1.1e-196) {
		tmp = t_1;
	} else if (z <= 3e-133) {
		tmp = x - (y * (a / t));
	} else if (z <= 1.45e-7) {
		tmp = t_1;
	} else if (z <= 1.05e+134) {
		tmp = x + (a / (z / y));
	} else {
		tmp = x - a;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (y * a)
	tmp = 0
	if z <= -1.45e+20:
		tmp = x - a
	elif z <= 1.1e-196:
		tmp = t_1
	elif z <= 3e-133:
		tmp = x - (y * (a / t))
	elif z <= 1.45e-7:
		tmp = t_1
	elif z <= 1.05e+134:
		tmp = x + (a / (z / y))
	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 <= -1.45e+20)
		tmp = Float64(x - a);
	elseif (z <= 1.1e-196)
		tmp = t_1;
	elseif (z <= 3e-133)
		tmp = Float64(x - Float64(y * Float64(a / t)));
	elseif (z <= 1.45e-7)
		tmp = t_1;
	elseif (z <= 1.05e+134)
		tmp = Float64(x + Float64(a / Float64(z / y)));
	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 <= -1.45e+20)
		tmp = x - a;
	elseif (z <= 1.1e-196)
		tmp = t_1;
	elseif (z <= 3e-133)
		tmp = x - (y * (a / t));
	elseif (z <= 1.45e-7)
		tmp = t_1;
	elseif (z <= 1.05e+134)
		tmp = x + (a / (z / y));
	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, -1.45e+20], N[(x - a), $MachinePrecision], If[LessEqual[z, 1.1e-196], t$95$1, If[LessEqual[z, 3e-133], N[(x - N[(y * N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.45e-7], t$95$1, If[LessEqual[z, 1.05e+134], N[(x + N[(a / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 1.1 \cdot 10^{-196}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 1.45 \cdot 10^{-7}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.05 \cdot 10^{+134}:\\
\;\;\;\;x + \frac{a}{\frac{z}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.45e20 or 1.05e134 < z

    1. Initial program 92.5%

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

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

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

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

    if -1.45e20 < z < 1.10000000000000007e-196 or 3.00000000000000019e-133 < z < 1.4499999999999999e-7

    1. Initial program 97.6%

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

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

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

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

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

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

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

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

    if 1.10000000000000007e-196 < z < 3.00000000000000019e-133

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

    if 1.4499999999999999e-7 < z < 1.05e134

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{a \cdot \frac{y}{z}} + x \]
    10. Simplified71.4%

      \[\leadsto \color{blue}{a \cdot \frac{y}{z} + x} \]
    11. Step-by-step derivation
      1. clear-num71.4%

        \[\leadsto a \cdot \color{blue}{\frac{1}{\frac{z}{y}}} + x \]
      2. un-div-inv71.5%

        \[\leadsto \color{blue}{\frac{a}{\frac{z}{y}}} + x \]
    12. Applied egg-rr71.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.45 \cdot 10^{+20}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-196}:\\ \;\;\;\;x - y \cdot a\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-133}:\\ \;\;\;\;x - y \cdot \frac{a}{t}\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{-7}:\\ \;\;\;\;x - y \cdot a\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{+134}:\\ \;\;\;\;x + \frac{a}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 74.0% accurate, 0.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -7.8e18 or 4.2000000000000002e134 < z

    1. Initial program 92.5%

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

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

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

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

    if -7.8e18 < z < 5.8000000000000003e-8

    1. Initial program 97.9%

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

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

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

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

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

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

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

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

    if 5.8000000000000003e-8 < z < 4.2000000000000002e134

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{a \cdot \frac{y}{z}} + x \]
    10. Simplified71.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.8 \cdot 10^{+18}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-8}:\\ \;\;\;\;x - y \cdot a\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{+134}:\\ \;\;\;\;x + a \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 73.9% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;z \leq 1.4 \cdot 10^{+134}:\\
\;\;\;\;x + \frac{a}{\frac{z}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -8.6e21 or 1.3999999999999999e134 < z

    1. Initial program 92.5%

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

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

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

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

    if -8.6e21 < z < 1.4499999999999999e-7

    1. Initial program 97.9%

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

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

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

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

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

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

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

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

    if 1.4499999999999999e-7 < z < 1.3999999999999999e134

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{a \cdot \frac{y}{z}} + x \]
    10. Simplified71.4%

      \[\leadsto \color{blue}{a \cdot \frac{y}{z} + x} \]
    11. Step-by-step derivation
      1. clear-num71.4%

        \[\leadsto a \cdot \color{blue}{\frac{1}{\frac{z}{y}}} + x \]
      2. un-div-inv71.5%

        \[\leadsto \color{blue}{\frac{a}{\frac{z}{y}}} + x \]
    12. Applied egg-rr71.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.6 \cdot 10^{+21}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{-7}:\\ \;\;\;\;x - y \cdot a\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+134}:\\ \;\;\;\;x + \frac{a}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 87.5% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 88.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 84.9%

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

    if -9.5000000000000004e116 < z < 1.2200000000000001e26

    1. Initial program 98.1%

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

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

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

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

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

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

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

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

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

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

    if 1.2200000000000001e26 < z

    1. Initial program 95.5%

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

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

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

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

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

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

Alternative 7: 88.2% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{+20}:\\
\;\;\;\;x + z \cdot \frac{a}{1 - \left(z - t\right)}\\

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

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


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

    1. Initial program 92.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.2e20 < z < 1.30000000000000001e26

    1. Initial program 97.9%

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

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

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

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

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

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

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

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

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

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

    if 1.30000000000000001e26 < z

    1. Initial program 95.5%

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

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

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

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

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

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

Alternative 8: 81.3% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.7e-60 or 2.8e26 < z

    1. Initial program 94.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 inf 75.7%

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

    if -2.7e-60 < z < 2.8e26

    1. Initial program 97.8%

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

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

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

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

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

Alternative 9: 83.8% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.7 \cdot 10^{-60} \lor \neg \left(z \leq 3.3 \cdot 10^{+26}\right):\\
\;\;\;\;x - \frac{z - y}{\frac{z}{a}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.7e-60 or 3.29999999999999993e26 < z

    1. Initial program 94.3%

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

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

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

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

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

    if -2.7e-60 < z < 3.29999999999999993e26

    1. Initial program 97.8%

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

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

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

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

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

Alternative 10: 73.9% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+21} \lor \neg \left(z \leq 1.45 \cdot 10^{-7}\right):\\
\;\;\;\;x - a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.8e21 or 1.4499999999999999e-7 < z

    1. Initial program 93.9%

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

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

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

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

    if -3.8e21 < z < 1.4499999999999999e-7

    1. Initial program 97.9%

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

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

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

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

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

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

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

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

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

Alternative 11: 65.9% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.1499999999999999e-84 or 2.75000000000000001e31 < z

    1. Initial program 94.4%

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

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

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

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

    if -1.1499999999999999e-84 < z < 2.75000000000000001e31

    1. Initial program 97.7%

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

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

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

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

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

Alternative 12: 99.6% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 13: 55.5% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.3 \cdot 10^{-282}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 2.8 \cdot 10^{-152}:\\
\;\;\;\;-a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.2999999999999999e-282 or 2.79999999999999984e-152 < x

    1. Initial program 97.4%

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

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

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

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

    if -2.2999999999999999e-282 < x < 2.79999999999999984e-152

    1. Initial program 90.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \frac{y - z}{\color{blue}{-1} + z} \]
    10. Simplified63.5%

      \[\leadsto \color{blue}{a \cdot \frac{y - z}{-1 + z}} \]
    11. Taylor expanded in z around inf 41.2%

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

        \[\leadsto \color{blue}{-a} \]
    13. Simplified41.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.3 \cdot 10^{-282}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 2.8 \cdot 10^{-152}:\\ \;\;\;\;-a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 53.9% accurate, 13.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
	return x;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x
end function
public static double code(double x, double y, double z, double t, double a) {
	return x;
}
def code(x, y, z, t, a):
	return x
function code(x, y, z, t, a)
	return x
end
function tmp = code(x, y, z, t, a)
	tmp = x;
end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Final simplification55.4%

    \[\leadsto x \]
  7. 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 2024067 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"
  :precision binary64

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

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