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

Percentage Accurate: 93.0% → 98.1%
Time: 9.2s
Alternatives: 13
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 13 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.0% 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.1% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 77.3%

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

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

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

    if -1.49999999999999993e80 < y < 7.5e-125

    1. Initial program 99.7%

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

    if 7.5e-125 < y

    1. Initial program 90.9%

      \[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. Step-by-step derivation
      1. clear-num99.8%

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

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

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

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

Alternative 2: 51.7% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t \leq 1.25 \cdot 10^{-242}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 2.1 \cdot 10^{-150}:\\
\;\;\;\;y \cdot \frac{z}{a}\\

\mathbf{elif}\;t \leq 7.5 \cdot 10^{+25}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.49999999999999997e82 or 7.49999999999999993e25 < t

    1. Initial program 86.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.49999999999999997e82 < t < 1.25e-242 or 2.1000000000000001e-150 < t < 7.49999999999999993e25

    1. Initial program 96.9%

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

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

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

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

    if 1.25e-242 < t < 2.1000000000000001e-150

    1. Initial program 84.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
    12. Simplified66.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.5 \cdot 10^{+82}:\\ \;\;\;\;t \cdot \frac{y}{-a}\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{-242}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{-150}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{+25}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{-a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 66.2% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z - t \leq -1 \cdot 10^{+27} \lor \neg \left(z - t \leq 5 \cdot 10^{+82}\right):\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 z t) < -1e27 or 5.00000000000000015e82 < (-.f64 z t)

    1. Initial program 86.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y}{a} \cdot z - \color{blue}{\frac{y}{a} \cdot t} \]
      4. distribute-lft-out--75.4%

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

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

    if -1e27 < (-.f64 z t) < 5.00000000000000015e82

    1. Initial program 99.8%

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

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

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

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

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

Alternative 4: 85.4% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -8 \cdot 10^{-23} \lor \neg \left(t \leq 6.5 \cdot 10^{+62}\right):\\
\;\;\;\;x - t \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -7.99999999999999968e-23 or 6.5000000000000003e62 < t

    1. Initial program 88.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.99999999999999968e-23 < t < 6.5000000000000003e62

    1. Initial program 94.3%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{a} \cdot z} + x \]
      2. *-commutative92.5%

        \[\leadsto \color{blue}{z \cdot \frac{y}{a}} + x \]
    9. Simplified92.5%

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

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

        \[\leadsto \color{blue}{\frac{z}{\frac{a}{y}}} + x \]
    11. Applied egg-rr92.5%

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

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

Alternative 5: 80.5% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.1 \cdot 10^{+109} \lor \neg \left(t \leq 1.85 \cdot 10^{+90}\right):\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.10000000000000008e109 or 1.85e90 < t

    1. Initial program 85.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y}{a} \cdot z - \color{blue}{\frac{y}{a} \cdot t} \]
      4. distribute-lft-out--80.6%

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

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

    if -6.10000000000000008e109 < t < 1.85e90

    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*98.7%

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

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

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

        \[\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*98.3%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{a} \cdot z} + x \]
      2. *-commutative86.7%

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

      \[\leadsto \color{blue}{z \cdot \frac{y}{a}} + x \]
    10. Step-by-step derivation
      1. clear-num86.7%

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

        \[\leadsto \color{blue}{\frac{z}{\frac{a}{y}}} + x \]
    11. Applied egg-rr86.7%

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

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

Alternative 6: 80.6% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.3 \cdot 10^{+109} \lor \neg \left(t \leq 7.1 \cdot 10^{+87}\right):\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.2999999999999999e109 or 7.0999999999999998e87 < t

    1. Initial program 85.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y}{a} \cdot z - \color{blue}{\frac{y}{a} \cdot t} \]
      4. distribute-lft-out--80.6%

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

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

    if -3.2999999999999999e109 < t < 7.0999999999999998e87

    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*98.7%

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

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

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

        \[\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*98.3%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{a} \cdot z} + x \]
      2. *-commutative86.7%

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

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

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

Alternative 7: 78.5% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.4 \cdot 10^{+109} \lor \neg \left(t \leq 3.8 \cdot 10^{+26}\right):\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.40000000000000006e109 or 3.8000000000000002e26 < t

    1. Initial program 86.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y}{a} \cdot z - \color{blue}{\frac{y}{a} \cdot t} \]
      4. distribute-lft-out--79.4%

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

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

    if -3.40000000000000006e109 < t < 3.8000000000000002e26

    1. Initial program 95.1%

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

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

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

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

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

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

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

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

Alternative 8: 78.6% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.5 \cdot 10^{+109} \lor \neg \left(t \leq 6 \cdot 10^{+25}\right):\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.4999999999999998e109 or 6.00000000000000011e25 < t

    1. Initial program 86.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y}{a} \cdot z - \color{blue}{\frac{y}{a} \cdot t} \]
      4. distribute-lft-out--79.4%

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

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

    if -5.4999999999999998e109 < t < 6.00000000000000011e25

    1. Initial program 95.1%

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

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

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

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

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

Alternative 9: 49.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{+113} \lor \neg \left(y \leq 1.45 \cdot 10^{+45}\right):\\
\;\;\;\;y \cdot \frac{z}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.1999999999999998e113 or 1.4499999999999999e45 < y

    1. Initial program 81.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
    12. Simplified49.6%

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

    if -3.1999999999999998e113 < y < 1.4499999999999999e45

    1. Initial program 98.5%

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

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

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

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

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

Alternative 10: 97.0% accurate, 1.0× speedup?

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

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

    \[x + \frac{y \cdot \left(z - t\right)}{a} \]
  2. Step-by-step derivation
    1. +-commutative91.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/91.8%

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

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

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

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

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

Alternative 11: 93.6% 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 91.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. Step-by-step derivation
    1. clear-num95.4%

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

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

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

Alternative 12: 93.0% 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 91.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. Add Preprocessing

Alternative 13: 38.7% 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 91.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 x around inf 40.4%

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

Developer target: 99.0% accurate, 0.5× speedup?

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

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

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

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024100 
(FPCore (x y z t a)
  :name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, E"
  :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)))