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

Percentage Accurate: 93.6% → 99.6%
Time: 10.0s
Alternatives: 13
Speedup: 0.4×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 13 alternatives:

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

Initial Program: 93.6% 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.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(z - t\right)\\ \mathbf{if}\;t_1 \leq -2 \cdot 10^{+174}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{a}, z - t, x\right)\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+246}:\\ \;\;\;\;x + \frac{t_1}{a}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z - t}{\frac{a}{y}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (- z t))))
   (if (<= t_1 -2e+174)
     (fma (/ y a) (- z t) x)
     (if (<= t_1 2e+246) (+ x (/ t_1 a)) (+ x (/ (- z t) (/ a y)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (z - t);
	double tmp;
	if (t_1 <= -2e+174) {
		tmp = fma((y / a), (z - t), x);
	} else if (t_1 <= 2e+246) {
		tmp = x + (t_1 / a);
	} else {
		tmp = x + ((z - t) / (a / y));
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(z - t))
	tmp = 0.0
	if (t_1 <= -2e+174)
		tmp = fma(Float64(y / a), Float64(z - t), x);
	elseif (t_1 <= 2e+246)
		tmp = Float64(x + Float64(t_1 / a));
	else
		tmp = Float64(x + Float64(Float64(z - t) / Float64(a / y)));
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+174], N[(N[(y / a), $MachinePrecision] * N[(z - t), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 2e+246], N[(x + N[(t$95$1 / a), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z - t), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \left(z - t\right)\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{+174}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, z - t, x\right)\\

\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+246}:\\
\;\;\;\;x + \frac{t_1}{a}\\

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


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

    1. Initial program 83.4%

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

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

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

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

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

    if -2.00000000000000014e174 < (*.f64 y (-.f64 z t)) < 2.00000000000000014e246

    1. Initial program 99.2%

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

    if 2.00000000000000014e246 < (*.f64 y (-.f64 z t))

    1. Initial program 72.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \cdot \left(z - t\right) \leq -2 \cdot 10^{+174}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{a}, z - t, x\right)\\ \mathbf{elif}\;y \cdot \left(z - t\right) \leq 2 \cdot 10^{+246}:\\ \;\;\;\;x + \frac{y \cdot \left(z - t\right)}{a}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z - t}{\frac{a}{y}}\\ \end{array} \]

Alternative 2: 98.1% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(z - t\right)\\ \mathbf{if}\;t_1 \leq -2 \cdot 10^{+292} \lor \neg \left(t_1 \leq 5 \cdot 10^{+288}\right):\\ \;\;\;\;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 -2e+292) (not (<= t_1 5e+288)))
     (* 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 <= -2e+292) || !(t_1 <= 5e+288)) {
		tmp = y * ((z - t) / a);
	} else {
		tmp = x + (t_1 / a);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y * (z - t)
    if ((t_1 <= (-2d+292)) .or. (.not. (t_1 <= 5d+288))) then
        tmp = y * ((z - t) / a)
    else
        tmp = x + (t_1 / a)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (z - t);
	double tmp;
	if ((t_1 <= -2e+292) || !(t_1 <= 5e+288)) {
		tmp = 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 <= -2e+292) or not (t_1 <= 5e+288):
		tmp = 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 <= -2e+292) || !(t_1 <= 5e+288))
		tmp = 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 <= -2e+292) || ~((t_1 <= 5e+288)))
		tmp = 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, -2e+292], N[Not[LessEqual[t$95$1, 5e+288]], $MachinePrecision]], N[(y * N[(N[(z - t), $MachinePrecision] / a), $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 -2 \cdot 10^{+292} \lor \neg \left(t_1 \leq 5 \cdot 10^{+288}\right):\\
\;\;\;\;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)) < -2e292 or 5.0000000000000003e288 < (*.f64 y (-.f64 z t))

    1. Initial program 66.4%

      \[x + \frac{y \cdot \left(z - t\right)}{a} \]
    2. Taylor expanded in x around 0 66.4%

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

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

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

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

    if -2e292 < (*.f64 y (-.f64 z t)) < 5.0000000000000003e288

    1. Initial program 99.3%

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

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

Alternative 3: 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 -2 \cdot 10^{+292} \lor \neg \left(t_1 \leq 2 \cdot 10^{+246}\right):\\ \;\;\;\;x + \frac{z - t}{\frac{a}{y}}\\ \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 -2e+292) (not (<= t_1 2e+246)))
     (+ x (/ (- z t) (/ a y)))
     (+ 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 <= -2e+292) || !(t_1 <= 2e+246)) {
		tmp = x + ((z - t) / (a / y));
	} else {
		tmp = x + (t_1 / a);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y * (z - t)
    if ((t_1 <= (-2d+292)) .or. (.not. (t_1 <= 2d+246))) then
        tmp = x + ((z - t) / (a / y))
    else
        tmp = x + (t_1 / a)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (z - t);
	double tmp;
	if ((t_1 <= -2e+292) || !(t_1 <= 2e+246)) {
		tmp = x + ((z - t) / (a / y));
	} 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 <= -2e+292) or not (t_1 <= 2e+246):
		tmp = x + ((z - t) / (a / y))
	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 <= -2e+292) || !(t_1 <= 2e+246))
		tmp = Float64(x + Float64(Float64(z - t) / Float64(a / y)));
	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 <= -2e+292) || ~((t_1 <= 2e+246)))
		tmp = x + ((z - t) / (a / y));
	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, -2e+292], N[Not[LessEqual[t$95$1, 2e+246]], $MachinePrecision]], N[(x + N[(N[(z - t), $MachinePrecision] / N[(a / y), $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 -2 \cdot 10^{+292} \lor \neg \left(t_1 \leq 2 \cdot 10^{+246}\right):\\
\;\;\;\;x + \frac{z - t}{\frac{a}{y}}\\

\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)) < -2e292 or 2.00000000000000014e246 < (*.f64 y (-.f64 z t))

    1. Initial program 70.7%

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

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

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

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

    if -2e292 < (*.f64 y (-.f64 z t)) < 2.00000000000000014e246

    1. Initial program 99.3%

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

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

Alternative 4: 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:\\ \;\;\;\;x + \frac{\frac{y}{a}}{\frac{1}{z - t}}\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+246}:\\ \;\;\;\;x + \frac{t_1}{a}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z - t}{\frac{a}{y}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (- z t))))
   (if (<= t_1 (- INFINITY))
     (+ x (/ (/ y a) (/ 1.0 (- z t))))
     (if (<= t_1 2e+246) (+ x (/ t_1 a)) (+ x (/ (- z t) (/ a y)))))))
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)) {
		tmp = x + ((y / a) / (1.0 / (z - t)));
	} else if (t_1 <= 2e+246) {
		tmp = x + (t_1 / a);
	} else {
		tmp = x + ((z - t) / (a / y));
	}
	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) {
		tmp = x + ((y / a) / (1.0 / (z - t)));
	} else if (t_1 <= 2e+246) {
		tmp = x + (t_1 / a);
	} else {
		tmp = x + ((z - t) / (a / y));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * (z - t)
	tmp = 0
	if t_1 <= -math.inf:
		tmp = x + ((y / a) / (1.0 / (z - t)))
	elif t_1 <= 2e+246:
		tmp = x + (t_1 / a)
	else:
		tmp = x + ((z - t) / (a / y))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(z - t))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(x + Float64(Float64(y / a) / Float64(1.0 / Float64(z - t))));
	elseif (t_1 <= 2e+246)
		tmp = Float64(x + Float64(t_1 / a));
	else
		tmp = Float64(x + Float64(Float64(z - t) / Float64(a / y)));
	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)
		tmp = x + ((y / a) / (1.0 / (z - t)));
	elseif (t_1 <= 2e+246)
		tmp = x + (t_1 / a);
	else
		tmp = x + ((z - t) / (a / y));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(x + N[(N[(y / a), $MachinePrecision] / N[(1.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+246], N[(x + N[(t$95$1 / a), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z - t), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \left(z - t\right)\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;x + \frac{\frac{y}{a}}{\frac{1}{z - t}}\\

\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+246}:\\
\;\;\;\;x + \frac{t_1}{a}\\

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


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

    1. Initial program 64.4%

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (*.f64 y (-.f64 z t)) < 2.00000000000000014e246

    1. Initial program 99.3%

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

    if 2.00000000000000014e246 < (*.f64 y (-.f64 z t))

    1. Initial program 72.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \cdot \left(z - t\right) \leq -\infty:\\ \;\;\;\;x + \frac{\frac{y}{a}}{\frac{1}{z - t}}\\ \mathbf{elif}\;y \cdot \left(z - t\right) \leq 2 \cdot 10^{+246}:\\ \;\;\;\;x + \frac{y \cdot \left(z - t\right)}{a}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z - t}{\frac{a}{y}}\\ \end{array} \]

Alternative 5: 49.7% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t \leq -5.8 \cdot 10^{-173}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;t \leq 1.02 \cdot 10^{-62}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;t \leq 0.285:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -3.5999999999999999e59 or 0.284999999999999976 < t

    1. Initial program 90.6%

      \[x + \frac{y \cdot \left(z - t\right)}{a} \]
    2. Taylor expanded in x around 0 70.9%

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

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

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

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

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

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

    if -3.5999999999999999e59 < t < -5.7999999999999997e-173 or 2.34999999999999999e-175 < t < 1.02000000000000005e-62 or 1.00000000000000004e-42 < t < 0.284999999999999976

    1. Initial program 91.3%

      \[x + \frac{y \cdot \left(z - t\right)}{a} \]
    2. Taylor expanded in x around inf 59.8%

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

    if -5.7999999999999997e-173 < t < 2.34999999999999999e-175

    1. Initial program 91.0%

      \[x + \frac{y \cdot \left(z - t\right)}{a} \]
    2. Taylor expanded in x around 0 60.5%

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{z}}} \]
    5. Simplified65.0%

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

    if 1.02000000000000005e-62 < t < 1.00000000000000004e-42

    1. Initial program 80.5%

      \[x + \frac{y \cdot \left(z - t\right)}{a} \]
    2. Taylor expanded in x around 0 80.5%

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{z}}} \]
    5. Simplified98.6%

      \[\leadsto \color{blue}{\frac{y}{\frac{a}{z}}} \]
    6. Step-by-step derivation
      1. clear-num98.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.6 \cdot 10^{+59}:\\ \;\;\;\;t \cdot \frac{-y}{a}\\ \mathbf{elif}\;t \leq -5.8 \cdot 10^{-173}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 2.35 \cdot 10^{-175}:\\ \;\;\;\;\frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 1.02 \cdot 10^{-62}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 10^{-42}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 0.285:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{-y}{a}\\ \end{array} \]

Alternative 6: 65.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.4 \cdot 10^{-78} \lor \neg \left(y \leq -4 \cdot 10^{-166} \lor \neg \left(y \leq -2.9 \cdot 10^{-216}\right) \land y \leq 1.7 \cdot 10^{+49}\right):\\
\;\;\;\;y \cdot \frac{z - t}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.39999999999999987e-78 or -4.00000000000000016e-166 < y < -2.9000000000000001e-216 or 1.7e49 < y

    1. Initial program 85.0%

      \[x + \frac{y \cdot \left(z - t\right)}{a} \]
    2. Taylor expanded in x around 0 73.5%

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

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

        \[\leadsto \color{blue}{\frac{z - t}{a} \cdot y} \]
    4. Applied egg-rr85.2%

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

    if -5.39999999999999987e-78 < y < -4.00000000000000016e-166 or -2.9000000000000001e-216 < y < 1.7e49

    1. Initial program 98.9%

      \[x + \frac{y \cdot \left(z - t\right)}{a} \]
    2. Taylor expanded in x around inf 62.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.4 \cdot 10^{-78} \lor \neg \left(y \leq -4 \cdot 10^{-166} \lor \neg \left(y \leq -2.9 \cdot 10^{-216}\right) \land y \leq 1.7 \cdot 10^{+49}\right):\\ \;\;\;\;y \cdot \frac{z - t}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 7: 76.2% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;t \leq 104 \lor \neg \left(t \leq 8 \cdot 10^{+75}\right) \land t \leq 1.1 \cdot 10^{+163}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\

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


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

    1. Initial program 90.8%

      \[x + \frac{y \cdot \left(z - t\right)}{a} \]
    2. Taylor expanded in x around 0 72.2%

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

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

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

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

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

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

    if -1.40000000000000006e75 < t < 104 or 7.99999999999999941e75 < t < 1.09999999999999993e163

    1. Initial program 91.1%

      \[x + \frac{y \cdot \left(z - t\right)}{a} \]
    2. Taylor expanded in z around inf 82.0%

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

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

        \[\leadsto \color{blue}{z \cdot \frac{y}{a}} \]
    4. Simplified87.1%

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

    if 104 < t < 7.99999999999999941e75 or 1.09999999999999993e163 < t

    1. Initial program 89.4%

      \[x + \frac{y \cdot \left(z - t\right)}{a} \]
    2. Taylor expanded in x around 0 72.1%

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

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

        \[\leadsto \color{blue}{\frac{z - t}{a} \cdot y} \]
    4. Applied egg-rr73.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.4 \cdot 10^{+75}:\\ \;\;\;\;t \cdot \frac{-y}{a}\\ \mathbf{elif}\;t \leq 104 \lor \neg \left(t \leq 8 \cdot 10^{+75}\right) \land t \leq 1.1 \cdot 10^{+163}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z - t}{a}\\ \end{array} \]

Alternative 8: 74.8% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;t \leq 104:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\

\mathbf{elif}\;t \leq 4.5 \cdot 10^{+76} \lor \neg \left(t \leq 4.3 \cdot 10^{+164}\right):\\
\;\;\;\;y \cdot \frac{z - t}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.04999999999999999e75

    1. Initial program 90.8%

      \[x + \frac{y \cdot \left(z - t\right)}{a} \]
    2. Taylor expanded in x around 0 72.2%

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

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

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

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

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

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

    if -1.04999999999999999e75 < t < 104

    1. Initial program 90.3%

      \[x + \frac{y \cdot \left(z - t\right)}{a} \]
    2. Taylor expanded in z around inf 82.6%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{z}}} \]
    4. Simplified89.6%

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

    if 104 < t < 4.4999999999999997e76 or 4.3e164 < t

    1. Initial program 89.4%

      \[x + \frac{y \cdot \left(z - t\right)}{a} \]
    2. Taylor expanded in x around 0 72.1%

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

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

        \[\leadsto \color{blue}{\frac{z - t}{a} \cdot y} \]
    4. Applied egg-rr73.7%

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

    if 4.4999999999999997e76 < t < 4.3e164

    1. Initial program 100.0%

      \[x + \frac{y \cdot \left(z - t\right)}{a} \]
    2. Taylor expanded in z around inf 75.3%

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

        \[\leadsto \color{blue}{\frac{y}{a} \cdot z} \]
      2. *-commutative35.1%

        \[\leadsto \color{blue}{z \cdot \frac{y}{a}} \]
    4. Simplified75.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.05 \cdot 10^{+75}:\\ \;\;\;\;t \cdot \frac{-y}{a}\\ \mathbf{elif}\;t \leq 104:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{+76} \lor \neg \left(t \leq 4.3 \cdot 10^{+164}\right):\\ \;\;\;\;y \cdot \frac{z - t}{a}\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \end{array} \]

Alternative 9: 84.3% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.3499999999999999e74 or 5.8e13 < t

    1. Initial program 91.7%

      \[x + \frac{y \cdot \left(z - t\right)}{a} \]
    2. Taylor expanded in z around 0 81.7%

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

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

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

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

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

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

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

    if -1.3499999999999999e74 < t < 5.8e13

    1. Initial program 89.8%

      \[x + \frac{y \cdot \left(z - t\right)}{a} \]
    2. Taylor expanded in z around inf 81.5%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{z}}} \]
    4. Simplified89.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.35 \cdot 10^{+74} \lor \neg \left(t \leq 58000000000000\right):\\ \;\;\;\;x - t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \end{array} \]

Alternative 10: 51.5% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.6 \cdot 10^{-28} \lor \neg \left(y \leq 2.15 \cdot 10^{+83}\right):\\
\;\;\;\;z \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.6e-28 or 2.15e83 < y

    1. Initial program 81.1%

      \[x + \frac{y \cdot \left(z - t\right)}{a} \]
    2. Taylor expanded in x around 0 74.2%

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

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

        \[\leadsto \color{blue}{\frac{y}{a} \cdot z} \]
      2. *-commutative56.1%

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

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

    if -2.6e-28 < y < 2.15e83

    1. Initial program 99.1%

      \[x + \frac{y \cdot \left(z - t\right)}{a} \]
    2. Taylor expanded in x around inf 55.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.6 \cdot 10^{-28} \lor \neg \left(y \leq 2.15 \cdot 10^{+83}\right):\\ \;\;\;\;z \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 11: 50.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{-27}:\\
\;\;\;\;y \cdot \frac{z}{a}\\

\mathbf{elif}\;y \leq 2.15 \cdot 10^{+91}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.69999999999999989e-27

    1. Initial program 78.4%

      \[x + \frac{y \cdot \left(z - t\right)}{a} \]
    2. Taylor expanded in x around 0 67.9%

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{z}}} \]
    5. Simplified61.0%

      \[\leadsto \color{blue}{\frac{y}{\frac{a}{z}}} \]
    6. Step-by-step derivation
      1. clear-num61.0%

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

        \[\leadsto \color{blue}{\frac{1}{\frac{a}{z}} \cdot y} \]
      3. clear-num61.1%

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

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

    if -2.69999999999999989e-27 < y < 2.15e91

    1. Initial program 99.1%

      \[x + \frac{y \cdot \left(z - t\right)}{a} \]
    2. Taylor expanded in x around inf 55.0%

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

    if 2.15e91 < y

    1. Initial program 84.9%

      \[x + \frac{y \cdot \left(z - t\right)}{a} \]
    2. Taylor expanded in x around 0 83.0%

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

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

        \[\leadsto \color{blue}{\frac{y}{a} \cdot z} \]
      2. *-commutative54.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.7 \cdot 10^{-27}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;y \leq 2.15 \cdot 10^{+91}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{y}{a}\\ \end{array} \]

Alternative 12: 50.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{-27}:\\
\;\;\;\;y \cdot \frac{z}{a}\\

\mathbf{elif}\;y \leq 3.4 \cdot 10^{+82}:\\
\;\;\;\;x\\

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


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

    1. Initial program 78.4%

      \[x + \frac{y \cdot \left(z - t\right)}{a} \]
    2. Taylor expanded in x around 0 67.9%

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{z}}} \]
    5. Simplified61.0%

      \[\leadsto \color{blue}{\frac{y}{\frac{a}{z}}} \]
    6. Step-by-step derivation
      1. clear-num61.0%

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

        \[\leadsto \color{blue}{\frac{1}{\frac{a}{z}} \cdot y} \]
      3. clear-num61.1%

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

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

    if -1e-27 < y < 3.39999999999999994e82

    1. Initial program 99.1%

      \[x + \frac{y \cdot \left(z - t\right)}{a} \]
    2. Taylor expanded in x around inf 55.0%

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

    if 3.39999999999999994e82 < y

    1. Initial program 84.9%

      \[x + \frac{y \cdot \left(z - t\right)}{a} \]
    2. Taylor expanded in x around 0 83.0%

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

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

        \[\leadsto \color{blue}{\frac{y}{a} \cdot z} \]
      2. *-commutative54.8%

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

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

        \[\leadsto z \cdot \color{blue}{\frac{1}{\frac{a}{y}}} \]
      2. un-div-inv54.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1 \cdot 10^{-27}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{+82}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{\frac{a}{y}}\\ \end{array} \]

Alternative 13: 40.6% 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 90.7%

    \[x + \frac{y \cdot \left(z - t\right)}{a} \]
  2. Taylor expanded in x around inf 34.7%

    \[\leadsto \color{blue}{x} \]
  3. Final simplification34.7%

    \[\leadsto x \]

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 2023310 
(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)))