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

Percentage Accurate: 93.3% → 99.5%
Time: 24.2s
Alternatives: 12
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 12 alternatives:

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

Initial Program: 93.3% 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.5% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := y \cdot \left(z - t\right)\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+236} \lor \neg \left(t\_1 \leq 4 \cdot 10^{+219}\right):\\
\;\;\;\;x - y \cdot \frac{z - t}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 y (-.f64 z t)) < -1.00000000000000005e236 or 3.99999999999999986e219 < (*.f64 y (-.f64 z t))

    1. Initial program 74.2%

      \[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 -1.00000000000000005e236 < (*.f64 y (-.f64 z t)) < 3.99999999999999986e219

    1. Initial program 99.8%

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

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

Alternative 2: 50.1% accurate, 0.4× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.3e32 or 2.1499999999999999e-16 < a

    1. Initial program 85.9%

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

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

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

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

    if -2.3e32 < a < -3.19999999999999986e-245

    1. Initial program 99.8%

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{-1 \cdot \left(t \cdot y\right)}{a}} \]
      2. mul-1-neg72.0%

        \[\leadsto x - \frac{\color{blue}{-t \cdot y}}{a} \]
      3. distribute-lft-neg-out72.0%

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    10. Simplified50.2%

      \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    11. Step-by-step derivation
      1. clear-num50.1%

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    12. Applied egg-rr50.2%

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

    if -3.19999999999999986e-245 < a < 2.1499999999999999e-16

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y \cdot \left(-z\right)}{a}} \]
    9. Applied egg-rr56.5%

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

Alternative 3: 86.3% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.8 \cdot 10^{+22} \lor \neg \left(t \leq 24000000000000\right):\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.8e22 or 2.4e13 < t

    1. Initial program 89.1%

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

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

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

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

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

        \[\leadsto x - \frac{1}{a} \cdot \color{blue}{\left(-t \cdot y\right)} \]
      2. distribute-lft-neg-out84.0%

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

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

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

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

        \[\leadsto x - \color{blue}{\left(-y \cdot t\right)} \cdot \frac{1}{a} \]
      3. cancel-sign-sub84.0%

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{t}{a} + x} \]
      7. frac-2neg83.6%

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

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

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

        \[\leadsto \frac{\color{blue}{-t \cdot y}}{-a} + x \]
      11. frac-2neg84.0%

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} + x \]
      13. clear-num89.4%

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{a}{y}}} + x \]
      14. un-div-inv89.5%

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

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

    if -2.8e22 < t < 2.4e13

    1. Initial program 96.0%

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

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

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

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

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

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

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

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

Alternative 4: 84.9% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -180000000 \lor \neg \left(t \leq 3600000000000\right):\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.8e8 or 3.6e12 < t

    1. Initial program 89.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{t}{a} + x} \]
      7. frac-2neg83.2%

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

        \[\leadsto \color{blue}{\frac{y \cdot \left(-t\right)}{-a}} + x \]
      9. *-commutative83.6%

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} + x \]
      13. clear-num88.8%

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{a}{y}}} + x \]
      14. un-div-inv88.9%

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

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

    if -1.8e8 < t < 3.6e12

    1. Initial program 95.9%

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

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

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

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

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

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

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

Alternative 5: 79.3% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.25 \cdot 10^{+153} \lor \neg \left(z \leq 4.2 \cdot 10^{+104}\right):\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.25000000000000005e153 or 4.1999999999999997e104 < z

    1. Initial program 86.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.25000000000000005e153 < z < 4.1999999999999997e104

    1. Initial program 95.0%

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

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

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

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

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

        \[\leadsto x - \frac{1}{a} \cdot \color{blue}{\left(-t \cdot y\right)} \]
      2. distribute-lft-neg-out83.0%

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

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

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

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

        \[\leadsto x - \color{blue}{\left(-y \cdot t\right)} \cdot \frac{1}{a} \]
      3. cancel-sign-sub83.0%

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{t}{a} + x} \]
      7. frac-2neg80.7%

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

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

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

        \[\leadsto \frac{\color{blue}{-t \cdot y}}{-a} + x \]
      11. frac-2neg83.0%

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} + x \]
      13. clear-num86.3%

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{a}{y}}} + x \]
      14. un-div-inv86.4%

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

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

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

Alternative 6: 76.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.1 \cdot 10^{+152} \lor \neg \left(z \leq 8.8 \cdot 10^{+101}\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 -2.1e+152) (not (<= z 8.8e+101)))
   (* (/ y a) (- t z))
   (+ x (/ (* y t) a))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -2.1e+152) || !(z <= 8.8e+101)) {
		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 <= (-2.1d+152)) .or. (.not. (z <= 8.8d+101))) 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 <= -2.1e+152) || !(z <= 8.8e+101)) {
		tmp = (y / a) * (t - z);
	} else {
		tmp = x + ((y * t) / a);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -2.1e+152) or not (z <= 8.8e+101):
		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 <= -2.1e+152) || !(z <= 8.8e+101))
		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 <= -2.1e+152) || ~((z <= 8.8e+101)))
		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, -2.1e+152], N[Not[LessEqual[z, 8.8e+101]], $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 -2.1 \cdot 10^{+152} \lor \neg \left(z \leq 8.8 \cdot 10^{+101}\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 < -2.1000000000000002e152 or 8.8000000000000003e101 < z

    1. Initial program 86.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.1000000000000002e152 < z < 8.8000000000000003e101

    1. Initial program 95.0%

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{-1 \cdot \left(t \cdot y\right)}{a}} \]
      2. mul-1-neg82.9%

        \[\leadsto x - \frac{\color{blue}{-t \cdot y}}{a} \]
      3. distribute-lft-neg-out82.9%

        \[\leadsto x - \frac{\color{blue}{\left(-t\right) \cdot y}}{a} \]
      4. *-commutative82.9%

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

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

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

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

Alternative 7: 67.0% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.1 \cdot 10^{+194}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -5.1000000000000002e194 or 1.85e50 < x

    1. Initial program 91.5%

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

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

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

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

    if -5.1000000000000002e194 < x < 1.85e50

    1. Initial program 92.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 46.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.5 \cdot 10^{+173}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -5.50000000000000049e173 or 1.7999999999999999e46 < x

    1. Initial program 89.9%

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

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

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

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

    if -5.50000000000000049e173 < x < 1.7999999999999999e46

    1. Initial program 93.7%

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{-1 \cdot \left(t \cdot y\right)}{a}} \]
      2. mul-1-neg65.5%

        \[\leadsto x - \frac{\color{blue}{-t \cdot y}}{a} \]
      3. distribute-lft-neg-out65.5%

        \[\leadsto x - \frac{\color{blue}{\left(-t\right) \cdot y}}{a} \]
      4. *-commutative65.5%

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    10. Simplified45.2%

      \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    11. Step-by-step derivation
      1. clear-num45.2%

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    12. Applied egg-rr45.2%

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

Alternative 9: 46.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.6 \cdot 10^{+174}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -7.6000000000000004e174 or 2.64999999999999996e45 < x

    1. Initial program 89.9%

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

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

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

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

    if -7.6000000000000004e174 < x < 2.64999999999999996e45

    1. Initial program 93.7%

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{-1 \cdot \left(t \cdot y\right)}{a}} \]
      2. mul-1-neg65.5%

        \[\leadsto x - \frac{\color{blue}{-t \cdot y}}{a} \]
      3. distribute-lft-neg-out65.5%

        \[\leadsto x - \frac{\color{blue}{\left(-t\right) \cdot y}}{a} \]
      4. *-commutative65.5%

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    10. Simplified45.2%

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

Alternative 10: 93.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \frac{y}{\frac{a}{t - z}} \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(y / Float64(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[(y / N[(a / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

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

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

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

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

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

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

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

Alternative 11: 93.4% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 12: 38.8% accurate, 9.0× speedup?

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

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

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

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

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

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

Developer Target 1: 99.1% accurate, 0.5× speedup?

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

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

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

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


\end{array}
\end{array}

Reproduce

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

  :alt
  (! :herbie-platform default (if (< y -430450648655599/4000000000000000000000000) (- x (/ 1 (/ (/ a (- z t)) y))) (if (< y 2894426862792089/10000000000000000000000000000000000000000000000000000000000000000) (- x (/ (* y (- z t)) a)) (- x (/ y (/ a (- z t)))))))

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