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

Percentage Accurate: 97.1% → 99.6%
Time: 11.8s
Alternatives: 18
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 18 alternatives:

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

Initial Program: 97.1% accurate, 1.0× speedup?

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

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

Alternative 1: 99.6% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 2: 85.6% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;z \leq -3.3 \cdot 10^{-5} \lor \neg \left(z \leq 7.7 \cdot 10^{+18}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.95e149 or -2e24 < z < -3.3000000000000003e-5 or 7.7e18 < z

    1. Initial program 95.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.95e149 < z < -2e24

    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. Add Preprocessing
    5. Taylor expanded in t around inf 84.0%

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

    if -3.3000000000000003e-5 < z < 7.7e18

    1. Initial program 98.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. Add Preprocessing
    5. Taylor expanded in z around 0 92.1%

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

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

Alternative 3: 85.6% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;z \leq -3.3 \cdot 10^{-5} \lor \neg \left(z \leq 2.55 \cdot 10^{+19}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.95e149 or -1.85e24 < z < -3.3000000000000003e-5 or 2.55e19 < z

    1. Initial program 95.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.95e149 < z < -1.85e24

    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. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative99.8%

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

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

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

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

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

    if -3.3000000000000003e-5 < z < 2.55e19

    1. Initial program 98.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. Add Preprocessing
    5. Taylor expanded in z around 0 92.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.95 \cdot 10^{+149}:\\ \;\;\;\;x + \left(a \cdot \frac{y}{z} - a\right)\\ \mathbf{elif}\;z \leq -1.85 \cdot 10^{+24}:\\ \;\;\;\;x + \frac{a}{\frac{t}{z - y}}\\ \mathbf{elif}\;z \leq -3.3 \cdot 10^{-5} \lor \neg \left(z \leq 2.55 \cdot 10^{+19}\right):\\ \;\;\;\;x + \left(a \cdot \frac{y}{z} - a\right)\\ \mathbf{else}:\\ \;\;\;\;x + a \cdot \frac{y}{-1 - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 81.7% accurate, 0.4× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.95e149 or 2.2999999999999999e86 < z

    1. Initial program 94.4%

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

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

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

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

    if -1.95e149 < z < -2.50000000000000023e24

    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. Add Preprocessing
    5. Taylor expanded in t around inf 84.0%

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

    if -2.50000000000000023e24 < z < -4.3000000000000001e-7

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

    if -4.3000000000000001e-7 < z < 2.2999999999999999e86

    1. Initial program 98.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. Add Preprocessing
    5. Taylor expanded in z around 0 89.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.95 \cdot 10^{+149}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq -2.5 \cdot 10^{+24}:\\ \;\;\;\;x - a \cdot \frac{y - z}{t}\\ \mathbf{elif}\;z \leq -4.3 \cdot 10^{-7}:\\ \;\;\;\;x + a \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{+86}:\\ \;\;\;\;x + a \cdot \frac{y}{-1 - t}\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 85.6% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;z \leq -2.1 \cdot 10^{-12}:\\
\;\;\;\;x - \frac{y \cdot a}{1 - z}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.95e149 or 8.2e18 < z

    1. Initial program 94.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.95e149 < z < -2.50000000000000023e24

    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. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative99.8%

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

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

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

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

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

    if -2.50000000000000023e24 < z < -2.09999999999999994e-12

    1. Initial program 99.8%

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

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

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

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

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

    if -2.09999999999999994e-12 < z < 8.2e18

    1. Initial program 98.5%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.95 \cdot 10^{+149}:\\ \;\;\;\;x + \left(a \cdot \frac{y}{z} - a\right)\\ \mathbf{elif}\;z \leq -2.5 \cdot 10^{+24}:\\ \;\;\;\;x + \frac{a}{\frac{t}{z - y}}\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{-12}:\\ \;\;\;\;x - \frac{y \cdot a}{1 - z}\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{+18}:\\ \;\;\;\;x + a \cdot \frac{y}{-1 - t}\\ \mathbf{else}:\\ \;\;\;\;x + \left(a \cdot \frac{y}{z} - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 85.9% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.0000000000000001e149 or 6.6e19 < z

    1. Initial program 94.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.0000000000000001e149 < z < -3.5e5

    1. Initial program 99.7%

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

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

    if -3.5e5 < z < 6.6e19

    1. Initial program 98.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. Add Preprocessing
    5. Taylor expanded in z around 0 90.9%

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

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

Alternative 7: 88.6% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.00000000000000001e160 or 5.1e19 < z

    1. Initial program 94.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.00000000000000001e160 < z < -1.30000000000000005e-6

    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. Add Preprocessing
    5. Taylor expanded in y around 0 65.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.30000000000000005e-6 < z < 5.1e19

    1. Initial program 98.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. Add Preprocessing
    5. Taylor expanded in z around 0 92.1%

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

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

Alternative 8: 89.3% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.19999999999999962e-15 or 2.34999999999999993e-4 < y

    1. Initial program 96.9%

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

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

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

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

    if -4.19999999999999962e-15 < y < 2.34999999999999993e-4

    1. Initial program 98.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 90.1% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.4499999999999999e-13 or 1.06e49 < y

    1. Initial program 98.2%

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

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

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

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

    if -1.4499999999999999e-13 < y < 1.06e49

    1. Initial program 96.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 90.3% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.95e149 or 1.7e18 < z

    1. Initial program 94.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.95e149 < z < 1.7e18

    1. Initial program 98.8%

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

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

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

Alternative 11: 82.6% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.49999999999999995e149 or 8.5000000000000005e86 < z

    1. Initial program 94.4%

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

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

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

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

    if -2.49999999999999995e149 < z < 8.5000000000000005e86

    1. Initial program 98.9%

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

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

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

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

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

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

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

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

Alternative 12: 82.9% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.95 \cdot 10^{+149} \lor \neg \left(z \leq 2.6 \cdot 10^{+88}\right):\\
\;\;\;\;x - a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.95e149 or 2.6000000000000001e88 < z

    1. Initial program 94.4%

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

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

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

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

    if -1.95e149 < z < 2.6000000000000001e88

    1. Initial program 98.9%

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

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

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

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

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

Alternative 13: 70.6% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{+16} \lor \neg \left(t \leq 5.7 \cdot 10^{-5}\right):\\
\;\;\;\;x - y \cdot \frac{a}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2e16 or 5.7000000000000003e-5 < t

    1. Initial program 97.4%

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

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

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

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

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

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

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

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

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

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

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

    if -2e16 < t < 5.7000000000000003e-5

    1. Initial program 97.5%

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

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

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

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

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

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

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

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

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

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

Alternative 14: 71.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{+16} \lor \neg \left(t \leq 5.7 \cdot 10^{-5}\right):\\
\;\;\;\;x - a \cdot \frac{y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2e16 or 5.7000000000000003e-5 < t

    1. Initial program 97.4%

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

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

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

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

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

    if -2e16 < t < 5.7000000000000003e-5

    1. Initial program 97.5%

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

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

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

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

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

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

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

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

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

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

Alternative 15: 71.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{+16}:\\
\;\;\;\;x - a \cdot \frac{y}{t}\\

\mathbf{elif}\;t \leq 5.7 \cdot 10^{-5}:\\
\;\;\;\;x - y \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2e16

    1. Initial program 97.4%

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

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

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

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

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

    if -2e16 < t < 5.7000000000000003e-5

    1. Initial program 97.5%

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

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

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

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

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

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

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

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

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

    if 5.7000000000000003e-5 < t

    1. Initial program 97.5%

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

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

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

        \[\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}}} \]
    6. Applied egg-rr100.0%

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

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

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

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

Alternative 16: 69.0% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.95 \cdot 10^{+149} \lor \neg \left(z \leq 8.8 \cdot 10^{-114}\right):\\
\;\;\;\;x - a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.95e149 or 8.80000000000000045e-114 < z

    1. Initial program 95.1%

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

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

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

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

    if -1.95e149 < z < 8.80000000000000045e-114

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

Alternative 17: 65.3% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.05e93 or 2.2999999999999999e86 < z

    1. Initial program 95.1%

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

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

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

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

    if -3.05e93 < z < 2.2999999999999999e86

    1. Initial program 98.8%

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

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

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

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

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

        \[\leadsto x - \color{blue}{\left(-\frac{z}{t}\right)} \cdot a \]
      2. distribute-neg-frac53.8%

        \[\leadsto x - \color{blue}{\frac{-z}{t}} \cdot a \]
    8. Simplified53.8%

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

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

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

Alternative 18: 53.8% 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 97.5%

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

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

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

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

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

      \[\leadsto x - \color{blue}{\left(-\frac{z}{t}\right)} \cdot a \]
    2. distribute-neg-frac48.2%

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

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

    \[\leadsto \color{blue}{x} \]
  10. Final simplification53.9%

    \[\leadsto x \]
  11. Add Preprocessing

Developer target: 99.6% accurate, 1.0× speedup?

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

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

Reproduce

?
herbie shell --seed 2024082 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"
  :precision binary64

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

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