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

Percentage Accurate: 93.2% → 97.0%
Time: 9.1s
Alternatives: 9
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 9 alternatives:

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

Initial Program: 93.2% accurate, 1.0× speedup?

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

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

Alternative 1: 97.0% accurate, 1.0× speedup?

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

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

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

      \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(z - t\right)}{a}\right)\right)} \]
    2. +-lowering-+.f64N/A

      \[\leadsto \mathsf{+.f64}\left(x, \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(z - t\right)}{a}\right)\right)}\right) \]
    3. distribute-neg-fracN/A

      \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{\mathsf{neg}\left(y \cdot \left(z - t\right)\right)}{\color{blue}{a}}\right)\right) \]
    4. distribute-rgt-neg-inN/A

      \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y \cdot \left(\mathsf{neg}\left(\left(z - t\right)\right)\right)}{a}\right)\right) \]
    5. associate-*l/N/A

      \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y}{a} \cdot \color{blue}{\left(\mathsf{neg}\left(\left(z - t\right)\right)\right)}\right)\right) \]
    6. *-lowering-*.f64N/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\left(\frac{y}{a}\right), \color{blue}{\left(\mathsf{neg}\left(\left(z - t\right)\right)\right)}\right)\right) \]
    7. /-lowering-/.f64N/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\mathsf{neg}\left(\color{blue}{\left(z - t\right)}\right)\right)\right)\right) \]
    8. sub-negN/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\mathsf{neg}\left(\left(z + \left(\mathsf{neg}\left(t\right)\right)\right)\right)\right)\right)\right) \]
    9. +-commutativeN/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(t\right)\right) + z\right)\right)\right)\right)\right) \]
    10. distribute-neg-inN/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) + \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right) \]
    11. unsub-negN/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) - \color{blue}{z}\right)\right)\right) \]
    12. remove-double-negN/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(t - z\right)\right)\right) \]
    13. --lowering--.f6497.5%

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \mathsf{\_.f64}\left(t, \color{blue}{z}\right)\right)\right) \]
  3. Simplified97.5%

    \[\leadsto \color{blue}{x + \frac{y}{a} \cdot \left(t - z\right)} \]
  4. Add Preprocessing
  5. Add Preprocessing

Alternative 2: 82.7% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := x + \frac{y \cdot t}{a}\\
\mathbf{if}\;t \leq -1.65 \cdot 10^{+53}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 1.55 \cdot 10^{+38}:\\
\;\;\;\;x - \frac{y \cdot z}{a}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.6500000000000001e53 or 1.55000000000000009e38 < t

    1. Initial program 91.0%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \left(\frac{\left(z - t\right) \cdot y}{a}\right)\right) \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \left(\left(z - t\right) \cdot \color{blue}{\frac{y}{a}}\right)\right) \]
      3. clear-numN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \left(\left(z - t\right) \cdot \frac{1}{\color{blue}{\frac{a}{y}}}\right)\right) \]
      4. un-div-invN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \left(\frac{z - t}{\color{blue}{\frac{a}{y}}}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\left(z - t\right), \color{blue}{\left(\frac{a}{y}\right)}\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\frac{\color{blue}{a}}{y}\right)\right)\right) \]
      7. /-lowering-/.f6497.0%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{/.f64}\left(a, \color{blue}{y}\right)\right)\right) \]
    4. Applied egg-rr97.0%

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

      \[\leadsto \color{blue}{x - -1 \cdot \frac{t \cdot y}{a}} \]
    6. Step-by-step derivation
      1. cancel-sign-sub-invN/A

        \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(-1\right)\right) \cdot \frac{t \cdot y}{a}} \]
      2. metadata-evalN/A

        \[\leadsto x + 1 \cdot \frac{\color{blue}{t \cdot y}}{a} \]
      3. *-lft-identityN/A

        \[\leadsto x + \frac{t \cdot y}{\color{blue}{a}} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \color{blue}{\left(\frac{t \cdot y}{a}\right)}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\left(t \cdot y\right), \color{blue}{a}\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\left(y \cdot t\right), a\right)\right) \]
      7. *-lowering-*.f6481.7%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, t\right), a\right)\right) \]
    7. Simplified81.7%

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

    if -1.6500000000000001e53 < t < 1.55000000000000009e38

    1. Initial program 94.4%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\color{blue}{\left(y \cdot z\right)}, a\right)\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f6487.9%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), a\right)\right) \]
    5. Simplified87.9%

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

Alternative 3: 82.4% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := x + \frac{y \cdot t}{a}\\
\mathbf{if}\;t \leq -5.5 \cdot 10^{+52}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 2.2 \cdot 10^{+81}:\\
\;\;\;\;x - \frac{y}{\frac{a}{z}}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.49999999999999996e52 or 2.19999999999999987e81 < t

    1. Initial program 93.0%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \left(\frac{\left(z - t\right) \cdot y}{a}\right)\right) \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \left(\left(z - t\right) \cdot \color{blue}{\frac{y}{a}}\right)\right) \]
      3. clear-numN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \left(\left(z - t\right) \cdot \frac{1}{\color{blue}{\frac{a}{y}}}\right)\right) \]
      4. un-div-invN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \left(\frac{z - t}{\color{blue}{\frac{a}{y}}}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\left(z - t\right), \color{blue}{\left(\frac{a}{y}\right)}\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\frac{\color{blue}{a}}{y}\right)\right)\right) \]
      7. /-lowering-/.f6496.8%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{/.f64}\left(a, \color{blue}{y}\right)\right)\right) \]
    4. Applied egg-rr96.8%

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

      \[\leadsto \color{blue}{x - -1 \cdot \frac{t \cdot y}{a}} \]
    6. Step-by-step derivation
      1. cancel-sign-sub-invN/A

        \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(-1\right)\right) \cdot \frac{t \cdot y}{a}} \]
      2. metadata-evalN/A

        \[\leadsto x + 1 \cdot \frac{\color{blue}{t \cdot y}}{a} \]
      3. *-lft-identityN/A

        \[\leadsto x + \frac{t \cdot y}{\color{blue}{a}} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \color{blue}{\left(\frac{t \cdot y}{a}\right)}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\left(t \cdot y\right), \color{blue}{a}\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\left(y \cdot t\right), a\right)\right) \]
      7. *-lowering-*.f6482.8%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, t\right), a\right)\right) \]
    7. Simplified82.8%

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

    if -5.49999999999999996e52 < t < 2.19999999999999987e81

    1. Initial program 93.1%

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

        \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(z - t\right)}{a}\right)\right)} \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(z - t\right)}{a}\right)\right)}\right) \]
      3. distribute-neg-fracN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{\mathsf{neg}\left(y \cdot \left(z - t\right)\right)}{\color{blue}{a}}\right)\right) \]
      4. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y \cdot \left(\mathsf{neg}\left(\left(z - t\right)\right)\right)}{a}\right)\right) \]
      5. associate-*l/N/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y}{a} \cdot \color{blue}{\left(\mathsf{neg}\left(\left(z - t\right)\right)\right)}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\left(\frac{y}{a}\right), \color{blue}{\left(\mathsf{neg}\left(\left(z - t\right)\right)\right)}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\mathsf{neg}\left(\color{blue}{\left(z - t\right)}\right)\right)\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\mathsf{neg}\left(\left(z + \left(\mathsf{neg}\left(t\right)\right)\right)\right)\right)\right)\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(t\right)\right) + z\right)\right)\right)\right)\right) \]
      10. distribute-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) + \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right) \]
      11. unsub-negN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) - \color{blue}{z}\right)\right)\right) \]
      12. remove-double-negN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(t - z\right)\right)\right) \]
      13. --lowering--.f6498.0%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \mathsf{\_.f64}\left(t, \color{blue}{z}\right)\right)\right) \]
    3. Simplified98.0%

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{y \cdot z}{a}} \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x + \left(\mathsf{neg}\left(\frac{y \cdot z}{a}\right)\right) \]
      2. sub-negN/A

        \[\leadsto x - \color{blue}{\frac{y \cdot z}{a}} \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \color{blue}{\left(\frac{y \cdot z}{a}\right)}\right) \]
      4. associate-/l*N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \left(y \cdot \color{blue}{\frac{z}{a}}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, \color{blue}{\left(\frac{z}{a}\right)}\right)\right) \]
      6. /-lowering-/.f6486.6%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(z, \color{blue}{a}\right)\right)\right) \]
    7. Simplified86.6%

      \[\leadsto \color{blue}{x - y \cdot \frac{z}{a}} \]
    8. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \left(y \cdot \frac{1}{\color{blue}{\frac{a}{z}}}\right)\right) \]
      2. un-div-invN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \left(\frac{y}{\color{blue}{\frac{a}{z}}}\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(y, \color{blue}{\left(\frac{a}{z}\right)}\right)\right) \]
      4. /-lowering-/.f6486.8%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(y, \mathsf{/.f64}\left(a, \color{blue}{z}\right)\right)\right) \]
    9. Applied egg-rr86.8%

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

Alternative 4: 82.2% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := x + \frac{y \cdot t}{a}\\
\mathbf{if}\;t \leq -3.6 \cdot 10^{+52}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 6.8 \cdot 10^{+80}:\\
\;\;\;\;x - y \cdot \frac{z}{a}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.6e52 or 6.79999999999999984e80 < t

    1. Initial program 93.0%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \left(\frac{\left(z - t\right) \cdot y}{a}\right)\right) \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \left(\left(z - t\right) \cdot \color{blue}{\frac{y}{a}}\right)\right) \]
      3. clear-numN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \left(\left(z - t\right) \cdot \frac{1}{\color{blue}{\frac{a}{y}}}\right)\right) \]
      4. un-div-invN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \left(\frac{z - t}{\color{blue}{\frac{a}{y}}}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\left(z - t\right), \color{blue}{\left(\frac{a}{y}\right)}\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\frac{\color{blue}{a}}{y}\right)\right)\right) \]
      7. /-lowering-/.f6496.8%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{/.f64}\left(a, \color{blue}{y}\right)\right)\right) \]
    4. Applied egg-rr96.8%

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

      \[\leadsto \color{blue}{x - -1 \cdot \frac{t \cdot y}{a}} \]
    6. Step-by-step derivation
      1. cancel-sign-sub-invN/A

        \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(-1\right)\right) \cdot \frac{t \cdot y}{a}} \]
      2. metadata-evalN/A

        \[\leadsto x + 1 \cdot \frac{\color{blue}{t \cdot y}}{a} \]
      3. *-lft-identityN/A

        \[\leadsto x + \frac{t \cdot y}{\color{blue}{a}} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \color{blue}{\left(\frac{t \cdot y}{a}\right)}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\left(t \cdot y\right), \color{blue}{a}\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\left(y \cdot t\right), a\right)\right) \]
      7. *-lowering-*.f6482.8%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, t\right), a\right)\right) \]
    7. Simplified82.8%

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

    if -3.6e52 < t < 6.79999999999999984e80

    1. Initial program 93.1%

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

        \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(z - t\right)}{a}\right)\right)} \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(z - t\right)}{a}\right)\right)}\right) \]
      3. distribute-neg-fracN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{\mathsf{neg}\left(y \cdot \left(z - t\right)\right)}{\color{blue}{a}}\right)\right) \]
      4. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y \cdot \left(\mathsf{neg}\left(\left(z - t\right)\right)\right)}{a}\right)\right) \]
      5. associate-*l/N/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y}{a} \cdot \color{blue}{\left(\mathsf{neg}\left(\left(z - t\right)\right)\right)}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\left(\frac{y}{a}\right), \color{blue}{\left(\mathsf{neg}\left(\left(z - t\right)\right)\right)}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\mathsf{neg}\left(\color{blue}{\left(z - t\right)}\right)\right)\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\mathsf{neg}\left(\left(z + \left(\mathsf{neg}\left(t\right)\right)\right)\right)\right)\right)\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(t\right)\right) + z\right)\right)\right)\right)\right) \]
      10. distribute-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) + \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right) \]
      11. unsub-negN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) - \color{blue}{z}\right)\right)\right) \]
      12. remove-double-negN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(t - z\right)\right)\right) \]
      13. --lowering--.f6498.0%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \mathsf{\_.f64}\left(t, \color{blue}{z}\right)\right)\right) \]
    3. Simplified98.0%

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{y \cdot z}{a}} \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x + \left(\mathsf{neg}\left(\frac{y \cdot z}{a}\right)\right) \]
      2. sub-negN/A

        \[\leadsto x - \color{blue}{\frac{y \cdot z}{a}} \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \color{blue}{\left(\frac{y \cdot z}{a}\right)}\right) \]
      4. associate-/l*N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \left(y \cdot \color{blue}{\frac{z}{a}}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, \color{blue}{\left(\frac{z}{a}\right)}\right)\right) \]
      6. /-lowering-/.f6486.6%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(z, \color{blue}{a}\right)\right)\right) \]
    7. Simplified86.6%

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

Alternative 5: 76.8% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{if}\;y \leq -4 \cdot 10^{-75}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 3.6 \cdot 10^{-43}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.9999999999999998e-75 or 3.5999999999999999e-43 < y

    1. Initial program 89.7%

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

        \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(z - t\right)}{a}\right)\right)} \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(z - t\right)}{a}\right)\right)}\right) \]
      3. distribute-neg-fracN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{\mathsf{neg}\left(y \cdot \left(z - t\right)\right)}{\color{blue}{a}}\right)\right) \]
      4. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y \cdot \left(\mathsf{neg}\left(\left(z - t\right)\right)\right)}{a}\right)\right) \]
      5. associate-*l/N/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y}{a} \cdot \color{blue}{\left(\mathsf{neg}\left(\left(z - t\right)\right)\right)}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\left(\frac{y}{a}\right), \color{blue}{\left(\mathsf{neg}\left(\left(z - t\right)\right)\right)}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\mathsf{neg}\left(\color{blue}{\left(z - t\right)}\right)\right)\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\mathsf{neg}\left(\left(z + \left(\mathsf{neg}\left(t\right)\right)\right)\right)\right)\right)\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(t\right)\right) + z\right)\right)\right)\right)\right) \]
      10. distribute-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) + \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right) \]
      11. unsub-negN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) - \color{blue}{z}\right)\right)\right) \]
      12. remove-double-negN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(t - z\right)\right)\right) \]
      13. --lowering--.f6498.5%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \mathsf{\_.f64}\left(t, \color{blue}{z}\right)\right)\right) \]
    3. Simplified98.5%

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

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

        \[\leadsto \frac{\left(t - z\right) \cdot y}{a} \]
      2. associate-/l*N/A

        \[\leadsto \left(t - z\right) \cdot \color{blue}{\frac{y}{a}} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(t - z\right), \color{blue}{\left(\frac{y}{a}\right)}\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, z\right), \left(\frac{\color{blue}{y}}{a}\right)\right) \]
      5. /-lowering-/.f6482.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, z\right), \mathsf{/.f64}\left(y, \color{blue}{a}\right)\right) \]
    7. Simplified82.6%

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

    if -3.9999999999999998e-75 < y < 3.5999999999999999e-43

    1. Initial program 98.4%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \left(\frac{\left(z - t\right) \cdot y}{a}\right)\right) \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \left(\left(z - t\right) \cdot \color{blue}{\frac{y}{a}}\right)\right) \]
      3. clear-numN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \left(\left(z - t\right) \cdot \frac{1}{\color{blue}{\frac{a}{y}}}\right)\right) \]
      4. un-div-invN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \left(\frac{z - t}{\color{blue}{\frac{a}{y}}}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\left(z - t\right), \color{blue}{\left(\frac{a}{y}\right)}\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\frac{\color{blue}{a}}{y}\right)\right)\right) \]
      7. /-lowering-/.f6496.0%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{/.f64}\left(a, \color{blue}{y}\right)\right)\right) \]
    4. Applied egg-rr96.0%

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

      \[\leadsto \color{blue}{x - -1 \cdot \frac{t \cdot y}{a}} \]
    6. Step-by-step derivation
      1. cancel-sign-sub-invN/A

        \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(-1\right)\right) \cdot \frac{t \cdot y}{a}} \]
      2. metadata-evalN/A

        \[\leadsto x + 1 \cdot \frac{\color{blue}{t \cdot y}}{a} \]
      3. *-lft-identityN/A

        \[\leadsto x + \frac{t \cdot y}{\color{blue}{a}} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \color{blue}{\left(\frac{t \cdot y}{a}\right)}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\left(t \cdot y\right), \color{blue}{a}\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\left(y \cdot t\right), a\right)\right) \]
      7. *-lowering-*.f6480.6%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, t\right), a\right)\right) \]
    7. Simplified80.6%

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

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

Alternative 6: 73.9% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{if}\;y \leq -3.2 \cdot 10^{-75}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 5.3 \cdot 10^{-43}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.19999999999999977e-75 or 5.3000000000000003e-43 < y

    1. Initial program 89.7%

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

        \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(z - t\right)}{a}\right)\right)} \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(z - t\right)}{a}\right)\right)}\right) \]
      3. distribute-neg-fracN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{\mathsf{neg}\left(y \cdot \left(z - t\right)\right)}{\color{blue}{a}}\right)\right) \]
      4. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y \cdot \left(\mathsf{neg}\left(\left(z - t\right)\right)\right)}{a}\right)\right) \]
      5. associate-*l/N/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y}{a} \cdot \color{blue}{\left(\mathsf{neg}\left(\left(z - t\right)\right)\right)}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\left(\frac{y}{a}\right), \color{blue}{\left(\mathsf{neg}\left(\left(z - t\right)\right)\right)}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\mathsf{neg}\left(\color{blue}{\left(z - t\right)}\right)\right)\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\mathsf{neg}\left(\left(z + \left(\mathsf{neg}\left(t\right)\right)\right)\right)\right)\right)\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(t\right)\right) + z\right)\right)\right)\right)\right) \]
      10. distribute-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) + \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right) \]
      11. unsub-negN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) - \color{blue}{z}\right)\right)\right) \]
      12. remove-double-negN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(t - z\right)\right)\right) \]
      13. --lowering--.f6498.5%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \mathsf{\_.f64}\left(t, \color{blue}{z}\right)\right)\right) \]
    3. Simplified98.5%

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

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

        \[\leadsto \frac{\left(t - z\right) \cdot y}{a} \]
      2. associate-/l*N/A

        \[\leadsto \left(t - z\right) \cdot \color{blue}{\frac{y}{a}} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(t - z\right), \color{blue}{\left(\frac{y}{a}\right)}\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, z\right), \left(\frac{\color{blue}{y}}{a}\right)\right) \]
      5. /-lowering-/.f6482.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, z\right), \mathsf{/.f64}\left(y, \color{blue}{a}\right)\right) \]
    7. Simplified82.6%

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

    if -3.19999999999999977e-75 < y < 5.3000000000000003e-43

    1. Initial program 98.4%

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

        \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(z - t\right)}{a}\right)\right)} \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(z - t\right)}{a}\right)\right)}\right) \]
      3. distribute-neg-fracN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{\mathsf{neg}\left(y \cdot \left(z - t\right)\right)}{\color{blue}{a}}\right)\right) \]
      4. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y \cdot \left(\mathsf{neg}\left(\left(z - t\right)\right)\right)}{a}\right)\right) \]
      5. associate-*l/N/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y}{a} \cdot \color{blue}{\left(\mathsf{neg}\left(\left(z - t\right)\right)\right)}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\left(\frac{y}{a}\right), \color{blue}{\left(\mathsf{neg}\left(\left(z - t\right)\right)\right)}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\mathsf{neg}\left(\color{blue}{\left(z - t\right)}\right)\right)\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\mathsf{neg}\left(\left(z + \left(\mathsf{neg}\left(t\right)\right)\right)\right)\right)\right)\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(t\right)\right) + z\right)\right)\right)\right)\right) \]
      10. distribute-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) + \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right) \]
      11. unsub-negN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) - \color{blue}{z}\right)\right)\right) \]
      12. remove-double-negN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(t - z\right)\right)\right) \]
      13. --lowering--.f6496.0%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \mathsf{\_.f64}\left(t, \color{blue}{z}\right)\right)\right) \]
    3. Simplified96.0%

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

      \[\leadsto \color{blue}{x + \frac{t \cdot y}{a}} \]
    6. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \color{blue}{\left(\frac{t \cdot y}{a}\right)}\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y \cdot t}{a}\right)\right) \]
      3. associate-/l*N/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(y \cdot \color{blue}{\frac{t}{a}}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \color{blue}{\left(\frac{t}{a}\right)}\right)\right) \]
      5. /-lowering-/.f6470.2%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(t, \color{blue}{a}\right)\right)\right) \]
    7. Simplified70.2%

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

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

Alternative 7: 68.6% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{if}\;y \leq -1.1 \cdot 10^{-75}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 3.8 \cdot 10^{-43}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.10000000000000003e-75 or 3.7999999999999997e-43 < y

    1. Initial program 89.7%

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

        \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(z - t\right)}{a}\right)\right)} \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(z - t\right)}{a}\right)\right)}\right) \]
      3. distribute-neg-fracN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{\mathsf{neg}\left(y \cdot \left(z - t\right)\right)}{\color{blue}{a}}\right)\right) \]
      4. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y \cdot \left(\mathsf{neg}\left(\left(z - t\right)\right)\right)}{a}\right)\right) \]
      5. associate-*l/N/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y}{a} \cdot \color{blue}{\left(\mathsf{neg}\left(\left(z - t\right)\right)\right)}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\left(\frac{y}{a}\right), \color{blue}{\left(\mathsf{neg}\left(\left(z - t\right)\right)\right)}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\mathsf{neg}\left(\color{blue}{\left(z - t\right)}\right)\right)\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\mathsf{neg}\left(\left(z + \left(\mathsf{neg}\left(t\right)\right)\right)\right)\right)\right)\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(t\right)\right) + z\right)\right)\right)\right)\right) \]
      10. distribute-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) + \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right) \]
      11. unsub-negN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) - \color{blue}{z}\right)\right)\right) \]
      12. remove-double-negN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(t - z\right)\right)\right) \]
      13. --lowering--.f6498.5%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \mathsf{\_.f64}\left(t, \color{blue}{z}\right)\right)\right) \]
    3. Simplified98.5%

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

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

        \[\leadsto \frac{\left(t - z\right) \cdot y}{a} \]
      2. associate-/l*N/A

        \[\leadsto \left(t - z\right) \cdot \color{blue}{\frac{y}{a}} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(t - z\right), \color{blue}{\left(\frac{y}{a}\right)}\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, z\right), \left(\frac{\color{blue}{y}}{a}\right)\right) \]
      5. /-lowering-/.f6482.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, z\right), \mathsf{/.f64}\left(y, \color{blue}{a}\right)\right) \]
    7. Simplified82.6%

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

    if -1.10000000000000003e-75 < y < 3.7999999999999997e-43

    1. Initial program 98.4%

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

        \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(z - t\right)}{a}\right)\right)} \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(z - t\right)}{a}\right)\right)}\right) \]
      3. distribute-neg-fracN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{\mathsf{neg}\left(y \cdot \left(z - t\right)\right)}{\color{blue}{a}}\right)\right) \]
      4. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y \cdot \left(\mathsf{neg}\left(\left(z - t\right)\right)\right)}{a}\right)\right) \]
      5. associate-*l/N/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y}{a} \cdot \color{blue}{\left(\mathsf{neg}\left(\left(z - t\right)\right)\right)}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\left(\frac{y}{a}\right), \color{blue}{\left(\mathsf{neg}\left(\left(z - t\right)\right)\right)}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\mathsf{neg}\left(\color{blue}{\left(z - t\right)}\right)\right)\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\mathsf{neg}\left(\left(z + \left(\mathsf{neg}\left(t\right)\right)\right)\right)\right)\right)\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(t\right)\right) + z\right)\right)\right)\right)\right) \]
      10. distribute-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) + \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right) \]
      11. unsub-negN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) - \color{blue}{z}\right)\right)\right) \]
      12. remove-double-negN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(t - z\right)\right)\right) \]
      13. --lowering--.f6496.0%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \mathsf{\_.f64}\left(t, \color{blue}{z}\right)\right)\right) \]
    3. Simplified96.0%

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

      \[\leadsto \color{blue}{x} \]
    6. Step-by-step derivation
      1. Simplified64.8%

        \[\leadsto \color{blue}{x} \]
    7. Recombined 2 regimes into one program.
    8. Final simplification75.7%

      \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.1 \cdot 10^{-75}:\\ \;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\ \mathbf{elif}\;y \leq 3.8 \cdot 10^{-43}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\ \end{array} \]
    9. Add Preprocessing

    Alternative 8: 50.2% accurate, 0.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{a} \cdot t\\ \mathbf{if}\;y \leq -4 \cdot 10^{-75}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{+47}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a)
     :precision binary64
     (let* ((t_1 (* (/ y a) t))) (if (<= y -4e-75) t_1 (if (<= y 6.5e+47) x t_1))))
    double code(double x, double y, double z, double t, double a) {
    	double t_1 = (y / a) * t;
    	double tmp;
    	if (y <= -4e-75) {
    		tmp = t_1;
    	} else if (y <= 6.5e+47) {
    		tmp = x;
    	} else {
    		tmp = 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 = (y / a) * t
        if (y <= (-4d-75)) then
            tmp = t_1
        else if (y <= 6.5d+47) then
            tmp = x
        else
            tmp = 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 = (y / a) * t;
    	double tmp;
    	if (y <= -4e-75) {
    		tmp = t_1;
    	} else if (y <= 6.5e+47) {
    		tmp = x;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a):
    	t_1 = (y / a) * t
    	tmp = 0
    	if y <= -4e-75:
    		tmp = t_1
    	elif y <= 6.5e+47:
    		tmp = x
    	else:
    		tmp = t_1
    	return tmp
    
    function code(x, y, z, t, a)
    	t_1 = Float64(Float64(y / a) * t)
    	tmp = 0.0
    	if (y <= -4e-75)
    		tmp = t_1;
    	elseif (y <= 6.5e+47)
    		tmp = x;
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a)
    	t_1 = (y / a) * t;
    	tmp = 0.0;
    	if (y <= -4e-75)
    		tmp = t_1;
    	elseif (y <= 6.5e+47)
    		tmp = x;
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[y, -4e-75], t$95$1, If[LessEqual[y, 6.5e+47], x, t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \frac{y}{a} \cdot t\\
    \mathbf{if}\;y \leq -4 \cdot 10^{-75}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;y \leq 6.5 \cdot 10^{+47}:\\
    \;\;\;\;x\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if y < -3.9999999999999998e-75 or 6.49999999999999988e47 < y

      1. Initial program 87.8%

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

          \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(z - t\right)}{a}\right)\right)} \]
        2. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(x, \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(z - t\right)}{a}\right)\right)}\right) \]
        3. distribute-neg-fracN/A

          \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{\mathsf{neg}\left(y \cdot \left(z - t\right)\right)}{\color{blue}{a}}\right)\right) \]
        4. distribute-rgt-neg-inN/A

          \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y \cdot \left(\mathsf{neg}\left(\left(z - t\right)\right)\right)}{a}\right)\right) \]
        5. associate-*l/N/A

          \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y}{a} \cdot \color{blue}{\left(\mathsf{neg}\left(\left(z - t\right)\right)\right)}\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\left(\frac{y}{a}\right), \color{blue}{\left(\mathsf{neg}\left(\left(z - t\right)\right)\right)}\right)\right) \]
        7. /-lowering-/.f64N/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\mathsf{neg}\left(\color{blue}{\left(z - t\right)}\right)\right)\right)\right) \]
        8. sub-negN/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\mathsf{neg}\left(\left(z + \left(\mathsf{neg}\left(t\right)\right)\right)\right)\right)\right)\right) \]
        9. +-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(t\right)\right) + z\right)\right)\right)\right)\right) \]
        10. distribute-neg-inN/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) + \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right) \]
        11. unsub-negN/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) - \color{blue}{z}\right)\right)\right) \]
        12. remove-double-negN/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(t - z\right)\right)\right) \]
        13. --lowering--.f6498.2%

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \mathsf{\_.f64}\left(t, \color{blue}{z}\right)\right)\right) \]
      3. Simplified98.2%

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

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

          \[\leadsto \frac{\left(t - z\right) \cdot y}{a} \]
        2. associate-/l*N/A

          \[\leadsto \left(t - z\right) \cdot \color{blue}{\frac{y}{a}} \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left(t - z\right), \color{blue}{\left(\frac{y}{a}\right)}\right) \]
        4. --lowering--.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, z\right), \left(\frac{\color{blue}{y}}{a}\right)\right) \]
        5. /-lowering-/.f6485.2%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, z\right), \mathsf{/.f64}\left(y, \color{blue}{a}\right)\right) \]
      7. Simplified85.2%

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

        \[\leadsto \mathsf{*.f64}\left(\color{blue}{t}, \mathsf{/.f64}\left(y, a\right)\right) \]
      9. Step-by-step derivation
        1. Simplified42.1%

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

        if -3.9999999999999998e-75 < y < 6.49999999999999988e47

        1. Initial program 98.7%

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

            \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(z - t\right)}{a}\right)\right)} \]
          2. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(z - t\right)}{a}\right)\right)}\right) \]
          3. distribute-neg-fracN/A

            \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{\mathsf{neg}\left(y \cdot \left(z - t\right)\right)}{\color{blue}{a}}\right)\right) \]
          4. distribute-rgt-neg-inN/A

            \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y \cdot \left(\mathsf{neg}\left(\left(z - t\right)\right)\right)}{a}\right)\right) \]
          5. associate-*l/N/A

            \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y}{a} \cdot \color{blue}{\left(\mathsf{neg}\left(\left(z - t\right)\right)\right)}\right)\right) \]
          6. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\left(\frac{y}{a}\right), \color{blue}{\left(\mathsf{neg}\left(\left(z - t\right)\right)\right)}\right)\right) \]
          7. /-lowering-/.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\mathsf{neg}\left(\color{blue}{\left(z - t\right)}\right)\right)\right)\right) \]
          8. sub-negN/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\mathsf{neg}\left(\left(z + \left(\mathsf{neg}\left(t\right)\right)\right)\right)\right)\right)\right) \]
          9. +-commutativeN/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(t\right)\right) + z\right)\right)\right)\right)\right) \]
          10. distribute-neg-inN/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) + \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right) \]
          11. unsub-negN/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) - \color{blue}{z}\right)\right)\right) \]
          12. remove-double-negN/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(t - z\right)\right)\right) \]
          13. --lowering--.f6496.8%

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \mathsf{\_.f64}\left(t, \color{blue}{z}\right)\right)\right) \]
        3. Simplified96.8%

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

          \[\leadsto \color{blue}{x} \]
        6. Step-by-step derivation
          1. Simplified58.5%

            \[\leadsto \color{blue}{x} \]
        7. Recombined 2 regimes into one program.
        8. Final simplification50.0%

          \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4 \cdot 10^{-75}:\\ \;\;\;\;\frac{y}{a} \cdot t\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{+47}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a} \cdot t\\ \end{array} \]
        9. Add Preprocessing

        Alternative 9: 39.4% 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.0%

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

            \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(z - t\right)}{a}\right)\right)} \]
          2. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(z - t\right)}{a}\right)\right)}\right) \]
          3. distribute-neg-fracN/A

            \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{\mathsf{neg}\left(y \cdot \left(z - t\right)\right)}{\color{blue}{a}}\right)\right) \]
          4. distribute-rgt-neg-inN/A

            \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y \cdot \left(\mathsf{neg}\left(\left(z - t\right)\right)\right)}{a}\right)\right) \]
          5. associate-*l/N/A

            \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y}{a} \cdot \color{blue}{\left(\mathsf{neg}\left(\left(z - t\right)\right)\right)}\right)\right) \]
          6. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\left(\frac{y}{a}\right), \color{blue}{\left(\mathsf{neg}\left(\left(z - t\right)\right)\right)}\right)\right) \]
          7. /-lowering-/.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\mathsf{neg}\left(\color{blue}{\left(z - t\right)}\right)\right)\right)\right) \]
          8. sub-negN/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\mathsf{neg}\left(\left(z + \left(\mathsf{neg}\left(t\right)\right)\right)\right)\right)\right)\right) \]
          9. +-commutativeN/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(t\right)\right) + z\right)\right)\right)\right)\right) \]
          10. distribute-neg-inN/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) + \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right) \]
          11. unsub-negN/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) - \color{blue}{z}\right)\right)\right) \]
          12. remove-double-negN/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(t - z\right)\right)\right) \]
          13. --lowering--.f6497.5%

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \mathsf{\_.f64}\left(t, \color{blue}{z}\right)\right)\right) \]
        3. Simplified97.5%

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

          \[\leadsto \color{blue}{x} \]
        6. Step-by-step derivation
          1. Simplified36.2%

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

          Developer Target 1: 99.0% 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 2024158 
          (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)))