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

Percentage Accurate: 98.3% → 98.3%
Time: 15.0s
Alternatives: 19
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ x + y \cdot \frac{z - t}{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(y * Float64(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[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + y \cdot \frac{z - t}{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 19 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: 98.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + y \cdot \frac{z - t}{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(y * Float64(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[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 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 97.3%

    \[x + y \cdot \frac{z - t}{z - a} \]
  2. Step-by-step derivation
    1. +-commutative97.3%

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

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

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

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

Alternative 2: 61.8% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5 \cdot 10^{-19}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq -1.9 \cdot 10^{-253}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{-273}:\\ \;\;\;\;\frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{-153}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.02 \cdot 10^{-133}:\\ \;\;\;\;y \cdot \frac{t}{-z}\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{-118}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -5e-19)
   (+ y x)
   (if (<= z -1.9e-253)
     x
     (if (<= z 1.55e-273)
       (/ (* y t) a)
       (if (<= z 1.12e-153)
         x
         (if (<= z 1.02e-133)
           (* y (/ t (- z)))
           (if (<= z 2.05e-118) x (+ y x))))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -5e-19) {
		tmp = y + x;
	} else if (z <= -1.9e-253) {
		tmp = x;
	} else if (z <= 1.55e-273) {
		tmp = (y * t) / a;
	} else if (z <= 1.12e-153) {
		tmp = x;
	} else if (z <= 1.02e-133) {
		tmp = y * (t / -z);
	} else if (z <= 2.05e-118) {
		tmp = x;
	} 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 <= (-5d-19)) then
        tmp = y + x
    else if (z <= (-1.9d-253)) then
        tmp = x
    else if (z <= 1.55d-273) then
        tmp = (y * t) / a
    else if (z <= 1.12d-153) then
        tmp = x
    else if (z <= 1.02d-133) then
        tmp = y * (t / -z)
    else if (z <= 2.05d-118) then
        tmp = x
    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 <= -5e-19) {
		tmp = y + x;
	} else if (z <= -1.9e-253) {
		tmp = x;
	} else if (z <= 1.55e-273) {
		tmp = (y * t) / a;
	} else if (z <= 1.12e-153) {
		tmp = x;
	} else if (z <= 1.02e-133) {
		tmp = y * (t / -z);
	} else if (z <= 2.05e-118) {
		tmp = x;
	} else {
		tmp = y + x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -5e-19:
		tmp = y + x
	elif z <= -1.9e-253:
		tmp = x
	elif z <= 1.55e-273:
		tmp = (y * t) / a
	elif z <= 1.12e-153:
		tmp = x
	elif z <= 1.02e-133:
		tmp = y * (t / -z)
	elif z <= 2.05e-118:
		tmp = x
	else:
		tmp = y + x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -5e-19)
		tmp = Float64(y + x);
	elseif (z <= -1.9e-253)
		tmp = x;
	elseif (z <= 1.55e-273)
		tmp = Float64(Float64(y * t) / a);
	elseif (z <= 1.12e-153)
		tmp = x;
	elseif (z <= 1.02e-133)
		tmp = Float64(y * Float64(t / Float64(-z)));
	elseif (z <= 2.05e-118)
		tmp = x;
	else
		tmp = Float64(y + x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -5e-19)
		tmp = y + x;
	elseif (z <= -1.9e-253)
		tmp = x;
	elseif (z <= 1.55e-273)
		tmp = (y * t) / a;
	elseif (z <= 1.12e-153)
		tmp = x;
	elseif (z <= 1.02e-133)
		tmp = y * (t / -z);
	elseif (z <= 2.05e-118)
		tmp = x;
	else
		tmp = y + x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5e-19], N[(y + x), $MachinePrecision], If[LessEqual[z, -1.9e-253], x, If[LessEqual[z, 1.55e-273], N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 1.12e-153], x, If[LessEqual[z, 1.02e-133], N[(y * N[(t / (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.05e-118], x, N[(y + x), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -1.9 \cdot 10^{-253}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 1.12 \cdot 10^{-153}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 2.05 \cdot 10^{-118}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -5.0000000000000004e-19 or 2.0500000000000002e-118 < z

    1. Initial program 98.9%

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

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

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

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

    if -5.0000000000000004e-19 < z < -1.90000000000000006e-253 or 1.54999999999999994e-273 < z < 1.12000000000000005e-153 or 1.02e-133 < z < 2.0500000000000002e-118

    1. Initial program 96.9%

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

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

    if -1.90000000000000006e-253 < z < 1.54999999999999994e-273

    1. Initial program 82.1%

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

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

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

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

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

    if 1.12000000000000005e-153 < z < 1.02e-133

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5 \cdot 10^{-19}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq -1.9 \cdot 10^{-253}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{-273}:\\ \;\;\;\;\frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{-153}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.02 \cdot 10^{-133}:\\ \;\;\;\;y \cdot \frac{t}{-z}\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{-118}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 61.9% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.95 \cdot 10^{-19}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq -4.8 \cdot 10^{-252}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{-275}:\\ \;\;\;\;\frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 1.06 \cdot 10^{-153}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{-133}:\\ \;\;\;\;\frac{y \cdot \left(-t\right)}{z}\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{-118}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -1.95e-19)
   (+ y x)
   (if (<= z -4.8e-252)
     x
     (if (<= z 2.3e-275)
       (/ (* y t) a)
       (if (<= z 1.06e-153)
         x
         (if (<= z 1.15e-133)
           (/ (* y (- t)) z)
           (if (<= z 1.35e-118) x (+ y x))))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.95e-19) {
		tmp = y + x;
	} else if (z <= -4.8e-252) {
		tmp = x;
	} else if (z <= 2.3e-275) {
		tmp = (y * t) / a;
	} else if (z <= 1.06e-153) {
		tmp = x;
	} else if (z <= 1.15e-133) {
		tmp = (y * -t) / z;
	} else if (z <= 1.35e-118) {
		tmp = x;
	} 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.95d-19)) then
        tmp = y + x
    else if (z <= (-4.8d-252)) then
        tmp = x
    else if (z <= 2.3d-275) then
        tmp = (y * t) / a
    else if (z <= 1.06d-153) then
        tmp = x
    else if (z <= 1.15d-133) then
        tmp = (y * -t) / z
    else if (z <= 1.35d-118) then
        tmp = x
    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.95e-19) {
		tmp = y + x;
	} else if (z <= -4.8e-252) {
		tmp = x;
	} else if (z <= 2.3e-275) {
		tmp = (y * t) / a;
	} else if (z <= 1.06e-153) {
		tmp = x;
	} else if (z <= 1.15e-133) {
		tmp = (y * -t) / z;
	} else if (z <= 1.35e-118) {
		tmp = x;
	} else {
		tmp = y + x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -1.95e-19:
		tmp = y + x
	elif z <= -4.8e-252:
		tmp = x
	elif z <= 2.3e-275:
		tmp = (y * t) / a
	elif z <= 1.06e-153:
		tmp = x
	elif z <= 1.15e-133:
		tmp = (y * -t) / z
	elif z <= 1.35e-118:
		tmp = x
	else:
		tmp = y + x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -1.95e-19)
		tmp = Float64(y + x);
	elseif (z <= -4.8e-252)
		tmp = x;
	elseif (z <= 2.3e-275)
		tmp = Float64(Float64(y * t) / a);
	elseif (z <= 1.06e-153)
		tmp = x;
	elseif (z <= 1.15e-133)
		tmp = Float64(Float64(y * Float64(-t)) / z);
	elseif (z <= 1.35e-118)
		tmp = x;
	else
		tmp = Float64(y + x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -1.95e-19)
		tmp = y + x;
	elseif (z <= -4.8e-252)
		tmp = x;
	elseif (z <= 2.3e-275)
		tmp = (y * t) / a;
	elseif (z <= 1.06e-153)
		tmp = x;
	elseif (z <= 1.15e-133)
		tmp = (y * -t) / z;
	elseif (z <= 1.35e-118)
		tmp = x;
	else
		tmp = y + x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.95e-19], N[(y + x), $MachinePrecision], If[LessEqual[z, -4.8e-252], x, If[LessEqual[z, 2.3e-275], N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 1.06e-153], x, If[LessEqual[z, 1.15e-133], N[(N[(y * (-t)), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 1.35e-118], x, N[(y + x), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -4.8 \cdot 10^{-252}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 1.06 \cdot 10^{-153}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 1.35 \cdot 10^{-118}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.94999999999999998e-19 or 1.34999999999999997e-118 < z

    1. Initial program 98.9%

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

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

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

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

    if -1.94999999999999998e-19 < z < -4.8000000000000003e-252 or 2.2999999999999999e-275 < z < 1.06e-153 or 1.15e-133 < z < 1.34999999999999997e-118

    1. Initial program 96.9%

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

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

    if -4.8000000000000003e-252 < z < 2.2999999999999999e-275

    1. Initial program 82.1%

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

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

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

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

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

    if 1.06e-153 < z < 1.15e-133

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-t \cdot y}}{z} \]
      3. distribute-lft-neg-out68.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.95 \cdot 10^{-19}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq -4.8 \cdot 10^{-252}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{-275}:\\ \;\;\;\;\frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 1.06 \cdot 10^{-153}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{-133}:\\ \;\;\;\;\frac{y \cdot \left(-t\right)}{z}\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{-118}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 59.1% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.02 \cdot 10^{+157}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{-185}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;a \leq 1.14 \cdot 10^{-305}:\\ \;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{-193}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;a \leq 3 \cdot 10^{-126}:\\ \;\;\;\;\frac{y \cdot \left(-t\right)}{z}\\ \mathbf{elif}\;a \leq 2.35 \cdot 10^{+92}:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -1.02e+157)
   x
   (if (<= a -6.5e-185)
     (+ y x)
     (if (<= a 1.14e-305)
       (* y (- 1.0 (/ t z)))
       (if (<= a 1.9e-193)
         (+ y x)
         (if (<= a 3e-126)
           (/ (* y (- t)) z)
           (if (<= a 2.35e+92) (+ y x) x)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1.02e+157) {
		tmp = x;
	} else if (a <= -6.5e-185) {
		tmp = y + x;
	} else if (a <= 1.14e-305) {
		tmp = y * (1.0 - (t / z));
	} else if (a <= 1.9e-193) {
		tmp = y + x;
	} else if (a <= 3e-126) {
		tmp = (y * -t) / z;
	} else if (a <= 2.35e+92) {
		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 (a <= (-1.02d+157)) then
        tmp = x
    else if (a <= (-6.5d-185)) then
        tmp = y + x
    else if (a <= 1.14d-305) then
        tmp = y * (1.0d0 - (t / z))
    else if (a <= 1.9d-193) then
        tmp = y + x
    else if (a <= 3d-126) then
        tmp = (y * -t) / z
    else if (a <= 2.35d+92) 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 (a <= -1.02e+157) {
		tmp = x;
	} else if (a <= -6.5e-185) {
		tmp = y + x;
	} else if (a <= 1.14e-305) {
		tmp = y * (1.0 - (t / z));
	} else if (a <= 1.9e-193) {
		tmp = y + x;
	} else if (a <= 3e-126) {
		tmp = (y * -t) / z;
	} else if (a <= 2.35e+92) {
		tmp = y + x;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -1.02e+157:
		tmp = x
	elif a <= -6.5e-185:
		tmp = y + x
	elif a <= 1.14e-305:
		tmp = y * (1.0 - (t / z))
	elif a <= 1.9e-193:
		tmp = y + x
	elif a <= 3e-126:
		tmp = (y * -t) / z
	elif a <= 2.35e+92:
		tmp = y + x
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -1.02e+157)
		tmp = x;
	elseif (a <= -6.5e-185)
		tmp = Float64(y + x);
	elseif (a <= 1.14e-305)
		tmp = Float64(y * Float64(1.0 - Float64(t / z)));
	elseif (a <= 1.9e-193)
		tmp = Float64(y + x);
	elseif (a <= 3e-126)
		tmp = Float64(Float64(y * Float64(-t)) / z);
	elseif (a <= 2.35e+92)
		tmp = Float64(y + x);
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -1.02e+157)
		tmp = x;
	elseif (a <= -6.5e-185)
		tmp = y + x;
	elseif (a <= 1.14e-305)
		tmp = y * (1.0 - (t / z));
	elseif (a <= 1.9e-193)
		tmp = y + x;
	elseif (a <= 3e-126)
		tmp = (y * -t) / z;
	elseif (a <= 2.35e+92)
		tmp = y + x;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.02e+157], x, If[LessEqual[a, -6.5e-185], N[(y + x), $MachinePrecision], If[LessEqual[a, 1.14e-305], N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.9e-193], N[(y + x), $MachinePrecision], If[LessEqual[a, 3e-126], N[(N[(y * (-t)), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 2.35e+92], N[(y + x), $MachinePrecision], x]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -6.5 \cdot 10^{-185}:\\
\;\;\;\;y + x\\

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

\mathbf{elif}\;a \leq 1.9 \cdot 10^{-193}:\\
\;\;\;\;y + x\\

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

\mathbf{elif}\;a \leq 2.35 \cdot 10^{+92}:\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.02000000000000003e157 or 2.35e92 < a

    1. Initial program 97.7%

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

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

    if -1.02000000000000003e157 < a < -6.49999999999999946e-185 or 1.14e-305 < a < 1.90000000000000002e-193 or 3.0000000000000002e-126 < a < 2.35e92

    1. Initial program 96.9%

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

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

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

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

    if -6.49999999999999946e-185 < a < 1.14e-305

    1. Initial program 99.8%

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

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

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

    if 1.90000000000000002e-193 < a < 3.0000000000000002e-126

    1. Initial program 91.9%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-t \cdot y}}{z} \]
      3. distribute-lft-neg-out65.3%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.02 \cdot 10^{+157}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{-185}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;a \leq 1.14 \cdot 10^{-305}:\\ \;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{-193}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;a \leq 3 \cdot 10^{-126}:\\ \;\;\;\;\frac{y \cdot \left(-t\right)}{z}\\ \mathbf{elif}\;a \leq 2.35 \cdot 10^{+92}:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 59.3% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(1 - \frac{t}{z}\right)\\ t_2 := y \cdot \frac{t}{a - z}\\ \mathbf{if}\;x \leq -4.5 \cdot 10^{-143}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;x \leq -3.55 \cdot 10^{-186}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq -4.2 \cdot 10^{-254}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 1.85 \cdot 10^{-230}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq 1.95 \cdot 10^{-14}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (- 1.0 (/ t z)))) (t_2 (* y (/ t (- a z)))))
   (if (<= x -4.5e-143)
     (+ y x)
     (if (<= x -3.55e-186)
       t_2
       (if (<= x -4.2e-254)
         t_1
         (if (<= x 1.85e-230) t_2 (if (<= x 1.95e-14) t_1 (+ y x))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (1.0 - (t / z));
	double t_2 = y * (t / (a - z));
	double tmp;
	if (x <= -4.5e-143) {
		tmp = y + x;
	} else if (x <= -3.55e-186) {
		tmp = t_2;
	} else if (x <= -4.2e-254) {
		tmp = t_1;
	} else if (x <= 1.85e-230) {
		tmp = t_2;
	} else if (x <= 1.95e-14) {
		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) :: t_2
    real(8) :: tmp
    t_1 = y * (1.0d0 - (t / z))
    t_2 = y * (t / (a - z))
    if (x <= (-4.5d-143)) then
        tmp = y + x
    else if (x <= (-3.55d-186)) then
        tmp = t_2
    else if (x <= (-4.2d-254)) then
        tmp = t_1
    else if (x <= 1.85d-230) then
        tmp = t_2
    else if (x <= 1.95d-14) 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 = y * (1.0 - (t / z));
	double t_2 = y * (t / (a - z));
	double tmp;
	if (x <= -4.5e-143) {
		tmp = y + x;
	} else if (x <= -3.55e-186) {
		tmp = t_2;
	} else if (x <= -4.2e-254) {
		tmp = t_1;
	} else if (x <= 1.85e-230) {
		tmp = t_2;
	} else if (x <= 1.95e-14) {
		tmp = t_1;
	} else {
		tmp = y + x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * (1.0 - (t / z))
	t_2 = y * (t / (a - z))
	tmp = 0
	if x <= -4.5e-143:
		tmp = y + x
	elif x <= -3.55e-186:
		tmp = t_2
	elif x <= -4.2e-254:
		tmp = t_1
	elif x <= 1.85e-230:
		tmp = t_2
	elif x <= 1.95e-14:
		tmp = t_1
	else:
		tmp = y + x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(1.0 - Float64(t / z)))
	t_2 = Float64(y * Float64(t / Float64(a - z)))
	tmp = 0.0
	if (x <= -4.5e-143)
		tmp = Float64(y + x);
	elseif (x <= -3.55e-186)
		tmp = t_2;
	elseif (x <= -4.2e-254)
		tmp = t_1;
	elseif (x <= 1.85e-230)
		tmp = t_2;
	elseif (x <= 1.95e-14)
		tmp = t_1;
	else
		tmp = Float64(y + x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * (1.0 - (t / z));
	t_2 = y * (t / (a - z));
	tmp = 0.0;
	if (x <= -4.5e-143)
		tmp = y + x;
	elseif (x <= -3.55e-186)
		tmp = t_2;
	elseif (x <= -4.2e-254)
		tmp = t_1;
	elseif (x <= 1.85e-230)
		tmp = t_2;
	elseif (x <= 1.95e-14)
		tmp = t_1;
	else
		tmp = y + x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.5e-143], N[(y + x), $MachinePrecision], If[LessEqual[x, -3.55e-186], t$95$2, If[LessEqual[x, -4.2e-254], t$95$1, If[LessEqual[x, 1.85e-230], t$95$2, If[LessEqual[x, 1.95e-14], t$95$1, N[(y + x), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq -3.55 \cdot 10^{-186}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \leq -4.2 \cdot 10^{-254}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 1.85 \cdot 10^{-230}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \leq 1.95 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -4.5e-143 or 1.9499999999999999e-14 < x

    1. Initial program 99.3%

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

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

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

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

    if -4.5e-143 < x < -3.55000000000000007e-186 or -4.19999999999999993e-254 < x < 1.84999999999999991e-230

    1. Initial program 95.1%

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

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

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

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

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

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

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

    if -3.55000000000000007e-186 < x < -4.19999999999999993e-254 or 1.84999999999999991e-230 < x < 1.9499999999999999e-14

    1. Initial program 94.1%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4.5 \cdot 10^{-143}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;x \leq -3.55 \cdot 10^{-186}:\\ \;\;\;\;y \cdot \frac{t}{a - z}\\ \mathbf{elif}\;x \leq -4.2 \cdot 10^{-254}:\\ \;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{elif}\;x \leq 1.85 \cdot 10^{-230}:\\ \;\;\;\;y \cdot \frac{t}{a - z}\\ \mathbf{elif}\;x \leq 1.95 \cdot 10^{-14}:\\ \;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 62.1% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;z \leq -8 \cdot 10^{-255}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 4.2 \cdot 10^{-272}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.12 \cdot 10^{-153}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 4 \cdot 10^{-132}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.19999999999999994e-11 or 3.9999999999999999e-132 < z

    1. Initial program 98.9%

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

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

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

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

    if -3.19999999999999994e-11 < z < -8.0000000000000001e-255 or 4.19999999999999974e-272 < z < 1.12000000000000005e-153

    1. Initial program 95.6%

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

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

    if -8.0000000000000001e-255 < z < 4.19999999999999974e-272 or 1.12000000000000005e-153 < z < 3.9999999999999999e-132

    1. Initial program 91.8%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{-11}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq -8 \cdot 10^{-255}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{-272}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{-153}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-132}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 62.0% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;z \leq -6.8 \cdot 10^{-255}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 2.6 \cdot 10^{-157}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -7.80000000000000053e-15 or 1.94999999999999991e-132 < z

    1. Initial program 98.9%

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

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

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

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

    if -7.80000000000000053e-15 < z < -6.79999999999999967e-255 or 7.59999999999999988e-266 < z < 2.59999999999999988e-157

    1. Initial program 95.6%

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

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

    if -6.79999999999999967e-255 < z < 7.59999999999999988e-266

    1. Initial program 87.0%

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{a}{t}}} \]
      2. un-div-inv72.4%

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} \]
    6. Applied egg-rr72.4%

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

    if 2.59999999999999988e-157 < z < 1.94999999999999991e-132

    1. Initial program 100.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.8 \cdot 10^{-15}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq -6.8 \cdot 10^{-255}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 7.6 \cdot 10^{-266}:\\ \;\;\;\;\frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-157}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{-132}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 80.5% accurate, 0.4× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.1600000000000001e78 or 7.4999999999999998e-49 < z

    1. Initial program 99.9%

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

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

    if -1.1600000000000001e78 < z < -2.05e49

    1. Initial program 99.4%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num99.4%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{z \cdot \frac{y}{z - a} + x} \]
    8. Taylor expanded in z around 0 22.8%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{y \cdot z}{a}} \]
    9. Step-by-step derivation
      1. mul-1-neg22.8%

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

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

        \[\leadsto x - \color{blue}{y \cdot \frac{z}{a}} \]
    10. Simplified99.4%

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

    if -2.05e49 < z < -6.8000000000000001e-130

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num99.8%

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

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

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

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

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

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

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

    if -6.8000000000000001e-130 < z < 7.4999999999999998e-49

    1. Initial program 92.3%

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

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

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

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

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

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

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

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

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

Alternative 9: 81.2% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot \frac{z - t}{z}\\ \mathbf{if}\;z \leq -1.16 \cdot 10^{+78}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -2.05 \cdot 10^{+49}:\\ \;\;\;\;x - y \cdot \frac{z}{a}\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{-13}:\\ \;\;\;\;x + \frac{y \cdot z}{z - a}\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{-50}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* y (/ (- z t) z)))))
   (if (<= z -1.16e+78)
     t_1
     (if (<= z -2.05e+49)
       (- x (* y (/ z a)))
       (if (<= z -2.1e-13)
         (+ x (/ (* y z) (- z a)))
         (if (<= z 2.3e-50) (+ x (* y (/ t a))) t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * ((z - t) / z));
	double tmp;
	if (z <= -1.16e+78) {
		tmp = t_1;
	} else if (z <= -2.05e+49) {
		tmp = x - (y * (z / a));
	} else if (z <= -2.1e-13) {
		tmp = x + ((y * z) / (z - a));
	} else if (z <= 2.3e-50) {
		tmp = x + (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 = x + (y * ((z - t) / z))
    if (z <= (-1.16d+78)) then
        tmp = t_1
    else if (z <= (-2.05d+49)) then
        tmp = x - (y * (z / a))
    else if (z <= (-2.1d-13)) then
        tmp = x + ((y * z) / (z - a))
    else if (z <= 2.3d-50) then
        tmp = x + (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 = x + (y * ((z - t) / z));
	double tmp;
	if (z <= -1.16e+78) {
		tmp = t_1;
	} else if (z <= -2.05e+49) {
		tmp = x - (y * (z / a));
	} else if (z <= -2.1e-13) {
		tmp = x + ((y * z) / (z - a));
	} else if (z <= 2.3e-50) {
		tmp = x + (y * (t / a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (y * ((z - t) / z))
	tmp = 0
	if z <= -1.16e+78:
		tmp = t_1
	elif z <= -2.05e+49:
		tmp = x - (y * (z / a))
	elif z <= -2.1e-13:
		tmp = x + ((y * z) / (z - a))
	elif z <= 2.3e-50:
		tmp = x + (y * (t / a))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(y * Float64(Float64(z - t) / z)))
	tmp = 0.0
	if (z <= -1.16e+78)
		tmp = t_1;
	elseif (z <= -2.05e+49)
		tmp = Float64(x - Float64(y * Float64(z / a)));
	elseif (z <= -2.1e-13)
		tmp = Float64(x + Float64(Float64(y * z) / Float64(z - a)));
	elseif (z <= 2.3e-50)
		tmp = Float64(x + Float64(y * Float64(t / a)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (y * ((z - t) / z));
	tmp = 0.0;
	if (z <= -1.16e+78)
		tmp = t_1;
	elseif (z <= -2.05e+49)
		tmp = x - (y * (z / a));
	elseif (z <= -2.1e-13)
		tmp = x + ((y * z) / (z - a));
	elseif (z <= 2.3e-50)
		tmp = x + (y * (t / 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[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.16e+78], t$95$1, If[LessEqual[z, -2.05e+49], N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.1e-13], N[(x + N[(N[(y * z), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.3e-50], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.1600000000000001e78 or 2.3000000000000002e-50 < z

    1. Initial program 99.9%

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

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

    if -1.1600000000000001e78 < z < -2.05e49

    1. Initial program 99.4%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num99.4%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{z \cdot \frac{y}{z - a} + x} \]
    8. Taylor expanded in z around 0 22.8%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{y \cdot z}{a}} \]
    9. Step-by-step derivation
      1. mul-1-neg22.8%

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

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

        \[\leadsto x - \color{blue}{y \cdot \frac{z}{a}} \]
    10. Simplified99.4%

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

    if -2.05e49 < z < -2.09999999999999989e-13

    1. Initial program 100.0%

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

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

    if -2.09999999999999989e-13 < z < 2.3000000000000002e-50

    1. Initial program 94.2%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.16 \cdot 10^{+78}:\\ \;\;\;\;x + y \cdot \frac{z - t}{z}\\ \mathbf{elif}\;z \leq -2.05 \cdot 10^{+49}:\\ \;\;\;\;x - y \cdot \frac{z}{a}\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{-13}:\\ \;\;\;\;x + \frac{y \cdot z}{z - a}\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{-50}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z - t}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 81.6% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot \frac{z - t}{z}\\ \mathbf{if}\;z \leq -8.5 \cdot 10^{+188}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -9.8 \cdot 10^{-17}:\\ \;\;\;\;x + z \cdot \frac{y}{z - a}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-49}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* y (/ (- z t) z)))))
   (if (<= z -8.5e+188)
     t_1
     (if (<= z -9.8e-17)
       (+ x (* z (/ y (- z a))))
       (if (<= z 1.4e-49) (+ x (* y (/ t a))) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * ((z - t) / z));
	double tmp;
	if (z <= -8.5e+188) {
		tmp = t_1;
	} else if (z <= -9.8e-17) {
		tmp = x + (z * (y / (z - a)));
	} else if (z <= 1.4e-49) {
		tmp = x + (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 = x + (y * ((z - t) / z))
    if (z <= (-8.5d+188)) then
        tmp = t_1
    else if (z <= (-9.8d-17)) then
        tmp = x + (z * (y / (z - a)))
    else if (z <= 1.4d-49) then
        tmp = x + (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 = x + (y * ((z - t) / z));
	double tmp;
	if (z <= -8.5e+188) {
		tmp = t_1;
	} else if (z <= -9.8e-17) {
		tmp = x + (z * (y / (z - a)));
	} else if (z <= 1.4e-49) {
		tmp = x + (y * (t / a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (y * ((z - t) / z))
	tmp = 0
	if z <= -8.5e+188:
		tmp = t_1
	elif z <= -9.8e-17:
		tmp = x + (z * (y / (z - a)))
	elif z <= 1.4e-49:
		tmp = x + (y * (t / a))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(y * Float64(Float64(z - t) / z)))
	tmp = 0.0
	if (z <= -8.5e+188)
		tmp = t_1;
	elseif (z <= -9.8e-17)
		tmp = Float64(x + Float64(z * Float64(y / Float64(z - a))));
	elseif (z <= 1.4e-49)
		tmp = Float64(x + Float64(y * Float64(t / a)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (y * ((z - t) / z));
	tmp = 0.0;
	if (z <= -8.5e+188)
		tmp = t_1;
	elseif (z <= -9.8e-17)
		tmp = x + (z * (y / (z - a)));
	elseif (z <= 1.4e-49)
		tmp = x + (y * (t / 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[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.5e+188], t$95$1, If[LessEqual[z, -9.8e-17], N[(x + N[(z * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.4e-49], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -8.49999999999999958e188 or 1.39999999999999999e-49 < z

    1. Initial program 99.8%

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

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

    if -8.49999999999999958e188 < z < -9.80000000000000024e-17

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num99.9%

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

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

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

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

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

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

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

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

    if -9.80000000000000024e-17 < z < 1.39999999999999999e-49

    1. Initial program 94.2%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{+188}:\\ \;\;\;\;x + y \cdot \frac{z - t}{z}\\ \mathbf{elif}\;z \leq -9.8 \cdot 10^{-17}:\\ \;\;\;\;x + z \cdot \frac{y}{z - a}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-49}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z - t}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 87.1% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -9.8000000000000006e187 or 4.1000000000000002e27 < z

    1. Initial program 99.8%

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

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

    if -9.8000000000000006e187 < z < -8.99999999999999986e-8

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num99.9%

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

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

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

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

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

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

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

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

    if -8.99999999999999986e-8 < z < 4.1000000000000002e27

    1. Initial program 94.7%

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

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

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

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

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

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

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

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

Alternative 12: 62.3% 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 -9.5 \cdot 10^{-254}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.15 \cdot 10^{-269}:\\ \;\;\;\;\frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 1.88 \cdot 10^{-118}:\\ \;\;\;\;x\\ \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 -9.5e-254)
     x
     (if (<= z 2.15e-269) (/ (* y t) a) (if (<= z 1.88e-118) x (+ 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 <= -9.5e-254) {
		tmp = x;
	} else if (z <= 2.15e-269) {
		tmp = (y * t) / a;
	} else if (z <= 1.88e-118) {
		tmp = x;
	} 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 <= (-9.5d-254)) then
        tmp = x
    else if (z <= 2.15d-269) then
        tmp = (y * t) / a
    else if (z <= 1.88d-118) then
        tmp = x
    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 <= -9.5e-254) {
		tmp = x;
	} else if (z <= 2.15e-269) {
		tmp = (y * t) / a;
	} else if (z <= 1.88e-118) {
		tmp = x;
	} 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 <= -9.5e-254:
		tmp = x
	elif z <= 2.15e-269:
		tmp = (y * t) / a
	elif z <= 1.88e-118:
		tmp = x
	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 <= -9.5e-254)
		tmp = x;
	elseif (z <= 2.15e-269)
		tmp = Float64(Float64(y * t) / a);
	elseif (z <= 1.88e-118)
		tmp = x;
	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 <= -9.5e-254)
		tmp = x;
	elseif (z <= 2.15e-269)
		tmp = (y * t) / a;
	elseif (z <= 1.88e-118)
		tmp = x;
	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, -9.5e-254], x, If[LessEqual[z, 2.15e-269], N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 1.88e-118], x, 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 -9.5 \cdot 10^{-254}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 1.88 \cdot 10^{-118}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.8500000000000002e-18 or 1.88000000000000001e-118 < z

    1. Initial program 98.9%

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

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

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

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

    if -1.8500000000000002e-18 < z < -9.5000000000000003e-254 or 2.14999999999999994e-269 < z < 1.88000000000000001e-118

    1. Initial program 97.2%

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

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

    if -9.5000000000000003e-254 < z < 2.14999999999999994e-269

    1. Initial program 82.1%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.85 \cdot 10^{-18}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq -9.5 \cdot 10^{-254}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.15 \cdot 10^{-269}:\\ \;\;\;\;\frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 1.88 \cdot 10^{-118}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 81.5% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -8.50000000000000035e61 or 1060 < a

    1. Initial program 97.2%

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

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

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

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

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

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

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

    if -8.50000000000000035e61 < a < 1060

    1. Initial program 97.3%

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

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

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

Alternative 14: 76.3% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.35 \cdot 10^{+102}:\\ \;\;\;\;x - y \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq 780:\\ \;\;\;\;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 -1.35e+102)
   (- x (* y (/ z a)))
   (if (<= a 780.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 <= -1.35e+102) {
		tmp = x - (y * (z / a));
	} else if (a <= 780.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 <= (-1.35d+102)) then
        tmp = x - (y * (z / a))
    else if (a <= 780.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 <= -1.35e+102) {
		tmp = x - (y * (z / a));
	} else if (a <= 780.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 <= -1.35e+102:
		tmp = x - (y * (z / a))
	elif a <= 780.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 <= -1.35e+102)
		tmp = Float64(x - Float64(y * Float64(z / a)));
	elseif (a <= 780.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 <= -1.35e+102)
		tmp = x - (y * (z / a));
	elseif (a <= 780.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, -1.35e+102], N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 780.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 -1.35 \cdot 10^{+102}:\\
\;\;\;\;x - y \cdot \frac{z}{a}\\

\mathbf{elif}\;a \leq 780:\\
\;\;\;\;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 < -1.3500000000000001e102

    1. Initial program 95.7%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{z \cdot \frac{y}{z - a} + x} \]
    8. Taylor expanded in z around 0 68.2%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{y \cdot z}{a}} \]
    9. Step-by-step derivation
      1. mul-1-neg68.2%

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

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

        \[\leadsto x - \color{blue}{y \cdot \frac{z}{a}} \]
    10. Simplified77.3%

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

    if -1.3500000000000001e102 < a < 780

    1. Initial program 97.2%

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

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

    if 780 < a

    1. Initial program 98.5%

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

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

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

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

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

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

Alternative 15: 81.5% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.40000000000000005e-16

    1. Initial program 99.9%

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

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

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

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

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

    if -2.40000000000000005e-16 < z < 1.05e-50

    1. Initial program 94.2%

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

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

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

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

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

    if 1.05e-50 < z

    1. Initial program 99.8%

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

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

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

Alternative 16: 76.8% accurate, 0.6× speedup?

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

    1. Initial program 99.9%

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

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

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

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

    if -245 < z < 6.4000000000000001e-7

    1. Initial program 94.7%

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

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

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

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

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

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

Alternative 17: 62.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.8 \cdot 10^{-17} \lor \neg \left(z \leq 1.9 \cdot 10^{-118}\right):\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.80000000000000024e-17 or 1.9e-118 < z

    1. Initial program 98.9%

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

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

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

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

    if -9.80000000000000024e-17 < z < 1.9e-118

    1. Initial program 94.9%

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

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

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

Alternative 18: 98.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + y \cdot \frac{z - t}{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(y * Float64(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[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

    \[x + y \cdot \frac{z - t}{z - a} \]
  2. Add Preprocessing
  3. Final simplification97.3%

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

Alternative 19: 49.7% 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 97.3%

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

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

    \[\leadsto x \]
  5. Add Preprocessing

Developer target: 98.4% 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 2024067 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, A"
  :precision binary64

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

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