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

Percentage Accurate: 93.6% → 96.9%
Time: 8.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: 93.6% 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: 96.9% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 2: 77.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{+142} \lor \neg \left(z \leq 4 \cdot 10^{+160}\right):\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.50000000000000001e142 or 4.00000000000000003e160 < z

    1. Initial program 89.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.50000000000000001e142 < z < 4.00000000000000003e160

    1. Initial program 95.7%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. sub-neg95.7%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, -\frac{z - t}{a}, x\right)} \]
      8. distribute-frac-neg95.0%

        \[\leadsto \mathsf{fma}\left(y, \color{blue}{\frac{-\left(z - t\right)}{a}}, x\right) \]
      9. sub-neg95.0%

        \[\leadsto \mathsf{fma}\left(y, \frac{-\color{blue}{\left(z + \left(-t\right)\right)}}{a}, x\right) \]
      10. +-commutative95.0%

        \[\leadsto \mathsf{fma}\left(y, \frac{-\color{blue}{\left(\left(-t\right) + z\right)}}{a}, x\right) \]
      11. distribute-neg-in95.0%

        \[\leadsto \mathsf{fma}\left(y, \frac{\color{blue}{\left(-\left(-t\right)\right) + \left(-z\right)}}{a}, x\right) \]
      12. unsub-neg95.0%

        \[\leadsto \mathsf{fma}\left(y, \frac{\color{blue}{\left(-\left(-t\right)\right) - z}}{a}, x\right) \]
      13. remove-double-neg95.0%

        \[\leadsto \mathsf{fma}\left(y, \frac{\color{blue}{t} - z}{a}, x\right) \]
    3. Simplified95.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{t - z}{a}, x\right)} \]
    4. Taylor expanded in z around 0 83.8%

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

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

Alternative 3: 81.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{+86} \lor \neg \left(t \leq 1.06 \cdot 10^{+15}\right):\\
\;\;\;\;x + \frac{y \cdot t}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1e86 or 1.06e15 < t

    1. Initial program 93.5%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. sub-neg93.5%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, -\frac{z - t}{a}, x\right)} \]
      8. distribute-frac-neg90.1%

        \[\leadsto \mathsf{fma}\left(y, \color{blue}{\frac{-\left(z - t\right)}{a}}, x\right) \]
      9. sub-neg90.1%

        \[\leadsto \mathsf{fma}\left(y, \frac{-\color{blue}{\left(z + \left(-t\right)\right)}}{a}, x\right) \]
      10. +-commutative90.1%

        \[\leadsto \mathsf{fma}\left(y, \frac{-\color{blue}{\left(\left(-t\right) + z\right)}}{a}, x\right) \]
      11. distribute-neg-in90.1%

        \[\leadsto \mathsf{fma}\left(y, \frac{\color{blue}{\left(-\left(-t\right)\right) + \left(-z\right)}}{a}, x\right) \]
      12. unsub-neg90.1%

        \[\leadsto \mathsf{fma}\left(y, \frac{\color{blue}{\left(-\left(-t\right)\right) - z}}{a}, x\right) \]
      13. remove-double-neg90.1%

        \[\leadsto \mathsf{fma}\left(y, \frac{\color{blue}{t} - z}{a}, x\right) \]
    3. Simplified90.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{t - z}{a}, x\right)} \]
    4. Taylor expanded in z around 0 86.0%

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

    if -1e86 < t < 1.06e15

    1. Initial program 94.6%

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

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

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

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

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

Alternative 4: 81.6% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -7.4999999999999997e86 or 5.7999999999999994e45 < t

    1. Initial program 93.2%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. sub-neg93.2%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, -\frac{z - t}{a}, x\right)} \]
      8. distribute-frac-neg89.6%

        \[\leadsto \mathsf{fma}\left(y, \color{blue}{\frac{-\left(z - t\right)}{a}}, x\right) \]
      9. sub-neg89.6%

        \[\leadsto \mathsf{fma}\left(y, \frac{-\color{blue}{\left(z + \left(-t\right)\right)}}{a}, x\right) \]
      10. +-commutative89.6%

        \[\leadsto \mathsf{fma}\left(y, \frac{-\color{blue}{\left(\left(-t\right) + z\right)}}{a}, x\right) \]
      11. distribute-neg-in89.6%

        \[\leadsto \mathsf{fma}\left(y, \frac{\color{blue}{\left(-\left(-t\right)\right) + \left(-z\right)}}{a}, x\right) \]
      12. unsub-neg89.6%

        \[\leadsto \mathsf{fma}\left(y, \frac{\color{blue}{\left(-\left(-t\right)\right) - z}}{a}, x\right) \]
      13. remove-double-neg89.6%

        \[\leadsto \mathsf{fma}\left(y, \frac{\color{blue}{t} - z}{a}, x\right) \]
    3. Simplified89.6%

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

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

    if -7.4999999999999997e86 < t < 5.7999999999999994e45

    1. Initial program 94.8%

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

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

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

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

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

Alternative 5: 64.4% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \leq 3.2 \cdot 10^{+32}:\\
\;\;\;\;y \cdot \frac{t - z}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.25e20 or 3.1999999999999999e32 < a

    1. Initial program 89.1%

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

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

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

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

    if -2.25e20 < a < 3.1999999999999999e32

    1. Initial program 98.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{t - z}}{\frac{a}{y}} \]
      9. associate-/r/74.3%

        \[\leadsto \color{blue}{\frac{t - z}{a} \cdot y} \]
      10. div-sub69.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.25 \cdot 10^{+20}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{+32}:\\ \;\;\;\;y \cdot \frac{t - z}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 6: 68.0% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \leq 5.2 \cdot 10^{+32}:\\
\;\;\;\;\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 < -6e20 or 5.2000000000000004e32 < a

    1. Initial program 89.1%

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

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

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

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

    if -6e20 < a < 5.2000000000000004e32

    1. Initial program 98.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 51.2% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -9.1e18 or 1.0799999999999999e-74 < a

    1. Initial program 90.3%

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

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

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

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

    if -9.1e18 < a < 1.0799999999999999e-74

    1. Initial program 98.3%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.1 \cdot 10^{+18}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.08 \cdot 10^{-74}:\\ \;\;\;\;\frac{y}{a} \cdot t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 8: 93.4% accurate, 1.0× speedup?

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

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

    \[x - \frac{y \cdot \left(z - t\right)}{a} \]
  2. Step-by-step derivation
    1. associate-*r/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. Final simplification93.2%

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

Alternative 9: 38.6% accurate, 9.0× speedup?

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification43.0%

    \[\leadsto x \]

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

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

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