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

Percentage Accurate: 93.1% → 99.6%
Time: 11.6s
Alternatives: 16
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 16 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.1% 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: 99.6% accurate, 0.4× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;x + \frac{t_1}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 y (-.f64 z t)) < -inf.0 or 5.00000000000000037e243 < (*.f64 y (-.f64 z t))

    1. Initial program 67.8%

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

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

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

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

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

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

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

    if -inf.0 < (*.f64 y (-.f64 z t)) < 5.00000000000000037e243

    1. Initial program 99.6%

      \[x + \frac{y \cdot \left(z - t\right)}{a} \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification99.6%

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

Alternative 2: 97.1% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(\frac{y}{a}, z - t, x\right) \end{array} \]
(FPCore (x y z t a) :precision binary64 (fma (/ y a) (- z t) x))
double code(double x, double y, double z, double t, double a) {
	return fma((y / a), (z - t), x);
}
function code(x, y, z, t, a)
	return fma(Float64(y / a), Float64(z - t), x)
end
code[x_, y_, z_, t_, a_] := N[(N[(y / a), $MachinePrecision] * N[(z - t), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(\frac{y}{a}, z - t, x\right)
\end{array}
Derivation
  1. Initial program 91.9%

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

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

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

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{a}, z - t, x\right)} \]
  4. Add Preprocessing
  5. Final simplification97.0%

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

Alternative 3: 65.1% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{-48} \lor \neg \left(y \leq 1.7 \cdot 10^{-261} \lor \neg \left(y \leq 2.9 \cdot 10^{-161}\right) \land \left(y \leq 1.05 \cdot 10^{-152} \lor \neg \left(y \leq 2.1 \cdot 10^{-38}\right) \land y \leq 1.8\right)\right):\\
\;\;\;\;\frac{y}{a} \cdot \left(z - t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.9000000000000003e-48 or 1.7e-261 < y < 2.9e-161 or 1.04999999999999999e-152 < y < 2.10000000000000013e-38 or 1.80000000000000004 < y

    1. Initial program 88.7%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a}, y, x\right)} \]
    7. Taylor expanded in a around 0 67.7%

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

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

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

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

    if -2.9000000000000003e-48 < y < 1.7e-261 or 2.9e-161 < y < 1.04999999999999999e-152 or 2.10000000000000013e-38 < y < 1.80000000000000004

    1. Initial program 99.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.9 \cdot 10^{-48} \lor \neg \left(y \leq 1.7 \cdot 10^{-261} \lor \neg \left(y \leq 2.9 \cdot 10^{-161}\right) \land \left(y \leq 1.05 \cdot 10^{-152} \lor \neg \left(y \leq 2.1 \cdot 10^{-38}\right) \land y \leq 1.8\right)\right):\\ \;\;\;\;\frac{y}{a} \cdot \left(z - t\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 48.3% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;t \leq 1.55 \cdot 10^{-249}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;t \leq 3.1 \cdot 10^{-125}:\\
\;\;\;\;x\\

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -6.59999999999999984e136 or 6.80000000000000031e-13 < t

    1. Initial program 86.9%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a}, y, x\right)} \]
    7. Taylor expanded in t around inf 56.9%

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

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

        \[\leadsto -\color{blue}{\frac{t}{a} \cdot y} \]
    9. Simplified61.8%

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

    if -6.59999999999999984e136 < t < 1.54999999999999993e-249 or 6.50000000000000012e-172 < t < 3.10000000000000013e-125

    1. Initial program 97.3%

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

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

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

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

    if 1.54999999999999993e-249 < t < 6.50000000000000012e-172

    1. Initial program 85.4%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a}, y, x\right)} \]
    7. Taylor expanded in z around inf 55.7%

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
    9. Simplified70.0%

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

    if 3.10000000000000013e-125 < t < 6.80000000000000031e-13

    1. Initial program 89.7%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a}, y, x\right)} \]
    7. Taylor expanded in z around inf 50.5%

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

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

        \[\leadsto \color{blue}{\frac{y}{a} \cdot z} \]
    9. Applied egg-rr62.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.6 \cdot 10^{+136}:\\ \;\;\;\;y \cdot \left(-\frac{t}{a}\right)\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{-249}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 6.5 \cdot 10^{-172}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{-125}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 6.8 \cdot 10^{-13}:\\ \;\;\;\;\frac{y}{a} \cdot z\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(-\frac{t}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 48.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.16 \cdot 10^{+138}:\\
\;\;\;\;\frac{-y}{\frac{a}{t}}\\

\mathbf{elif}\;t \leq 2.2 \cdot 10^{-245}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;t \leq 1.35 \cdot 10^{-130}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -1.15999999999999994e138

    1. Initial program 84.3%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a}, y, x\right)} \]
    7. Taylor expanded in t around inf 63.2%

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

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

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

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

        \[\leadsto -\color{blue}{y \cdot \frac{t}{a}} \]
      2. clear-num74.8%

        \[\leadsto -y \cdot \color{blue}{\frac{1}{\frac{a}{t}}} \]
      3. un-div-inv74.9%

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

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

    if -1.15999999999999994e138 < t < 2.19999999999999993e-245 or 1.39999999999999995e-173 < t < 1.34999999999999996e-130

    1. Initial program 97.3%

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

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

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

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

    if 2.19999999999999993e-245 < t < 1.39999999999999995e-173

    1. Initial program 85.4%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a}, y, x\right)} \]
    7. Taylor expanded in z around inf 55.7%

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
    9. Simplified70.0%

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

    if 1.34999999999999996e-130 < t < 5.99999999999999968e-13

    1. Initial program 89.7%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a}, y, x\right)} \]
    7. Taylor expanded in z around inf 50.5%

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

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

        \[\leadsto \color{blue}{\frac{y}{a} \cdot z} \]
    9. Applied egg-rr62.0%

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

    if 5.99999999999999968e-13 < t

    1. Initial program 87.8%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a}, y, x\right)} \]
    7. Taylor expanded in t around inf 54.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.16 \cdot 10^{+138}:\\ \;\;\;\;\frac{-y}{\frac{a}{t}}\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-245}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{-173}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{-130}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 6 \cdot 10^{-13}:\\ \;\;\;\;\frac{y}{a} \cdot z\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(-\frac{t}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 49.4% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;t \leq 1.3 \cdot 10^{-246}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;t \leq 6.8 \cdot 10^{-131}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -5.50000000000000039e136

    1. Initial program 84.3%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a}, y, x\right)} \]
    7. Taylor expanded in t around inf 63.2%

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

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

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

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

        \[\leadsto -\color{blue}{y \cdot \frac{t}{a}} \]
      2. clear-num74.8%

        \[\leadsto -y \cdot \color{blue}{\frac{1}{\frac{a}{t}}} \]
      3. un-div-inv74.9%

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

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

    if -5.50000000000000039e136 < t < 1.2999999999999999e-246 or 2.60000000000000003e-173 < t < 6.7999999999999999e-131

    1. Initial program 97.3%

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

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

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

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

    if 1.2999999999999999e-246 < t < 2.60000000000000003e-173

    1. Initial program 85.4%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a}, y, x\right)} \]
    7. Taylor expanded in z around inf 55.7%

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
    9. Simplified70.0%

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

    if 6.7999999999999999e-131 < t < 3.89999999999999994e-12

    1. Initial program 89.7%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a}, y, x\right)} \]
    7. Taylor expanded in z around inf 50.5%

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

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

        \[\leadsto \color{blue}{\frac{y}{a} \cdot z} \]
    9. Applied egg-rr62.0%

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

    if 3.89999999999999994e-12 < t

    1. Initial program 87.8%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a}, y, x\right)} \]
    7. Taylor expanded in t around inf 54.8%

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

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

        \[\leadsto \color{blue}{-t \cdot \frac{y}{a}} \]
      3. distribute-rgt-neg-in59.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.5 \cdot 10^{+136}:\\ \;\;\;\;\frac{-y}{\frac{a}{t}}\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{-246}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-173}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 6.8 \cdot 10^{-131}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 3.9 \cdot 10^{-12}:\\ \;\;\;\;\frac{y}{a} \cdot z\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a} \cdot \left(-t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 50.5% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;a \leq -1.45 \cdot 10^{+47}:\\
\;\;\;\;y \cdot \frac{z}{a}\\

\mathbf{elif}\;a \leq -2.55 \cdot 10^{-23}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 2.6 \cdot 10^{-66}:\\
\;\;\;\;\frac{y}{a} \cdot z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -9.5000000000000008e112 or -1.4499999999999999e47 < a < -2.55000000000000005e-23 or 2.5999999999999999e-66 < a

    1. Initial program 87.1%

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

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

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

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

    if -9.5000000000000008e112 < a < -1.4499999999999999e47

    1. Initial program 84.2%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a}, y, x\right)} \]
    7. Taylor expanded in z around inf 43.0%

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

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

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

    if -2.55000000000000005e-23 < a < 2.5999999999999999e-66

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a}, y, x\right)} \]
    7. Taylor expanded in z around inf 50.4%

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

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

        \[\leadsto \color{blue}{\frac{y}{a} \cdot z} \]
    9. Applied egg-rr52.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.5 \cdot 10^{+112}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.45 \cdot 10^{+47}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq -2.55 \cdot 10^{-23}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{-66}:\\ \;\;\;\;\frac{y}{a} \cdot z\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 83.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{+118} \lor \neg \left(t \leq 4.1 \cdot 10^{-13}\right):\\
\;\;\;\;x - y \cdot \frac{t}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.2e118 or 4.1000000000000002e-13 < t

    1. Initial program 86.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.2e118 < t < 4.1000000000000002e-13

    1. Initial program 95.3%

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

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

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

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

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

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

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

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

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

Alternative 9: 83.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{+118} \lor \neg \left(t \leq 4.6 \cdot 10^{-12}\right):\\
\;\;\;\;x - \frac{y}{\frac{a}{t}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.05e118 or 4.59999999999999979e-12 < t

    1. Initial program 86.6%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{y \cdot \frac{t}{a}} \]
      2. clear-num60.7%

        \[\leadsto -y \cdot \color{blue}{\frac{1}{\frac{a}{t}}} \]
      3. un-div-inv60.8%

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

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

    if -1.05e118 < t < 4.59999999999999979e-12

    1. Initial program 95.3%

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

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

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

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

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

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

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

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

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

Alternative 10: 85.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.1 \cdot 10^{+118} \lor \neg \left(t \leq 2.35 \cdot 10^{-12}\right):\\
\;\;\;\;x - \frac{y}{a} \cdot t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.09999999999999993e118 or 2.34999999999999988e-12 < t

    1. Initial program 86.6%

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

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

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

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

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

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

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

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

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

    if -1.09999999999999993e118 < t < 2.34999999999999988e-12

    1. Initial program 95.3%

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

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

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

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

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

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

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

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

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

Alternative 11: 73.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.7 \cdot 10^{+151}:\\
\;\;\;\;\frac{-y}{\frac{a}{t}}\\

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

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


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

    1. Initial program 83.6%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a}, y, x\right)} \]
    7. Taylor expanded in t around inf 61.6%

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

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

        \[\leadsto -\color{blue}{\frac{t}{a} \cdot y} \]
    9. Simplified73.8%

      \[\leadsto \color{blue}{-\frac{t}{a} \cdot y} \]
    10. Step-by-step derivation
      1. *-commutative73.8%

        \[\leadsto -\color{blue}{y \cdot \frac{t}{a}} \]
      2. clear-num73.7%

        \[\leadsto -y \cdot \color{blue}{\frac{1}{\frac{a}{t}}} \]
      3. un-div-inv73.8%

        \[\leadsto -\color{blue}{\frac{y}{\frac{a}{t}}} \]
    11. Applied egg-rr73.8%

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

    if -4.69999999999999989e151 < t < 3.45e-102

    1. Initial program 96.4%

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

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

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

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

    if 3.45e-102 < t

    1. Initial program 87.0%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a}, y, x\right)} \]
    7. Taylor expanded in a around 0 62.3%

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

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

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

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

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

Alternative 12: 77.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.55 \cdot 10^{+151}:\\
\;\;\;\;\frac{-y}{\frac{a}{t}}\\

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

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


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

    1. Initial program 83.6%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a}, y, x\right)} \]
    7. Taylor expanded in t around inf 61.6%

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

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

        \[\leadsto -\color{blue}{\frac{t}{a} \cdot y} \]
    9. Simplified73.8%

      \[\leadsto \color{blue}{-\frac{t}{a} \cdot y} \]
    10. Step-by-step derivation
      1. *-commutative73.8%

        \[\leadsto -\color{blue}{y \cdot \frac{t}{a}} \]
      2. clear-num73.7%

        \[\leadsto -y \cdot \color{blue}{\frac{1}{\frac{a}{t}}} \]
      3. un-div-inv73.8%

        \[\leadsto -\color{blue}{\frac{y}{\frac{a}{t}}} \]
    11. Applied egg-rr73.8%

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

    if -2.54999999999999998e151 < t < 2.1000000000000001e-16

    1. Initial program 94.7%

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

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

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

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

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

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

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

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

    if 2.1000000000000001e-16 < t

    1. Initial program 88.3%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a}, y, x\right)} \]
    7. Taylor expanded in a around 0 63.6%

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

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

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

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

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

Alternative 13: 50.0% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.36 \cdot 10^{+70} \lor \neg \left(y \leq 10^{+96}\right):\\
\;\;\;\;y \cdot \frac{z}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.35999999999999995e70 or 1.00000000000000005e96 < y

    1. Initial program 82.4%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a}, y, x\right)} \]
    7. Taylor expanded in z around inf 44.7%

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

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

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

    if -1.35999999999999995e70 < y < 1.00000000000000005e96

    1. Initial program 97.8%

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

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

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

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

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

Alternative 14: 92.9% 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.9%

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

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

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

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

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

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

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

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

Alternative 15: 97.1% accurate, 1.0× speedup?

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

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

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

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

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

    \[\leadsto \color{blue}{x + \frac{z - t}{\frac{a}{y}}} \]
  4. Add Preprocessing
  5. Final simplification96.6%

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

Alternative 16: 39.8% 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.9%

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Final simplification38.5%

    \[\leadsto x \]
  7. Add Preprocessing

Developer target: 99.1% accurate, 0.7× 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 2024019 
(FPCore (x y z t a)
  :name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, E"
  :precision binary64

  :herbie-target
  (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)))