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

Percentage Accurate: 93.1% → 97.4%
Time: 12.0s
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.1% accurate, 1.0× speedup?

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

\\
x - \frac{y \cdot \left(z - t\right)}{a}
\end{array}

Alternative 1: 97.4% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.89999999999999965e-108

    1. Initial program 94.8%

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

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

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

    if -5.89999999999999965e-108 < a

    1. Initial program 92.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 48.9% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;x \leq 4500:\\
\;\;\;\;z \cdot \frac{y}{-a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -6e-52 or 4500 < x

    1. Initial program 95.0%

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

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

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

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

    if -6e-52 < x < 1.80000000000000009e-114

    1. Initial program 92.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    10. Simplified55.6%

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

    if 1.80000000000000009e-114 < x < 4500

    1. Initial program 87.1%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{z}{a} \cdot \left(-y\right)} \]
    11. Step-by-step derivation
      1. distribute-rgt-neg-out36.7%

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

        \[\leadsto -\color{blue}{\frac{z}{\frac{a}{y}}} \]
      3. div-inv52.7%

        \[\leadsto -\color{blue}{z \cdot \frac{1}{\frac{a}{y}}} \]
      4. clear-num52.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6 \cdot 10^{-52}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.8 \cdot 10^{-114}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;x \leq 4500:\\ \;\;\;\;z \cdot \frac{y}{-a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 48.9% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;x \leq 115:\\
\;\;\;\;\frac{-z}{\frac{a}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.25e-52 or 115 < x

    1. Initial program 95.0%

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

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

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

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

    if -2.25e-52 < x < 1.80000000000000009e-114

    1. Initial program 92.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    10. Simplified55.6%

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

    if 1.80000000000000009e-114 < x < 115

    1. Initial program 87.1%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{z}{a} \cdot \left(-y\right)} \]
    11. Step-by-step derivation
      1. add-sqr-sqrt18.4%

        \[\leadsto \frac{z}{a} \cdot \color{blue}{\left(\sqrt{-y} \cdot \sqrt{-y}\right)} \]
      2. sqrt-unprod16.2%

        \[\leadsto \frac{z}{a} \cdot \color{blue}{\sqrt{\left(-y\right) \cdot \left(-y\right)}} \]
      3. sqr-neg16.2%

        \[\leadsto \frac{z}{a} \cdot \sqrt{\color{blue}{y \cdot y}} \]
      4. sqrt-unprod0.8%

        \[\leadsto \frac{z}{a} \cdot \color{blue}{\left(\sqrt{y} \cdot \sqrt{y}\right)} \]
      5. add-sqr-sqrt2.3%

        \[\leadsto \frac{z}{a} \cdot \color{blue}{y} \]
      6. associate-/r/5.6%

        \[\leadsto \color{blue}{\frac{z}{\frac{a}{y}}} \]
      7. frac-2neg5.6%

        \[\leadsto \color{blue}{\frac{-z}{-\frac{a}{y}}} \]
      8. distribute-neg-frac25.6%

        \[\leadsto \frac{-z}{\color{blue}{\frac{a}{-y}}} \]
      9. add-sqr-sqrt1.5%

        \[\leadsto \frac{-z}{\frac{a}{\color{blue}{\sqrt{-y} \cdot \sqrt{-y}}}} \]
      10. sqrt-unprod22.8%

        \[\leadsto \frac{-z}{\frac{a}{\color{blue}{\sqrt{\left(-y\right) \cdot \left(-y\right)}}}} \]
      11. sqr-neg22.8%

        \[\leadsto \frac{-z}{\frac{a}{\sqrt{\color{blue}{y \cdot y}}}} \]
      12. sqrt-unprod24.6%

        \[\leadsto \frac{-z}{\frac{a}{\color{blue}{\sqrt{y} \cdot \sqrt{y}}}} \]
      13. add-sqr-sqrt52.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.25 \cdot 10^{-52}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.8 \cdot 10^{-114}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;x \leq 115:\\ \;\;\;\;\frac{-z}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 78.9% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.95 \cdot 10^{+56} \lor \neg \left(z \leq 7.5 \cdot 10^{+31}\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 -1.95e+56) (not (<= z 7.5e+31)))
   (* (/ y a) (- t z))
   (+ x (/ (* y t) a))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -1.95e+56) || !(z <= 7.5e+31)) {
		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 <= (-1.95d+56)) .or. (.not. (z <= 7.5d+31))) 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 <= -1.95e+56) || !(z <= 7.5e+31)) {
		tmp = (y / a) * (t - z);
	} else {
		tmp = x + ((y * t) / a);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -1.95e+56) or not (z <= 7.5e+31):
		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 <= -1.95e+56) || !(z <= 7.5e+31))
		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 <= -1.95e+56) || ~((z <= 7.5e+31)))
		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, -1.95e+56], N[Not[LessEqual[z, 7.5e+31]], $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 -1.95 \cdot 10^{+56} \lor \neg \left(z \leq 7.5 \cdot 10^{+31}\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 < -1.94999999999999997e56 or 7.5e31 < z

    1. Initial program 88.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\left(\left(-\color{blue}{\frac{t \cdot y}{a}}\right) + z \cdot \frac{y}{a}\right) \]
      10. mul-1-neg57.1%

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

        \[\leadsto \color{blue}{\left(--1 \cdot \frac{t \cdot y}{a}\right) + \left(-z \cdot \frac{y}{a}\right)} \]
      12. mul-1-neg57.1%

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{t}{a}} + \left(-z \cdot \frac{y}{a}\right) \]
      16. sub-neg59.1%

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

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

        \[\leadsto \color{blue}{\frac{y}{a} \cdot t} - z \cdot \frac{y}{a} \]
      19. *-commutative61.7%

        \[\leadsto \frac{y}{a} \cdot t - \color{blue}{\frac{y}{a} \cdot z} \]
      20. distribute-lft-out--71.0%

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

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

    if -1.94999999999999997e56 < z < 7.5e31

    1. Initial program 96.8%

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{-a}} + x \]
      5. fma-define94.8%

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 82.0% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.42 \cdot 10^{+51} \lor \neg \left(z \leq 3.6 \cdot 10^{+67}\right):\\
\;\;\;\;x - \frac{y \cdot z}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.41999999999999998e51 or 3.5999999999999999e67 < z

    1. Initial program 88.2%

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

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

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

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

    if -1.41999999999999998e51 < z < 3.5999999999999999e67

    1. Initial program 96.4%

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{-a}} + x \]
      5. fma-define95.2%

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

        \[\leadsto \mathsf{fma}\left(y, \color{blue}{-\frac{z - t}{a}}, x\right) \]
      7. distribute-neg-frac95.2%

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

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

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

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

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

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

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

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

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

Alternative 6: 68.3% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -170000000000:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 3.9 \cdot 10^{+107}:\\
\;\;\;\;\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 < -1.7e11 or 3.8999999999999998e107 < a

    1. Initial program 87.9%

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

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

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

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

    if -1.7e11 < a < 3.8999999999999998e107

    1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\left(\left(-t\right) \cdot \frac{y}{a} + z \cdot \frac{y}{a}\right)} \]
      8. distribute-lft-neg-out65.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{a} \cdot t} - z \cdot \frac{y}{a} \]
      19. *-commutative65.1%

        \[\leadsto \frac{y}{a} \cdot t - \color{blue}{\frac{y}{a} \cdot z} \]
      20. distribute-lft-out--75.6%

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

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

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

Alternative 7: 48.3% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.69999999999999994e-54 or 2.49999999999999995e-114 < x

    1. Initial program 93.6%

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

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

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

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

    if -1.69999999999999994e-54 < x < 2.49999999999999995e-114

    1. Initial program 92.8%

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

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

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

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

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

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

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

Alternative 8: 48.2% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -6e-52 or 3.30000000000000035e-114 < x

    1. Initial program 93.6%

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

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

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

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

    if -6e-52 < x < 3.30000000000000035e-114

    1. Initial program 92.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    10. Simplified55.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6 \cdot 10^{-52}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 3.3 \cdot 10^{-114}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 97.6% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.99999999999999959e-63

    1. Initial program 94.3%

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

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

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

    if -5.99999999999999959e-63 < a

    1. Initial program 92.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 39.1% 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*93.2%

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

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

    \[\leadsto \color{blue}{x} \]
  6. Final simplification41.1%

    \[\leadsto x \]
  7. Add Preprocessing

Developer target: 99.2% accurate, 0.5× speedup?

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

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

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

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


\end{array}
\end{array}

Reproduce

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

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

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