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

Percentage Accurate: 93.2% → 97.0%
Time: 14.4s
Alternatives: 12
Speedup: 0.8×

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 12 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.2% 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: 97.0% accurate, 0.7× speedup?

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

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

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

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

    \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. associate-*r/96.2%

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

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

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

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

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

    \[\leadsto x - \frac{1}{\color{blue}{\frac{a}{y} \cdot \frac{1}{z - t}}} \]
  9. Final simplification99.0%

    \[\leadsto x + \frac{-1}{\frac{a}{y} \cdot \frac{1}{z - t}} \]
  10. Add Preprocessing

Alternative 2: 49.9% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := y \cdot \frac{t}{a}\\
\mathbf{if}\;a \leq -1 \cdot 10^{-32}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -1.25 \cdot 10^{-121}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 5.8 \cdot 10^{-22}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.00000000000000006e-32 or 2.7999999999999998e49 < a

    1. Initial program 93.6%

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

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

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

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

    if -1.00000000000000006e-32 < a < -1.24999999999999997e-121 or 2.0999999999999999e-62 < a < 5.8000000000000003e-22

    1. Initial program 99.8%

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

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

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

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

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

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

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

    if -1.24999999999999997e-121 < a < 2.0999999999999999e-62

    1. Initial program 98.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y}{a} \cdot \left(\color{blue}{\left(-\left(-t\right)\right)} - z\right) \]
      12. remove-double-neg87.7%

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

      \[\leadsto \color{blue}{\frac{y}{a} \cdot \left(t - z\right)} \]
    8. Taylor expanded in t around 0 65.9%

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

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

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

    if 5.8000000000000003e-22 < a < 2.7999999999999998e49

    1. Initial program 93.0%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1 \cdot 10^{-32}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.25 \cdot 10^{-121}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;a \leq 2.1 \cdot 10^{-62}:\\ \;\;\;\;z \cdot \frac{-y}{a}\\ \mathbf{elif}\;a \leq 5.8 \cdot 10^{-22}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{+49}:\\ \;\;\;\;y \cdot \frac{z}{-a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 49.8% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;y \leq -7.4 \cdot 10^{-110}:\\
\;\;\;\;y \cdot \frac{-z}{a}\\

\mathbf{elif}\;y \leq 6.6 \cdot 10^{-21}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.00000000000000003e40 or 6.60000000000000018e-21 < y

    1. Initial program 93.3%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num93.2%

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

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

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

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

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

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

    if -1.00000000000000003e40 < y < -7.40000000000000032e-110

    1. Initial program 99.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 z around inf 49.9%

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

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

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

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

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

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

    if -7.40000000000000032e-110 < y < 6.60000000000000018e-21

    1. Initial program 99.0%

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

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

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification57.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1 \cdot 10^{+40}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;y \leq -7.4 \cdot 10^{-110}:\\ \;\;\;\;y \cdot \frac{-z}{a}\\ \mathbf{elif}\;y \leq 6.6 \cdot 10^{-21}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 92.6% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.2499999999999998e-161 or 4.40000000000000025e-107 < a

    1. Initial program 95.2%

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

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

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

    if -2.2499999999999998e-161 < a < 4.40000000000000025e-107

    1. Initial program 98.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 96.3% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \cdot \left(z - t\right) \leq -\infty:\\ \;\;\;\;x - \frac{y}{\frac{a}{z - t}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot \left(t - z\right)}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= (* y (- z t)) (- INFINITY))
   (- x (/ y (/ a (- z t))))
   (+ x (/ (* y (- t z)) a))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((y * (z - t)) <= -((double) INFINITY)) {
		tmp = x - (y / (a / (z - t)));
	} else {
		tmp = x + ((y * (t - z)) / a);
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((y * (z - t)) <= -Double.POSITIVE_INFINITY) {
		tmp = x - (y / (a / (z - t)));
	} else {
		tmp = x + ((y * (t - z)) / a);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (y * (z - t)) <= -math.inf:
		tmp = x - (y / (a / (z - t)))
	else:
		tmp = x + ((y * (t - z)) / a)
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (Float64(y * Float64(z - t)) <= Float64(-Inf))
		tmp = Float64(x - Float64(y / Float64(a / Float64(z - t))));
	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 ((y * (z - t)) <= -Inf)
		tmp = x - (y / (a / (z - t)));
	else
		tmp = x + ((y * (t - z)) / a);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision], (-Infinity)], N[(x - N[(y / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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

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


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

    1. Initial program 78.5%

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

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

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

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

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

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

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

    1. Initial program 97.9%

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

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

Alternative 6: 81.8% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.40000000000000009e43 or 5.79999999999999961e47 < t

    1. Initial program 96.2%

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

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

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/96.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.40000000000000009e43 < t < 5.79999999999999961e47

    1. Initial program 96.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. Taylor expanded in z around inf 88.1%

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

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

Alternative 7: 82.2% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.2 \cdot 10^{+40} \lor \neg \left(t \leq 2.3 \cdot 10^{+50}\right):\\
\;\;\;\;x + y \cdot \frac{t}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.2000000000000001e40 or 2.29999999999999997e50 < t

    1. Initial program 96.2%

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

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

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/96.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.2000000000000001e40 < t < 2.29999999999999997e50

    1. Initial program 96.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. Taylor expanded in z around inf 88.1%

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

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

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

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

Alternative 8: 75.6% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -6.5 \cdot 10^{-117} \lor \neg \left(a \leq 5.8 \cdot 10^{+47}\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 (<= a -6.5e-117) (not (<= a 5.8e+47)))
   (+ x (* y (/ t a)))
   (* (/ y a) (- t z))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a <= -6.5e-117) || !(a <= 5.8e+47)) {
		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 ((a <= (-6.5d-117)) .or. (.not. (a <= 5.8d+47))) 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 ((a <= -6.5e-117) || !(a <= 5.8e+47)) {
		tmp = x + (y * (t / a));
	} else {
		tmp = (y / a) * (t - z);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (a <= -6.5e-117) or not (a <= 5.8e+47):
		tmp = x + (y * (t / a))
	else:
		tmp = (y / a) * (t - z)
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((a <= -6.5e-117) || !(a <= 5.8e+47))
		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 ((a <= -6.5e-117) || ~((a <= 5.8e+47)))
		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[a, -6.5e-117], N[Not[LessEqual[a, 5.8e+47]], $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}\;a \leq -6.5 \cdot 10^{-117} \lor \neg \left(a \leq 5.8 \cdot 10^{+47}\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 a < -6.5000000000000001e-117 or 5.79999999999999961e47 < a

    1. Initial program 94.6%

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

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

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/94.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{t}{a}} \]
    11. Simplified81.5%

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

    if -6.5000000000000001e-117 < a < 5.79999999999999961e47

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y}{a} \cdot \left(\color{blue}{\left(-\left(-t\right)\right)} - z\right) \]
      12. remove-double-neg86.1%

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

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

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

Alternative 9: 67.0% accurate, 0.5× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.80000000000000028e91 or 1.26e184 < a

    1. Initial program 91.3%

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

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

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

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

    if -5.80000000000000028e91 < a < 1.26e184

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 50.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -360 \lor \neg \left(y \leq 7.5 \cdot 10^{-20}\right):\\
\;\;\;\;t \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -360 or 7.49999999999999981e-20 < y

    1. Initial program 93.5%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num93.4%

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

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

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

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

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

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

    if -360 < y < 7.49999999999999981e-20

    1. Initial program 99.2%

      \[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. Taylor expanded in x around inf 57.8%

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

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

Alternative 11: 97.0% accurate, 0.8× speedup?

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

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

    \[x - \frac{y \cdot \left(z - t\right)}{a} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. clear-num96.1%

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

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

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

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

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

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

    \[\leadsto x + \frac{1}{\frac{\frac{a}{y}}{t - z}} \]
  8. Add Preprocessing

Alternative 12: 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 96.2%

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Add Preprocessing

Developer target: 99.1% accurate, 0.5× speedup?

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

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

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

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


\end{array}
\end{array}

Reproduce

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

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

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