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

Percentage Accurate: 93.4% → 98.2%
Time: 11.5s
Alternatives: 17
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 17 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.4% 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: 98.2% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+253}:\\
\;\;\;\;x + \frac{1}{\frac{a}{t\_1}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 y (-.f64 z t)) < -4.99999999999999964e224

    1. Initial program 81.0%

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

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

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

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

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

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

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

    if -4.99999999999999964e224 < (*.f64 y (-.f64 z t)) < 1.9999999999999999e253

    1. Initial program 99.8%

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

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

      \[\leadsto \color{blue}{x + y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/99.8%

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

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

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

    if 1.9999999999999999e253 < (*.f64 y (-.f64 z t))

    1. Initial program 80.3%

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{z - t}{a}} \]
    10. Simplified100.0%

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

Alternative 2: 84.8% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z - t\right)}{a}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+152} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+281}\right):\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 y (-.f64 z t)) a) < -2.0000000000000001e152 or 5.00000000000000016e281 < (/.f64 (*.f64 y (-.f64 z t)) a)

    1. Initial program 84.9%

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

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

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

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

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

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

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

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

    if -2.0000000000000001e152 < (/.f64 (*.f64 y (-.f64 z t)) a) < 5.00000000000000016e281

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 83.7% accurate, 0.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 y (-.f64 z t)) a) < -2.0000000000000001e152 or 3.9999999999999997e253 < (/.f64 (*.f64 y (-.f64 z t)) a)

    1. Initial program 85.5%

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

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

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

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

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

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

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

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

    if -2.0000000000000001e152 < (/.f64 (*.f64 y (-.f64 z t)) a) < 3.9999999999999997e253

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 98.3% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+253}:\\
\;\;\;\;x + \frac{t\_1}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 y (-.f64 z t)) < -4.99999999999999964e224

    1. Initial program 81.0%

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

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

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

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

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

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

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

    if -4.99999999999999964e224 < (*.f64 y (-.f64 z t)) < 1.9999999999999999e253

    1. Initial program 99.8%

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

    if 1.9999999999999999e253 < (*.f64 y (-.f64 z t))

    1. Initial program 80.3%

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{z - t}{a}} \]
    10. Simplified100.0%

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

Alternative 5: 83.3% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{+202} \lor \neg \left(z \leq 3.5 \cdot 10^{+19}\right):\\
\;\;\;\;x + z \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.6000000000000002e202 or 3.5e19 < z

    1. Initial program 90.6%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{a}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-undefine90.7%

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

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

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

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

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

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

    if -2.6000000000000002e202 < z < 3.5e19

    1. Initial program 94.9%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{a}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-undefine95.1%

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

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

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

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

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{t \cdot y}{a}} \]
    8. Step-by-step derivation
      1. mul-1-neg84.7%

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

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

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

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

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

Alternative 6: 69.2% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.62 \cdot 10^{-52} \lor \neg \left(y \leq 6.2 \cdot 10^{-44}\right):\\
\;\;\;\;y \cdot \frac{z - t}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.61999999999999995e-52 or 6.19999999999999968e-44 < y

    1. Initial program 89.5%

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

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

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

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

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

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

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

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

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

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

    if -1.61999999999999995e-52 < y < 6.19999999999999968e-44

    1. Initial program 99.8%

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

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

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

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

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

Alternative 7: 79.0% accurate, 0.5× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.19999999999999988e123

    1. Initial program 83.3%

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

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

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

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

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

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

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

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

    if -4.19999999999999988e123 < t < 3.3000000000000002e119

    1. Initial program 96.8%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{a}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-undefine95.4%

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

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

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

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

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

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

    if 3.3000000000000002e119 < t

    1. Initial program 87.7%

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\left(-\frac{t}{a}\right)} \]
      2. distribute-frac-neg260.0%

        \[\leadsto y \cdot \color{blue}{\frac{t}{-a}} \]
    10. Simplified60.0%

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

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

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

        \[\leadsto \color{blue}{t \cdot \left(\frac{1}{-a} \cdot y\right)} \]
      4. add-sqr-sqrt29.1%

        \[\leadsto t \cdot \left(\frac{1}{\color{blue}{\sqrt{-a} \cdot \sqrt{-a}}} \cdot y\right) \]
      5. sqrt-unprod22.3%

        \[\leadsto t \cdot \left(\frac{1}{\color{blue}{\sqrt{\left(-a\right) \cdot \left(-a\right)}}} \cdot y\right) \]
      6. sqr-neg22.3%

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

        \[\leadsto t \cdot \left(\frac{1}{\color{blue}{\sqrt{a} \cdot \sqrt{a}}} \cdot y\right) \]
      8. add-sqr-sqrt0.9%

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
      11. frac-2neg0.9%

        \[\leadsto \color{blue}{\frac{-t}{-\frac{a}{y}}} \]
      12. distribute-neg-frac0.9%

        \[\leadsto \frac{-t}{\color{blue}{\frac{-a}{y}}} \]
      13. add-sqr-sqrt0.2%

        \[\leadsto \frac{-t}{\frac{\color{blue}{\sqrt{-a} \cdot \sqrt{-a}}}{y}} \]
      14. sqrt-unprod30.3%

        \[\leadsto \frac{-t}{\frac{\color{blue}{\sqrt{\left(-a\right) \cdot \left(-a\right)}}}{y}} \]
      15. sqr-neg30.3%

        \[\leadsto \frac{-t}{\frac{\sqrt{\color{blue}{a \cdot a}}}{y}} \]
      16. sqrt-unprod40.1%

        \[\leadsto \frac{-t}{\frac{\color{blue}{\sqrt{a} \cdot \sqrt{a}}}{y}} \]
      17. add-sqr-sqrt69.3%

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

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

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

Alternative 8: 77.0% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.15 \cdot 10^{+123}:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.14999999999999993e123

    1. Initial program 83.3%

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

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

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

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

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

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

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

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

    if -2.14999999999999993e123 < t < 4.9999999999999999e119

    1. Initial program 96.8%

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} + x \]
    7. Simplified82.0%

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

    if 4.9999999999999999e119 < t

    1. Initial program 87.7%

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\left(-\frac{t}{a}\right)} \]
      2. distribute-frac-neg260.0%

        \[\leadsto y \cdot \color{blue}{\frac{t}{-a}} \]
    10. Simplified60.0%

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

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

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

        \[\leadsto \color{blue}{t \cdot \left(\frac{1}{-a} \cdot y\right)} \]
      4. add-sqr-sqrt29.1%

        \[\leadsto t \cdot \left(\frac{1}{\color{blue}{\sqrt{-a} \cdot \sqrt{-a}}} \cdot y\right) \]
      5. sqrt-unprod22.3%

        \[\leadsto t \cdot \left(\frac{1}{\color{blue}{\sqrt{\left(-a\right) \cdot \left(-a\right)}}} \cdot y\right) \]
      6. sqr-neg22.3%

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

        \[\leadsto t \cdot \left(\frac{1}{\color{blue}{\sqrt{a} \cdot \sqrt{a}}} \cdot y\right) \]
      8. add-sqr-sqrt0.9%

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
      11. frac-2neg0.9%

        \[\leadsto \color{blue}{\frac{-t}{-\frac{a}{y}}} \]
      12. distribute-neg-frac0.9%

        \[\leadsto \frac{-t}{\color{blue}{\frac{-a}{y}}} \]
      13. add-sqr-sqrt0.2%

        \[\leadsto \frac{-t}{\frac{\color{blue}{\sqrt{-a} \cdot \sqrt{-a}}}{y}} \]
      14. sqrt-unprod30.3%

        \[\leadsto \frac{-t}{\frac{\color{blue}{\sqrt{\left(-a\right) \cdot \left(-a\right)}}}{y}} \]
      15. sqr-neg30.3%

        \[\leadsto \frac{-t}{\frac{\sqrt{\color{blue}{a \cdot a}}}{y}} \]
      16. sqrt-unprod40.1%

        \[\leadsto \frac{-t}{\frac{\color{blue}{\sqrt{a} \cdot \sqrt{a}}}{y}} \]
      17. add-sqr-sqrt69.3%

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

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

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

Alternative 9: 76.9% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.1 \cdot 10^{+123}:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.09999999999999994e123

    1. Initial program 83.3%

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

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

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

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

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

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

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

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

    if -2.09999999999999994e123 < t < 4.4000000000000003e120

    1. Initial program 96.8%

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

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

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

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

    if 4.4000000000000003e120 < t

    1. Initial program 87.7%

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\left(-\frac{t}{a}\right)} \]
      2. distribute-frac-neg260.0%

        \[\leadsto y \cdot \color{blue}{\frac{t}{-a}} \]
    10. Simplified60.0%

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

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

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

        \[\leadsto \color{blue}{t \cdot \left(\frac{1}{-a} \cdot y\right)} \]
      4. add-sqr-sqrt29.1%

        \[\leadsto t \cdot \left(\frac{1}{\color{blue}{\sqrt{-a} \cdot \sqrt{-a}}} \cdot y\right) \]
      5. sqrt-unprod22.3%

        \[\leadsto t \cdot \left(\frac{1}{\color{blue}{\sqrt{\left(-a\right) \cdot \left(-a\right)}}} \cdot y\right) \]
      6. sqr-neg22.3%

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

        \[\leadsto t \cdot \left(\frac{1}{\color{blue}{\sqrt{a} \cdot \sqrt{a}}} \cdot y\right) \]
      8. add-sqr-sqrt0.9%

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
      11. frac-2neg0.9%

        \[\leadsto \color{blue}{\frac{-t}{-\frac{a}{y}}} \]
      12. distribute-neg-frac0.9%

        \[\leadsto \frac{-t}{\color{blue}{\frac{-a}{y}}} \]
      13. add-sqr-sqrt0.2%

        \[\leadsto \frac{-t}{\frac{\color{blue}{\sqrt{-a} \cdot \sqrt{-a}}}{y}} \]
      14. sqrt-unprod30.3%

        \[\leadsto \frac{-t}{\frac{\color{blue}{\sqrt{\left(-a\right) \cdot \left(-a\right)}}}{y}} \]
      15. sqr-neg30.3%

        \[\leadsto \frac{-t}{\frac{\sqrt{\color{blue}{a \cdot a}}}{y}} \]
      16. sqrt-unprod40.1%

        \[\leadsto \frac{-t}{\frac{\color{blue}{\sqrt{a} \cdot \sqrt{a}}}{y}} \]
      17. add-sqr-sqrt69.3%

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

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

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

Alternative 10: 50.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.2 \cdot 10^{+122} \lor \neg \left(y \leq 4.8 \cdot 10^{+49}\right):\\
\;\;\;\;\frac{z}{\frac{a}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9.2000000000000002e122 or 4.8e49 < y

    1. Initial program 87.5%

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

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

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

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

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

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

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

      \[\leadsto y \cdot \color{blue}{\frac{z}{a}} \]
    9. Step-by-step derivation
      1. *-commutative49.5%

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

        \[\leadsto \color{blue}{\frac{z}{\frac{a}{y}}} \]
    10. Applied egg-rr50.6%

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

    if -9.2000000000000002e122 < y < 4.8e49

    1. Initial program 97.8%

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

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

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

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

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

Alternative 11: 50.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.1 \cdot 10^{+120} \lor \neg \left(y \leq 5.8 \cdot 10^{+53}\right):\\
\;\;\;\;z \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.10000000000000027e120 or 5.8000000000000004e53 < y

    1. Initial program 87.5%

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

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

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

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

      \[\leadsto \frac{\color{blue}{y \cdot z}}{a} \]
    7. Step-by-step derivation
      1. div-inv43.9%

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

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

        \[\leadsto \color{blue}{z \cdot \left(y \cdot \frac{1}{a}\right)} \]
      4. div-inv50.5%

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

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

    if -5.10000000000000027e120 < y < 5.8000000000000004e53

    1. Initial program 97.8%

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

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

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

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

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

Alternative 12: 50.1% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.95 \cdot 10^{+119} \lor \neg \left(y \leq 1.6 \cdot 10^{+50}\right):\\
\;\;\;\;y \cdot \frac{z}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.95e119 or 1.59999999999999991e50 < y

    1. Initial program 87.5%

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

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

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

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

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

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

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

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

    if -2.95e119 < y < 1.59999999999999991e50

    1. Initial program 97.8%

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

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

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

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

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

Alternative 13: 51.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5600000000000:\\
\;\;\;\;\frac{t}{\frac{a}{-y}}\\

\mathbf{elif}\;y \leq 8 \cdot 10^{+50}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;\frac{z}{\frac{a}{y}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -5.6e12

    1. Initial program 92.7%

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\left(-\frac{t}{a}\right)} \]
      2. distribute-frac-neg249.3%

        \[\leadsto y \cdot \color{blue}{\frac{t}{-a}} \]
    10. Simplified49.3%

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

        \[\leadsto \color{blue}{\frac{t}{-a} \cdot y} \]
      2. div-inv49.3%

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

        \[\leadsto \color{blue}{t \cdot \left(\frac{1}{-a} \cdot y\right)} \]
      4. add-sqr-sqrt18.6%

        \[\leadsto t \cdot \left(\frac{1}{\color{blue}{\sqrt{-a} \cdot \sqrt{-a}}} \cdot y\right) \]
      5. sqrt-unprod19.4%

        \[\leadsto t \cdot \left(\frac{1}{\color{blue}{\sqrt{\left(-a\right) \cdot \left(-a\right)}}} \cdot y\right) \]
      6. sqr-neg19.4%

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

        \[\leadsto t \cdot \left(\frac{1}{\color{blue}{\sqrt{a} \cdot \sqrt{a}}} \cdot y\right) \]
      8. add-sqr-sqrt4.4%

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

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{a}{y}}} \]
      10. div-inv4.4%

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
      11. frac-2neg4.4%

        \[\leadsto \color{blue}{\frac{-t}{-\frac{a}{y}}} \]
      12. distribute-neg-frac4.4%

        \[\leadsto \frac{-t}{\color{blue}{\frac{-a}{y}}} \]
      13. add-sqr-sqrt1.8%

        \[\leadsto \frac{-t}{\frac{\color{blue}{\sqrt{-a} \cdot \sqrt{-a}}}{y}} \]
      14. sqrt-unprod27.1%

        \[\leadsto \frac{-t}{\frac{\color{blue}{\sqrt{\left(-a\right) \cdot \left(-a\right)}}}{y}} \]
      15. sqr-neg27.1%

        \[\leadsto \frac{-t}{\frac{\sqrt{\color{blue}{a \cdot a}}}{y}} \]
      16. sqrt-unprod32.2%

        \[\leadsto \frac{-t}{\frac{\color{blue}{\sqrt{a} \cdot \sqrt{a}}}{y}} \]
      17. add-sqr-sqrt51.2%

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

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

    if -5.6e12 < y < 8.0000000000000006e50

    1. Initial program 98.3%

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

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

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

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

    if 8.0000000000000006e50 < y

    1. Initial program 84.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z}{\frac{a}{y}}} \]
    10. Applied egg-rr54.1%

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

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

Alternative 14: 51.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4500000000000:\\
\;\;\;\;\frac{t}{a} \cdot \left(-y\right)\\

\mathbf{elif}\;y \leq 1.05 \cdot 10^{+52}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;\frac{z}{\frac{a}{y}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.5e12

    1. Initial program 92.7%

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\left(-\frac{t}{a}\right)} \]
      2. distribute-frac-neg249.3%

        \[\leadsto y \cdot \color{blue}{\frac{t}{-a}} \]
    10. Simplified49.3%

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

    if -4.5e12 < y < 1.05e52

    1. Initial program 98.3%

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

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

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

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

    if 1.05e52 < y

    1. Initial program 84.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z}{\frac{a}{y}}} \]
    10. Applied egg-rr54.1%

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

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

Alternative 15: 93.9% accurate, 1.0× speedup?

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

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

    \[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 y around 0 93.5%

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

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

      \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{z - t}}} \]
  7. Simplified95.1%

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

Alternative 16: 93.3% accurate, 1.0× speedup?

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

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

    \[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. Add Preprocessing

Alternative 17: 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 93.5%

    \[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 41.5%

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

Developer Target 1: 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 2024186 
(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)))