Optimisation.CirclePacking:place from circle-packing-0.1.0.4, F

Percentage Accurate: 93.0% → 99.5%
Time: 12.1s
Alternatives: 18
Speedup: 0.6×

Specification

?
\[\begin{array}{l} \\ x - \frac{y \cdot \left(z - t\right)}{a} \end{array} \]
(FPCore (x y z t a) :precision binary64 (- x (/ (* y (- z t)) a)))
double code(double x, double y, double z, double t, double a) {
	return x - ((y * (z - t)) / 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)) / a)
end function
public static double code(double x, double y, double z, double t, double a) {
	return x - ((y * (z - t)) / a);
}
def code(x, y, z, t, a):
	return x - ((y * (z - t)) / a)
function code(x, y, z, t, a)
	return Float64(x - Float64(Float64(y * Float64(z - t)) / a))
end
function tmp = code(x, y, z, t, a)
	tmp = x - ((y * (z - t)) / a);
end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x - \frac{y \cdot \left(z - t\right)}{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: 93.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x - \frac{y \cdot \left(z - t\right)}{a} \end{array} \]
(FPCore (x y z t a) :precision binary64 (- x (/ (* y (- z t)) a)))
double code(double x, double y, double z, double t, double a) {
	return x - ((y * (z - t)) / 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)) / a)
end function
public static double code(double x, double y, double z, double t, double a) {
	return x - ((y * (z - t)) / a);
}
def code(x, y, z, t, a):
	return x - ((y * (z - t)) / a)
function code(x, y, z, t, a)
	return Float64(x - Float64(Float64(y * Float64(z - t)) / a))
end
function tmp = code(x, y, z, t, a)
	tmp = x - ((y * (z - t)) / a);
end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 99.5% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(z - t\right)\\ \mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 2 \cdot 10^{+202}\right):\\ \;\;\;\;x + y \cdot \frac{t - z}{a}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot \left(t - z\right)}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (- z t))))
   (if (or (<= t_1 (- INFINITY)) (not (<= t_1 2e+202)))
     (+ x (* y (/ (- t z) a)))
     (+ x (/ (* y (- t z)) a)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (z - t);
	double tmp;
	if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 2e+202)) {
		tmp = x + (y * ((t - z) / a));
	} else {
		tmp = x + ((y * (t - z)) / a);
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (z - t);
	double tmp;
	if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 2e+202)) {
		tmp = x + (y * ((t - z) / a));
	} else {
		tmp = x + ((y * (t - z)) / a);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * (z - t)
	tmp = 0
	if (t_1 <= -math.inf) or not (t_1 <= 2e+202):
		tmp = x + (y * ((t - z) / a))
	else:
		tmp = x + ((y * (t - z)) / a)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(z - t))
	tmp = 0.0
	if ((t_1 <= Float64(-Inf)) || !(t_1 <= 2e+202))
		tmp = Float64(x + Float64(y * Float64(Float64(t - z) / a)));
	else
		tmp = Float64(x + Float64(Float64(y * Float64(t - z)) / a));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * (z - t);
	tmp = 0.0;
	if ((t_1 <= -Inf) || ~((t_1 <= 2e+202)))
		tmp = x + (y * ((t - z) / a));
	else
		tmp = x + ((y * (t - z)) / a);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 2e+202]], $MachinePrecision]], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 y (-.f64 z t)) < -inf.0 or 1.9999999999999998e202 < (*.f64 y (-.f64 z t))

    1. Initial program 74.4%

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

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
    3. Simplified100.0%

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

    if -inf.0 < (*.f64 y (-.f64 z t)) < 1.9999999999999998e202

    1. Initial program 98.5%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification98.9%

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

Alternative 2: 49.9% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := y \cdot \frac{z}{-a}\\
\mathbf{if}\;z \leq -4 \cdot 10^{+126}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -1.1 \cdot 10^{-233}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 2.8 \cdot 10^{-150}:\\
\;\;\;\;\frac{y \cdot t}{a}\\

\mathbf{elif}\;z \leq 6.6 \cdot 10^{+65}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.9999999999999997e126 or 6.60000000000000046e65 < z

    1. Initial program 89.1%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-/l*94.2%

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{z}{-a}} \]
    7. Simplified67.6%

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

    if -3.9999999999999997e126 < z < -1.1e-233 or 2.79999999999999996e-150 < z < 6.60000000000000046e65

    1. Initial program 93.3%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-/l*95.9%

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
    3. Simplified95.9%

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

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

    if -1.1e-233 < z < 2.79999999999999996e-150

    1. Initial program 97.0%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-/l*89.8%

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

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

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

        \[\leadsto \frac{\color{blue}{y \cdot t}}{a} \]
    7. Simplified69.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{+126}:\\ \;\;\;\;y \cdot \frac{z}{-a}\\ \mathbf{elif}\;z \leq -1.1 \cdot 10^{-233}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-150}:\\ \;\;\;\;\frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 6.6 \cdot 10^{+65}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z}{-a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 50.6% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;z \leq -4.7 \cdot 10^{-232}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 1.15 \cdot 10^{-148}:\\
\;\;\;\;\frac{y \cdot t}{a}\\

\mathbf{elif}\;z \leq 2 \cdot 10^{+64}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -6.59999999999999953e127

    1. Initial program 82.7%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-/l*90.4%

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
    3. Simplified90.4%

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in a around 0 82.7%

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

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

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

        \[\leadsto \frac{\color{blue}{z \cdot \left(-1 \cdot y\right)}}{a} \]
      3. mul-1-neg65.6%

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

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

        \[\leadsto \frac{\color{blue}{\left(-y\right) \cdot z}}{a} \]
      2. distribute-lft-neg-out65.6%

        \[\leadsto \frac{\color{blue}{-y \cdot z}}{a} \]
      3. distribute-neg-frac65.6%

        \[\leadsto \color{blue}{-\frac{y \cdot z}{a}} \]
      4. associate-*l/78.4%

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

        \[\leadsto \color{blue}{\frac{y}{a} \cdot \left(-z\right)} \]
    10. Applied egg-rr78.4%

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

    if -6.59999999999999953e127 < z < -4.70000000000000035e-232 or 1.14999999999999999e-148 < z < 2.00000000000000004e64

    1. Initial program 93.3%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-/l*95.9%

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
    3. Simplified95.9%

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

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

    if -4.70000000000000035e-232 < z < 1.14999999999999999e-148

    1. Initial program 97.0%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-/l*89.8%

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

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

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

        \[\leadsto \frac{\color{blue}{y \cdot t}}{a} \]
    7. Simplified69.9%

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

    if 2.00000000000000004e64 < z

    1. Initial program 93.4%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-/l*96.7%

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
    3. Simplified96.7%

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{z}{-a}} \]
    7. Simplified65.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.6 \cdot 10^{+127}:\\ \;\;\;\;z \cdot \frac{y}{-a}\\ \mathbf{elif}\;z \leq -4.7 \cdot 10^{-232}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{-148}:\\ \;\;\;\;\frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+64}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z}{-a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 50.6% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;z \leq -2.35 \cdot 10^{-233}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 5.2 \cdot 10^{+64}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.65999999999999998e127

    1. Initial program 82.7%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-/l*90.4%

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
    3. Simplified90.4%

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in a around 0 82.7%

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

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

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

        \[\leadsto \frac{\color{blue}{z \cdot \left(-1 \cdot y\right)}}{a} \]
      3. mul-1-neg65.6%

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

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

        \[\leadsto \frac{\color{blue}{\left(-y\right) \cdot z}}{a} \]
      2. distribute-lft-neg-out65.6%

        \[\leadsto \frac{\color{blue}{-y \cdot z}}{a} \]
      3. distribute-neg-frac65.6%

        \[\leadsto \color{blue}{-\frac{y \cdot z}{a}} \]
      4. associate-*l/78.4%

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

        \[\leadsto \color{blue}{\frac{y}{a} \cdot \left(-z\right)} \]
    10. Applied egg-rr78.4%

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

    if -1.65999999999999998e127 < z < -2.3499999999999998e-233 or 2.2500000000000001e-150 < z < 5.19999999999999994e64

    1. Initial program 93.3%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-/l*95.9%

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
    3. Simplified95.9%

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

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

    if -2.3499999999999998e-233 < z < 2.2500000000000001e-150

    1. Initial program 97.0%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-/l*89.8%

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

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

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

        \[\leadsto \frac{\color{blue}{y \cdot t}}{a} \]
    7. Simplified69.9%

      \[\leadsto \color{blue}{\frac{y \cdot t}{a}} \]
    8. Step-by-step derivation
      1. clear-num69.9%

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

        \[\leadsto \color{blue}{\frac{1}{a} \cdot \left(y \cdot t\right)} \]
    9. Applied egg-rr70.0%

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

    if 5.19999999999999994e64 < z

    1. Initial program 93.4%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-/l*96.7%

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
    3. Simplified96.7%

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{z}{-a}} \]
    7. Simplified65.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.66 \cdot 10^{+127}:\\ \;\;\;\;z \cdot \frac{y}{-a}\\ \mathbf{elif}\;z \leq -2.35 \cdot 10^{-233}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.25 \cdot 10^{-150}:\\ \;\;\;\;\frac{1}{a} \cdot \left(y \cdot t\right)\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{+64}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z}{-a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 48.3% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{a}\\
\mathbf{if}\;y \leq -2.4 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 1.55 \cdot 10^{-143}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 1.36 \cdot 10^{-42}:\\
\;\;\;\;y \cdot \frac{t}{a}\\

\mathbf{elif}\;y \leq 8.5 \cdot 10^{+42}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.4e-14 or 8.5000000000000003e42 < y

    1. Initial program 85.5%

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

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

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num99.0%

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a}{z - t}}} \]
    6. Applied egg-rr99.1%

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

      \[\leadsto \color{blue}{\frac{t \cdot y}{a}} \]
    8. Step-by-step derivation
      1. associate-*r/47.3%

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    9. Simplified47.3%

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

    if -2.4e-14 < y < 1.55000000000000004e-143 or 1.36e-42 < y < 8.5000000000000003e42

    1. Initial program 97.6%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-/l*90.1%

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
    3. Simplified90.1%

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

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

    if 1.55000000000000004e-143 < y < 1.36e-42

    1. Initial program 99.8%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-/l*92.2%

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

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

      \[\leadsto \color{blue}{\frac{t \cdot y}{a}} \]
    6. Step-by-step derivation
      1. *-commutative59.3%

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

        \[\leadsto \color{blue}{y \cdot \frac{t}{a}} \]
    7. Simplified55.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.4 \cdot 10^{-14}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;y \leq 1.55 \cdot 10^{-143}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.36 \cdot 10^{-42}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{+42}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 48.2% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{t}{\frac{a}{y}}\\
\mathbf{if}\;y \leq -2.4 \cdot 10^{-21}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 1.55 \cdot 10^{-143}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 2.8 \cdot 10^{-37}:\\
\;\;\;\;y \cdot \frac{t}{a}\\

\mathbf{elif}\;y \leq 8 \cdot 10^{+42}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.3999999999999999e-21 or 8.00000000000000036e42 < y

    1. Initial program 85.7%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-/l*98.3%

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

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num98.3%

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a}{z - t}}} \]
    6. Applied egg-rr98.8%

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

      \[\leadsto \color{blue}{\frac{t \cdot y}{a}} \]
    8. Step-by-step derivation
      1. associate-*r/47.3%

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    9. Simplified47.3%

      \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    10. Step-by-step derivation
      1. clear-num47.3%

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    11. Applied egg-rr47.3%

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

    if -2.3999999999999999e-21 < y < 1.55000000000000004e-143 or 2.8000000000000001e-37 < y < 8.00000000000000036e42

    1. Initial program 97.6%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-/l*90.7%

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
    3. Simplified90.7%

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

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

    if 1.55000000000000004e-143 < y < 2.8000000000000001e-37

    1. Initial program 99.8%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-/l*92.2%

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

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

      \[\leadsto \color{blue}{\frac{t \cdot y}{a}} \]
    6. Step-by-step derivation
      1. *-commutative59.3%

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

        \[\leadsto \color{blue}{y \cdot \frac{t}{a}} \]
    7. Simplified55.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.4 \cdot 10^{-21}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;y \leq 1.55 \cdot 10^{-143}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 2.8 \cdot 10^{-37}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;y \leq 8 \cdot 10^{+42}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 48.2% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{t}{\frac{a}{y}}\\
\mathbf{if}\;y \leq -5.5 \cdot 10^{-21}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 1.55 \cdot 10^{-143}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 4 \cdot 10^{-35}:\\
\;\;\;\;\frac{y}{\frac{a}{t}}\\

\mathbf{elif}\;y \leq 1.06 \cdot 10^{+43}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -5.49999999999999977e-21 or 1.06000000000000006e43 < y

    1. Initial program 85.7%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-/l*98.3%

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

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num98.3%

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a}{z - t}}} \]
    6. Applied egg-rr98.8%

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

      \[\leadsto \color{blue}{\frac{t \cdot y}{a}} \]
    8. Step-by-step derivation
      1. associate-*r/47.3%

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    9. Simplified47.3%

      \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    10. Step-by-step derivation
      1. clear-num47.3%

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    11. Applied egg-rr47.3%

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

    if -5.49999999999999977e-21 < y < 1.55000000000000004e-143 or 4.00000000000000003e-35 < y < 1.06000000000000006e43

    1. Initial program 97.6%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-/l*90.7%

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
    3. Simplified90.7%

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

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

    if 1.55000000000000004e-143 < y < 4.00000000000000003e-35

    1. Initial program 99.8%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-/l*92.2%

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

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

      \[\leadsto \color{blue}{\frac{t \cdot y}{a}} \]
    6. Step-by-step derivation
      1. *-commutative59.3%

        \[\leadsto \frac{\color{blue}{y \cdot t}}{a} \]
    7. Simplified59.3%

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

        \[\leadsto \color{blue}{y \cdot \frac{t}{a}} \]
      2. *-commutative55.6%

        \[\leadsto \color{blue}{\frac{t}{a} \cdot y} \]
    9. Applied egg-rr55.6%

      \[\leadsto \color{blue}{\frac{t}{a} \cdot y} \]
    10. Step-by-step derivation
      1. *-commutative55.6%

        \[\leadsto \color{blue}{y \cdot \frac{t}{a}} \]
      2. clear-num55.6%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} \]
    11. Applied egg-rr55.6%

      \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification53.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.5 \cdot 10^{-21}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;y \leq 1.55 \cdot 10^{-143}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 4 \cdot 10^{-35}:\\ \;\;\;\;\frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;y \leq 1.06 \cdot 10^{+43}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 48.5% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{t}{\frac{a}{y}}\\
\mathbf{if}\;y \leq -2.7 \cdot 10^{-21}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 5.6 \cdot 10^{-146}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 2.7 \cdot 10^{-37}:\\
\;\;\;\;\frac{y \cdot t}{a}\\

\mathbf{elif}\;y \leq 8.8 \cdot 10^{+42}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.7000000000000001e-21 or 8.8000000000000005e42 < y

    1. Initial program 85.7%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-/l*98.3%

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

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num98.3%

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a}{z - t}}} \]
    6. Applied egg-rr98.8%

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

      \[\leadsto \color{blue}{\frac{t \cdot y}{a}} \]
    8. Step-by-step derivation
      1. associate-*r/47.3%

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    9. Simplified47.3%

      \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    10. Step-by-step derivation
      1. clear-num47.3%

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    11. Applied egg-rr47.3%

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

    if -2.7000000000000001e-21 < y < 5.60000000000000006e-146 or 2.70000000000000016e-37 < y < 8.8000000000000005e42

    1. Initial program 97.6%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-/l*90.7%

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
    3. Simplified90.7%

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

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

    if 5.60000000000000006e-146 < y < 2.70000000000000016e-37

    1. Initial program 99.8%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-/l*92.2%

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

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

      \[\leadsto \color{blue}{\frac{t \cdot y}{a}} \]
    6. Step-by-step derivation
      1. *-commutative59.3%

        \[\leadsto \frac{\color{blue}{y \cdot t}}{a} \]
    7. Simplified59.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.7 \cdot 10^{-21}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;y \leq 5.6 \cdot 10^{-146}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{-37}:\\ \;\;\;\;\frac{y \cdot t}{a}\\ \mathbf{elif}\;y \leq 8.8 \cdot 10^{+42}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 67.3% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{-17} \lor \neg \left(y \leq 1.05 \cdot 10^{-213}\right):\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.6999999999999999e-17 or 1.0499999999999999e-213 < y

    1. Initial program 89.5%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-/l*97.3%

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a}{z - t}}} \]
    6. Applied egg-rr97.3%

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

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

        \[\leadsto -1 \cdot \color{blue}{\left(y \cdot \frac{z - t}{a}\right)} \]
      2. neg-mul-176.5%

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

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

        \[\leadsto y \cdot \color{blue}{\left(0 - \frac{z - t}{a}\right)} \]
      5. div-sub72.6%

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

        \[\leadsto y \cdot \color{blue}{\left(\left(0 - \frac{z}{a}\right) + \frac{t}{a}\right)} \]
      7. neg-sub072.6%

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

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

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

        \[\leadsto y \cdot \left(\frac{t}{a} + \color{blue}{\left(-\frac{z}{a}\right)}\right) \]
      11. sub-neg72.6%

        \[\leadsto y \cdot \color{blue}{\left(\frac{t}{a} - \frac{z}{a}\right)} \]
      12. distribute-lft-out--67.5%

        \[\leadsto \color{blue}{y \cdot \frac{t}{a} - y \cdot \frac{z}{a}} \]
      13. *-commutative67.5%

        \[\leadsto \color{blue}{\frac{t}{a} \cdot y} - y \cdot \frac{z}{a} \]
      14. associate-*l/64.8%

        \[\leadsto \color{blue}{\frac{t \cdot y}{a}} - y \cdot \frac{z}{a} \]
      15. associate-*r/61.8%

        \[\leadsto \frac{t \cdot y}{a} - \color{blue}{\frac{y \cdot z}{a}} \]
      16. associate-*r/59.6%

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} - \frac{y \cdot z}{a} \]
      17. associate-*l/62.9%

        \[\leadsto t \cdot \frac{y}{a} - \color{blue}{\frac{y}{a} \cdot z} \]
      18. *-commutative62.9%

        \[\leadsto t \cdot \frac{y}{a} - \color{blue}{z \cdot \frac{y}{a}} \]
      19. distribute-rgt-out--76.6%

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

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

    if -1.6999999999999999e-17 < y < 1.0499999999999999e-213

    1. Initial program 98.6%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-/l*87.9%

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
    3. Simplified87.9%

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

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

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

Alternative 10: 80.6% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{+126} \lor \neg \left(z \leq 9.2 \cdot 10^{+64}\right):\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.9999999999999994e126 or 9.2e64 < z

    1. Initial program 89.1%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-/l*94.2%

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a}{z - t}}} \]
    6. Applied egg-rr94.9%

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

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

        \[\leadsto -1 \cdot \color{blue}{\left(y \cdot \frac{z - t}{a}\right)} \]
      2. neg-mul-178.6%

        \[\leadsto \color{blue}{-y \cdot \frac{z - t}{a}} \]
      3. distribute-rgt-neg-in78.6%

        \[\leadsto \color{blue}{y \cdot \left(-\frac{z - t}{a}\right)} \]
      4. neg-sub078.6%

        \[\leadsto y \cdot \color{blue}{\left(0 - \frac{z - t}{a}\right)} \]
      5. div-sub71.3%

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

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

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

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

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

        \[\leadsto y \cdot \left(\frac{t}{a} + \color{blue}{\left(-\frac{z}{a}\right)}\right) \]
      11. sub-neg71.3%

        \[\leadsto y \cdot \color{blue}{\left(\frac{t}{a} - \frac{z}{a}\right)} \]
      12. distribute-lft-out--64.0%

        \[\leadsto \color{blue}{y \cdot \frac{t}{a} - y \cdot \frac{z}{a}} \]
      13. *-commutative64.0%

        \[\leadsto \color{blue}{\frac{t}{a} \cdot y} - y \cdot \frac{z}{a} \]
      14. associate-*l/64.9%

        \[\leadsto \color{blue}{\frac{t \cdot y}{a}} - y \cdot \frac{z}{a} \]
      15. associate-*r/60.7%

        \[\leadsto \frac{t \cdot y}{a} - \color{blue}{\frac{y \cdot z}{a}} \]
      16. associate-*r/57.6%

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} - \frac{y \cdot z}{a} \]
      17. associate-*l/64.6%

        \[\leadsto t \cdot \frac{y}{a} - \color{blue}{\frac{y}{a} \cdot z} \]
      18. *-commutative64.6%

        \[\leadsto t \cdot \frac{y}{a} - \color{blue}{z \cdot \frac{y}{a}} \]
      19. distribute-rgt-out--82.2%

        \[\leadsto \color{blue}{\frac{y}{a} \cdot \left(t - z\right)} \]
    9. Simplified82.2%

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

    if -7.9999999999999994e126 < z < 9.2e64

    1. Initial program 94.2%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-/l*94.5%

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a}{z - t}}} \]
    6. Applied egg-rr94.9%

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

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

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

        \[\leadsto x - \left(-\color{blue}{t \cdot \frac{y}{a}}\right) \]
      3. distribute-lft-neg-out84.2%

        \[\leadsto x - \color{blue}{\left(-t\right) \cdot \frac{y}{a}} \]
      4. cancel-sign-sub84.2%

        \[\leadsto \color{blue}{x + t \cdot \frac{y}{a}} \]
    9. Simplified84.2%

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

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

Alternative 11: 85.0% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.2e20 or 2.40000000000000013e44 < z

    1. Initial program 90.3%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-/l*95.6%

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

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

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

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

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

    if -2.2e20 < z < 2.40000000000000013e44

    1. Initial program 94.2%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-/l*93.1%

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
    3. Simplified93.1%

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a}{z - t}}} \]
    6. Applied egg-rr93.7%

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

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

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

        \[\leadsto x - \left(-\color{blue}{t \cdot \frac{y}{a}}\right) \]
      3. distribute-lft-neg-out86.3%

        \[\leadsto x - \color{blue}{\left(-t\right) \cdot \frac{y}{a}} \]
      4. cancel-sign-sub86.3%

        \[\leadsto \color{blue}{x + t \cdot \frac{y}{a}} \]
    9. Simplified86.3%

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

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

Alternative 12: 86.9% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{+20} \lor \neg \left(z \leq 2.15 \cdot 10^{+44}\right):\\
\;\;\;\;x - z \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.1e20 or 2.14999999999999991e44 < z

    1. Initial program 90.3%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-/l*95.6%

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

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num95.6%

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a}{z - t}}} \]
    6. Applied egg-rr96.1%

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

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

        \[\leadsto x - \color{blue}{\frac{y}{a} \cdot z} \]
    9. Applied egg-rr85.8%

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

    if -2.1e20 < z < 2.14999999999999991e44

    1. Initial program 94.2%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-/l*93.1%

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
    3. Simplified93.1%

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a}{z - t}}} \]
    6. Applied egg-rr93.7%

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

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

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

        \[\leadsto x - \left(-\color{blue}{t \cdot \frac{y}{a}}\right) \]
      3. distribute-lft-neg-out86.3%

        \[\leadsto x - \color{blue}{\left(-t\right) \cdot \frac{y}{a}} \]
      4. cancel-sign-sub86.3%

        \[\leadsto \color{blue}{x + t \cdot \frac{y}{a}} \]
    9. Simplified86.3%

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

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

Alternative 13: 86.8% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 87.3%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-/l*94.5%

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a}{z - t}}} \]
    6. Applied egg-rr95.5%

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

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

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

      \[\leadsto x - \color{blue}{\frac{y}{a} \cdot z} \]
    10. Step-by-step derivation
      1. *-commutative87.1%

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

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

        \[\leadsto x - \color{blue}{\frac{z}{\frac{a}{y}}} \]
    11. Applied egg-rr87.1%

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

    if -1.9e20 < z < 1.7e44

    1. Initial program 94.2%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-/l*93.1%

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
    3. Simplified93.1%

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a}{z - t}}} \]
    6. Applied egg-rr93.7%

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

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

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

        \[\leadsto x - \left(-\color{blue}{t \cdot \frac{y}{a}}\right) \]
      3. distribute-lft-neg-out86.3%

        \[\leadsto x - \color{blue}{\left(-t\right) \cdot \frac{y}{a}} \]
      4. cancel-sign-sub86.3%

        \[\leadsto \color{blue}{x + t \cdot \frac{y}{a}} \]
    9. Simplified86.3%

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

    if 1.7e44 < z

    1. Initial program 93.7%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-/l*96.9%

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
    3. Simplified96.9%

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num96.9%

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a}{z - t}}} \]
    6. Applied egg-rr96.8%

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

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

        \[\leadsto x - \color{blue}{\frac{y}{a} \cdot z} \]
    9. Applied egg-rr84.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.9 \cdot 10^{+20}:\\ \;\;\;\;x - \frac{z}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{+44}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x - z \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 85.3% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 87.3%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-/l*94.5%

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a}{z - t}}} \]
    6. Applied egg-rr95.5%

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

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

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

      \[\leadsto x - \color{blue}{\frac{y}{a} \cdot z} \]
    10. Step-by-step derivation
      1. *-commutative87.1%

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

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

        \[\leadsto x - \color{blue}{\frac{z}{\frac{a}{y}}} \]
    11. Applied egg-rr87.1%

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

    if -2.1e20 < z < 1.65000000000000007e44

    1. Initial program 94.2%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-/l*93.1%

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
    3. Simplified93.1%

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 86.4%

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

        \[\leadsto x - \color{blue}{\frac{-1 \cdot \left(t \cdot y\right)}{a}} \]
      2. mul-1-neg86.4%

        \[\leadsto x - \frac{\color{blue}{-t \cdot y}}{a} \]
      3. distribute-lft-neg-out86.4%

        \[\leadsto x - \frac{\color{blue}{\left(-t\right) \cdot y}}{a} \]
      4. *-commutative86.4%

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

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

    if 1.65000000000000007e44 < z

    1. Initial program 93.7%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-/l*96.9%

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
    3. Simplified96.9%

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num96.9%

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a}{z - t}}} \]
    6. Applied egg-rr96.8%

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

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

        \[\leadsto x - \color{blue}{\frac{y}{a} \cdot z} \]
    9. Applied egg-rr84.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.1 \cdot 10^{+20}:\\ \;\;\;\;x - \frac{z}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{+44}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;x - z \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 48.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.06 \cdot 10^{-14} \lor \neg \left(y \leq 1.45 \cdot 10^{-143}\right):\\
\;\;\;\;t \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.06e-14 or 1.45e-143 < y

    1. Initial program 89.8%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-/l*97.7%

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
    3. Simplified97.7%

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num97.6%

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a}{z - t}}} \]
    6. Applied egg-rr97.7%

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

      \[\leadsto \color{blue}{\frac{t \cdot y}{a}} \]
    8. Step-by-step derivation
      1. associate-*r/44.6%

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    9. Simplified44.6%

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

    if -1.06e-14 < y < 1.45e-143

    1. Initial program 97.0%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-/l*88.1%

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

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

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

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

Alternative 16: 93.5% accurate, 0.6× speedup?

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

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

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


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

    1. Initial program 90.4%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-/l*76.3%

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a}{z - t}}} \]
    6. Applied egg-rr79.0%

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

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

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

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

        \[\leadsto x - \color{blue}{\left(-t\right) \cdot \frac{y}{a}} \]
      4. cancel-sign-sub99.8%

        \[\leadsto \color{blue}{x + t \cdot \frac{y}{a}} \]
    9. Simplified99.8%

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

    if -7.60000000000000014e166 < t

    1. Initial program 92.4%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-/l*95.9%

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
    3. Simplified95.9%

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

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

Alternative 17: 94.1% accurate, 0.6× speedup?

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

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

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


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

    1. Initial program 90.4%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-/l*76.3%

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a}{z - t}}} \]
    6. Applied egg-rr79.0%

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

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

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

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

        \[\leadsto x - \color{blue}{\left(-t\right) \cdot \frac{y}{a}} \]
      4. cancel-sign-sub99.8%

        \[\leadsto \color{blue}{x + t \cdot \frac{y}{a}} \]
    9. Simplified99.8%

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

    if -1.15e168 < t

    1. Initial program 92.4%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-/l*95.9%

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
    3. Simplified95.9%

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num95.9%

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a}{z - t}}} \]
    6. Applied egg-rr96.3%

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

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

Alternative 18: 39.1% accurate, 9.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 92.3%

    \[x - \frac{y \cdot \left(z - t\right)}{a} \]
  2. Step-by-step derivation
    1. associate-/l*94.4%

      \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
  3. Simplified94.4%

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

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

    \[\leadsto x \]
  7. Add Preprocessing

Developer target: 99.3% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{a}{z - t}\\
\mathbf{if}\;y < -1.0761266216389975 \cdot 10^{-10}:\\
\;\;\;\;x - \frac{1}{\frac{t\_1}{y}}\\

\mathbf{elif}\;y < 2.894426862792089 \cdot 10^{-49}:\\
\;\;\;\;x - \frac{y \cdot \left(z - t\right)}{a}\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024078 
(FPCore (x y z t a)
  :name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, F"
  :precision binary64

  :alt
  (if (< y -1.0761266216389975e-10) (- x (/ 1.0 (/ (/ a (- z t)) y))) (if (< y 2.894426862792089e-49) (- x (/ (* y (- z t)) a)) (- x (/ y (/ a (- z t))))))

  (- x (/ (* y (- z t)) a)))