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

Percentage Accurate: 97.2% → 99.7%
Time: 11.0s
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: 97.2% 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.7% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 2: 74.2% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(\frac{a}{\frac{z}{y}} - a\right)\\ t_2 := x + a \cdot \frac{z - y}{t}\\ t_3 := x - y \cdot a\\ \mathbf{if}\;t \leq -3.1 \cdot 10^{+32}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -7.6 \cdot 10^{-67}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -5 \cdot 10^{-193}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{-289}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.12 \cdot 10^{-7}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (- (/ a (/ z y)) a)))
        (t_2 (+ x (* a (/ (- z y) t))))
        (t_3 (- x (* y a))))
   (if (<= t -3.1e+32)
     t_2
     (if (<= t -7.6e-67)
       t_1
       (if (<= t -5e-193)
         t_3
         (if (<= t 2.7e-289) t_1 (if (<= t 1.12e-7) t_3 t_2)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((a / (z / y)) - a);
	double t_2 = x + (a * ((z - y) / t));
	double t_3 = x - (y * a);
	double tmp;
	if (t <= -3.1e+32) {
		tmp = t_2;
	} else if (t <= -7.6e-67) {
		tmp = t_1;
	} else if (t <= -5e-193) {
		tmp = t_3;
	} else if (t <= 2.7e-289) {
		tmp = t_1;
	} else if (t <= 1.12e-7) {
		tmp = t_3;
	} 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) :: t_3
    real(8) :: tmp
    t_1 = x + ((a / (z / y)) - a)
    t_2 = x + (a * ((z - y) / t))
    t_3 = x - (y * a)
    if (t <= (-3.1d+32)) then
        tmp = t_2
    else if (t <= (-7.6d-67)) then
        tmp = t_1
    else if (t <= (-5d-193)) then
        tmp = t_3
    else if (t <= 2.7d-289) then
        tmp = t_1
    else if (t <= 1.12d-7) then
        tmp = t_3
    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 + ((a / (z / y)) - a);
	double t_2 = x + (a * ((z - y) / t));
	double t_3 = x - (y * a);
	double tmp;
	if (t <= -3.1e+32) {
		tmp = t_2;
	} else if (t <= -7.6e-67) {
		tmp = t_1;
	} else if (t <= -5e-193) {
		tmp = t_3;
	} else if (t <= 2.7e-289) {
		tmp = t_1;
	} else if (t <= 1.12e-7) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((a / (z / y)) - a)
	t_2 = x + (a * ((z - y) / t))
	t_3 = x - (y * a)
	tmp = 0
	if t <= -3.1e+32:
		tmp = t_2
	elif t <= -7.6e-67:
		tmp = t_1
	elif t <= -5e-193:
		tmp = t_3
	elif t <= 2.7e-289:
		tmp = t_1
	elif t <= 1.12e-7:
		tmp = t_3
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(a / Float64(z / y)) - a))
	t_2 = Float64(x + Float64(a * Float64(Float64(z - y) / t)))
	t_3 = Float64(x - Float64(y * a))
	tmp = 0.0
	if (t <= -3.1e+32)
		tmp = t_2;
	elseif (t <= -7.6e-67)
		tmp = t_1;
	elseif (t <= -5e-193)
		tmp = t_3;
	elseif (t <= 2.7e-289)
		tmp = t_1;
	elseif (t <= 1.12e-7)
		tmp = t_3;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((a / (z / y)) - a);
	t_2 = x + (a * ((z - y) / t));
	t_3 = x - (y * a);
	tmp = 0.0;
	if (t <= -3.1e+32)
		tmp = t_2;
	elseif (t <= -7.6e-67)
		tmp = t_1;
	elseif (t <= -5e-193)
		tmp = t_3;
	elseif (t <= 2.7e-289)
		tmp = t_1;
	elseif (t <= 1.12e-7)
		tmp = t_3;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(a / N[(z / y), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.1e+32], t$95$2, If[LessEqual[t, -7.6e-67], t$95$1, If[LessEqual[t, -5e-193], t$95$3, If[LessEqual[t, 2.7e-289], t$95$1, If[LessEqual[t, 1.12e-7], t$95$3, t$95$2]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -7.6 \cdot 10^{-67}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -5 \cdot 10^{-193}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t \leq 2.7 \cdot 10^{-289}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 1.12 \cdot 10^{-7}:\\
\;\;\;\;t_3\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.09999999999999993e32 or 1.12e-7 < t

    1. Initial program 95.7%

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

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

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

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

    if -3.09999999999999993e32 < t < -7.59999999999999976e-67 or -5.0000000000000005e-193 < t < 2.7e-289

    1. Initial program 95.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. Taylor expanded in z around inf 81.3%

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

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

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

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

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

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

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

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

    if -7.59999999999999976e-67 < t < -5.0000000000000005e-193 or 2.7e-289 < t < 1.12e-7

    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.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. Taylor expanded in z around 0 84.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.1 \cdot 10^{+32}:\\ \;\;\;\;x + a \cdot \frac{z - y}{t}\\ \mathbf{elif}\;t \leq -7.6 \cdot 10^{-67}:\\ \;\;\;\;x + \left(\frac{a}{\frac{z}{y}} - a\right)\\ \mathbf{elif}\;t \leq -5 \cdot 10^{-193}:\\ \;\;\;\;x - y \cdot a\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{-289}:\\ \;\;\;\;x + \left(\frac{a}{\frac{z}{y}} - a\right)\\ \mathbf{elif}\;t \leq 1.12 \cdot 10^{-7}:\\ \;\;\;\;x - y \cdot a\\ \mathbf{else}:\\ \;\;\;\;x + a \cdot \frac{z - y}{t}\\ \end{array} \]

Alternative 3: 90.9% accurate, 0.9× speedup?

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

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

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

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


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

    1. Initial program 89.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. Step-by-step derivation
      1. *-commutative100.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \frac{-a}{\frac{1 + t}{z} - \color{blue}{1}} \]
      6. sub-neg91.4%

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

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

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

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

    if -3.49999999999999983e109 < z < 2.9000000000000001e61

    1. Initial program 98.6%

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

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

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

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

    if 2.9000000000000001e61 < z

    1. Initial program 91.7%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.5 \cdot 10^{+109}:\\ \;\;\;\;x + \frac{a}{\frac{t}{z} + -1}\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{+61}:\\ \;\;\;\;x + a \cdot \frac{z - y}{t + 1}\\ \mathbf{else}:\\ \;\;\;\;x + \left(\frac{a}{\frac{z}{y}} - a\right)\\ \end{array} \]

Alternative 4: 72.1% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;z \leq -63000000 \lor \neg \left(z \leq 3.95 \cdot 10^{+59}\right):\\
\;\;\;\;x - a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.3e131 or -1.20000000000000007e44 < z < -6.3e7 or 3.95e59 < z

    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. Taylor expanded in z around inf 79.9%

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

    if -1.3e131 < z < -1.20000000000000007e44

    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.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. Taylor expanded in z around inf 83.8%

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

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

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

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

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

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

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

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

    if -6.3e7 < z < 3.95e59

    1. Initial program 99.1%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{+131}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{+44}:\\ \;\;\;\;x + \frac{y \cdot a}{z}\\ \mathbf{elif}\;z \leq -63000000 \lor \neg \left(z \leq 3.95 \cdot 10^{+59}\right):\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;x - y \cdot a\\ \end{array} \]

Alternative 5: 70.2% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;t \leq -4.4 \cdot 10^{-60}:\\
\;\;\;\;x - a\\

\mathbf{elif}\;t \leq 0.96:\\
\;\;\;\;x - y \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.04999999999999998e129 or 0.95999999999999996 < t

    1. Initial program 95.8%

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

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

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

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

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

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

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

    if -1.04999999999999998e129 < t < -4.3999999999999998e-60

    1. Initial program 97.1%

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

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

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

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

    if -4.3999999999999998e-60 < t < 0.95999999999999996

    1. Initial program 95.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. Taylor expanded in z around 0 76.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.05 \cdot 10^{+129}:\\ \;\;\;\;x - \frac{a}{\frac{t}{y}}\\ \mathbf{elif}\;t \leq -4.4 \cdot 10^{-60}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;t \leq 0.96:\\ \;\;\;\;x - y \cdot a\\ \mathbf{else}:\\ \;\;\;\;x - \frac{a}{\frac{t}{y}}\\ \end{array} \]

Alternative 6: 73.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.4 \cdot 10^{+28} \lor \neg \left(t \leq 1.12 \cdot 10^{-7}\right):\\
\;\;\;\;x + a \cdot \frac{z - y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.39999999999999981e28 or 1.12e-7 < t

    1. Initial program 95.8%

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

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

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

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

    if -2.39999999999999981e28 < t < 1.12e-7

    1. Initial program 95.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. Taylor expanded in z around 0 74.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.4 \cdot 10^{+28} \lor \neg \left(t \leq 1.12 \cdot 10^{-7}\right):\\ \;\;\;\;x + a \cdot \frac{z - y}{t}\\ \mathbf{else}:\\ \;\;\;\;x - y \cdot a\\ \end{array} \]

Alternative 7: 87.0% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.2999999999999999e109 or 7.99999999999999977e59 < z

    1. Initial program 90.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. Taylor expanded in z around inf 90.5%

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

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

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

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

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

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

        \[\leadsto x - \left(a - \color{blue}{\frac{a}{\frac{z}{y}}}\right) \]
    9. Simplified90.5%

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

    if -3.2999999999999999e109 < z < 7.99999999999999977e59

    1. Initial program 98.6%

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{a}{\frac{1 + t}{y}}} \]
    6. Simplified88.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.3 \cdot 10^{+109} \lor \neg \left(z \leq 8 \cdot 10^{+59}\right):\\ \;\;\;\;x + \left(\frac{a}{\frac{z}{y}} - a\right)\\ \mathbf{else}:\\ \;\;\;\;x - \frac{a}{\frac{t + 1}{y}}\\ \end{array} \]

Alternative 8: 87.0% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 89.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. Taylor expanded in z around inf 91.2%

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

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

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

    if -3.2999999999999999e109 < z < 3.99999999999999989e59

    1. Initial program 98.6%

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{a}{\frac{1 + t}{y}}} \]
    6. Simplified88.3%

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

    if 3.99999999999999989e59 < z

    1. Initial program 91.7%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.3 \cdot 10^{+109}:\\ \;\;\;\;x - a \cdot \frac{y - z}{-z}\\ \mathbf{elif}\;z \leq 4 \cdot 10^{+59}:\\ \;\;\;\;x - \frac{a}{\frac{t + 1}{y}}\\ \mathbf{else}:\\ \;\;\;\;x + \left(\frac{a}{\frac{z}{y}} - a\right)\\ \end{array} \]

Alternative 9: 86.9% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 89.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. Step-by-step derivation
      1. *-commutative100.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \frac{-a}{\frac{1 + t}{z} - \color{blue}{1}} \]
      6. sub-neg91.4%

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

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

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

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

    if -3.80000000000000039e109 < z < 1.36000000000000002e60

    1. Initial program 98.6%

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{a}{\frac{1 + t}{y}}} \]
    6. Simplified88.3%

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

    if 1.36000000000000002e60 < z

    1. Initial program 91.7%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.8 \cdot 10^{+109}:\\ \;\;\;\;x + \frac{a}{\frac{t}{z} + -1}\\ \mathbf{elif}\;z \leq 1.36 \cdot 10^{+60}:\\ \;\;\;\;x - \frac{a}{\frac{t + 1}{y}}\\ \mathbf{else}:\\ \;\;\;\;x + \left(\frac{a}{\frac{z}{y}} - a\right)\\ \end{array} \]

Alternative 10: 97.4% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

Alternative 11: 63.2% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;z \leq -1.02 \cdot 10^{-165}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 3.2 \cdot 10^{+75}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.55000000000000008e131 or 3.19999999999999985e75 < z

    1. Initial program 90.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. Taylor expanded in z around inf 82.7%

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

    if -1.55000000000000008e131 < z < -1.02e-165 or -9.9999999999999996e-226 < z < 3.19999999999999985e75

    1. Initial program 98.1%

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

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

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

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

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

    if -1.02e-165 < z < -9.9999999999999996e-226

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.55 \cdot 10^{+131}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq -1.02 \cdot 10^{-165}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1 \cdot 10^{-225}:\\ \;\;\;\;y \cdot \left(-a\right)\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{+75}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \]

Alternative 12: 72.8% accurate, 1.4× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.32e8 or 3.99999999999999989e59 < z

    1. Initial program 91.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. Taylor expanded in z around inf 76.4%

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

    if -1.32e8 < z < 3.99999999999999989e59

    1. Initial program 99.1%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -132000000 \lor \neg \left(z \leq 4 \cdot 10^{+59}\right):\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;x - y \cdot a\\ \end{array} \]

Alternative 13: 64.8% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.55 \cdot 10^{+131} \lor \neg \left(z \leq 4.8 \cdot 10^{+74}\right):\\
\;\;\;\;x - a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.55000000000000008e131 or 4.80000000000000017e74 < z

    1. Initial program 90.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. Taylor expanded in z around inf 82.7%

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

    if -1.55000000000000008e131 < z < 4.80000000000000017e74

    1. Initial program 98.2%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.55 \cdot 10^{+131} \lor \neg \left(z \leq 4.8 \cdot 10^{+74}\right):\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Final simplification57.2%

    \[\leadsto x \]

Developer target: 99.7% 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 2023339 
(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))))