Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A

Percentage Accurate: 85.2% → 99.4%
Time: 11.8s
Alternatives: 20
Speedup: 0.6×

Specification

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

\\
x + \frac{y \cdot \left(z - t\right)}{z - 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 20 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: 85.2% accurate, 1.0× speedup?

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

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

Alternative 1: 99.4% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y \cdot \left(z - t\right)}{z - a}\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;x + \left(z - t\right) \cdot \frac{y}{z - a}\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+251}:\\ \;\;\;\;x + t\_1\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(\frac{z - t}{z - a} + \frac{x}{y}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (* y (- z t)) (- z a))))
   (if (<= t_1 (- INFINITY))
     (+ x (* (- z t) (/ y (- z a))))
     (if (<= t_1 5e+251) (+ x t_1) (* y (+ (/ (- z t) (- z a)) (/ x y)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y * (z - t)) / (z - a);
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = x + ((z - t) * (y / (z - a)));
	} else if (t_1 <= 5e+251) {
		tmp = x + t_1;
	} else {
		tmp = y * (((z - t) / (z - a)) + (x / y));
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (y * (z - t)) / (z - a);
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = x + ((z - t) * (y / (z - a)));
	} else if (t_1 <= 5e+251) {
		tmp = x + t_1;
	} else {
		tmp = y * (((z - t) / (z - a)) + (x / y));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (y * (z - t)) / (z - a)
	tmp = 0
	if t_1 <= -math.inf:
		tmp = x + ((z - t) * (y / (z - a)))
	elif t_1 <= 5e+251:
		tmp = x + t_1
	else:
		tmp = y * (((z - t) / (z - a)) + (x / y))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(y * Float64(z - t)) / Float64(z - a))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(x + Float64(Float64(z - t) * Float64(y / Float64(z - a))));
	elseif (t_1 <= 5e+251)
		tmp = Float64(x + t_1);
	else
		tmp = Float64(y * Float64(Float64(Float64(z - t) / Float64(z - a)) + Float64(x / y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (y * (z - t)) / (z - a);
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = x + ((z - t) * (y / (z - a)));
	elseif (t_1 <= 5e+251)
		tmp = x + t_1;
	else
		tmp = y * (((z - t) / (z - a)) + (x / y));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+251], N[(x + t$95$1), $MachinePrecision], N[(y * N[(N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] + N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+251}:\\
\;\;\;\;x + t\_1\\

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


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

    1. Initial program 38.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 5.0000000000000005e251

    1. Initial program 99.9%

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

    if 5.0000000000000005e251 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a))

    1. Initial program 65.0%

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

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

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

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

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

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

Alternative 2: 98.0% accurate, 0.1× speedup?

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

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

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

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

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

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

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

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

Alternative 3: 95.3% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 55.2%

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

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

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

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

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

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

    if -inf.0 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 2e173

    1. Initial program 99.9%

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

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

Alternative 4: 98.9% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 55.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 2e173

    1. Initial program 99.9%

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

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

Alternative 5: 83.4% accurate, 0.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -2.00000000000000003e141 or 3.99999999999999999e98 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a))

    1. Initial program 65.3%

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

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

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

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

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

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

    if -2.00000000000000003e141 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 3.99999999999999999e98

    1. Initial program 99.9%

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

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

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

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

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

Alternative 6: 79.4% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{if}\;z \leq -3.2 \cdot 10^{-30}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-142}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-47}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{z - a}\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{+53} \lor \neg \left(z \leq 2.4 \cdot 10^{+155}\right):\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* y (- 1.0 (/ t z))))))
   (if (<= z -3.2e-30)
     t_1
     (if (<= z 2.6e-142)
       (+ x (/ (* y t) a))
       (if (<= z 2.9e-47)
         (* (- z t) (/ y (- z a)))
         (if (or (<= z 2.5e+53) (not (<= z 2.4e+155)))
           t_1
           (+ x (* y (/ z (- z a))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * (1.0 - (t / z)));
	double tmp;
	if (z <= -3.2e-30) {
		tmp = t_1;
	} else if (z <= 2.6e-142) {
		tmp = x + ((y * t) / a);
	} else if (z <= 2.9e-47) {
		tmp = (z - t) * (y / (z - a));
	} else if ((z <= 2.5e+53) || !(z <= 2.4e+155)) {
		tmp = t_1;
	} else {
		tmp = x + (y * (z / (z - a)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x + (y * (1.0d0 - (t / z)))
    if (z <= (-3.2d-30)) then
        tmp = t_1
    else if (z <= 2.6d-142) then
        tmp = x + ((y * t) / a)
    else if (z <= 2.9d-47) then
        tmp = (z - t) * (y / (z - a))
    else if ((z <= 2.5d+53) .or. (.not. (z <= 2.4d+155))) then
        tmp = t_1
    else
        tmp = x + (y * (z / (z - a)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * (1.0 - (t / z)));
	double tmp;
	if (z <= -3.2e-30) {
		tmp = t_1;
	} else if (z <= 2.6e-142) {
		tmp = x + ((y * t) / a);
	} else if (z <= 2.9e-47) {
		tmp = (z - t) * (y / (z - a));
	} else if ((z <= 2.5e+53) || !(z <= 2.4e+155)) {
		tmp = t_1;
	} else {
		tmp = x + (y * (z / (z - a)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (y * (1.0 - (t / z)))
	tmp = 0
	if z <= -3.2e-30:
		tmp = t_1
	elif z <= 2.6e-142:
		tmp = x + ((y * t) / a)
	elif z <= 2.9e-47:
		tmp = (z - t) * (y / (z - a))
	elif (z <= 2.5e+53) or not (z <= 2.4e+155):
		tmp = t_1
	else:
		tmp = x + (y * (z / (z - a)))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(y * Float64(1.0 - Float64(t / z))))
	tmp = 0.0
	if (z <= -3.2e-30)
		tmp = t_1;
	elseif (z <= 2.6e-142)
		tmp = Float64(x + Float64(Float64(y * t) / a));
	elseif (z <= 2.9e-47)
		tmp = Float64(Float64(z - t) * Float64(y / Float64(z - a)));
	elseif ((z <= 2.5e+53) || !(z <= 2.4e+155))
		tmp = t_1;
	else
		tmp = Float64(x + Float64(y * Float64(z / Float64(z - a))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (y * (1.0 - (t / z)));
	tmp = 0.0;
	if (z <= -3.2e-30)
		tmp = t_1;
	elseif (z <= 2.6e-142)
		tmp = x + ((y * t) / a);
	elseif (z <= 2.9e-47)
		tmp = (z - t) * (y / (z - a));
	elseif ((z <= 2.5e+53) || ~((z <= 2.4e+155)))
		tmp = t_1;
	else
		tmp = x + (y * (z / (z - a)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.2e-30], t$95$1, If[LessEqual[z, 2.6e-142], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.9e-47], N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 2.5e+53], N[Not[LessEqual[z, 2.4e+155]], $MachinePrecision]], t$95$1, N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;z \leq 2.5 \cdot 10^{+53} \lor \neg \left(z \leq 2.4 \cdot 10^{+155}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.2e-30 or 2.9e-47 < z < 2.5000000000000002e53 or 2.40000000000000021e155 < z

    1. Initial program 77.9%

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{z}} \]
      2. div-sub39.8%

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

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

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

    if -3.2e-30 < z < 2.6e-142

    1. Initial program 98.8%

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

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

    if 2.6e-142 < z < 2.9e-47

    1. Initial program 85.2%

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

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

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

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

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

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

    if 2.5000000000000002e53 < z < 2.40000000000000021e155

    1. Initial program 77.5%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{-30}:\\ \;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-142}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-47}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{z - a}\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{+53} \lor \neg \left(z \leq 2.4 \cdot 10^{+155}\right):\\ \;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 79.4% accurate, 0.3× speedup?

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

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

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

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

\mathbf{elif}\;z \leq 2.9 \cdot 10^{+53} \lor \neg \left(z \leq 2.9 \cdot 10^{+164}\right):\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -2.7999999999999999e-32

    1. Initial program 78.3%

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{z}} + x \]
    5. Simplified86.0%

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

    if -2.7999999999999999e-32 < z < 3.7000000000000003e-144

    1. Initial program 98.8%

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

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

    if 3.7000000000000003e-144 < z < 1.9600000000000001e-47

    1. Initial program 85.2%

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

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

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

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

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

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

    if 1.9600000000000001e-47 < z < 2.9000000000000002e53 or 2.8999999999999999e164 < z

    1. Initial program 77.2%

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{z}} \]
      2. div-sub39.2%

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

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

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

    if 2.9000000000000002e53 < z < 2.8999999999999999e164

    1. Initial program 77.5%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{-32}:\\ \;\;\;\;x + y \cdot \frac{z - t}{z}\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{-144}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 1.96 \cdot 10^{-47}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{z - a}\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{+53} \lor \neg \left(z \leq 2.9 \cdot 10^{+164}\right):\\ \;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 73.6% accurate, 0.3× speedup?

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

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

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

\mathbf{elif}\;z \leq 6.6 \cdot 10^{-47}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 7 \cdot 10^{+44}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\

\mathbf{elif}\;z \leq 5 \cdot 10^{+87}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.75e18 or 4.9999999999999998e87 < z

    1. Initial program 72.0%

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

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative84.1%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified84.1%

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

    if -1.75e18 < z < 1.3e-145

    1. Initial program 97.4%

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

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

    if 1.3e-145 < z < 6.60000000000000007e-47 or 6.9999999999999998e44 < z < 4.9999999999999998e87

    1. Initial program 89.1%

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

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

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

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

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

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

    if 6.60000000000000007e-47 < z < 6.9999999999999998e44

    1. Initial program 94.8%

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \frac{z - t}{z} + x} \]
    6. Taylor expanded in z around 0 84.0%

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

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

        \[\leadsto \frac{\color{blue}{-t \cdot y}}{z} + x \]
      3. distribute-rgt-neg-in84.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.75 \cdot 10^{+18}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-145}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 6.6 \cdot 10^{-47}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{z - a}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+44}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{+87}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{z - a}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 74.9% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{+18}:\\
\;\;\;\;y + x\\

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

\mathbf{elif}\;z \leq 3.2 \cdot 10^{+53}:\\
\;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.7e18 or 1.0500000000000001e72 < z

    1. Initial program 72.0%

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

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative84.1%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified84.1%

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

    if -1.7e18 < z < 3.8e12

    1. Initial program 96.0%

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

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

    if 3.8e12 < z < 3.2e53

    1. Initial program 86.7%

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{z}} \]
      2. div-sub86.7%

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

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

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

    if 3.2e53 < z < 1.0500000000000001e72

    1. Initial program 100.0%

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

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

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

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

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

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

Alternative 10: 75.7% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.02 \cdot 10^{+18}:\\
\;\;\;\;y + x\\

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

\mathbf{elif}\;z \leq 3.2 \cdot 10^{+53}:\\
\;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.02e18 or 1.0500000000000001e72 < z

    1. Initial program 72.0%

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

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative84.1%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified84.1%

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

    if -1.02e18 < z < 7.5e12

    1. Initial program 96.0%

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} + x \]
    5. Simplified78.8%

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

    if 7.5e12 < z < 3.2e53

    1. Initial program 86.7%

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{z}} \]
      2. div-sub86.7%

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

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

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

    if 3.2e53 < z < 1.0500000000000001e72

    1. Initial program 100.0%

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

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

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

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

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

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

Alternative 11: 75.8% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{+17}:\\
\;\;\;\;y + x\\

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

\mathbf{elif}\;z \leq 3.2 \cdot 10^{+53}:\\
\;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -9.5e17 or 1.0500000000000001e72 < z

    1. Initial program 72.0%

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

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative84.1%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified84.1%

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

    if -9.5e17 < z < 5.5e12

    1. Initial program 96.0%

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} + x \]
    5. Simplified78.8%

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

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

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

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

    if 5.5e12 < z < 3.2e53

    1. Initial program 86.7%

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{z}} \]
      2. div-sub86.7%

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

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

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

    if 3.2e53 < z < 1.0500000000000001e72

    1. Initial program 100.0%

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

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

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

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

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

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

Alternative 12: 76.0% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{+17}:\\
\;\;\;\;y + x\\

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

\mathbf{elif}\;z \leq 1.9 \cdot 10^{+53}:\\
\;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\

\mathbf{elif}\;z \leq 5.5 \cdot 10^{+83}:\\
\;\;\;\;x - y \cdot \frac{z}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -9.5e17 or 5.4999999999999996e83 < z

    1. Initial program 72.0%

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

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative84.1%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified84.1%

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

    if -9.5e17 < z < 7.5e12

    1. Initial program 96.0%

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} + x \]
    5. Simplified78.8%

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

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

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

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

    if 7.5e12 < z < 1.89999999999999999e53

    1. Initial program 86.7%

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{z}} \]
      2. div-sub86.7%

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

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

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

    if 1.89999999999999999e53 < z < 5.4999999999999996e83

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{y \cdot \frac{z}{a}} \]
    12. Simplified85.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.5 \cdot 10^{+17}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq 7500000000000:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{+53}:\\ \;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{+83}:\\ \;\;\;\;x - y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 57.8% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;z \leq 10^{-211}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 4.2 \cdot 10^{-143}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 5.4 \cdot 10^{-46}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.04999999999999992e-81 or 5.4e-46 < z

    1. Initial program 79.6%

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

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative72.4%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified72.4%

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

    if -2.04999999999999992e-81 < z < 1.00000000000000009e-211 or 4.2000000000000002e-143 < z < 5.4e-46

    1. Initial program 96.6%

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    6. Simplified52.6%

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

    if 1.00000000000000009e-211 < z < 4.2000000000000002e-143

    1. Initial program 99.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.05 \cdot 10^{-81}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq 10^{-211}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{-143}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{-46}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 57.6% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{-81}:\\
\;\;\;\;y + x\\

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

\mathbf{elif}\;z \leq 2.95 \cdot 10^{-145}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -6.19999999999999976e-81 or 2.7e-46 < z

    1. Initial program 79.6%

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

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative72.4%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified72.4%

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

    if -6.19999999999999976e-81 < z < 2.2e-208

    1. Initial program 99.8%

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

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

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

    if 2.2e-208 < z < 2.9499999999999999e-145

    1. Initial program 99.9%

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

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

    if 2.9499999999999999e-145 < z < 2.7e-46

    1. Initial program 85.2%

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    6. Simplified48.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.2 \cdot 10^{-81}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{-208}:\\ \;\;\;\;\frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 2.95 \cdot 10^{-145}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{-46}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 79.3% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.2999999999999999e-32 or 1.14000000000000009e-46 < z

    1. Initial program 77.8%

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{z}} \]
      2. div-sub39.5%

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

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

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

    if -1.2999999999999999e-32 < z < 2.05e-142

    1. Initial program 98.8%

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

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

    if 2.05e-142 < z < 1.14000000000000009e-46

    1. Initial program 85.2%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{-32}:\\ \;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{-142}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 1.14 \cdot 10^{-46}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{z - a}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 77.1% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.85 \cdot 10^{+18}:\\
\;\;\;\;y + x\\

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

\mathbf{elif}\;z \leq 8.5 \cdot 10^{+86}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.85e18 or 8.5000000000000005e86 < z

    1. Initial program 72.0%

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

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative84.1%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified84.1%

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

    if -1.85e18 < z < 1.15e-32

    1. Initial program 95.7%

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

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

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

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

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

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

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

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

    if 1.15e-32 < z < 8.5000000000000005e86

    1. Initial program 95.3%

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

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(z - t\right)}{z}} \]
    4. Step-by-step derivation
      1. +-commutative75.7%

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

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{z}} + x \]
    5. Simplified80.2%

      \[\leadsto \color{blue}{y \cdot \frac{z - t}{z} + x} \]
    6. Taylor expanded in z around 0 71.1%

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

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

        \[\leadsto \frac{\color{blue}{-t \cdot y}}{z} + x \]
      3. distribute-rgt-neg-in71.1%

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

        \[\leadsto \color{blue}{t \cdot \frac{-y}{z}} + x \]
    8. Simplified75.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.85 \cdot 10^{+18}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{-32}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+86}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 87.7% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 76.3%

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

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(z - t\right)}{z}} \]
    4. Step-by-step derivation
      1. +-commutative70.1%

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

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

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

    if -1.2e18 < z < 2.1e41

    1. Initial program 95.4%

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

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

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

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

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

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

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

    if 2.1e41 < z

    1. Initial program 71.4%

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

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

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

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

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

Alternative 18: 63.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{+18} \lor \neg \left(z \leq 2.05 \cdot 10^{-53}\right):\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.1e18 or 2.05e-53 < z

    1. Initial program 76.8%

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

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative75.7%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified75.7%

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

    if -1.1e18 < z < 2.05e-53

    1. Initial program 96.2%

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

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

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

Alternative 19: 53.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.3 \cdot 10^{-182}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 5.4 \cdot 10^{-149}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= x -2.3e-182) x (if (<= x 5.4e-149) y x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (x <= -2.3e-182) {
		tmp = x;
	} else if (x <= 5.4e-149) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (x <= (-2.3d-182)) then
        tmp = x
    else if (x <= 5.4d-149) then
        tmp = y
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (x <= -2.3e-182) {
		tmp = x;
	} else if (x <= 5.4e-149) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if x <= -2.3e-182:
		tmp = x
	elif x <= 5.4e-149:
		tmp = y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (x <= -2.3e-182)
		tmp = x;
	elseif (x <= 5.4e-149)
		tmp = y;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (x <= -2.3e-182)
		tmp = x;
	elseif (x <= 5.4e-149)
		tmp = y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -2.3e-182], x, If[LessEqual[x, 5.4e-149], y, x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.3 \cdot 10^{-182}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 5.4 \cdot 10^{-149}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.2999999999999999e-182 or 5.40000000000000028e-149 < x

    1. Initial program 85.1%

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

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

    if -2.2999999999999999e-182 < x < 5.40000000000000028e-149

    1. Initial program 89.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.3 \cdot 10^{-182}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 5.4 \cdot 10^{-149}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 51.0% accurate, 11.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 86.2%

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

    \[\leadsto \color{blue}{x} \]
  4. Final simplification47.2%

    \[\leadsto x \]
  5. Add Preprocessing

Developer target: 98.0% accurate, 1.0× speedup?

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

\\
x + \frac{y}{\frac{z - a}{z - t}}
\end{array}

Reproduce

?
herbie shell --seed 2024071 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A"
  :precision binary64

  :alt
  (+ x (/ y (/ (- z a) (- z t))))

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