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

Percentage Accurate: 92.9% → 99.3%
Time: 14.0s
Alternatives: 16
Speedup: 1.0×

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 16 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: 92.9% 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.3% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(z - t\right)\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+201} \lor \neg \left(t\_1 \leq 10^{+161}\right):\\ \;\;\;\;x + \frac{t - z}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{t\_1}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (- z t))))
   (if (or (<= t_1 -5e+201) (not (<= t_1 1e+161)))
     (+ x (/ (- t z) (/ a y)))
     (- x (/ t_1 a)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (z - t);
	double tmp;
	if ((t_1 <= -5e+201) || !(t_1 <= 1e+161)) {
		tmp = x + ((t - z) / (a / y));
	} else {
		tmp = x - (t_1 / a);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y * (z - t)
    if ((t_1 <= (-5d+201)) .or. (.not. (t_1 <= 1d+161))) then
        tmp = x + ((t - z) / (a / y))
    else
        tmp = x - (t_1 / a)
    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 - t);
	double tmp;
	if ((t_1 <= -5e+201) || !(t_1 <= 1e+161)) {
		tmp = x + ((t - z) / (a / y));
	} else {
		tmp = x - (t_1 / a);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * (z - t)
	tmp = 0
	if (t_1 <= -5e+201) or not (t_1 <= 1e+161):
		tmp = x + ((t - z) / (a / y))
	else:
		tmp = x - (t_1 / a)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(z - t))
	tmp = 0.0
	if ((t_1 <= -5e+201) || !(t_1 <= 1e+161))
		tmp = Float64(x + Float64(Float64(t - z) / Float64(a / y)));
	else
		tmp = Float64(x - Float64(t_1 / 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 <= -5e+201) || ~((t_1 <= 1e+161)))
		tmp = x + ((t - z) / (a / y));
	else
		tmp = x - (t_1 / 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, -5e+201], N[Not[LessEqual[t$95$1, 1e+161]], $MachinePrecision]], N[(x + N[(N[(t - z), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(t$95$1 / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 y (-.f64 z t)) < -4.9999999999999995e201 or 1e161 < (*.f64 y (-.f64 z t))

    1. Initial program 85.3%

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{z - t}{\frac{a}{y}}} \]
    7. Simplified99.9%

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

    if -4.9999999999999995e201 < (*.f64 y (-.f64 z t)) < 1e161

    1. Initial program 99.8%

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

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

Alternative 2: 99.1% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+274}:\\
\;\;\;\;x - t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 y (-.f64 z t)) a) < -2.00000000000000011e301

    1. Initial program 88.4%

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

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

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

    if -2.00000000000000011e301 < (/.f64 (*.f64 y (-.f64 z t)) a) < 4.9999999999999998e274

    1. Initial program 99.8%

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

    if 4.9999999999999998e274 < (/.f64 (*.f64 y (-.f64 z t)) a)

    1. Initial program 78.3%

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

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

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

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

Alternative 3: 85.2% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;z \leq -4.3 \cdot 10^{-42}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 1300:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.17999999999999995e81 or 1300 < z

    1. Initial program 87.0%

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

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

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

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

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

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

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

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

    if -1.17999999999999995e81 < z < -4.3000000000000001e-42 or 4.00000000000000033e-217 < z < 1300

    1. Initial program 98.6%

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot \frac{t \cdot y}{a}} \]
    6. Step-by-step derivation
      1. cancel-sign-sub-inv88.4%

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

        \[\leadsto x + \color{blue}{1} \cdot \frac{t \cdot y}{a} \]
      3. *-lft-identity88.4%

        \[\leadsto x + \color{blue}{\frac{t \cdot y}{a}} \]
      4. +-commutative88.4%

        \[\leadsto \color{blue}{\frac{t \cdot y}{a} + x} \]
      5. associate-*r/92.0%

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} + x \]
    7. Simplified92.0%

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

    if -4.3000000000000001e-42 < z < 4.00000000000000033e-217

    1. Initial program 99.9%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.18 \cdot 10^{+81}:\\ \;\;\;\;x - \frac{z}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq -4.3 \cdot 10^{-42}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-217}:\\ \;\;\;\;x - \frac{y}{\frac{-a}{t}}\\ \mathbf{elif}\;z \leq 1300:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{z}{\frac{a}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 48.3% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.4 \cdot 10^{+36}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq -1.6 \cdot 10^{-131}:\\
\;\;\;\;\frac{y \cdot t}{a}\\

\mathbf{elif}\;x \leq 6.5 \cdot 10^{-286}:\\
\;\;\;\;z \cdot \frac{y}{-a}\\

\mathbf{elif}\;x \leq 1.2 \cdot 10^{+96}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -8.40000000000000018e36 or 1.19999999999999996e96 < x

    1. Initial program 94.6%

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

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

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

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

    if -8.40000000000000018e36 < x < -1.6e-131

    1. Initial program 90.9%

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

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

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

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

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

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

    if -1.6e-131 < x < 6.5000000000000004e-286

    1. Initial program 95.0%

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{y}{a} \cdot z} \]
      3. *-commutative52.4%

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

        \[\leadsto \color{blue}{z \cdot \left(-\frac{y}{a}\right)} \]
      5. *-lft-identity52.4%

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

        \[\leadsto z \cdot \left(-\color{blue}{\frac{1}{a} \cdot y}\right) \]
      7. remove-double-neg52.3%

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

        \[\leadsto z \cdot \left(-\frac{1}{a} \cdot \color{blue}{\left(-1 \cdot \left(-y\right)\right)}\right) \]
      9. associate-*r*52.3%

        \[\leadsto z \cdot \left(-\color{blue}{\left(\frac{1}{a} \cdot -1\right) \cdot \left(-y\right)}\right) \]
      10. *-commutative52.3%

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

        \[\leadsto z \cdot \left(-\color{blue}{\left(-\frac{1}{a}\right)} \cdot \left(-y\right)\right) \]
      12. *-commutative52.3%

        \[\leadsto z \cdot \left(-\color{blue}{\left(-y\right) \cdot \left(-\frac{1}{a}\right)}\right) \]
      13. distribute-neg-frac52.3%

        \[\leadsto z \cdot \left(-\left(-y\right) \cdot \color{blue}{\frac{-1}{a}}\right) \]
      14. metadata-eval52.3%

        \[\leadsto z \cdot \left(-\left(-y\right) \cdot \frac{\color{blue}{-1}}{a}\right) \]
      15. metadata-eval52.3%

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

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

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

        \[\leadsto z \cdot \left(-\color{blue}{\frac{\left(-y\right) \cdot 1}{-a}}\right) \]
      19. *-rgt-identity52.4%

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

        \[\leadsto z \cdot \color{blue}{\frac{-\left(-y\right)}{-a}} \]
      21. remove-double-neg52.4%

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

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

    if 6.5000000000000004e-286 < x < 1.19999999999999996e96

    1. Initial program 95.0%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    9. Applied egg-rr50.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -8.4 \cdot 10^{+36}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -1.6 \cdot 10^{-131}:\\ \;\;\;\;\frac{y \cdot t}{a}\\ \mathbf{elif}\;x \leq 6.5 \cdot 10^{-286}:\\ \;\;\;\;z \cdot \frac{y}{-a}\\ \mathbf{elif}\;x \leq 1.2 \cdot 10^{+96}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 48.0% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -4 \cdot 10^{+38}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq -1.9 \cdot 10^{-124}:\\
\;\;\;\;\frac{y \cdot t}{a}\\

\mathbf{elif}\;x \leq 1.52 \cdot 10^{-260}:\\
\;\;\;\;\frac{-y}{\frac{a}{z}}\\

\mathbf{elif}\;x \leq 5.4 \cdot 10^{+93}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -3.99999999999999991e38 or 5.3999999999999999e93 < x

    1. Initial program 94.6%

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

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

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

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

    if -3.99999999999999991e38 < x < -1.90000000000000006e-124

    1. Initial program 90.9%

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

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

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

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

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

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

    if -1.90000000000000006e-124 < x < 1.52e-260

    1. Initial program 93.5%

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{y}{a} \cdot z} \]
      3. *-commutative49.9%

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

        \[\leadsto \color{blue}{z \cdot \left(-\frac{y}{a}\right)} \]
      5. *-lft-identity49.9%

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

        \[\leadsto z \cdot \left(-\color{blue}{\frac{1}{a} \cdot y}\right) \]
      7. remove-double-neg49.9%

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

        \[\leadsto z \cdot \left(-\frac{1}{a} \cdot \color{blue}{\left(-1 \cdot \left(-y\right)\right)}\right) \]
      9. associate-*r*49.9%

        \[\leadsto z \cdot \left(-\color{blue}{\left(\frac{1}{a} \cdot -1\right) \cdot \left(-y\right)}\right) \]
      10. *-commutative49.9%

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

        \[\leadsto z \cdot \left(-\color{blue}{\left(-\frac{1}{a}\right)} \cdot \left(-y\right)\right) \]
      12. *-commutative49.9%

        \[\leadsto z \cdot \left(-\color{blue}{\left(-y\right) \cdot \left(-\frac{1}{a}\right)}\right) \]
      13. distribute-neg-frac49.9%

        \[\leadsto z \cdot \left(-\left(-y\right) \cdot \color{blue}{\frac{-1}{a}}\right) \]
      14. metadata-eval49.9%

        \[\leadsto z \cdot \left(-\left(-y\right) \cdot \frac{\color{blue}{-1}}{a}\right) \]
      15. metadata-eval49.9%

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

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

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

        \[\leadsto z \cdot \left(-\color{blue}{\frac{\left(-y\right) \cdot 1}{-a}}\right) \]
      19. *-rgt-identity49.9%

        \[\leadsto z \cdot \left(-\frac{\color{blue}{-y}}{-a}\right) \]
      20. distribute-frac-neg49.9%

        \[\leadsto z \cdot \color{blue}{\frac{-\left(-y\right)}{-a}} \]
      21. remove-double-neg49.9%

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

      \[\leadsto \color{blue}{z \cdot \frac{y}{-a}} \]
    8. Step-by-step derivation
      1. *-commutative49.9%

        \[\leadsto \color{blue}{\frac{y}{-a} \cdot z} \]
      2. frac-2neg49.9%

        \[\leadsto \color{blue}{\frac{-y}{-\left(-a\right)}} \cdot z \]
      3. remove-double-neg49.9%

        \[\leadsto \frac{-y}{\color{blue}{a}} \cdot z \]
      4. distribute-frac-neg49.9%

        \[\leadsto \color{blue}{\left(-\frac{y}{a}\right)} \cdot z \]
      5. distribute-lft-neg-in49.9%

        \[\leadsto \color{blue}{-\frac{y}{a} \cdot z} \]
      6. associate-/r/50.3%

        \[\leadsto -\color{blue}{\frac{y}{\frac{a}{z}}} \]
      7. distribute-neg-frac50.3%

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

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

    if 1.52e-260 < x < 5.3999999999999999e93

    1. Initial program 95.9%

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

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

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

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

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

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

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{a}{y}}} \]
      2. div-inv51.4%

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    9. Applied egg-rr51.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4 \cdot 10^{+38}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -1.9 \cdot 10^{-124}:\\ \;\;\;\;\frac{y \cdot t}{a}\\ \mathbf{elif}\;x \leq 1.52 \cdot 10^{-260}:\\ \;\;\;\;\frac{-y}{\frac{a}{z}}\\ \mathbf{elif}\;x \leq 5.4 \cdot 10^{+93}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 77.0% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -5.80000000000000026e-28 or 1.30000000000000008e-208 < x

    1. Initial program 95.2%

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot \frac{t \cdot y}{a}} \]
    6. Step-by-step derivation
      1. cancel-sign-sub-inv80.6%

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

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

        \[\leadsto x + \color{blue}{\frac{t \cdot y}{a}} \]
      4. +-commutative80.6%

        \[\leadsto \color{blue}{\frac{t \cdot y}{a} + x} \]
      5. associate-*r/83.6%

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

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

    if -5.80000000000000026e-28 < x < 1.30000000000000008e-208

    1. Initial program 92.2%

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \left(-\frac{z - t}{a}\right)} \]
      4. *-rgt-identity77.8%

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

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

        \[\leadsto y \cdot \color{blue}{\frac{-\left(z - t\right)}{a}} \]
      7. neg-sub077.8%

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

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

        \[\leadsto y \cdot \frac{\color{blue}{\left(-z\right)} + t}{a} \]
      10. +-commutative77.8%

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

        \[\leadsto y \cdot \frac{\color{blue}{t - z}}{a} \]
    7. Simplified77.8%

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

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

Alternative 7: 83.1% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.55 \cdot 10^{+81} \lor \neg \left(z \leq 1.8\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 -1.55e+81) (not (<= z 1.8)))
   (- x (* y (/ z a)))
   (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -1.55e+81) || !(z <= 1.8)) {
		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 <= (-1.55d+81)) .or. (.not. (z <= 1.8d0))) 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 <= -1.55e+81) || !(z <= 1.8)) {
		tmp = x - (y * (z / a));
	} else {
		tmp = x + (t * (y / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -1.55e+81) or not (z <= 1.8):
		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 <= -1.55e+81) || !(z <= 1.8))
		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 <= -1.55e+81) || ~((z <= 1.8)))
		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, -1.55e+81], N[Not[LessEqual[z, 1.8]], $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 -1.55 \cdot 10^{+81} \lor \neg \left(z \leq 1.8\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 < -1.55e81 or 1.80000000000000004 < z

    1. Initial program 87.0%

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

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

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

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

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

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

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

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

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

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

    if -1.55e81 < z < 1.80000000000000004

    1. Initial program 99.3%

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot \frac{t \cdot y}{a}} \]
    6. Step-by-step derivation
      1. cancel-sign-sub-inv91.3%

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

        \[\leadsto x + \color{blue}{1} \cdot \frac{t \cdot y}{a} \]
      3. *-lft-identity91.3%

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

        \[\leadsto \color{blue}{\frac{t \cdot y}{a} + x} \]
      5. associate-*r/89.4%

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

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

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

Alternative 8: 85.7% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.79999999999999984e80 or 3e6 < z

    1. Initial program 87.0%

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

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

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

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

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

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

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

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

    if -2.79999999999999984e80 < z < 3e6

    1. Initial program 99.3%

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot \frac{t \cdot y}{a}} \]
    6. Step-by-step derivation
      1. cancel-sign-sub-inv91.3%

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

        \[\leadsto x + \color{blue}{1} \cdot \frac{t \cdot y}{a} \]
      3. *-lft-identity91.3%

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

        \[\leadsto \color{blue}{\frac{t \cdot y}{a} + x} \]
      5. associate-*r/89.4%

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

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

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

Alternative 9: 66.1% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.9 \cdot 10^{+96}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.8999999999999996e96 or 4.0000000000000002e117 < x

    1. Initial program 93.3%

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

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

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

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

    if -4.8999999999999996e96 < x < 4.0000000000000002e117

    1. Initial program 94.9%

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \left(-\frac{z - t}{a}\right)} \]
      4. *-rgt-identity69.0%

        \[\leadsto y \cdot \color{blue}{\left(\left(-\frac{z - t}{a}\right) \cdot 1\right)} \]
      5. *-rgt-identity69.0%

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

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

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

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

        \[\leadsto y \cdot \frac{\color{blue}{\left(-z\right)} + t}{a} \]
      10. +-commutative69.0%

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

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

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

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

Alternative 10: 50.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.9 \cdot 10^{+38}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 3700000000:\\
\;\;\;\;t \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.8999999999999999e38 or 3.7e9 < a

    1. Initial program 88.2%

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

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

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

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

    if -1.8999999999999999e38 < a < 3.7e9

    1. Initial program 99.2%

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

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

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

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

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

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

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

Alternative 11: 50.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.4 \cdot 10^{+37}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 5000000000:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.40000000000000006e37 or 5e9 < a

    1. Initial program 88.2%

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

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

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

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

    if -3.40000000000000006e37 < a < 5e9

    1. Initial program 99.2%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    9. Applied egg-rr49.5%

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

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

Alternative 12: 46.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.22 \cdot 10^{+37}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 7 \cdot 10^{+93}:\\
\;\;\;\;\frac{y \cdot t}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.22e37 or 6.99999999999999996e93 < x

    1. Initial program 94.6%

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

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

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

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

    if -1.22e37 < x < 6.99999999999999996e93

    1. Initial program 94.2%

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

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

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

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

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

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

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

Alternative 13: 96.6% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.69999999999999993e-201

    1. Initial program 91.1%

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

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

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

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

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

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

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

    if -1.69999999999999993e-201 < y

    1. Initial program 96.7%

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

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

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

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

Alternative 14: 96.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5 \cdot 10^{-194}:\\
\;\;\;\;x - \frac{y}{\frac{a}{z - t}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.0000000000000002e-194

    1. Initial program 91.0%

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

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

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

    if -5.0000000000000002e-194 < y

    1. Initial program 96.7%

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

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

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

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

Alternative 15: 97.1% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 16: 39.4% 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 94.3%

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Final simplification41.7%

    \[\leadsto x \]
  7. Add Preprocessing

Developer target: 99.1% 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 2024040 
(FPCore (x y z t a)
  :name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, F"
  :precision binary64

  :herbie-target
  (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)))