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

Percentage Accurate: 97.1% → 99.7%
Time: 9.3s
Alternatives: 10
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 10 alternatives:

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

Initial Program: 97.1% accurate, 1.0× speedup?

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

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

Alternative 1: 99.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 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. Final simplification99.6%

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

Alternative 2: 72.4% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq -6.3 \cdot 10^{-65}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 1.52 \cdot 10^{-260}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 2.45 \cdot 10^{-186}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 0.88:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -7.6000000000000002e84 or 0.880000000000000004 < z

    1. Initial program 96.6%

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

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

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

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

    if -7.6000000000000002e84 < z < -6.2999999999999997e-65 or 1.52e-260 < z < 2.4499999999999998e-186

    1. Initial program 99.9%

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

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

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

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

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

    if -6.2999999999999997e-65 < z < 1.52e-260 or 2.4499999999999998e-186 < z < 0.880000000000000004

    1. Initial program 98.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.6 \cdot 10^{+84}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq -6.3 \cdot 10^{-65}:\\ \;\;\;\;x - a \cdot \frac{y}{t}\\ \mathbf{elif}\;z \leq 1.52 \cdot 10^{-260}:\\ \;\;\;\;x - y \cdot a\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{-186}:\\ \;\;\;\;x - a \cdot \frac{y}{t}\\ \mathbf{elif}\;z \leq 0.88:\\ \;\;\;\;x - y \cdot a\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \]

Alternative 3: 72.3% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;z \leq 1.7 \cdot 10^{-262}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 1000:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.5e84 or 1e3 < z

    1. Initial program 96.6%

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

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

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

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

    if -2.5e84 < z < -6.1999999999999995e-66

    1. Initial program 100.0%

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{1}{\frac{t}{y - z}}} \cdot a \]
      2. inv-pow72.2%

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

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

        \[\leadsto x - \color{blue}{\frac{1}{\frac{t}{y - z}}} \cdot a \]
    8. Simplified72.2%

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

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

        \[\leadsto x - \color{blue}{\frac{a}{\frac{t}{y}}} \]
    11. Simplified76.2%

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

    if -6.1999999999999995e-66 < z < 1.69999999999999995e-262 or 4.2000000000000004e-186 < z < 1e3

    1. Initial program 98.9%

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

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

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

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

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

    if 1.69999999999999995e-262 < z < 4.2000000000000004e-186

    1. Initial program 99.8%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.5 \cdot 10^{+84}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq -6.2 \cdot 10^{-66}:\\ \;\;\;\;x - \frac{a}{\frac{t}{y}}\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-262}:\\ \;\;\;\;x - y \cdot a\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{-186}:\\ \;\;\;\;x - a \cdot \frac{y}{t}\\ \mathbf{elif}\;z \leq 1000:\\ \;\;\;\;x - y \cdot a\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \]

Alternative 4: 91.6% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4200 or 1e103 < t

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

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

    if -4200 < t < 1e103

    1. Initial program 99.3%

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

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

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

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

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

Alternative 5: 86.2% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.2999999999999999e84 or 7.5e9 < z

    1. Initial program 96.6%

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

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

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

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

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

    if -2.2999999999999999e84 < z < 7.5e9

    1. Initial program 99.3%

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{a}{\frac{1 + t}{y}}} \]
      2. associate-/r/89.7%

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

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

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

Alternative 6: 83.8% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2e86 or 6e10 < z

    1. Initial program 96.6%

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

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

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

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

    if -2e86 < z < 6e10

    1. Initial program 99.3%

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{a}{\frac{1 + t}{y}}} \]
      2. associate-/r/89.7%

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

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

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

Alternative 7: 83.8% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 93.7%

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

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

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

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

    if -7.00000000000000038e86 < z < 3.39999999999999991

    1. Initial program 99.3%

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{a}{\frac{1 + t}{y}}} \]
      2. associate-/r/89.7%

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

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

    if 3.39999999999999991 < z

    1. Initial program 98.5%

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

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

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

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

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

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

        \[\leadsto x - \left(-\color{blue}{\frac{a}{\frac{1 - z}{z}}}\right) \]
      3. distribute-neg-frac79.9%

        \[\leadsto x - \color{blue}{\frac{-a}{\frac{1 - z}{z}}} \]
    7. Simplified79.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7 \cdot 10^{+86}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq 3.4:\\ \;\;\;\;x - y \cdot \frac{a}{t + 1}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{a}{\frac{1 - z}{z}}\\ \end{array} \]

Alternative 8: 73.0% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.00096 \lor \neg \left(z \leq 1500\right):\\
\;\;\;\;x - a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.60000000000000024e-4 or 1500 < z

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

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

    if -9.60000000000000024e-4 < z < 1500

    1. Initial program 99.2%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.00096 \lor \neg \left(z \leq 1500\right):\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;x - y \cdot a\\ \end{array} \]

Alternative 9: 65.3% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.00083 \lor \neg \left(z \leq 2.65 \cdot 10^{-20}\right):\\
\;\;\;\;x - a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.3000000000000001e-4 or 2.6500000000000001e-20 < z

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

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

    if -8.3000000000000001e-4 < z < 2.6500000000000001e-20

    1. Initial program 99.1%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.00083 \lor \neg \left(z \leq 2.65 \cdot 10^{-20}\right):\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 10: 52.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 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. Taylor expanded in t around inf 51.9%

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

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

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