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

Percentage Accurate: 92.8% → 97.7%
Time: 6.3s
Alternatives: 9
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 9 alternatives:

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

Initial Program: 92.8% 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.7% accurate, 0.8× speedup?

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

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

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


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

    1. Initial program 85.1%

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

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

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

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

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

    if -8.1999999999999999e-83 < y

    1. Initial program 95.5%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.2 \cdot 10^{-83}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z - t}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z - t}{\frac{a}{y}}\\ \end{array} \]

Alternative 2: 74.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.56 \cdot 10^{+188} \lor \neg \left(t \leq 8.5 \cdot 10^{+244}\right):\\
\;\;\;\;t \cdot \frac{-y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.55999999999999992e188 or 8.49999999999999995e244 < t

    1. Initial program 92.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.55999999999999992e188 < t < 8.49999999999999995e244

    1. Initial program 92.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.56 \cdot 10^{+188} \lor \neg \left(t \leq 8.5 \cdot 10^{+244}\right):\\ \;\;\;\;t \cdot \frac{-y}{a}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot z}{a}\\ \end{array} \]

Alternative 3: 77.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.9 \cdot 10^{+186} \lor \neg \left(t \leq 8.5 \cdot 10^{+244}\right):\\
\;\;\;\;t \cdot \frac{-y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.89999999999999992e186 or 8.49999999999999995e244 < t

    1. Initial program 92.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.89999999999999992e186 < t < 8.49999999999999995e244

    1. Initial program 92.1%

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

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

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

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

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

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

        \[\leadsto \color{blue}{z \cdot \frac{y}{a}} + x \]
    6. Simplified79.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.9 \cdot 10^{+186} \lor \neg \left(t \leq 8.5 \cdot 10^{+244}\right):\\ \;\;\;\;t \cdot \frac{-y}{a}\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \end{array} \]

Alternative 4: 77.4% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.65 \cdot 10^{+185} \lor \neg \left(t \leq 8.5 \cdot 10^{+244}\right):\\
\;\;\;\;t \cdot \frac{-y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.65000000000000004e185 or 8.49999999999999995e244 < t

    1. Initial program 92.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.65000000000000004e185 < t < 8.49999999999999995e244

    1. Initial program 92.1%

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

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

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

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

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

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

        \[\leadsto \color{blue}{z \cdot \frac{y}{a}} + x \]
    6. Simplified79.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.65 \cdot 10^{+185} \lor \neg \left(t \leq 8.5 \cdot 10^{+244}\right):\\ \;\;\;\;t \cdot \frac{-y}{a}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y}}\\ \end{array} \]

Alternative 5: 85.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.7 \cdot 10^{+52} \lor \neg \left(z \leq 7.2 \cdot 10^{-28}\right):\\
\;\;\;\;x + \frac{z}{\frac{a}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.7e52 or 7.1999999999999997e-28 < z

    1. Initial program 90.1%

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

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

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

      \[\leadsto \color{blue}{x + \frac{y \cdot z}{a}} \]
    5. Step-by-step derivation
      1. +-commutative82.2%

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

        \[\leadsto \color{blue}{\frac{y}{a} \cdot z} + x \]
      3. *-commutative87.5%

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

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

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

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

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

    if -3.7e52 < z < 7.1999999999999997e-28

    1. Initial program 94.4%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.7 \cdot 10^{+52} \lor \neg \left(z \leq 7.2 \cdot 10^{-28}\right):\\ \;\;\;\;x + \frac{z}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x - t \cdot \frac{y}{a}\\ \end{array} \]

Alternative 6: 97.7% accurate, 0.8× speedup?

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

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

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


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

    1. Initial program 85.9%

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

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

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

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

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

    if -4.5e-95 < y

    1. Initial program 95.4%

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

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

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

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

Alternative 7: 50.2% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.2 \cdot 10^{-97}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -9.19999999999999976e-97 or 1.05e7 < a

    1. Initial program 86.7%

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

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

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

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

    if -9.19999999999999976e-97 < a < 1.05e7

    1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{t}{\frac{a}{y}}} \]
      3. clear-num55.5%

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

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

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

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

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

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

        \[\leadsto t \cdot \color{blue}{\frac{-y}{a}} \]
    11. Simplified43.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.2 \cdot 10^{-97}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 10500000:\\ \;\;\;\;t \cdot \frac{-y}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 8: 97.3% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 9: 39.3% accurate, 9.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
	return x;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x
end function
public static double code(double x, double y, double z, double t, double a) {
	return x;
}
def code(x, y, z, t, a):
	return x
function code(x, y, z, t, a)
	return x
end
function tmp = code(x, y, z, t, a)
	tmp = x;
end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 92.2%

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

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

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification39.4%

    \[\leadsto x \]

Developer target: 99.3% accurate, 0.7× 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 2023271 
(FPCore (x y z t a)
  :name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, E"
  :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)))