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

Percentage Accurate: 85.1% → 99.3%
Time: 14.1s
Alternatives: 18
Speedup: 0.3×

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 18 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.1% 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.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 10^{+222}\right):\\ \;\;\;\;x + \frac{z - t}{\frac{z - a}{y}}\\ \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 1e+222)))
     (+ x (/ (- z t) (/ (- z a) y)))
     (+ 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 <= 1e+222)) {
		tmp = x + ((z - t) / ((z - a) / y));
	} 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 <= 1e+222)) {
		tmp = x + ((z - t) / ((z - a) / y));
	} 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 <= 1e+222):
		tmp = x + ((z - t) / ((z - a) / y))
	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 <= 1e+222))
		tmp = Float64(x + Float64(Float64(z - t) / Float64(Float64(z - a) / y)));
	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 <= 1e+222)))
		tmp = x + ((z - t) / ((z - a) / y));
	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, 1e+222]], $MachinePrecision]], N[(x + N[(N[(z - t), $MachinePrecision] / N[(N[(z - a), $MachinePrecision] / y), $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 10^{+222}\right):\\
\;\;\;\;x + \frac{z - t}{\frac{z - a}{y}}\\

\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 1e222 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a))

    1. Initial program 41.3%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z - t}{\frac{z - a}{y}}} \]
      2. add-cube-cbrt98.9%

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 1e222

    1. Initial program 99.5%

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

    \[\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 10^{+222}\right):\\ \;\;\;\;x + \frac{z - t}{\frac{z - a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot \left(z - t\right)}{z - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 98.3% 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.6%

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

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

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

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

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

Alternative 3: 92.2% 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 10^{+222}\right):\\ \;\;\;\;x + y \cdot \frac{z - t}{z}\\ \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 1e+222)))
     (+ x (* y (/ (- z t) z)))
     (+ 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 <= 1e+222)) {
		tmp = x + (y * ((z - t) / z));
	} 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 <= 1e+222)) {
		tmp = x + (y * ((z - t) / z));
	} 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 <= 1e+222):
		tmp = x + (y * ((z - t) / z))
	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 <= 1e+222))
		tmp = Float64(x + Float64(y * Float64(Float64(z - t) / z)));
	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 <= 1e+222)))
		tmp = x + (y * ((z - t) / z));
	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, 1e+222]], $MachinePrecision]], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / z), $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 10^{+222}\right):\\
\;\;\;\;x + y \cdot \frac{z - t}{z}\\

\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 1e222 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a))

    1. Initial program 41.3%

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

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

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

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

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

    if -inf.0 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 1e222

    1. Initial program 99.5%

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

    \[\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 10^{+222}\right):\\ \;\;\;\;x + y \cdot \frac{z - t}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot \left(z - t\right)}{z - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 61.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z - t}{z}\\ \mathbf{if}\;y \leq -1.65 \cdot 10^{+127}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 1.55 \cdot 10^{+171}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;y \leq 5.1 \cdot 10^{+230}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;y \leq 1.22 \cdot 10^{+288}:\\ \;\;\;\;y \cdot \frac{z}{z - a}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- z t) z))))
   (if (<= y -1.65e+127)
     t_1
     (if (<= y 1.55e+171)
       (+ y x)
       (if (<= y 5.1e+230)
         (* y (/ t a))
         (if (<= y 1.22e+288) (* y (/ z (- z a))) t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((z - t) / z);
	double tmp;
	if (y <= -1.65e+127) {
		tmp = t_1;
	} else if (y <= 1.55e+171) {
		tmp = y + x;
	} else if (y <= 5.1e+230) {
		tmp = y * (t / a);
	} else if (y <= 1.22e+288) {
		tmp = y * (z / (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 = y * ((z - t) / z)
    if (y <= (-1.65d+127)) then
        tmp = t_1
    else if (y <= 1.55d+171) then
        tmp = y + x
    else if (y <= 5.1d+230) then
        tmp = y * (t / a)
    else if (y <= 1.22d+288) then
        tmp = y * (z / (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 = y * ((z - t) / z);
	double tmp;
	if (y <= -1.65e+127) {
		tmp = t_1;
	} else if (y <= 1.55e+171) {
		tmp = y + x;
	} else if (y <= 5.1e+230) {
		tmp = y * (t / a);
	} else if (y <= 1.22e+288) {
		tmp = y * (z / (z - a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((z - t) / z)
	tmp = 0
	if y <= -1.65e+127:
		tmp = t_1
	elif y <= 1.55e+171:
		tmp = y + x
	elif y <= 5.1e+230:
		tmp = y * (t / a)
	elif y <= 1.22e+288:
		tmp = y * (z / (z - a))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(z - t) / z))
	tmp = 0.0
	if (y <= -1.65e+127)
		tmp = t_1;
	elseif (y <= 1.55e+171)
		tmp = Float64(y + x);
	elseif (y <= 5.1e+230)
		tmp = Float64(y * Float64(t / a));
	elseif (y <= 1.22e+288)
		tmp = Float64(y * Float64(z / Float64(z - a)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((z - t) / z);
	tmp = 0.0;
	if (y <= -1.65e+127)
		tmp = t_1;
	elseif (y <= 1.55e+171)
		tmp = y + x;
	elseif (y <= 5.1e+230)
		tmp = y * (t / a);
	elseif (y <= 1.22e+288)
		tmp = y * (z / (z - a));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.65e+127], t$95$1, If[LessEqual[y, 1.55e+171], N[(y + x), $MachinePrecision], If[LessEqual[y, 5.1e+230], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.22e+288], N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \frac{z - t}{z}\\
\mathbf{if}\;y \leq -1.65 \cdot 10^{+127}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 1.55 \cdot 10^{+171}:\\
\;\;\;\;y + x\\

\mathbf{elif}\;y \leq 5.1 \cdot 10^{+230}:\\
\;\;\;\;y \cdot \frac{t}{a}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.64999999999999988e127 or 1.22000000000000011e288 < y

    1. Initial program 64.4%

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

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

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

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

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

    if -1.64999999999999988e127 < y < 1.5499999999999999e171

    1. Initial program 96.3%

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

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified73.6%

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

    if 1.5499999999999999e171 < y < 5.1e230

    1. Initial program 72.9%

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

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

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

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

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

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

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

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

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

    if 5.1e230 < y < 1.22000000000000011e288

    1. Initial program 53.5%

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

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

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

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

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

Alternative 5: 59.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z}{z - a}\\ \mathbf{if}\;y \leq -1.4 \cdot 10^{+168}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -6.2 \cdot 10^{+124}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;y \leq 1.55 \cdot 10^{+171}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;y \leq 9.2 \cdot 10^{+230}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ z (- z a)))))
   (if (<= y -1.4e+168)
     t_1
     (if (<= y -6.2e+124)
       (* t (/ y a))
       (if (<= y 1.55e+171) (+ y x) (if (<= y 9.2e+230) (* y (/ t a)) t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (z / (z - a));
	double tmp;
	if (y <= -1.4e+168) {
		tmp = t_1;
	} else if (y <= -6.2e+124) {
		tmp = t * (y / a);
	} else if (y <= 1.55e+171) {
		tmp = y + x;
	} else if (y <= 9.2e+230) {
		tmp = y * (t / 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 = y * (z / (z - a))
    if (y <= (-1.4d+168)) then
        tmp = t_1
    else if (y <= (-6.2d+124)) then
        tmp = t * (y / a)
    else if (y <= 1.55d+171) then
        tmp = y + x
    else if (y <= 9.2d+230) then
        tmp = y * (t / 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 = y * (z / (z - a));
	double tmp;
	if (y <= -1.4e+168) {
		tmp = t_1;
	} else if (y <= -6.2e+124) {
		tmp = t * (y / a);
	} else if (y <= 1.55e+171) {
		tmp = y + x;
	} else if (y <= 9.2e+230) {
		tmp = y * (t / a);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * (z / (z - a))
	tmp = 0
	if y <= -1.4e+168:
		tmp = t_1
	elif y <= -6.2e+124:
		tmp = t * (y / a)
	elif y <= 1.55e+171:
		tmp = y + x
	elif y <= 9.2e+230:
		tmp = y * (t / a)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(z / Float64(z - a)))
	tmp = 0.0
	if (y <= -1.4e+168)
		tmp = t_1;
	elseif (y <= -6.2e+124)
		tmp = Float64(t * Float64(y / a));
	elseif (y <= 1.55e+171)
		tmp = Float64(y + x);
	elseif (y <= 9.2e+230)
		tmp = Float64(y * Float64(t / a));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * (z / (z - a));
	tmp = 0.0;
	if (y <= -1.4e+168)
		tmp = t_1;
	elseif (y <= -6.2e+124)
		tmp = t * (y / a);
	elseif (y <= 1.55e+171)
		tmp = y + x;
	elseif (y <= 9.2e+230)
		tmp = y * (t / a);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.4e+168], t$95$1, If[LessEqual[y, -6.2e+124], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.55e+171], N[(y + x), $MachinePrecision], If[LessEqual[y, 9.2e+230], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -6.2 \cdot 10^{+124}:\\
\;\;\;\;t \cdot \frac{y}{a}\\

\mathbf{elif}\;y \leq 1.55 \cdot 10^{+171}:\\
\;\;\;\;y + x\\

\mathbf{elif}\;y \leq 9.2 \cdot 10^{+230}:\\
\;\;\;\;y \cdot \frac{t}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.39999999999999995e168 or 9.1999999999999993e230 < y

    1. Initial program 60.2%

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

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

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

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

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

    if -1.39999999999999995e168 < y < -6.2000000000000004e124

    1. Initial program 70.7%

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

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

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

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

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

    if -6.2000000000000004e124 < y < 1.5499999999999999e171

    1. Initial program 96.3%

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

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified73.6%

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

    if 1.5499999999999999e171 < y < 9.1999999999999993e230

    1. Initial program 72.9%

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

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

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

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

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

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

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

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

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

Alternative 6: 59.5% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq -1.8 \cdot 10^{-288} \lor \neg \left(a \leq 3.5 \cdot 10^{-245}\right):\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -5.50000000000000022e242

    1. Initial program 86.5%

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

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

    if -5.50000000000000022e242 < a < -1.8000000000000001e-288 or 3.50000000000000016e-245 < a

    1. Initial program 86.5%

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

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified64.2%

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

    if -1.8000000000000001e-288 < a < 3.50000000000000016e-245

    1. Initial program 87.4%

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

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

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

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

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

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

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

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

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

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

Alternative 7: 59.7% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq -1.18 \cdot 10^{-296} \lor \neg \left(a \leq 2.8 \cdot 10^{-241}\right):\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.7e242

    1. Initial program 86.5%

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

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

    if -3.7e242 < a < -1.18e-296 or 2.7999999999999999e-241 < a

    1. Initial program 86.8%

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

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

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

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

    if -1.18e-296 < a < 2.7999999999999999e-241

    1. Initial program 82.8%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot y}{z}} \]
    6. Step-by-step derivation
      1. mul-1-neg68.0%

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

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

        \[\leadsto \color{blue}{t \cdot \left(-\frac{y}{z}\right)} \]
      4. mul-1-neg68.0%

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

        \[\leadsto t \cdot \color{blue}{\frac{-1 \cdot y}{z}} \]
      6. neg-mul-168.0%

        \[\leadsto t \cdot \frac{\color{blue}{-y}}{z} \]
    7. Simplified68.0%

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

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

Alternative 8: 82.3% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.20000000000000007e26 or 82 < a

    1. Initial program 86.0%

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

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

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

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

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

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

    if -2.20000000000000007e26 < a < 82

    1. Initial program 87.1%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}}} + x \]
    7. Applied egg-rr85.0%

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

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

Alternative 9: 82.1% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.24999999999999995e27

    1. Initial program 86.3%

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

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

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

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

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

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

    if -1.24999999999999995e27 < a < 0.28000000000000003

    1. Initial program 87.1%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}}} + x \]
    7. Applied egg-rr85.0%

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

    if 0.28000000000000003 < a

    1. Initial program 85.7%

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

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

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

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

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

        \[\leadsto x + \frac{1}{\color{blue}{\frac{\frac{z - a}{y}}{z - t}}} \]
    6. Simplified97.4%

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

        \[\leadsto x + \color{blue}{\frac{z - t}{\frac{z - a}{y}}} \]
      2. add-cube-cbrt96.9%

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

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

        \[\leadsto x + \color{blue}{{\left(\sqrt[3]{z - t}\right)}^{2}} \cdot \frac{\sqrt[3]{z - t}}{\frac{z - a}{y}} \]
    8. Applied egg-rr96.9%

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{z - t}{\frac{z - a}{y}}} \]
    11. Taylor expanded in z around 0 88.0%

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

        \[\leadsto x + \frac{z - t}{\color{blue}{-\frac{a}{y}}} \]
      2. distribute-neg-frac88.0%

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

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

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

Alternative 10: 79.3% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -5.80000000000000049e33

    1. Initial program 86.3%

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{z - a}{y}}{z - t}}} \]
    7. Taylor expanded in z around 0 72.6%

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

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

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

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

    if -5.80000000000000049e33 < a < 0.062

    1. Initial program 87.1%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}}} + x \]
    7. Applied egg-rr85.0%

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

    if 0.062 < a

    1. Initial program 85.7%

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

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

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

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

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

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

Alternative 11: 79.2% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.55000000000000018e30

    1. Initial program 86.3%

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{z - a}{y}}{z - t}}} \]
    7. Taylor expanded in z around 0 72.6%

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

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

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

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

    if -2.55000000000000018e30 < a < 29

    1. Initial program 87.1%

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

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

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

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

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

    if 29 < a

    1. Initial program 85.7%

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

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

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

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

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

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

Alternative 12: 75.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{-94} \lor \neg \left(z \leq 6.5 \cdot 10^{+80}\right):\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.5000000000000003e-94 or 6.4999999999999998e80 < z

    1. Initial program 78.7%

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

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

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

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

    if -7.5000000000000003e-94 < z < 6.4999999999999998e80

    1. Initial program 94.6%

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

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

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

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

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

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

Alternative 13: 75.1% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{-94} \lor \neg \left(z \leq 7.5 \cdot 10^{+80}\right):\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.5000000000000003e-94 or 7.49999999999999994e80 < z

    1. Initial program 78.7%

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

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

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

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

    if -7.5000000000000003e-94 < z < 7.49999999999999994e80

    1. Initial program 94.6%

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{z - a}{y}}{z - t}}} \]
    7. Taylor expanded in z around 0 72.3%

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{t}{a}} \]
    9. Simplified75.1%

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

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

Alternative 14: 59.9% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.6 \cdot 10^{+266} \lor \neg \left(t \leq -6.6 \cdot 10^{+209}\right):\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.60000000000000011e266 or -6.59999999999999961e209 < t

    1. Initial program 86.2%

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

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

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

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

    if -1.60000000000000011e266 < t < -6.59999999999999961e209

    1. Initial program 93.1%

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

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

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

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

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

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

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

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

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

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

Alternative 15: 59.9% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.55 \cdot 10^{+265} \lor \neg \left(t \leq -3.7 \cdot 10^{+209}\right):\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.55000000000000011e265 or -3.7e209 < t

    1. Initial program 86.2%

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

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

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

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

    if -2.55000000000000011e265 < t < -3.7e209

    1. Initial program 93.1%

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

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

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

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

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

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

Alternative 16: 53.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.8 \cdot 10^{-113}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 2.7 \cdot 10^{-167}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= x -1.8e-113) x (if (<= x 2.7e-167) y x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (x <= -1.8e-113) {
		tmp = x;
	} else if (x <= 2.7e-167) {
		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 <= (-1.8d-113)) then
        tmp = x
    else if (x <= 2.7d-167) 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 <= -1.8e-113) {
		tmp = x;
	} else if (x <= 2.7e-167) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if x <= -1.8e-113:
		tmp = x
	elif x <= 2.7e-167:
		tmp = y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (x <= -1.8e-113)
		tmp = x;
	elseif (x <= 2.7e-167)
		tmp = y;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (x <= -1.8e-113)
		tmp = x;
	elseif (x <= 2.7e-167)
		tmp = y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.8e-113], x, If[LessEqual[x, 2.7e-167], y, x]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq 2.7 \cdot 10^{-167}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.79999999999999987e-113 or 2.7000000000000001e-167 < x

    1. Initial program 86.5%

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

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

    if -1.79999999999999987e-113 < x < 2.7000000000000001e-167

    1. Initial program 86.6%

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

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

      \[\leadsto \color{blue}{y} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 17: 60.0% accurate, 3.7× speedup?

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

\\
y + x
\end{array}
Derivation
  1. Initial program 86.6%

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

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

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

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

Alternative 18: 50.5% 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.6%

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

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

Developer target: 98.5% 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 2024110 
(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))))