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

Percentage Accurate: 93.3% → 97.1%
Time: 11.4s
Alternatives: 15
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 15 alternatives:

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

Initial Program: 93.3% accurate, 1.0× speedup?

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

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

Alternative 1: 97.1% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

Alternative 2: 46.8% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t}{\frac{a}{y}}\\ t_2 := \frac{y}{a} \cdot \left(-z\right)\\ \mathbf{if}\;z \leq -5.2 \cdot 10^{+76}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-227}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-183}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+53}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{+167} \lor \neg \left(z \leq 6.5 \cdot 10^{+245}\right):\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ t (/ a y))) (t_2 (* (/ y a) (- z))))
   (if (<= z -5.2e+76)
     t_2
     (if (<= z 1.6e-227)
       t_1
       (if (<= z 2.6e-183)
         x
         (if (<= z 3e+53)
           t_1
           (if (or (<= z 1.15e+167) (not (<= z 6.5e+245))) t_2 x)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t / (a / y);
	double t_2 = (y / a) * -z;
	double tmp;
	if (z <= -5.2e+76) {
		tmp = t_2;
	} else if (z <= 1.6e-227) {
		tmp = t_1;
	} else if (z <= 2.6e-183) {
		tmp = x;
	} else if (z <= 3e+53) {
		tmp = t_1;
	} else if ((z <= 1.15e+167) || !(z <= 6.5e+245)) {
		tmp = t_2;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t / (a / y)
    t_2 = (y / a) * -z
    if (z <= (-5.2d+76)) then
        tmp = t_2
    else if (z <= 1.6d-227) then
        tmp = t_1
    else if (z <= 2.6d-183) then
        tmp = x
    else if (z <= 3d+53) then
        tmp = t_1
    else if ((z <= 1.15d+167) .or. (.not. (z <= 6.5d+245))) then
        tmp = t_2
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t / (a / y);
	double t_2 = (y / a) * -z;
	double tmp;
	if (z <= -5.2e+76) {
		tmp = t_2;
	} else if (z <= 1.6e-227) {
		tmp = t_1;
	} else if (z <= 2.6e-183) {
		tmp = x;
	} else if (z <= 3e+53) {
		tmp = t_1;
	} else if ((z <= 1.15e+167) || !(z <= 6.5e+245)) {
		tmp = t_2;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t / (a / y)
	t_2 = (y / a) * -z
	tmp = 0
	if z <= -5.2e+76:
		tmp = t_2
	elif z <= 1.6e-227:
		tmp = t_1
	elif z <= 2.6e-183:
		tmp = x
	elif z <= 3e+53:
		tmp = t_1
	elif (z <= 1.15e+167) or not (z <= 6.5e+245):
		tmp = t_2
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t / Float64(a / y))
	t_2 = Float64(Float64(y / a) * Float64(-z))
	tmp = 0.0
	if (z <= -5.2e+76)
		tmp = t_2;
	elseif (z <= 1.6e-227)
		tmp = t_1;
	elseif (z <= 2.6e-183)
		tmp = x;
	elseif (z <= 3e+53)
		tmp = t_1;
	elseif ((z <= 1.15e+167) || !(z <= 6.5e+245))
		tmp = t_2;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t / (a / y);
	t_2 = (y / a) * -z;
	tmp = 0.0;
	if (z <= -5.2e+76)
		tmp = t_2;
	elseif (z <= 1.6e-227)
		tmp = t_1;
	elseif (z <= 2.6e-183)
		tmp = x;
	elseif (z <= 3e+53)
		tmp = t_1;
	elseif ((z <= 1.15e+167) || ~((z <= 6.5e+245)))
		tmp = t_2;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y / a), $MachinePrecision] * (-z)), $MachinePrecision]}, If[LessEqual[z, -5.2e+76], t$95$2, If[LessEqual[z, 1.6e-227], t$95$1, If[LessEqual[z, 2.6e-183], x, If[LessEqual[z, 3e+53], t$95$1, If[Or[LessEqual[z, 1.15e+167], N[Not[LessEqual[z, 6.5e+245]], $MachinePrecision]], t$95$2, x]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 1.6 \cdot 10^{-227}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.6 \cdot 10^{-183}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 3 \cdot 10^{+53}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.15 \cdot 10^{+167} \lor \neg \left(z \leq 6.5 \cdot 10^{+245}\right):\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.1999999999999999e76 or 2.99999999999999998e53 < z < 1.14999999999999994e167 or 6.50000000000000035e245 < z

    1. Initial program 90.1%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(y \cdot z\right)}{a}} \]
      2. *-commutative62.5%

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

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

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

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

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

    if -5.1999999999999999e76 < z < 1.60000000000000005e-227 or 2.5999999999999999e-183 < z < 2.99999999999999998e53

    1. Initial program 95.8%

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

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

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

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

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

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

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

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

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

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

    if 1.60000000000000005e-227 < z < 2.5999999999999999e-183 or 1.14999999999999994e167 < z < 6.50000000000000035e245

    1. Initial program 96.0%

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

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

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification64.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.2 \cdot 10^{+76}:\\ \;\;\;\;\frac{y}{a} \cdot \left(-z\right)\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-227}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-183}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+53}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{+167} \lor \neg \left(z \leq 6.5 \cdot 10^{+245}\right):\\ \;\;\;\;\frac{y}{a} \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 78.8% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;z \leq 1.75 \cdot 10^{+50}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 6.5 \cdot 10^{+245}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.65e18 or 6.50000000000000035e245 < z

    1. Initial program 88.3%

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

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

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

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

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

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

    if -1.65e18 < z < 1.75000000000000003e50 or 1.14999999999999994e167 < z < 6.50000000000000035e245

    1. Initial program 96.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t \cdot y}{a}} + x \]
      5. *-commutative88.0%

        \[\leadsto \frac{\color{blue}{y \cdot t}}{a} + x \]
      6. associate-/l*85.8%

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

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

    if 1.75000000000000003e50 < z < 1.14999999999999994e167

    1. Initial program 94.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.65 \cdot 10^{+18}:\\ \;\;\;\;x - y \cdot \frac{z}{a}\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{+50}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{+167}:\\ \;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+245}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;x - y \cdot \frac{z}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 78.7% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := x + y \cdot \frac{t}{a}\\
t_2 := x - \frac{y}{\frac{a}{z}}\\
\mathbf{if}\;z \leq -4.1 \cdot 10^{+71}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq 1.26 \cdot 10^{+51}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 6.5 \cdot 10^{+245}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.1000000000000002e71 or 6.50000000000000035e245 < z

    1. Initial program 89.1%

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

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

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

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

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

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

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

    if -4.1000000000000002e71 < z < 1.25999999999999997e51 or 1.14999999999999994e167 < z < 6.50000000000000035e245

    1. Initial program 95.8%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\left(-t\right) \cdot \frac{y}{a}} \]
      2. cancel-sign-sub88.8%

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

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

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

        \[\leadsto \frac{\color{blue}{y \cdot t}}{a} + x \]
      6. associate-/l*85.0%

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

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

    if 1.25999999999999997e51 < z < 1.14999999999999994e167

    1. Initial program 94.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.1 \cdot 10^{+71}:\\ \;\;\;\;x - \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;z \leq 1.26 \cdot 10^{+51}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{+167}:\\ \;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+245}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{\frac{a}{z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 82.9% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;t \leq 4.8 \cdot 10^{-79}:\\
\;\;\;\;x - \frac{z \cdot y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.35000000000000008e104 or 4.80000000000000011e-79 < t

    1. Initial program 92.6%

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

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

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

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

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

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

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

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

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

    if -2.35000000000000008e104 < t < -2.8000000000000001e40

    1. Initial program 91.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.8000000000000001e40 < t < 4.80000000000000011e-79

    1. Initial program 96.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.35 \cdot 10^{+104}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;t \leq -2.8 \cdot 10^{+40}:\\ \;\;\;\;\frac{t - z}{\frac{a}{y}}\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-79}:\\ \;\;\;\;x - \frac{z \cdot y}{a}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 47.0% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.45 \cdot 10^{+110}:\\
\;\;\;\;\frac{x \cdot y}{y}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -1.45e110

    1. Initial program 94.9%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y \cdot x}{y}} \]
    10. Applied egg-rr59.9%

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

    if -1.45e110 < x < 2.3000000000000001e-176

    1. Initial program 93.4%

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

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

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

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

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

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

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

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

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

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

    if 2.3000000000000001e-176 < x < 6.4e6

    1. Initial program 92.4%

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

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

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

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

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

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

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

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

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

    if 6.4e6 < x

    1. Initial program 95.3%

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

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

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification59.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.45 \cdot 10^{+110}:\\ \;\;\;\;\frac{x \cdot y}{y}\\ \mathbf{elif}\;x \leq 2.3 \cdot 10^{-176}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;x \leq 6400000:\\ \;\;\;\;y \cdot \frac{z}{-a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 67.5% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{-107} \lor \neg \left(y \leq 6.1 \cdot 10^{-139}\right):\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.2000000000000001e-107 or 6.0999999999999998e-139 < y

    1. Initial program 91.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.2000000000000001e-107 < y < 6.0999999999999998e-139

    1. Initial program 99.5%

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

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

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification72.9%

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

Alternative 8: 75.8% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.80000000000000023e-112 or 3.7e9 < x

    1. Initial program 92.7%

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

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

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

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

      \[\leadsto x - \color{blue}{-1 \cdot \frac{t \cdot y}{a}} \]
    6. Step-by-step derivation
      1. mul-1-neg78.9%

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

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

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

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

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

        \[\leadsto x - \color{blue}{\left(-t\right) \cdot \frac{y}{a}} \]
      2. cancel-sign-sub79.4%

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

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

        \[\leadsto \color{blue}{\frac{t \cdot y}{a}} + x \]
      5. *-commutative78.9%

        \[\leadsto \frac{\color{blue}{y \cdot t}}{a} + x \]
      6. associate-/l*78.8%

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

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

    if -2.80000000000000023e-112 < x < 3.7e9

    1. Initial program 95.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 82.1% accurate, 0.5× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.00000000000000013e71

    1. Initial program 90.0%

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

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

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

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

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

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

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

    if -3.00000000000000013e71 < z < 1.5500000000000001e53

    1. Initial program 96.0%

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

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

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

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

      \[\leadsto x - \color{blue}{-1 \cdot \frac{t \cdot y}{a}} \]
    6. Step-by-step derivation
      1. mul-1-neg85.9%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t \cdot y}{a}} + x \]
      5. *-commutative85.9%

        \[\leadsto \frac{\color{blue}{y \cdot t}}{a} + x \]
      6. associate-/l*84.2%

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

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

    if 1.5500000000000001e53 < z

    1. Initial program 91.6%

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

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

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

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

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

Alternative 10: 47.5% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.05000000000000007e110 or 9.00000000000000046e-139 < x

    1. Initial program 94.7%

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

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

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

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

    if -1.05000000000000007e110 < x < 9.00000000000000046e-139

    1. Initial program 93.1%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.05 \cdot 10^{+110}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 9 \cdot 10^{-139}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 47.4% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -9.8000000000000007e109 or 9.00000000000000046e-139 < x

    1. Initial program 94.7%

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

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

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

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

    if -9.8000000000000007e109 < x < 9.00000000000000046e-139

    1. Initial program 93.1%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -9.8 \cdot 10^{+109}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 9 \cdot 10^{-139}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 46.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.22 \cdot 10^{+110}:\\
\;\;\;\;\frac{x \cdot y}{y}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.22000000000000002e110

    1. Initial program 94.9%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y \cdot x}{y}} \]
    10. Applied egg-rr59.9%

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

    if -1.22000000000000002e110 < x < 9.00000000000000046e-139

    1. Initial program 93.1%

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

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

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

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

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

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

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

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

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

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

    if 9.00000000000000046e-139 < x

    1. Initial program 94.7%

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

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

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification56.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.22 \cdot 10^{+110}:\\ \;\;\;\;\frac{x \cdot y}{y}\\ \mathbf{elif}\;x \leq 9 \cdot 10^{-139}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 93.3% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 14: 97.1% accurate, 1.0× speedup?

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

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

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

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

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

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

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

Alternative 15: 39.3% accurate, 9.0× speedup?

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Final simplification34.8%

    \[\leadsto x \]
  7. Add Preprocessing

Developer target: 99.2% accurate, 0.5× speedup?

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

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

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

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


\end{array}
\end{array}

Reproduce

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

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

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