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

Percentage Accurate: 85.0% → 98.0%
Time: 11.1s
Alternatives: 15
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 85.0% accurate, 1.0× speedup?

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

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

Alternative 1: 98.0% accurate, 0.1× speedup?

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

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

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

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

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

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

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

Alternative 2: 77.0% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.0999999999999999e-15 or 6.20000000000000006e84 < z

    1. Initial program 78.0%

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

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

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

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

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

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

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified78.9%

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

    if -3.0999999999999999e-15 < z < 3.4000000000000001e-12

    1. Initial program 96.2%

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

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

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

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

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

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

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

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

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

    if 3.4000000000000001e-12 < z < 6.20000000000000006e84

    1. Initial program 86.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{t \cdot \frac{y}{z}} \]
    8. Simplified81.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.1 \cdot 10^{-15}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{-12}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+84}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 86.3% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -9e107 or 1.2999999999999999e-44 < t

    1. Initial program 84.8%

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

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

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

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

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

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

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

    if -9e107 < t < 1.2999999999999999e-44

    1. Initial program 89.9%

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

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

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

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

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

Alternative 4: 87.1% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -9.50000000000000019e107 or 1.70000000000000008e-44 < t

    1. Initial program 84.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.50000000000000019e107 < t < 1.70000000000000008e-44

    1. Initial program 89.9%

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

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

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

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

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

Alternative 5: 83.8% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -9e107 or 1.2999999999999999e-44 < t

    1. Initial program 84.8%

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

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

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

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

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

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

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

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

    if -9e107 < t < 1.2999999999999999e-44

    1. Initial program 89.9%

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

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

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

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

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

Alternative 6: 81.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{-153} \lor \neg \left(z \leq 1.65 \cdot 10^{-21}\right):\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.80000000000000023e-153 or 1.65000000000000004e-21 < z

    1. Initial program 83.1%

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

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

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

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

    if -3.80000000000000023e-153 < z < 1.65000000000000004e-21

    1. Initial program 95.2%

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

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

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

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

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

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

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

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

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

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

Alternative 7: 81.0% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 85.8%

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

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

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

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

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

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

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

    if -1.6e-153 < z < 2.7000000000000001e-21

    1. Initial program 95.2%

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

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

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

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

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

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

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

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

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

    if 2.7000000000000001e-21 < z

    1. Initial program 78.9%

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

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

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

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

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

Alternative 8: 76.6% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.30000000000000002e-15 or 3.39999999999999992e80 < z

    1. Initial program 78.2%

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

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

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

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

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

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

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified78.2%

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

    if -1.30000000000000002e-15 < z < 3.39999999999999992e80

    1. Initial program 94.8%

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

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

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

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

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

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

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

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

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

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

Alternative 9: 76.5% accurate, 0.6× speedup?

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

    1. Initial program 78.2%

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

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

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

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

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

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

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified78.2%

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

    if -5.50000000000000001e-17 < z < 1.41999999999999998e81

    1. Initial program 94.8%

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

        \[\leadsto x + \color{blue}{y \cdot \frac{z - t}{z - a}} \]
      2. *-commutative98.0%

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

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

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

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

Alternative 10: 59.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.22 \cdot 10^{+72} \lor \neg \left(y \leq 1.6 \cdot 10^{+221}\right):\\
\;\;\;\;t \cdot \frac{y}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.2200000000000001e72 or 1.6e221 < y

    1. Initial program 63.0%

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

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

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

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

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

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

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

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

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

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

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

    if -1.2200000000000001e72 < y < 1.6e221

    1. Initial program 95.6%

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

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

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

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

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

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

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified70.3%

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

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

Alternative 11: 60.6% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;y \leq 7.2 \cdot 10^{+211}:\\
\;\;\;\;y + x\\

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


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

    1. Initial program 62.9%

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

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

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

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

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

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

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

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

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

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

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

    if -1.45999999999999999e72 < y < 7.20000000000000006e211

    1. Initial program 96.4%

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

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

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

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

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

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

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

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

    if 7.20000000000000006e211 < y

    1. Initial program 61.2%

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

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

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

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

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

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

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

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

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

Alternative 12: 63.1% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \leq 1.8 \cdot 10^{+100}:\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -7.9999999999999994e45 or 1.8e100 < a

    1. Initial program 80.8%

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

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

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

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

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

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

    if -7.9999999999999994e45 < a < 1.8e100

    1. Initial program 91.9%

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

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

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

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

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

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

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

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

Alternative 13: 53.0% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;x \leq 3.7 \cdot 10^{-141}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.69999999999999997e-266 or 3.7e-141 < x

    1. Initial program 87.3%

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

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

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

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

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

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

    if -1.69999999999999997e-266 < x < 3.7e-141

    1. Initial program 90.6%

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

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

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

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

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

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

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

Alternative 14: 98.0% 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 87.8%

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

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

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

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

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

Alternative 15: 50.8% 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 87.8%

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

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

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

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

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

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

Developer Target 1: 98.2% 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 2024170 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A"
  :precision binary64

  :alt
  (! :herbie-platform default (+ x (/ y (/ (- z a) (- z t)))))

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