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

Percentage Accurate: 93.5% → 97.2%
Time: 9.2s
Alternatives: 11
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 11 alternatives:

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

Initial Program: 93.5% 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.2% accurate, 0.8× speedup?

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

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

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

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

      \[\leadsto x + \left(z - t\right) \cdot \color{blue}{\frac{y}{a}} \]
    3. cancel-sign-subN/A

      \[\leadsto x - \color{blue}{\left(\mathsf{neg}\left(\left(z - t\right)\right)\right) \cdot \frac{y}{a}} \]
    4. sub0-negN/A

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

      \[\leadsto x - \left(\left(0 - z\right) + t\right) \cdot \frac{\color{blue}{y}}{a} \]
    6. neg-sub0N/A

      \[\leadsto x - \left(\left(\mathsf{neg}\left(z\right)\right) + t\right) \cdot \frac{y}{a} \]
    7. +-commutativeN/A

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

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

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

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

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

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

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(t - z\right)\right), a\right)\right) \]
    14. --lowering--.f6495.1%

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(t, z\right)\right), a\right)\right) \]
  3. Simplified95.1%

    \[\leadsto \color{blue}{x - \frac{y \cdot \left(t - z\right)}{a}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. frac-2negN/A

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

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

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

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

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

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

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

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, z\right), \mathsf{*.f64}\left(\left(\mathsf{neg}\left(y\right)\right), \color{blue}{\left(\frac{1}{\mathsf{neg}\left(a\right)}\right)}\right)\right)\right) \]
    9. neg-sub0N/A

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

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, z\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, y\right), \left(\frac{\color{blue}{1}}{\mathsf{neg}\left(a\right)}\right)\right)\right)\right) \]
    11. distribute-frac-neg2N/A

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, z\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, y\right), \left(\mathsf{neg}\left(\frac{1}{a}\right)\right)\right)\right)\right) \]
    12. distribute-neg-fracN/A

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, z\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, y\right), \left(\frac{\mathsf{neg}\left(1\right)}{\color{blue}{a}}\right)\right)\right)\right) \]
    13. metadata-evalN/A

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, z\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, y\right), \left(\frac{-1}{a}\right)\right)\right)\right) \]
    14. /-lowering-/.f6497.6%

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

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

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

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

      \[\leadsto \mathsf{\_.f64}\left(x, \left(\left(t - z\right) \cdot \frac{0 - y}{\color{blue}{\mathsf{neg}\left(a\right)}}\right)\right) \]
    4. sub0-negN/A

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, z\right), \mathsf{*.f64}\left(\left(\frac{1}{a}\right), \color{blue}{y}\right)\right)\right) \]
    13. metadata-evalN/A

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, z\right), \mathsf{*.f64}\left(\left(\frac{\mathsf{neg}\left(-1\right)}{a}\right), y\right)\right)\right) \]
    14. /-lowering-/.f64N/A

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, z\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(-1\right)\right), a\right), y\right)\right)\right) \]
    15. metadata-eval97.6%

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, z\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, a\right), y\right)\right)\right) \]
  8. Applied egg-rr97.6%

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

    \[\leadsto x + \left(t - z\right) \cdot \left(y \cdot \frac{-1}{a}\right) \]
  10. Add Preprocessing

Alternative 2: 85.5% accurate, 0.2× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z - t\right)}{a}\\
t_2 := \frac{y}{a} \cdot \left(z - t\right)\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+216}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{+66}:\\
\;\;\;\;x - \frac{t \cdot y}{a}\\

\mathbf{elif}\;t\_1 \leq 10^{+91}:\\
\;\;\;\;x + \frac{z \cdot y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 y (-.f64 z t)) a) < -1e216 or 1.00000000000000008e91 < (/.f64 (*.f64 y (-.f64 z t)) a)

    1. Initial program 88.8%

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

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

        \[\leadsto x + \left(z - t\right) \cdot \color{blue}{\frac{y}{a}} \]
      3. cancel-sign-subN/A

        \[\leadsto x - \color{blue}{\left(\mathsf{neg}\left(\left(z - t\right)\right)\right) \cdot \frac{y}{a}} \]
      4. sub0-negN/A

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

        \[\leadsto x - \left(\left(0 - z\right) + t\right) \cdot \frac{\color{blue}{y}}{a} \]
      6. neg-sub0N/A

        \[\leadsto x - \left(\left(\mathsf{neg}\left(z\right)\right) + t\right) \cdot \frac{y}{a} \]
      7. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg}\left(\frac{y \cdot \left(t - z\right)}{a}\right) \]
      2. distribute-neg-fracN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(y \cdot \left(\mathsf{neg}\left(\left(t - z\right)\right)\right)\right), a\right) \]
      5. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(y \cdot \left(-1 \cdot \left(t - z\right)\right)\right), a\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(-1 \cdot \left(t - z\right)\right)\right), a\right) \]
      7. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(-1 \cdot \left(t + \left(\mathsf{neg}\left(z\right)\right)\right)\right)\right), a\right) \]
      8. mul-1-negN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(-1 \cdot \left(-1 \cdot z\right) + -1 \cdot t\right)\right), a\right) \]
      11. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(\left(-1 \cdot -1\right) \cdot z + -1 \cdot t\right)\right), a\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(1 \cdot z + -1 \cdot t\right)\right), a\right) \]
      13. *-lft-identityN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(z + -1 \cdot t\right)\right), a\right) \]
      14. mul-1-negN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(z, t\right)\right), a\right) \]
    7. Simplified83.0%

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

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

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

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

        \[\leadsto \left(\left(\mathsf{neg}\left(t\right)\right) + z\right) \cdot \frac{\color{blue}{y}}{a} \]
      5. remove-double-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(t\right)\right) + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right)\right) \cdot \frac{y}{a} \]
      6. distribute-neg-inN/A

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

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

        \[\leadsto \left(\mathsf{neg}\left(\left(t - z\right)\right)\right) \cdot \frac{\mathsf{neg}\left(y\right)}{\color{blue}{\mathsf{neg}\left(a\right)}} \]
      9. sub0-negN/A

        \[\leadsto \left(\mathsf{neg}\left(\left(t - z\right)\right)\right) \cdot \frac{0 - y}{\mathsf{neg}\left(\color{blue}{a}\right)} \]
      10. un-div-invN/A

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

        \[\leadsto \left(\mathsf{neg}\left(\left(t - z\right)\right)\right) \cdot \left(\left(0 - y\right) \cdot \frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(\color{blue}{a}\right)}\right) \]
      12. frac-2negN/A

        \[\leadsto \left(\mathsf{neg}\left(\left(t - z\right)\right)\right) \cdot \left(\left(0 - y\right) \cdot \frac{-1}{\color{blue}{a}}\right) \]
      13. *-commutativeN/A

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

        \[\leadsto \mathsf{*.f64}\left(\left(\left(0 - y\right) \cdot \frac{-1}{a}\right), \color{blue}{\left(\mathsf{neg}\left(\left(t - z\right)\right)\right)}\right) \]
      15. frac-2negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\left(0 - y\right) \cdot \frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(a\right)}\right), \left(\mathsf{neg}\left(\left(t - \color{blue}{z}\right)\right)\right)\right) \]
      16. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\left(0 - y\right) \cdot \frac{1}{\mathsf{neg}\left(a\right)}\right), \left(\mathsf{neg}\left(\left(t - z\right)\right)\right)\right) \]
      17. un-div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{0 - y}{\mathsf{neg}\left(a\right)}\right), \left(\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)\right)\right) \]
      18. sub0-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\mathsf{neg}\left(y\right)}{\mathsf{neg}\left(a\right)}\right), \left(\mathsf{neg}\left(\left(\color{blue}{t} - z\right)\right)\right)\right) \]
      19. frac-2negN/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \mathsf{\_.f64}\left(z, \color{blue}{t}\right)\right) \]
    9. Applied egg-rr87.2%

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

    if -1e216 < (/.f64 (*.f64 y (-.f64 z t)) a) < -9.99999999999999945e65

    1. Initial program 99.8%

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

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

        \[\leadsto x + \left(z - t\right) \cdot \color{blue}{\frac{y}{a}} \]
      3. cancel-sign-subN/A

        \[\leadsto x - \color{blue}{\left(\mathsf{neg}\left(\left(z - t\right)\right)\right) \cdot \frac{y}{a}} \]
      4. sub0-negN/A

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

        \[\leadsto x - \left(\left(0 - z\right) + t\right) \cdot \frac{\color{blue}{y}}{a} \]
      6. neg-sub0N/A

        \[\leadsto x - \left(\left(\mathsf{neg}\left(z\right)\right) + t\right) \cdot \frac{y}{a} \]
      7. +-commutativeN/A

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x - \frac{y \cdot \left(t - z\right)}{a}} \]
    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. /-lowering-/.f64N/A

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

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

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

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

    if -9.99999999999999945e65 < (/.f64 (*.f64 y (-.f64 z t)) a) < 1.00000000000000008e91

    1. Initial program 99.9%

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

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

        \[\leadsto x + \left(z - t\right) \cdot \color{blue}{\frac{y}{a}} \]
      3. cancel-sign-subN/A

        \[\leadsto x - \color{blue}{\left(\mathsf{neg}\left(\left(z - t\right)\right)\right) \cdot \frac{y}{a}} \]
      4. sub0-negN/A

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

        \[\leadsto x - \left(\left(0 - z\right) + t\right) \cdot \frac{\color{blue}{y}}{a} \]
      6. neg-sub0N/A

        \[\leadsto x - \left(\left(\mathsf{neg}\left(z\right)\right) + t\right) \cdot \frac{y}{a} \]
      7. +-commutativeN/A

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

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

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

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(t - z\right)\right), a\right)\right) \]
      14. --lowering--.f6499.9%

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

      \[\leadsto \color{blue}{x - \frac{y \cdot \left(t - z\right)}{a}} \]
    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. sub-negN/A

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\left(y \cdot z\right), \color{blue}{a}\right)\right) \]
      6. *-lowering-*.f6493.3%

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

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

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

Alternative 3: 77.8% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t \leq 9 \cdot 10^{+116}:\\
\;\;\;\;x + \frac{z \cdot y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3e83 or 9.00000000000000032e116 < t

    1. Initial program 92.8%

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

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

        \[\leadsto x + \left(z - t\right) \cdot \color{blue}{\frac{y}{a}} \]
      3. cancel-sign-subN/A

        \[\leadsto x - \color{blue}{\left(\mathsf{neg}\left(\left(z - t\right)\right)\right) \cdot \frac{y}{a}} \]
      4. sub0-negN/A

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

        \[\leadsto x - \left(\left(0 - z\right) + t\right) \cdot \frac{\color{blue}{y}}{a} \]
      6. neg-sub0N/A

        \[\leadsto x - \left(\left(\mathsf{neg}\left(z\right)\right) + t\right) \cdot \frac{y}{a} \]
      7. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg}\left(\frac{y \cdot \left(t - z\right)}{a}\right) \]
      2. distribute-neg-fracN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(y \cdot \left(\mathsf{neg}\left(\left(t - z\right)\right)\right)\right), a\right) \]
      5. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(y \cdot \left(-1 \cdot \left(t - z\right)\right)\right), a\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(-1 \cdot \left(t - z\right)\right)\right), a\right) \]
      7. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(-1 \cdot \left(t + \left(\mathsf{neg}\left(z\right)\right)\right)\right)\right), a\right) \]
      8. mul-1-negN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(-1 \cdot \left(-1 \cdot z\right) + -1 \cdot t\right)\right), a\right) \]
      11. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(\left(-1 \cdot -1\right) \cdot z + -1 \cdot t\right)\right), a\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(1 \cdot z + -1 \cdot t\right)\right), a\right) \]
      13. *-lft-identityN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(z + -1 \cdot t\right)\right), a\right) \]
      14. mul-1-negN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(z - t\right)\right), a\right) \]
      16. --lowering--.f6472.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(z, t\right)\right), a\right) \]
    7. Simplified72.9%

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

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

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

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

        \[\leadsto \left(\left(\mathsf{neg}\left(t\right)\right) + z\right) \cdot \frac{\color{blue}{y}}{a} \]
      5. remove-double-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(t\right)\right) + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right)\right) \cdot \frac{y}{a} \]
      6. distribute-neg-inN/A

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

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

        \[\leadsto \left(\mathsf{neg}\left(\left(t - z\right)\right)\right) \cdot \frac{\mathsf{neg}\left(y\right)}{\color{blue}{\mathsf{neg}\left(a\right)}} \]
      9. sub0-negN/A

        \[\leadsto \left(\mathsf{neg}\left(\left(t - z\right)\right)\right) \cdot \frac{0 - y}{\mathsf{neg}\left(\color{blue}{a}\right)} \]
      10. un-div-invN/A

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

        \[\leadsto \left(\mathsf{neg}\left(\left(t - z\right)\right)\right) \cdot \left(\left(0 - y\right) \cdot \frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(\color{blue}{a}\right)}\right) \]
      12. frac-2negN/A

        \[\leadsto \left(\mathsf{neg}\left(\left(t - z\right)\right)\right) \cdot \left(\left(0 - y\right) \cdot \frac{-1}{\color{blue}{a}}\right) \]
      13. *-commutativeN/A

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

        \[\leadsto \mathsf{*.f64}\left(\left(\left(0 - y\right) \cdot \frac{-1}{a}\right), \color{blue}{\left(\mathsf{neg}\left(\left(t - z\right)\right)\right)}\right) \]
      15. frac-2negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\left(0 - y\right) \cdot \frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(a\right)}\right), \left(\mathsf{neg}\left(\left(t - \color{blue}{z}\right)\right)\right)\right) \]
      16. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\left(0 - y\right) \cdot \frac{1}{\mathsf{neg}\left(a\right)}\right), \left(\mathsf{neg}\left(\left(t - z\right)\right)\right)\right) \]
      17. un-div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{0 - y}{\mathsf{neg}\left(a\right)}\right), \left(\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)\right)\right) \]
      18. sub0-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\mathsf{neg}\left(y\right)}{\mathsf{neg}\left(a\right)}\right), \left(\mathsf{neg}\left(\left(\color{blue}{t} - z\right)\right)\right)\right) \]
      19. frac-2negN/A

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(z - \color{blue}{t}\right)\right) \]
      26. --lowering--.f6476.0%

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

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

    if -3e83 < t < 9.00000000000000032e116

    1. Initial program 96.4%

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

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

        \[\leadsto x + \left(z - t\right) \cdot \color{blue}{\frac{y}{a}} \]
      3. cancel-sign-subN/A

        \[\leadsto x - \color{blue}{\left(\mathsf{neg}\left(\left(z - t\right)\right)\right) \cdot \frac{y}{a}} \]
      4. sub0-negN/A

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

        \[\leadsto x - \left(\left(0 - z\right) + t\right) \cdot \frac{\color{blue}{y}}{a} \]
      6. neg-sub0N/A

        \[\leadsto x - \left(\left(\mathsf{neg}\left(z\right)\right) + t\right) \cdot \frac{y}{a} \]
      7. +-commutativeN/A

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x - \frac{y \cdot \left(t - z\right)}{a}} \]
    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. sub-negN/A

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\left(y \cdot z\right), \color{blue}{a}\right)\right) \]
      6. *-lowering-*.f6488.2%

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

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

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

Alternative 4: 77.6% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{a} \cdot \left(z - t\right)\\ \mathbf{if}\;t \leq -3.4 \cdot 10^{+83}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.05 \cdot 10^{+119}:\\ \;\;\;\;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 (* (/ y a) (- z t))))
   (if (<= t -3.4e+83) t_1 (if (<= t 1.05e+119) (+ x (/ y (/ a z))) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y / a) * (z - t);
	double tmp;
	if (t <= -3.4e+83) {
		tmp = t_1;
	} else if (t <= 1.05e+119) {
		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 = (y / a) * (z - t)
    if (t <= (-3.4d+83)) then
        tmp = t_1
    else if (t <= 1.05d+119) 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 = (y / a) * (z - t);
	double tmp;
	if (t <= -3.4e+83) {
		tmp = t_1;
	} else if (t <= 1.05e+119) {
		tmp = x + (y / (a / z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (y / a) * (z - t)
	tmp = 0
	if t <= -3.4e+83:
		tmp = t_1
	elif t <= 1.05e+119:
		tmp = x + (y / (a / z))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(y / a) * Float64(z - t))
	tmp = 0.0
	if (t <= -3.4e+83)
		tmp = t_1;
	elseif (t <= 1.05e+119)
		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 = (y / a) * (z - t);
	tmp = 0.0;
	if (t <= -3.4e+83)
		tmp = t_1;
	elseif (t <= 1.05e+119)
		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[(N[(y / a), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.4e+83], t$95$1, If[LessEqual[t, 1.05e+119], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq 1.05 \cdot 10^{+119}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.3999999999999998e83 or 1.04999999999999991e119 < t

    1. Initial program 92.8%

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

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

        \[\leadsto x + \left(z - t\right) \cdot \color{blue}{\frac{y}{a}} \]
      3. cancel-sign-subN/A

        \[\leadsto x - \color{blue}{\left(\mathsf{neg}\left(\left(z - t\right)\right)\right) \cdot \frac{y}{a}} \]
      4. sub0-negN/A

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

        \[\leadsto x - \left(\left(0 - z\right) + t\right) \cdot \frac{\color{blue}{y}}{a} \]
      6. neg-sub0N/A

        \[\leadsto x - \left(\left(\mathsf{neg}\left(z\right)\right) + t\right) \cdot \frac{y}{a} \]
      7. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg}\left(\frac{y \cdot \left(t - z\right)}{a}\right) \]
      2. distribute-neg-fracN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(y \cdot \left(\mathsf{neg}\left(\left(t - z\right)\right)\right)\right), a\right) \]
      5. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(y \cdot \left(-1 \cdot \left(t - z\right)\right)\right), a\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(-1 \cdot \left(t - z\right)\right)\right), a\right) \]
      7. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(-1 \cdot \left(t + \left(\mathsf{neg}\left(z\right)\right)\right)\right)\right), a\right) \]
      8. mul-1-negN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(-1 \cdot \left(-1 \cdot z\right) + -1 \cdot t\right)\right), a\right) \]
      11. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(\left(-1 \cdot -1\right) \cdot z + -1 \cdot t\right)\right), a\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(1 \cdot z + -1 \cdot t\right)\right), a\right) \]
      13. *-lft-identityN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(z + -1 \cdot t\right)\right), a\right) \]
      14. mul-1-negN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(z - t\right)\right), a\right) \]
      16. --lowering--.f6472.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(z, t\right)\right), a\right) \]
    7. Simplified72.9%

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

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

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

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

        \[\leadsto \left(\left(\mathsf{neg}\left(t\right)\right) + z\right) \cdot \frac{\color{blue}{y}}{a} \]
      5. remove-double-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(t\right)\right) + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right)\right) \cdot \frac{y}{a} \]
      6. distribute-neg-inN/A

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

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

        \[\leadsto \left(\mathsf{neg}\left(\left(t - z\right)\right)\right) \cdot \frac{\mathsf{neg}\left(y\right)}{\color{blue}{\mathsf{neg}\left(a\right)}} \]
      9. sub0-negN/A

        \[\leadsto \left(\mathsf{neg}\left(\left(t - z\right)\right)\right) \cdot \frac{0 - y}{\mathsf{neg}\left(\color{blue}{a}\right)} \]
      10. un-div-invN/A

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

        \[\leadsto \left(\mathsf{neg}\left(\left(t - z\right)\right)\right) \cdot \left(\left(0 - y\right) \cdot \frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(\color{blue}{a}\right)}\right) \]
      12. frac-2negN/A

        \[\leadsto \left(\mathsf{neg}\left(\left(t - z\right)\right)\right) \cdot \left(\left(0 - y\right) \cdot \frac{-1}{\color{blue}{a}}\right) \]
      13. *-commutativeN/A

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

        \[\leadsto \mathsf{*.f64}\left(\left(\left(0 - y\right) \cdot \frac{-1}{a}\right), \color{blue}{\left(\mathsf{neg}\left(\left(t - z\right)\right)\right)}\right) \]
      15. frac-2negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\left(0 - y\right) \cdot \frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(a\right)}\right), \left(\mathsf{neg}\left(\left(t - \color{blue}{z}\right)\right)\right)\right) \]
      16. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\left(0 - y\right) \cdot \frac{1}{\mathsf{neg}\left(a\right)}\right), \left(\mathsf{neg}\left(\left(t - z\right)\right)\right)\right) \]
      17. un-div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{0 - y}{\mathsf{neg}\left(a\right)}\right), \left(\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)\right)\right) \]
      18. sub0-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\mathsf{neg}\left(y\right)}{\mathsf{neg}\left(a\right)}\right), \left(\mathsf{neg}\left(\left(\color{blue}{t} - z\right)\right)\right)\right) \]
      19. frac-2negN/A

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(z - \color{blue}{t}\right)\right) \]
      26. --lowering--.f6476.0%

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

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

    if -3.3999999999999998e83 < t < 1.04999999999999991e119

    1. Initial program 96.4%

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

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

        \[\leadsto x + \left(z - t\right) \cdot \color{blue}{\frac{y}{a}} \]
      3. cancel-sign-subN/A

        \[\leadsto x - \color{blue}{\left(\mathsf{neg}\left(\left(z - t\right)\right)\right) \cdot \frac{y}{a}} \]
      4. sub0-negN/A

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

        \[\leadsto x - \left(\left(0 - z\right) + t\right) \cdot \frac{\color{blue}{y}}{a} \]
      6. neg-sub0N/A

        \[\leadsto x - \left(\left(\mathsf{neg}\left(z\right)\right) + t\right) \cdot \frac{y}{a} \]
      7. +-commutativeN/A

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x - \frac{y \cdot \left(t - z\right)}{a}} \]
    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. sub-negN/A

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\left(y \cdot z\right), \color{blue}{a}\right)\right) \]
      6. *-lowering-*.f6488.2%

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

      \[\leadsto \color{blue}{x + \frac{y \cdot z}{a}} \]
    8. Step-by-step derivation
      1. associate-/l*N/A

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

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

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

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

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

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

Alternative 5: 67.2% accurate, 0.5× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.1e16 or 4.2000000000000003e23 < a

    1. Initial program 88.7%

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

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

        \[\leadsto x + \left(z - t\right) \cdot \color{blue}{\frac{y}{a}} \]
      3. cancel-sign-subN/A

        \[\leadsto x - \color{blue}{\left(\mathsf{neg}\left(\left(z - t\right)\right)\right) \cdot \frac{y}{a}} \]
      4. sub0-negN/A

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

        \[\leadsto x - \left(\left(0 - z\right) + t\right) \cdot \frac{\color{blue}{y}}{a} \]
      6. neg-sub0N/A

        \[\leadsto x - \left(\left(\mathsf{neg}\left(z\right)\right) + t\right) \cdot \frac{y}{a} \]
      7. +-commutativeN/A

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

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

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

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(t - z\right)\right), a\right)\right) \]
      14. --lowering--.f6488.7%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(t, z\right)\right), a\right)\right) \]
    3. Simplified88.7%

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

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

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

      if -3.1e16 < a < 4.2000000000000003e23

      1. Initial program 99.8%

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

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

          \[\leadsto x + \left(z - t\right) \cdot \color{blue}{\frac{y}{a}} \]
        3. cancel-sign-subN/A

          \[\leadsto x - \color{blue}{\left(\mathsf{neg}\left(\left(z - t\right)\right)\right) \cdot \frac{y}{a}} \]
        4. sub0-negN/A

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

          \[\leadsto x - \left(\left(0 - z\right) + t\right) \cdot \frac{\color{blue}{y}}{a} \]
        6. neg-sub0N/A

          \[\leadsto x - \left(\left(\mathsf{neg}\left(z\right)\right) + t\right) \cdot \frac{y}{a} \]
        7. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{neg}\left(\frac{y \cdot \left(t - z\right)}{a}\right) \]
        2. distribute-neg-fracN/A

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

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

          \[\leadsto \mathsf{/.f64}\left(\left(y \cdot \left(\mathsf{neg}\left(\left(t - z\right)\right)\right)\right), a\right) \]
        5. mul-1-negN/A

          \[\leadsto \mathsf{/.f64}\left(\left(y \cdot \left(-1 \cdot \left(t - z\right)\right)\right), a\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(-1 \cdot \left(t - z\right)\right)\right), a\right) \]
        7. sub-negN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(-1 \cdot \left(t + \left(\mathsf{neg}\left(z\right)\right)\right)\right)\right), a\right) \]
        8. mul-1-negN/A

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

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(-1 \cdot \left(-1 \cdot z\right) + -1 \cdot t\right)\right), a\right) \]
        11. associate-*r*N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(\left(-1 \cdot -1\right) \cdot z + -1 \cdot t\right)\right), a\right) \]
        12. metadata-evalN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(1 \cdot z + -1 \cdot t\right)\right), a\right) \]
        13. *-lft-identityN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(z + -1 \cdot t\right)\right), a\right) \]
        14. mul-1-negN/A

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(z - t\right)\right), a\right) \]
        16. --lowering--.f6476.6%

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

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

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

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

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

          \[\leadsto \left(\left(\mathsf{neg}\left(t\right)\right) + z\right) \cdot \frac{\color{blue}{y}}{a} \]
        5. remove-double-negN/A

          \[\leadsto \left(\left(\mathsf{neg}\left(t\right)\right) + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right)\right) \cdot \frac{y}{a} \]
        6. distribute-neg-inN/A

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

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

          \[\leadsto \left(\mathsf{neg}\left(\left(t - z\right)\right)\right) \cdot \frac{\mathsf{neg}\left(y\right)}{\color{blue}{\mathsf{neg}\left(a\right)}} \]
        9. sub0-negN/A

          \[\leadsto \left(\mathsf{neg}\left(\left(t - z\right)\right)\right) \cdot \frac{0 - y}{\mathsf{neg}\left(\color{blue}{a}\right)} \]
        10. un-div-invN/A

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

          \[\leadsto \left(\mathsf{neg}\left(\left(t - z\right)\right)\right) \cdot \left(\left(0 - y\right) \cdot \frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(\color{blue}{a}\right)}\right) \]
        12. frac-2negN/A

          \[\leadsto \left(\mathsf{neg}\left(\left(t - z\right)\right)\right) \cdot \left(\left(0 - y\right) \cdot \frac{-1}{\color{blue}{a}}\right) \]
        13. *-commutativeN/A

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

          \[\leadsto \mathsf{*.f64}\left(\left(\left(0 - y\right) \cdot \frac{-1}{a}\right), \color{blue}{\left(\mathsf{neg}\left(\left(t - z\right)\right)\right)}\right) \]
        15. frac-2negN/A

          \[\leadsto \mathsf{*.f64}\left(\left(\left(0 - y\right) \cdot \frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(a\right)}\right), \left(\mathsf{neg}\left(\left(t - \color{blue}{z}\right)\right)\right)\right) \]
        16. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\left(\left(0 - y\right) \cdot \frac{1}{\mathsf{neg}\left(a\right)}\right), \left(\mathsf{neg}\left(\left(t - z\right)\right)\right)\right) \]
        17. un-div-invN/A

          \[\leadsto \mathsf{*.f64}\left(\left(\frac{0 - y}{\mathsf{neg}\left(a\right)}\right), \left(\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)\right)\right) \]
        18. sub0-negN/A

          \[\leadsto \mathsf{*.f64}\left(\left(\frac{\mathsf{neg}\left(y\right)}{\mathsf{neg}\left(a\right)}\right), \left(\mathsf{neg}\left(\left(\color{blue}{t} - z\right)\right)\right)\right) \]
        19. frac-2negN/A

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \left(z - \color{blue}{t}\right)\right) \]
        26. --lowering--.f6474.8%

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

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

    Alternative 6: 49.8% accurate, 0.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.4 \cdot 10^{-27}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.42 \cdot 10^{-59}:\\ \;\;\;\;\frac{z \cdot y}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
    (FPCore (x y z t a)
     :precision binary64
     (if (<= a -1.4e-27) x (if (<= a 1.42e-59) (/ (* z y) a) x)))
    double code(double x, double y, double z, double t, double a) {
    	double tmp;
    	if (a <= -1.4e-27) {
    		tmp = x;
    	} else if (a <= 1.42e-59) {
    		tmp = (z * y) / a;
    	} else {
    		tmp = x;
    	}
    	return tmp;
    }
    
    real(8) function code(x, y, z, t, a)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8) :: tmp
        if (a <= (-1.4d-27)) then
            tmp = x
        else if (a <= 1.42d-59) then
            tmp = (z * y) / a
        else
            tmp = x
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a) {
    	double tmp;
    	if (a <= -1.4e-27) {
    		tmp = x;
    	} else if (a <= 1.42e-59) {
    		tmp = (z * y) / a;
    	} else {
    		tmp = x;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a):
    	tmp = 0
    	if a <= -1.4e-27:
    		tmp = x
    	elif a <= 1.42e-59:
    		tmp = (z * y) / a
    	else:
    		tmp = x
    	return tmp
    
    function code(x, y, z, t, a)
    	tmp = 0.0
    	if (a <= -1.4e-27)
    		tmp = x;
    	elseif (a <= 1.42e-59)
    		tmp = Float64(Float64(z * y) / a);
    	else
    		tmp = x;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a)
    	tmp = 0.0;
    	if (a <= -1.4e-27)
    		tmp = x;
    	elseif (a <= 1.42e-59)
    		tmp = (z * y) / a;
    	else
    		tmp = x;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.4e-27], x, If[LessEqual[a, 1.42e-59], N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision], x]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;a \leq -1.4 \cdot 10^{-27}:\\
    \;\;\;\;x\\
    
    \mathbf{elif}\;a \leq 1.42 \cdot 10^{-59}:\\
    \;\;\;\;\frac{z \cdot y}{a}\\
    
    \mathbf{else}:\\
    \;\;\;\;x\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if a < -1.4e-27 or 1.42000000000000006e-59 < a

      1. Initial program 90.8%

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

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

          \[\leadsto x + \left(z - t\right) \cdot \color{blue}{\frac{y}{a}} \]
        3. cancel-sign-subN/A

          \[\leadsto x - \color{blue}{\left(\mathsf{neg}\left(\left(z - t\right)\right)\right) \cdot \frac{y}{a}} \]
        4. sub0-negN/A

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

          \[\leadsto x - \left(\left(0 - z\right) + t\right) \cdot \frac{\color{blue}{y}}{a} \]
        6. neg-sub0N/A

          \[\leadsto x - \left(\left(\mathsf{neg}\left(z\right)\right) + t\right) \cdot \frac{y}{a} \]
        7. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

        if -1.4e-27 < a < 1.42000000000000006e-59

        1. Initial program 99.8%

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

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

            \[\leadsto x + \left(z - t\right) \cdot \color{blue}{\frac{y}{a}} \]
          3. cancel-sign-subN/A

            \[\leadsto x - \color{blue}{\left(\mathsf{neg}\left(\left(z - t\right)\right)\right) \cdot \frac{y}{a}} \]
          4. sub0-negN/A

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

            \[\leadsto x - \left(\left(0 - z\right) + t\right) \cdot \frac{\color{blue}{y}}{a} \]
          6. neg-sub0N/A

            \[\leadsto x - \left(\left(\mathsf{neg}\left(z\right)\right) + t\right) \cdot \frac{y}{a} \]
          7. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{/.f64}\left(\left(y \cdot z\right), \color{blue}{a}\right) \]
          2. *-lowering-*.f6450.3%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), a\right) \]
        7. Simplified50.3%

          \[\leadsto \color{blue}{\frac{y \cdot z}{a}} \]
      7. Recombined 2 regimes into one program.
      8. Final simplification57.7%

        \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.4 \cdot 10^{-27}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.42 \cdot 10^{-59}:\\ \;\;\;\;\frac{z \cdot y}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
      9. Add Preprocessing

      Alternative 7: 51.9% accurate, 0.6× speedup?

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

        1. Initial program 88.7%

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

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

            \[\leadsto x + \left(z - t\right) \cdot \color{blue}{\frac{y}{a}} \]
          3. cancel-sign-subN/A

            \[\leadsto x - \color{blue}{\left(\mathsf{neg}\left(\left(z - t\right)\right)\right) \cdot \frac{y}{a}} \]
          4. sub0-negN/A

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

            \[\leadsto x - \left(\left(0 - z\right) + t\right) \cdot \frac{\color{blue}{y}}{a} \]
          6. neg-sub0N/A

            \[\leadsto x - \left(\left(\mathsf{neg}\left(z\right)\right) + t\right) \cdot \frac{y}{a} \]
          7. +-commutativeN/A

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

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

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

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

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

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

            \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(t - z\right)\right), a\right)\right) \]
          14. --lowering--.f6488.7%

            \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(t, z\right)\right), a\right)\right) \]
        3. Simplified88.7%

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

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

            \[\leadsto \mathsf{/.f64}\left(\left(y \cdot z\right), \color{blue}{a}\right) \]
          2. *-lowering-*.f6459.6%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), a\right) \]
        7. Simplified59.6%

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), z\right) \]
        9. Applied egg-rr62.6%

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

        if -2.5500000000000002e74 < z < 8.4999999999999995e83

        1. Initial program 98.3%

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

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

            \[\leadsto x + \left(z - t\right) \cdot \color{blue}{\frac{y}{a}} \]
          3. cancel-sign-subN/A

            \[\leadsto x - \color{blue}{\left(\mathsf{neg}\left(\left(z - t\right)\right)\right) \cdot \frac{y}{a}} \]
          4. sub0-negN/A

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

            \[\leadsto x - \left(\left(0 - z\right) + t\right) \cdot \frac{\color{blue}{y}}{a} \]
          6. neg-sub0N/A

            \[\leadsto x - \left(\left(\mathsf{neg}\left(z\right)\right) + t\right) \cdot \frac{y}{a} \]
          7. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.55 \cdot 10^{+74}:\\ \;\;\;\;z \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+83}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{y}{a}\\ \end{array} \]
        9. Add Preprocessing

        Alternative 8: 93.4% accurate, 0.6× speedup?

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

          1. Initial program 97.0%

            \[x + \frac{y \cdot \left(z - t\right)}{a} \]
          2. Add Preprocessing

          if 6.00000000000000006e180 < a

          1. Initial program 77.0%

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

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

              \[\leadsto x + \left(z - t\right) \cdot \color{blue}{\frac{y}{a}} \]
            3. cancel-sign-subN/A

              \[\leadsto x - \color{blue}{\left(\mathsf{neg}\left(\left(z - t\right)\right)\right) \cdot \frac{y}{a}} \]
            4. sub0-negN/A

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

              \[\leadsto x - \left(\left(0 - z\right) + t\right) \cdot \frac{\color{blue}{y}}{a} \]
            6. neg-sub0N/A

              \[\leadsto x - \left(\left(\mathsf{neg}\left(z\right)\right) + t\right) \cdot \frac{y}{a} \]
            7. +-commutativeN/A

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{x - \frac{y \cdot \left(t - z\right)}{a}} \]
          4. Add Preprocessing
          5. Step-by-step derivation
            1. frac-2negN/A

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

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

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

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

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

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

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

              \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, z\right), \mathsf{*.f64}\left(\left(\mathsf{neg}\left(y\right)\right), \color{blue}{\left(\frac{1}{\mathsf{neg}\left(a\right)}\right)}\right)\right)\right) \]
            9. neg-sub0N/A

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

              \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, z\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, y\right), \left(\frac{\color{blue}{1}}{\mathsf{neg}\left(a\right)}\right)\right)\right)\right) \]
            11. distribute-frac-neg2N/A

              \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, z\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, y\right), \left(\mathsf{neg}\left(\frac{1}{a}\right)\right)\right)\right)\right) \]
            12. distribute-neg-fracN/A

              \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, z\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, y\right), \left(\frac{\mathsf{neg}\left(1\right)}{\color{blue}{a}}\right)\right)\right)\right) \]
            13. metadata-evalN/A

              \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, z\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, y\right), \left(\frac{-1}{a}\right)\right)\right)\right) \]
            14. /-lowering-/.f6499.9%

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

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

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

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

              \[\leadsto \mathsf{\_.f64}\left(x, \left(\left(t - z\right) \cdot \frac{0 - y}{\color{blue}{\mathsf{neg}\left(a\right)}}\right)\right) \]
            4. sub0-negN/A

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, z\right), \mathsf{*.f64}\left(\left(\frac{1}{a}\right), \color{blue}{y}\right)\right)\right) \]
            13. metadata-evalN/A

              \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, z\right), \mathsf{*.f64}\left(\left(\frac{\mathsf{neg}\left(-1\right)}{a}\right), y\right)\right)\right) \]
            14. /-lowering-/.f64N/A

              \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, z\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(-1\right)\right), a\right), y\right)\right)\right) \]
            15. metadata-eval99.9%

              \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, z\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, a\right), y\right)\right)\right) \]
          8. Applied egg-rr99.9%

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

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

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

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

          Alternative 9: 97.3% accurate, 1.0× speedup?

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

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

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

              \[\leadsto x + \left(z - t\right) \cdot \color{blue}{\frac{y}{a}} \]
            3. cancel-sign-subN/A

              \[\leadsto x - \color{blue}{\left(\mathsf{neg}\left(\left(z - t\right)\right)\right) \cdot \frac{y}{a}} \]
            4. sub0-negN/A

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

              \[\leadsto x - \left(\left(0 - z\right) + t\right) \cdot \frac{\color{blue}{y}}{a} \]
            6. neg-sub0N/A

              \[\leadsto x - \left(\left(\mathsf{neg}\left(z\right)\right) + t\right) \cdot \frac{y}{a} \]
            7. +-commutativeN/A

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

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

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

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

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

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

              \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(t - z\right)\right), a\right)\right) \]
            14. --lowering--.f6495.1%

              \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(t, z\right)\right), a\right)\right) \]
          3. Simplified95.1%

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

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

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

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

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

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

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

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

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

          Alternative 10: 93.5% 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}
          
          Derivation
          1. Initial program 95.1%

            \[x + \frac{y \cdot \left(z - t\right)}{a} \]
          2. Add Preprocessing
          3. Add Preprocessing

          Alternative 11: 39.2% 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 95.1%

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

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

              \[\leadsto x + \left(z - t\right) \cdot \color{blue}{\frac{y}{a}} \]
            3. cancel-sign-subN/A

              \[\leadsto x - \color{blue}{\left(\mathsf{neg}\left(\left(z - t\right)\right)\right) \cdot \frac{y}{a}} \]
            4. sub0-negN/A

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

              \[\leadsto x - \left(\left(0 - z\right) + t\right) \cdot \frac{\color{blue}{y}}{a} \]
            6. neg-sub0N/A

              \[\leadsto x - \left(\left(\mathsf{neg}\left(z\right)\right) + t\right) \cdot \frac{y}{a} \]
            7. +-commutativeN/A

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

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

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

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

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

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

              \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(t - z\right)\right), a\right)\right) \]
            14. --lowering--.f6495.1%

              \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(t, z\right)\right), a\right)\right) \]
          3. Simplified95.1%

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

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

              \[\leadsto \color{blue}{x} \]
            2. 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 2024155 
            (FPCore (x y z t a)
              :name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, E"
              :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)))