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

Percentage Accurate: 93.2% → 99.2%
Time: 7.6s
Alternatives: 11
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 11 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: 99.2% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(z - t\right)\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;x + \frac{t - z}{\frac{a}{y}}\\ \mathbf{elif}\;t_1 \leq 4 \cdot 10^{+124}:\\ \;\;\;\;x - \frac{t_1}{a}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{\frac{a}{z - t}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (- z t))))
   (if (<= t_1 (- INFINITY))
     (+ x (/ (- t z) (/ a y)))
     (if (<= t_1 4e+124) (- x (/ t_1 a)) (- x (/ y (/ a (- z t))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (z - t);
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = x + ((t - z) / (a / y));
	} else if (t_1 <= 4e+124) {
		tmp = x - (t_1 / a);
	} else {
		tmp = x - (y / (a / (z - t)));
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (z - t);
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = x + ((t - z) / (a / y));
	} else if (t_1 <= 4e+124) {
		tmp = x - (t_1 / a);
	} else {
		tmp = x - (y / (a / (z - t)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * (z - t)
	tmp = 0
	if t_1 <= -math.inf:
		tmp = x + ((t - z) / (a / y))
	elif t_1 <= 4e+124:
		tmp = x - (t_1 / a)
	else:
		tmp = x - (y / (a / (z - t)))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(z - t))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(x + Float64(Float64(t - z) / Float64(a / y)));
	elseif (t_1 <= 4e+124)
		tmp = Float64(x - Float64(t_1 / a));
	else
		tmp = Float64(x - Float64(y / Float64(a / Float64(z - t))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * (z - t);
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = x + ((t - z) / (a / y));
	elseif (t_1 <= 4e+124)
		tmp = x - (t_1 / a);
	else
		tmp = x - (y / (a / (z - t)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(x + N[(N[(t - z), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e+124], N[(x - N[(t$95$1 / a), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{elif}\;t_1 \leq 4 \cdot 10^{+124}:\\
\;\;\;\;x - \frac{t_1}{a}\\

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


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

    1. Initial program 56.2%

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

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

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

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

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

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

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

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

    1. Initial program 99.8%

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

    if 3.99999999999999979e124 < (*.f64 y (-.f64 z t))

    1. Initial program 90.9%

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

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

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

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

Alternative 2: 48.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{z}{a} \cdot \left(-y\right)\\
\mathbf{if}\;x \leq -7 \cdot 10^{-18}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq -1.06 \cdot 10^{-70}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \leq 2.3 \cdot 10^{+37}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -6.9999999999999997e-18 or 2.30000000000000002e37 < x

    1. Initial program 94.0%

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{a} \cdot z} \]
      2. *-commutative81.4%

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

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

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

    if -6.9999999999999997e-18 < x < -1.06e-70 or 4.4000000000000002e-91 < x < 2.30000000000000002e37

    1. Initial program 87.1%

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{a} \cdot z} \]
      2. *-commutative76.6%

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

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

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

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

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

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

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

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

    if -1.06e-70 < x < 4.4000000000000002e-91

    1. Initial program 94.7%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    10. Taylor expanded in t around 0 50.8%

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    12. Simplified55.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -7 \cdot 10^{-18}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -1.06 \cdot 10^{-70}:\\ \;\;\;\;\frac{z}{a} \cdot \left(-y\right)\\ \mathbf{elif}\;x \leq 4.4 \cdot 10^{-91}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;x \leq 2.3 \cdot 10^{+37}:\\ \;\;\;\;\frac{z}{a} \cdot \left(-y\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 3: 48.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.1 \cdot 10^{-17}:\\
\;\;\;\;x\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -2.09999999999999992e-17 or 2.7999999999999998e37 < x

    1. Initial program 94.0%

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{a} \cdot z} \]
      2. *-commutative81.4%

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

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

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

    if -2.09999999999999992e-17 < x < -1.76e-68

    1. Initial program 99.9%

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{a} \cdot z} \]
      2. *-commutative91.0%

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

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

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

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

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

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

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

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

    if -1.76e-68 < x < 3.6500000000000001e-91

    1. Initial program 94.7%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    10. Taylor expanded in t around 0 50.8%

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    12. Simplified55.5%

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

    if 3.6500000000000001e-91 < x < 2.7999999999999998e37

    1. Initial program 81.7%

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{a} \cdot z} \]
      2. *-commutative70.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y \cdot z}{-a}} \]
    11. Applied egg-rr33.5%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{-a}{z}}} \]
    13. Simplified51.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.1 \cdot 10^{-17}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -1.76 \cdot 10^{-68}:\\ \;\;\;\;\frac{z}{a} \cdot \left(-y\right)\\ \mathbf{elif}\;x \leq 3.65 \cdot 10^{-91}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;x \leq 2.8 \cdot 10^{+37}:\\ \;\;\;\;\frac{y}{\frac{-a}{z}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 4: 99.1% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -6.2e19

    1. Initial program 84.3%

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

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

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

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

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

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

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

    if -6.2e19 < y < 9.99999999999999971e-29

    1. Initial program 99.9%

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

    if 9.99999999999999971e-29 < y

    1. Initial program 89.5%

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

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

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

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

Alternative 5: 73.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.2 \cdot 10^{+87} \lor \neg \left(z \leq 2.6 \cdot 10^{+249}\right):\\
\;\;\;\;z \cdot \frac{y}{-a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.19999999999999988e87 or 2.60000000000000019e249 < z

    1. Initial program 86.3%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \frac{-z}{a}} \]
    10. Step-by-step derivation
      1. frac-2neg67.7%

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

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

        \[\leadsto \color{blue}{\frac{y \cdot z}{-a}} \]
    11. Applied egg-rr63.8%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{-a}{z}}} \]
      2. associate-/r/69.6%

        \[\leadsto \color{blue}{\frac{y}{-a} \cdot z} \]
    13. Simplified69.6%

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

    if -7.19999999999999988e87 < z < 2.60000000000000019e249

    1. Initial program 94.9%

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

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

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

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

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

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

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

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

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

Alternative 6: 85.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.7 \cdot 10^{-32} \lor \neg \left(z \leq 21500000000\right):\\
\;\;\;\;x - z \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.70000000000000019e-32 or 2.15e10 < z

    1. Initial program 89.6%

      \[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 z around inf 78.3%

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

        \[\leadsto x - \color{blue}{\frac{y}{a} \cdot z} \]
      2. *-commutative84.6%

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

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

    if -4.70000000000000019e-32 < z < 2.15e10

    1. Initial program 96.4%

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

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

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

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

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

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

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

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

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

Alternative 7: 86.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.7 \cdot 10^{-32} \lor \neg \left(z \leq 23000000000\right):\\
\;\;\;\;x - z \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.7000000000000004e-32 or 2.3e10 < z

    1. Initial program 89.6%

      \[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 z around inf 78.3%

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

        \[\leadsto x - \color{blue}{\frac{y}{a} \cdot z} \]
      2. *-commutative84.6%

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

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

    if -5.7000000000000004e-32 < z < 2.3e10

    1. Initial program 96.4%

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

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

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

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

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

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

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

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

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

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

Alternative 8: 49.0% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.65 \cdot 10^{-17}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.65e-17 or 3.5000000000000002e39 < x

    1. Initial program 94.0%

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{a} \cdot z} \]
      2. *-commutative81.4%

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

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

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

    if -1.65e-17 < x < 3.5000000000000002e39

    1. Initial program 92.5%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.65 \cdot 10^{-17}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 3.5 \cdot 10^{+39}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 9: 48.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.3 \cdot 10^{-17}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.3e-17 or 7.99999999999999963e37 < x

    1. Initial program 94.0%

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{a} \cdot z} \]
      2. *-commutative81.4%

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

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

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

    if -3.3e-17 < x < 7.99999999999999963e37

    1. Initial program 92.5%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    10. Taylor expanded in t around 0 45.9%

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    12. Simplified48.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.3 \cdot 10^{-17}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 8 \cdot 10^{+37}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 10: 97.3% 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 93.3%

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

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

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

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

Alternative 11: 38.7% 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 93.3%

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

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

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

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

      \[\leadsto x - \color{blue}{\frac{y}{a} \cdot z} \]
    2. *-commutative70.4%

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

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

    \[\leadsto \color{blue}{x} \]
  8. Final simplification42.4%

    \[\leadsto x \]

Developer target: 99.1% 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 2023293 
(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)))