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

Percentage Accurate: 93.1% → 98.8%
Time: 12.9s
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: 93.1% 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: 98.8% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.004:\\
\;\;\;\;x + y \cdot \left(\frac{1}{a} \cdot \left(t - z\right)\right)\\

\mathbf{elif}\;a \leq 1.08 \cdot 10^{-68}:\\
\;\;\;\;x + \frac{y \cdot \left(t - z\right)}{a}\\

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


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

    1. Initial program 84.4%

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

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

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

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

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

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

    if -0.0040000000000000001 < a < 1.0799999999999999e-68

    1. Initial program 99.1%

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

    if 1.0799999999999999e-68 < a

    1. Initial program 85.8%

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

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

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

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

Alternative 2: 47.8% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y}{a}\\ t_2 := y \cdot \frac{z}{-a}\\ \mathbf{if}\;z \leq -4 \cdot 10^{+106}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -1.05 \cdot 10^{+74}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -3 \cdot 10^{+50}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -6 \cdot 10^{-153}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.1 \cdot 10^{-243}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-265}:\\ \;\;\;\;\frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 1.42 \cdot 10^{-179}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{+46}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ y a))) (t_2 (* y (/ z (- a)))))
   (if (<= z -4e+106)
     t_2
     (if (<= z -1.05e+74)
       x
       (if (<= z -3e+50)
         t_2
         (if (<= z -6e-153)
           t_1
           (if (<= z -1.1e-243)
             x
             (if (<= z 1.8e-265)
               (/ y (/ a t))
               (if (<= z 1.42e-179) x (if (<= z 1.1e+46) t_1 t_2))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (y / a);
	double t_2 = y * (z / -a);
	double tmp;
	if (z <= -4e+106) {
		tmp = t_2;
	} else if (z <= -1.05e+74) {
		tmp = x;
	} else if (z <= -3e+50) {
		tmp = t_2;
	} else if (z <= -6e-153) {
		tmp = t_1;
	} else if (z <= -1.1e-243) {
		tmp = x;
	} else if (z <= 1.8e-265) {
		tmp = y / (a / t);
	} else if (z <= 1.42e-179) {
		tmp = x;
	} else if (z <= 1.1e+46) {
		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 = t * (y / a)
    t_2 = y * (z / -a)
    if (z <= (-4d+106)) then
        tmp = t_2
    else if (z <= (-1.05d+74)) then
        tmp = x
    else if (z <= (-3d+50)) then
        tmp = t_2
    else if (z <= (-6d-153)) then
        tmp = t_1
    else if (z <= (-1.1d-243)) then
        tmp = x
    else if (z <= 1.8d-265) then
        tmp = y / (a / t)
    else if (z <= 1.42d-179) then
        tmp = x
    else if (z <= 1.1d+46) 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 = t * (y / a);
	double t_2 = y * (z / -a);
	double tmp;
	if (z <= -4e+106) {
		tmp = t_2;
	} else if (z <= -1.05e+74) {
		tmp = x;
	} else if (z <= -3e+50) {
		tmp = t_2;
	} else if (z <= -6e-153) {
		tmp = t_1;
	} else if (z <= -1.1e-243) {
		tmp = x;
	} else if (z <= 1.8e-265) {
		tmp = y / (a / t);
	} else if (z <= 1.42e-179) {
		tmp = x;
	} else if (z <= 1.1e+46) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (y / a)
	t_2 = y * (z / -a)
	tmp = 0
	if z <= -4e+106:
		tmp = t_2
	elif z <= -1.05e+74:
		tmp = x
	elif z <= -3e+50:
		tmp = t_2
	elif z <= -6e-153:
		tmp = t_1
	elif z <= -1.1e-243:
		tmp = x
	elif z <= 1.8e-265:
		tmp = y / (a / t)
	elif z <= 1.42e-179:
		tmp = x
	elif z <= 1.1e+46:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(y / a))
	t_2 = Float64(y * Float64(z / Float64(-a)))
	tmp = 0.0
	if (z <= -4e+106)
		tmp = t_2;
	elseif (z <= -1.05e+74)
		tmp = x;
	elseif (z <= -3e+50)
		tmp = t_2;
	elseif (z <= -6e-153)
		tmp = t_1;
	elseif (z <= -1.1e-243)
		tmp = x;
	elseif (z <= 1.8e-265)
		tmp = Float64(y / Float64(a / t));
	elseif (z <= 1.42e-179)
		tmp = x;
	elseif (z <= 1.1e+46)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (y / a);
	t_2 = y * (z / -a);
	tmp = 0.0;
	if (z <= -4e+106)
		tmp = t_2;
	elseif (z <= -1.05e+74)
		tmp = x;
	elseif (z <= -3e+50)
		tmp = t_2;
	elseif (z <= -6e-153)
		tmp = t_1;
	elseif (z <= -1.1e-243)
		tmp = x;
	elseif (z <= 1.8e-265)
		tmp = y / (a / t);
	elseif (z <= 1.42e-179)
		tmp = x;
	elseif (z <= 1.1e+46)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(z / (-a)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4e+106], t$95$2, If[LessEqual[z, -1.05e+74], x, If[LessEqual[z, -3e+50], t$95$2, If[LessEqual[z, -6e-153], t$95$1, If[LessEqual[z, -1.1e-243], x, If[LessEqual[z, 1.8e-265], N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.42e-179], x, If[LessEqual[z, 1.1e+46], t$95$1, t$95$2]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -1.05 \cdot 10^{+74}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq -3 \cdot 10^{+50}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq -6 \cdot 10^{-153}:\\
\;\;\;\;t\_1\\

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

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

\mathbf{elif}\;z \leq 1.42 \cdot 10^{-179}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 1.1 \cdot 10^{+46}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -4.00000000000000036e106 or -1.0499999999999999e74 < z < -2.9999999999999998e50 or 1.1e46 < z

    1. Initial program 84.1%

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

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

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

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

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

        \[\leadsto -\color{blue}{y \cdot \frac{z}{a}} \]
      3. distribute-lft-neg-in61.9%

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

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

    if -4.00000000000000036e106 < z < -1.0499999999999999e74 or -6e-153 < z < -1.1e-243 or 1.8000000000000001e-265 < z < 1.42e-179

    1. Initial program 93.4%

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

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

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

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

    if -2.9999999999999998e50 < z < -6e-153 or 1.42e-179 < z < 1.1e46

    1. Initial program 96.9%

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

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

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

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

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

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

    if -1.1e-243 < z < 1.8000000000000001e-265

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{+106}:\\ \;\;\;\;y \cdot \frac{z}{-a}\\ \mathbf{elif}\;z \leq -1.05 \cdot 10^{+74}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -3 \cdot 10^{+50}:\\ \;\;\;\;y \cdot \frac{z}{-a}\\ \mathbf{elif}\;z \leq -6 \cdot 10^{-153}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -1.1 \cdot 10^{-243}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-265}:\\ \;\;\;\;\frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 1.42 \cdot 10^{-179}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{+46}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z}{-a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 98.7% accurate, 0.5× speedup?

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

    1. Initial program 83.8%

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

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

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

    if -7.39999999999999994e56 < a < 1.9999999999999998e-71

    1. Initial program 99.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.4 \cdot 10^{+56} \lor \neg \left(a \leq 2 \cdot 10^{-71}\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 4: 69.6% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \cdot 10^{-71} \lor \neg \left(y \leq 3.2 \cdot 10^{-70}\right):\\
\;\;\;\;y \cdot \frac{t - z}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.49999999999999999e-71 or 3.1999999999999997e-70 < y

    1. Initial program 88.4%

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

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

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

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

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

      \[\leadsto x - \color{blue}{\frac{y}{\frac{a}{z - t}}} \]
    7. Step-by-step derivation
      1. clear-num99.7%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y}{a} \cdot \color{blue}{\left(\left(-z\right) + \left(-\left(-t\right)\right)\right)} \]
      6. remove-double-neg78.4%

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{t - z}{a}} \]
    11. Simplified80.5%

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

    if -2.49999999999999999e-71 < y < 3.1999999999999997e-70

    1. Initial program 97.7%

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

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

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

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

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

Alternative 5: 75.2% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.59999999999999977e-4 or 1.11999999999999998e82 < x

    1. Initial program 92.1%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot \frac{t \cdot y}{a}} \]
    10. Step-by-step derivation
      1. sub-neg80.9%

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

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

        \[\leadsto x + \left(-\left(-\color{blue}{\frac{t}{a} \cdot y}\right)\right) \]
      4. distribute-rgt-neg-in80.2%

        \[\leadsto x + \left(-\color{blue}{\frac{t}{a} \cdot \left(-y\right)}\right) \]
      5. distribute-rgt-neg-out80.2%

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

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

        \[\leadsto x + \color{blue}{\frac{t}{\frac{a}{y}}} \]
    11. Simplified84.4%

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

        \[\leadsto x + \color{blue}{\frac{t}{a} \cdot y} \]
    13. Applied egg-rr80.2%

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

    if -2.59999999999999977e-4 < x < 1.11999999999999998e82

    1. Initial program 91.3%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-\frac{y \cdot \left(z - t\right)}{a}} \]
      2. associate-*r/78.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-sub76.6%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y \cdot t}{a}} - y \cdot \frac{z}{a} \]
      12. *-commutative75.8%

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

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

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

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

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

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

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

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

Alternative 6: 76.5% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.59999999999999977e-4 or 3.2499999999999999e91 < x

    1. Initial program 92.1%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot \frac{t \cdot y}{a}} \]
    10. Step-by-step derivation
      1. sub-neg80.9%

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

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

        \[\leadsto x + \left(-\left(-\color{blue}{\frac{t}{a} \cdot y}\right)\right) \]
      4. distribute-rgt-neg-in80.2%

        \[\leadsto x + \left(-\color{blue}{\frac{t}{a} \cdot \left(-y\right)}\right) \]
      5. distribute-rgt-neg-out80.2%

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

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

        \[\leadsto x + \color{blue}{\frac{t}{\frac{a}{y}}} \]
    11. Simplified84.4%

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

    if -2.59999999999999977e-4 < x < 3.2499999999999999e91

    1. Initial program 91.3%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-\frac{y \cdot \left(z - t\right)}{a}} \]
      2. associate-*r/78.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-sub76.6%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y \cdot t}{a}} - y \cdot \frac{z}{a} \]
      12. *-commutative75.8%

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

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

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

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

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

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

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

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

Alternative 7: 68.7% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{-164}:\\
\;\;\;\;\left(t - z\right) \cdot \frac{y}{a}\\

\mathbf{elif}\;y \leq 2.1 \cdot 10^{-83}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -5.8e-164

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y \cdot t}{a}} - y \cdot \frac{z}{a} \]
      12. *-commutative63.8%

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} - y \cdot \frac{z}{a} \]
      14. *-commutative66.8%

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

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

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

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

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

    if -5.8e-164 < y < 2.0999999999999999e-83

    1. Initial program 98.5%

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

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

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

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

    if 2.0999999999999999e-83 < y

    1. Initial program 85.4%

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

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

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

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

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

      \[\leadsto x - \color{blue}{\frac{y}{\frac{a}{z - t}}} \]
    7. Step-by-step derivation
      1. clear-num99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{t - z}{a}} \]
    11. Simplified82.1%

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

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

Alternative 8: 80.7% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 91.2%

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

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

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

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

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

      \[\leadsto x - \color{blue}{\frac{y}{\frac{a}{z - t}}} \]
    7. Step-by-step derivation
      1. clear-num93.0%

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot \frac{t \cdot y}{a}} \]
    10. Step-by-step derivation
      1. sub-neg79.7%

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

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

        \[\leadsto x + \left(-\left(-\color{blue}{\frac{t}{a} \cdot y}\right)\right) \]
      4. distribute-rgt-neg-in81.7%

        \[\leadsto x + \left(-\color{blue}{\frac{t}{a} \cdot \left(-y\right)}\right) \]
      5. distribute-rgt-neg-out81.7%

        \[\leadsto x + \color{blue}{\frac{t}{a} \cdot \left(-\left(-y\right)\right)} \]
      6. remove-double-neg81.7%

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

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

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

    if -4.8000000000000002e-11 < t < 3.8e-38

    1. Initial program 93.1%

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

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

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

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

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

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

    if 3.8e-38 < t

    1. Initial program 89.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\left(\frac{t}{a} + \left(-\frac{z}{a}\right)\right)} \]
      9. sub-neg64.4%

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} - y \cdot \frac{z}{a} \]
      14. *-commutative68.4%

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

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

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

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

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

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

Alternative 9: 80.6% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 91.2%

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

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

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

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

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

      \[\leadsto x - \color{blue}{\frac{y}{\frac{a}{z - t}}} \]
    7. Step-by-step derivation
      1. clear-num93.0%

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot \frac{t \cdot y}{a}} \]
    10. Step-by-step derivation
      1. sub-neg79.7%

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

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

        \[\leadsto x + \left(-\left(-\color{blue}{\frac{t}{a} \cdot y}\right)\right) \]
      4. distribute-rgt-neg-in81.7%

        \[\leadsto x + \left(-\color{blue}{\frac{t}{a} \cdot \left(-y\right)}\right) \]
      5. distribute-rgt-neg-out81.7%

        \[\leadsto x + \color{blue}{\frac{t}{a} \cdot \left(-\left(-y\right)\right)} \]
      6. remove-double-neg81.7%

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

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

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

    if -6.8000000000000001e-12 < t < 1.04999999999999997e-39

    1. Initial program 93.0%

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

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

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

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

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

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

    if 1.04999999999999997e-39 < t

    1. Initial program 89.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t - z}{\frac{a}{y}}} \]
    11. Applied egg-rr81.0%

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

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

Alternative 10: 50.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.52 \cdot 10^{-21} \lor \neg \left(t \leq 3.5 \cdot 10^{-70}\right):\\
\;\;\;\;t \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.52000000000000009e-21 or 3.49999999999999974e-70 < t

    1. Initial program 90.2%

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

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

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

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

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

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

    if -1.52000000000000009e-21 < t < 3.49999999999999974e-70

    1. Initial program 93.3%

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

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

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

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

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

Alternative 11: 48.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.4 \cdot 10^{-65}:\\
\;\;\;\;y \cdot \frac{t}{a}\\

\mathbf{elif}\;t \leq 2.75 \cdot 10^{-70}:\\
\;\;\;\;x\\

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


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

    1. Initial program 91.6%

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

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

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

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

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

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

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

    if -1.4e-65 < t < 2.75e-70

    1. Initial program 92.7%

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

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

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

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

    if 2.75e-70 < t

    1. Initial program 90.4%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.4 \cdot 10^{-65}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;t \leq 2.75 \cdot 10^{-70}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 48.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.6 \cdot 10^{-67}:\\
\;\;\;\;\frac{y}{\frac{a}{t}}\\

\mathbf{elif}\;t \leq 3.5 \cdot 10^{-70}:\\
\;\;\;\;x\\

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


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

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

    if -3.59999999999999999e-67 < t < 3.49999999999999974e-70

    1. Initial program 92.7%

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

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

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

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

    if 3.49999999999999974e-70 < t

    1. Initial program 90.4%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.6 \cdot 10^{-67}:\\ \;\;\;\;\frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{-70}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 47.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.25 \cdot 10^{-64}:\\
\;\;\;\;\frac{y}{\frac{a}{t}}\\

\mathbf{elif}\;t \leq 3.5 \cdot 10^{-70}:\\
\;\;\;\;x\\

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


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

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

    if -2.25000000000000005e-64 < t < 3.49999999999999974e-70

    1. Initial program 92.7%

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

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

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

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

    if 3.49999999999999974e-70 < t

    1. Initial program 90.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.25 \cdot 10^{-64}:\\ \;\;\;\;\frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{-70}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot t}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 92.4% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.50000000000000014e231

    1. Initial program 94.4%

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

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

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

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

    if -2.50000000000000014e231 < x

    1. Initial program 91.4%

      \[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
  3. Recombined 2 regimes into one program.
  4. Final simplification93.6%

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

Alternative 15: 93.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \frac{y}{\frac{a}{t - z}} \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(y / Float64(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[(y / N[(a / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \frac{y}{\frac{a}{t - z}}
\end{array}
Derivation
  1. Initial program 91.6%

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

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

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

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

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

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

    \[\leadsto x + \frac{y}{\frac{a}{t - z}} \]
  8. 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 91.6%

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Final simplification34.0%

    \[\leadsto x \]
  7. Add Preprocessing

Developer target: 99.2% 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 2024039 
(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)))