Numeric.SpecFunctions:invErfc from math-functions-0.1.5.2, A

Percentage Accurate: 95.7% → 98.7%
Time: 7.8s
Alternatives: 10
Speedup: 8.5×

Specification

?
\[\begin{array}{l} \\ x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (+ x (/ y (- (* 1.1283791670955126 (exp z)) (* x y)))))
double code(double x, double y, double z) {
	return x + (y / ((1.1283791670955126 * exp(z)) - (x * y)));
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = x + (y / ((1.1283791670955126d0 * exp(z)) - (x * y)))
end function
public static double code(double x, double y, double z) {
	return x + (y / ((1.1283791670955126 * Math.exp(z)) - (x * y)));
}
def code(x, y, z):
	return x + (y / ((1.1283791670955126 * math.exp(z)) - (x * y)))
function code(x, y, z)
	return Float64(x + Float64(y / Float64(Float64(1.1283791670955126 * exp(z)) - Float64(x * y))))
end
function tmp = code(x, y, z)
	tmp = x + (y / ((1.1283791670955126 * exp(z)) - (x * y)));
end
code[x_, y_, z_] := N[(x + N[(y / N[(N[(1.1283791670955126 * N[Exp[z], $MachinePrecision]), $MachinePrecision] - N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}
\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 10 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: 95.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (+ x (/ y (- (* 1.1283791670955126 (exp z)) (* x y)))))
double code(double x, double y, double z) {
	return x + (y / ((1.1283791670955126 * exp(z)) - (x * y)));
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = x + (y / ((1.1283791670955126d0 * exp(z)) - (x * y)))
end function
public static double code(double x, double y, double z) {
	return x + (y / ((1.1283791670955126 * Math.exp(z)) - (x * y)));
}
def code(x, y, z):
	return x + (y / ((1.1283791670955126 * math.exp(z)) - (x * y)))
function code(x, y, z)
	return Float64(x + Float64(y / Float64(Float64(1.1283791670955126 * exp(z)) - Float64(x * y))))
end
function tmp = code(x, y, z)
	tmp = x + (y / ((1.1283791670955126 * exp(z)) - (x * y)));
end
code[x_, y_, z_] := N[(x + N[(y / N[(N[(1.1283791670955126 * N[Exp[z], $MachinePrecision]), $MachinePrecision] - N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}
\end{array}

Alternative 1: 98.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -15500000000:\\ \;\;\;\;x + \frac{-1}{x}\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{-34}:\\ \;\;\;\;x + \frac{y}{1.1283791670955126 - x \cdot y}\\ \mathbf{else}:\\ \;\;\;\;x + 0.8862269254527579 \cdot \frac{y}{e^{z}}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -15500000000.0)
   (+ x (/ -1.0 x))
   (if (<= z 1.05e-34)
     (+ x (/ y (- 1.1283791670955126 (* x y))))
     (+ x (* 0.8862269254527579 (/ y (exp z)))))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -15500000000.0) {
		tmp = x + (-1.0 / x);
	} else if (z <= 1.05e-34) {
		tmp = x + (y / (1.1283791670955126 - (x * y)));
	} else {
		tmp = x + (0.8862269254527579 * (y / exp(z)));
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (z <= (-15500000000.0d0)) then
        tmp = x + ((-1.0d0) / x)
    else if (z <= 1.05d-34) then
        tmp = x + (y / (1.1283791670955126d0 - (x * y)))
    else
        tmp = x + (0.8862269254527579d0 * (y / exp(z)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (z <= -15500000000.0) {
		tmp = x + (-1.0 / x);
	} else if (z <= 1.05e-34) {
		tmp = x + (y / (1.1283791670955126 - (x * y)));
	} else {
		tmp = x + (0.8862269254527579 * (y / Math.exp(z)));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -15500000000.0:
		tmp = x + (-1.0 / x)
	elif z <= 1.05e-34:
		tmp = x + (y / (1.1283791670955126 - (x * y)))
	else:
		tmp = x + (0.8862269254527579 * (y / math.exp(z)))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -15500000000.0)
		tmp = Float64(x + Float64(-1.0 / x));
	elseif (z <= 1.05e-34)
		tmp = Float64(x + Float64(y / Float64(1.1283791670955126 - Float64(x * y))));
	else
		tmp = Float64(x + Float64(0.8862269254527579 * Float64(y / exp(z))));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -15500000000.0)
		tmp = x + (-1.0 / x);
	elseif (z <= 1.05e-34)
		tmp = x + (y / (1.1283791670955126 - (x * y)));
	else
		tmp = x + (0.8862269254527579 * (y / exp(z)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -15500000000.0], N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.05e-34], N[(x + N[(y / N[(1.1283791670955126 - N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(0.8862269254527579 * N[(y / N[Exp[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -15500000000:\\
\;\;\;\;x + \frac{-1}{x}\\

\mathbf{elif}\;z \leq 1.05 \cdot 10^{-34}:\\
\;\;\;\;x + \frac{y}{1.1283791670955126 - x \cdot y}\\

\mathbf{else}:\\
\;\;\;\;x + 0.8862269254527579 \cdot \frac{y}{e^{z}}\\


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

    1. Initial program 86.3%

      \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
    2. Step-by-step derivation
      1. *-lft-identity86.3%

        \[\leadsto x + \color{blue}{1 \cdot \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}} \]
      2. metadata-eval86.3%

        \[\leadsto x + \color{blue}{\frac{-1}{-1}} \cdot \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
      3. times-frac86.3%

        \[\leadsto x + \color{blue}{\frac{-1 \cdot y}{-1 \cdot \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      4. neg-mul-186.3%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{-\left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      5. sub0-neg86.3%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{0 - \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      6. associate-+l-86.3%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{\left(0 - 1.1283791670955126 \cdot e^{z}\right) + x \cdot y}} \]
      7. neg-sub086.6%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{\left(-1.1283791670955126 \cdot e^{z}\right)} + x \cdot y} \]
      8. +-commutative86.6%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{x \cdot y + \left(-1.1283791670955126 \cdot e^{z}\right)}} \]
      9. sub-neg86.6%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{x \cdot y - 1.1283791670955126 \cdot e^{z}}} \]
      10. associate-/l*86.7%

        \[\leadsto x + \color{blue}{\frac{-1}{\frac{x \cdot y - 1.1283791670955126 \cdot e^{z}}{y}}} \]
      11. div-sub86.6%

        \[\leadsto x + \frac{-1}{\color{blue}{\frac{x \cdot y}{y} - \frac{1.1283791670955126 \cdot e^{z}}{y}}} \]
      12. associate-*r/100.0%

        \[\leadsto x + \frac{-1}{\color{blue}{x \cdot \frac{y}{y}} - \frac{1.1283791670955126 \cdot e^{z}}{y}} \]
      13. *-inverses100.0%

        \[\leadsto x + \frac{-1}{x \cdot \color{blue}{1} - \frac{1.1283791670955126 \cdot e^{z}}{y}} \]
      14. *-rgt-identity100.0%

        \[\leadsto x + \frac{-1}{\color{blue}{x} - \frac{1.1283791670955126 \cdot e^{z}}{y}} \]
      15. associate-*l/100.0%

        \[\leadsto x + \frac{-1}{x - \color{blue}{\frac{1.1283791670955126}{y} \cdot e^{z}}} \]
      16. cancel-sign-sub-inv100.0%

        \[\leadsto x + \frac{-1}{\color{blue}{x + \left(-\frac{1.1283791670955126}{y}\right) \cdot e^{z}}} \]
      17. distribute-lft-neg-in100.0%

        \[\leadsto x + \frac{-1}{x + \color{blue}{\left(-\frac{1.1283791670955126}{y} \cdot e^{z}\right)}} \]
      18. distribute-rgt-neg-in100.0%

        \[\leadsto x + \frac{-1}{x + \color{blue}{\frac{1.1283791670955126}{y} \cdot \left(-e^{z}\right)}} \]
      19. associate-*l/100.0%

        \[\leadsto x + \frac{-1}{x + \color{blue}{\frac{1.1283791670955126 \cdot \left(-e^{z}\right)}{y}}} \]
      20. distribute-rgt-neg-in100.0%

        \[\leadsto x + \frac{-1}{x + \frac{\color{blue}{-1.1283791670955126 \cdot e^{z}}}{y}} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{x + \frac{-1}{\mathsf{fma}\left(e^{z}, \frac{-1.1283791670955126}{y}, x\right)}} \]
    4. Taylor expanded in x around inf 100.0%

      \[\leadsto \color{blue}{x - \frac{1}{x}} \]

    if -1.55e10 < z < 1.05e-34

    1. Initial program 99.9%

      \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
    2. Taylor expanded in z around 0 99.9%

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

    if 1.05e-34 < z

    1. Initial program 91.6%

      \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
    2. Step-by-step derivation
      1. *-lft-identity91.6%

        \[\leadsto x + \color{blue}{1 \cdot \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}} \]
      2. metadata-eval91.6%

        \[\leadsto x + \color{blue}{\frac{-1}{-1}} \cdot \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
      3. times-frac91.6%

        \[\leadsto x + \color{blue}{\frac{-1 \cdot y}{-1 \cdot \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      4. neg-mul-191.6%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{-\left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      5. sub0-neg91.6%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{0 - \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      6. associate-+l-91.6%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{\left(0 - 1.1283791670955126 \cdot e^{z}\right) + x \cdot y}} \]
      7. neg-sub091.6%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{\left(-1.1283791670955126 \cdot e^{z}\right)} + x \cdot y} \]
      8. +-commutative91.6%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{x \cdot y + \left(-1.1283791670955126 \cdot e^{z}\right)}} \]
      9. sub-neg91.6%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{x \cdot y - 1.1283791670955126 \cdot e^{z}}} \]
      10. associate-/l*91.6%

        \[\leadsto x + \color{blue}{\frac{-1}{\frac{x \cdot y - 1.1283791670955126 \cdot e^{z}}{y}}} \]
      11. div-sub91.6%

        \[\leadsto x + \frac{-1}{\color{blue}{\frac{x \cdot y}{y} - \frac{1.1283791670955126 \cdot e^{z}}{y}}} \]
      12. associate-*r/100.0%

        \[\leadsto x + \frac{-1}{\color{blue}{x \cdot \frac{y}{y}} - \frac{1.1283791670955126 \cdot e^{z}}{y}} \]
      13. *-inverses100.0%

        \[\leadsto x + \frac{-1}{x \cdot \color{blue}{1} - \frac{1.1283791670955126 \cdot e^{z}}{y}} \]
      14. *-rgt-identity100.0%

        \[\leadsto x + \frac{-1}{\color{blue}{x} - \frac{1.1283791670955126 \cdot e^{z}}{y}} \]
      15. associate-*l/100.0%

        \[\leadsto x + \frac{-1}{x - \color{blue}{\frac{1.1283791670955126}{y} \cdot e^{z}}} \]
      16. cancel-sign-sub-inv100.0%

        \[\leadsto x + \frac{-1}{\color{blue}{x + \left(-\frac{1.1283791670955126}{y}\right) \cdot e^{z}}} \]
      17. distribute-lft-neg-in100.0%

        \[\leadsto x + \frac{-1}{x + \color{blue}{\left(-\frac{1.1283791670955126}{y} \cdot e^{z}\right)}} \]
      18. distribute-rgt-neg-in100.0%

        \[\leadsto x + \frac{-1}{x + \color{blue}{\frac{1.1283791670955126}{y} \cdot \left(-e^{z}\right)}} \]
      19. associate-*l/100.0%

        \[\leadsto x + \frac{-1}{x + \color{blue}{\frac{1.1283791670955126 \cdot \left(-e^{z}\right)}{y}}} \]
      20. distribute-rgt-neg-in100.0%

        \[\leadsto x + \frac{-1}{x + \frac{\color{blue}{-1.1283791670955126 \cdot e^{z}}}{y}} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{x + \frac{-1}{\mathsf{fma}\left(e^{z}, \frac{-1.1283791670955126}{y}, x\right)}} \]
    4. Taylor expanded in y around 0 100.0%

      \[\leadsto \color{blue}{0.8862269254527579 \cdot \frac{y}{e^{z}} + x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification99.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -15500000000:\\ \;\;\;\;x + \frac{-1}{x}\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{-34}:\\ \;\;\;\;x + \frac{y}{1.1283791670955126 - x \cdot y}\\ \mathbf{else}:\\ \;\;\;\;x + 0.8862269254527579 \cdot \frac{y}{e^{z}}\\ \end{array} \]

Alternative 2: 98.2% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x + \frac{y}{e^{z} \cdot 1.1283791670955126 - x \cdot y}\\ \mathbf{if}\;t_0 \leq 10^{+211}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;x + \frac{-1}{x}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (+ x (/ y (- (* (exp z) 1.1283791670955126) (* x y))))))
   (if (<= t_0 1e+211) t_0 (+ x (/ -1.0 x)))))
double code(double x, double y, double z) {
	double t_0 = x + (y / ((exp(z) * 1.1283791670955126) - (x * y)));
	double tmp;
	if (t_0 <= 1e+211) {
		tmp = t_0;
	} else {
		tmp = x + (-1.0 / x);
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: t_0
    real(8) :: tmp
    t_0 = x + (y / ((exp(z) * 1.1283791670955126d0) - (x * y)))
    if (t_0 <= 1d+211) then
        tmp = t_0
    else
        tmp = x + ((-1.0d0) / x)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = x + (y / ((Math.exp(z) * 1.1283791670955126) - (x * y)));
	double tmp;
	if (t_0 <= 1e+211) {
		tmp = t_0;
	} else {
		tmp = x + (-1.0 / x);
	}
	return tmp;
}
def code(x, y, z):
	t_0 = x + (y / ((math.exp(z) * 1.1283791670955126) - (x * y)))
	tmp = 0
	if t_0 <= 1e+211:
		tmp = t_0
	else:
		tmp = x + (-1.0 / x)
	return tmp
function code(x, y, z)
	t_0 = Float64(x + Float64(y / Float64(Float64(exp(z) * 1.1283791670955126) - Float64(x * y))))
	tmp = 0.0
	if (t_0 <= 1e+211)
		tmp = t_0;
	else
		tmp = Float64(x + Float64(-1.0 / x));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = x + (y / ((exp(z) * 1.1283791670955126) - (x * y)));
	tmp = 0.0;
	if (t_0 <= 1e+211)
		tmp = t_0;
	else
		tmp = x + (-1.0 / x);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(x + N[(y / N[(N[(N[Exp[z], $MachinePrecision] * 1.1283791670955126), $MachinePrecision] - N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 1e+211], t$95$0, N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x + \frac{y}{e^{z} \cdot 1.1283791670955126 - x \cdot y}\\
\mathbf{if}\;t_0 \leq 10^{+211}:\\
\;\;\;\;t_0\\

\mathbf{else}:\\
\;\;\;\;x + \frac{-1}{x}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 x (/.f64 y (-.f64 (*.f64 5641895835477563/5000000000000000 (exp.f64 z)) (*.f64 x y)))) < 9.9999999999999996e210

    1. Initial program 98.5%

      \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]

    if 9.9999999999999996e210 < (+.f64 x (/.f64 y (-.f64 (*.f64 5641895835477563/5000000000000000 (exp.f64 z)) (*.f64 x y))))

    1. Initial program 74.6%

      \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
    2. Step-by-step derivation
      1. *-lft-identity74.6%

        \[\leadsto x + \color{blue}{1 \cdot \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}} \]
      2. metadata-eval74.6%

        \[\leadsto x + \color{blue}{\frac{-1}{-1}} \cdot \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
      3. times-frac74.6%

        \[\leadsto x + \color{blue}{\frac{-1 \cdot y}{-1 \cdot \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      4. neg-mul-174.6%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{-\left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      5. sub0-neg74.6%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{0 - \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      6. associate-+l-74.6%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{\left(0 - 1.1283791670955126 \cdot e^{z}\right) + x \cdot y}} \]
      7. neg-sub074.9%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{\left(-1.1283791670955126 \cdot e^{z}\right)} + x \cdot y} \]
      8. +-commutative74.9%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{x \cdot y + \left(-1.1283791670955126 \cdot e^{z}\right)}} \]
      9. sub-neg74.9%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{x \cdot y - 1.1283791670955126 \cdot e^{z}}} \]
      10. associate-/l*74.9%

        \[\leadsto x + \color{blue}{\frac{-1}{\frac{x \cdot y - 1.1283791670955126 \cdot e^{z}}{y}}} \]
      11. div-sub74.9%

        \[\leadsto x + \frac{-1}{\color{blue}{\frac{x \cdot y}{y} - \frac{1.1283791670955126 \cdot e^{z}}{y}}} \]
      12. associate-*r/100.0%

        \[\leadsto x + \frac{-1}{\color{blue}{x \cdot \frac{y}{y}} - \frac{1.1283791670955126 \cdot e^{z}}{y}} \]
      13. *-inverses100.0%

        \[\leadsto x + \frac{-1}{x \cdot \color{blue}{1} - \frac{1.1283791670955126 \cdot e^{z}}{y}} \]
      14. *-rgt-identity100.0%

        \[\leadsto x + \frac{-1}{\color{blue}{x} - \frac{1.1283791670955126 \cdot e^{z}}{y}} \]
      15. associate-*l/100.0%

        \[\leadsto x + \frac{-1}{x - \color{blue}{\frac{1.1283791670955126}{y} \cdot e^{z}}} \]
      16. cancel-sign-sub-inv100.0%

        \[\leadsto x + \frac{-1}{\color{blue}{x + \left(-\frac{1.1283791670955126}{y}\right) \cdot e^{z}}} \]
      17. distribute-lft-neg-in100.0%

        \[\leadsto x + \frac{-1}{x + \color{blue}{\left(-\frac{1.1283791670955126}{y} \cdot e^{z}\right)}} \]
      18. distribute-rgt-neg-in100.0%

        \[\leadsto x + \frac{-1}{x + \color{blue}{\frac{1.1283791670955126}{y} \cdot \left(-e^{z}\right)}} \]
      19. associate-*l/100.0%

        \[\leadsto x + \frac{-1}{x + \color{blue}{\frac{1.1283791670955126 \cdot \left(-e^{z}\right)}{y}}} \]
      20. distribute-rgt-neg-in100.0%

        \[\leadsto x + \frac{-1}{x + \frac{\color{blue}{-1.1283791670955126 \cdot e^{z}}}{y}} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{x + \frac{-1}{\mathsf{fma}\left(e^{z}, \frac{-1.1283791670955126}{y}, x\right)}} \]
    4. Taylor expanded in x around inf 100.0%

      \[\leadsto \color{blue}{x - \frac{1}{x}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \frac{y}{e^{z} \cdot 1.1283791670955126 - x \cdot y} \leq 10^{+211}:\\ \;\;\;\;x + \frac{y}{e^{z} \cdot 1.1283791670955126 - x \cdot y}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{-1}{x}\\ \end{array} \]

Alternative 3: 99.9% accurate, 0.5× speedup?

\[\begin{array}{l} \\ x + \frac{-1}{\mathsf{fma}\left(e^{z}, \frac{-1.1283791670955126}{y}, x\right)} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (+ x (/ -1.0 (fma (exp z) (/ -1.1283791670955126 y) x))))
double code(double x, double y, double z) {
	return x + (-1.0 / fma(exp(z), (-1.1283791670955126 / y), x));
}
function code(x, y, z)
	return Float64(x + Float64(-1.0 / fma(exp(z), Float64(-1.1283791670955126 / y), x)))
end
code[x_, y_, z_] := N[(x + N[(-1.0 / N[(N[Exp[z], $MachinePrecision] * N[(-1.1283791670955126 / y), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \frac{-1}{\mathsf{fma}\left(e^{z}, \frac{-1.1283791670955126}{y}, x\right)}
\end{array}
Derivation
  1. Initial program 94.9%

    \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
  2. Step-by-step derivation
    1. *-lft-identity94.9%

      \[\leadsto x + \color{blue}{1 \cdot \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}} \]
    2. metadata-eval94.9%

      \[\leadsto x + \color{blue}{\frac{-1}{-1}} \cdot \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
    3. times-frac94.9%

      \[\leadsto x + \color{blue}{\frac{-1 \cdot y}{-1 \cdot \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
    4. neg-mul-194.9%

      \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{-\left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
    5. sub0-neg94.9%

      \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{0 - \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
    6. associate-+l-94.9%

      \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{\left(0 - 1.1283791670955126 \cdot e^{z}\right) + x \cdot y}} \]
    7. neg-sub094.9%

      \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{\left(-1.1283791670955126 \cdot e^{z}\right)} + x \cdot y} \]
    8. +-commutative94.9%

      \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{x \cdot y + \left(-1.1283791670955126 \cdot e^{z}\right)}} \]
    9. sub-neg94.9%

      \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{x \cdot y - 1.1283791670955126 \cdot e^{z}}} \]
    10. associate-/l*94.9%

      \[\leadsto x + \color{blue}{\frac{-1}{\frac{x \cdot y - 1.1283791670955126 \cdot e^{z}}{y}}} \]
    11. div-sub94.9%

      \[\leadsto x + \frac{-1}{\color{blue}{\frac{x \cdot y}{y} - \frac{1.1283791670955126 \cdot e^{z}}{y}}} \]
    12. associate-*r/99.9%

      \[\leadsto x + \frac{-1}{\color{blue}{x \cdot \frac{y}{y}} - \frac{1.1283791670955126 \cdot e^{z}}{y}} \]
    13. *-inverses99.9%

      \[\leadsto x + \frac{-1}{x \cdot \color{blue}{1} - \frac{1.1283791670955126 \cdot e^{z}}{y}} \]
    14. *-rgt-identity99.9%

      \[\leadsto x + \frac{-1}{\color{blue}{x} - \frac{1.1283791670955126 \cdot e^{z}}{y}} \]
    15. associate-*l/99.9%

      \[\leadsto x + \frac{-1}{x - \color{blue}{\frac{1.1283791670955126}{y} \cdot e^{z}}} \]
    16. cancel-sign-sub-inv99.9%

      \[\leadsto x + \frac{-1}{\color{blue}{x + \left(-\frac{1.1283791670955126}{y}\right) \cdot e^{z}}} \]
    17. distribute-lft-neg-in99.9%

      \[\leadsto x + \frac{-1}{x + \color{blue}{\left(-\frac{1.1283791670955126}{y} \cdot e^{z}\right)}} \]
    18. distribute-rgt-neg-in99.9%

      \[\leadsto x + \frac{-1}{x + \color{blue}{\frac{1.1283791670955126}{y} \cdot \left(-e^{z}\right)}} \]
    19. associate-*l/99.9%

      \[\leadsto x + \frac{-1}{x + \color{blue}{\frac{1.1283791670955126 \cdot \left(-e^{z}\right)}{y}}} \]
    20. distribute-rgt-neg-in99.9%

      \[\leadsto x + \frac{-1}{x + \frac{\color{blue}{-1.1283791670955126 \cdot e^{z}}}{y}} \]
  3. Simplified99.9%

    \[\leadsto \color{blue}{x + \frac{-1}{\mathsf{fma}\left(e^{z}, \frac{-1.1283791670955126}{y}, x\right)}} \]
  4. Final simplification99.9%

    \[\leadsto x + \frac{-1}{\mathsf{fma}\left(e^{z}, \frac{-1.1283791670955126}{y}, x\right)} \]

Alternative 4: 99.3% accurate, 6.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -15500000000:\\ \;\;\;\;x + \frac{-1}{x}\\ \mathbf{elif}\;z \leq 3.05:\\ \;\;\;\;x + \frac{y}{\left(1.1283791670955126 + z \cdot 1.1283791670955126\right) - x \cdot y}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -15500000000.0)
   (+ x (/ -1.0 x))
   (if (<= z 3.05)
     (+ x (/ y (- (+ 1.1283791670955126 (* z 1.1283791670955126)) (* x y))))
     x)))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -15500000000.0) {
		tmp = x + (-1.0 / x);
	} else if (z <= 3.05) {
		tmp = x + (y / ((1.1283791670955126 + (z * 1.1283791670955126)) - (x * y)));
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (z <= (-15500000000.0d0)) then
        tmp = x + ((-1.0d0) / x)
    else if (z <= 3.05d0) then
        tmp = x + (y / ((1.1283791670955126d0 + (z * 1.1283791670955126d0)) - (x * y)))
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (z <= -15500000000.0) {
		tmp = x + (-1.0 / x);
	} else if (z <= 3.05) {
		tmp = x + (y / ((1.1283791670955126 + (z * 1.1283791670955126)) - (x * y)));
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -15500000000.0:
		tmp = x + (-1.0 / x)
	elif z <= 3.05:
		tmp = x + (y / ((1.1283791670955126 + (z * 1.1283791670955126)) - (x * y)))
	else:
		tmp = x
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -15500000000.0)
		tmp = Float64(x + Float64(-1.0 / x));
	elseif (z <= 3.05)
		tmp = Float64(x + Float64(y / Float64(Float64(1.1283791670955126 + Float64(z * 1.1283791670955126)) - Float64(x * y))));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -15500000000.0)
		tmp = x + (-1.0 / x);
	elseif (z <= 3.05)
		tmp = x + (y / ((1.1283791670955126 + (z * 1.1283791670955126)) - (x * y)));
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -15500000000.0], N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.05], N[(x + N[(y / N[(N[(1.1283791670955126 + N[(z * 1.1283791670955126), $MachinePrecision]), $MachinePrecision] - N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -15500000000:\\
\;\;\;\;x + \frac{-1}{x}\\

\mathbf{elif}\;z \leq 3.05:\\
\;\;\;\;x + \frac{y}{\left(1.1283791670955126 + z \cdot 1.1283791670955126\right) - x \cdot y}\\

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


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

    1. Initial program 86.3%

      \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
    2. Step-by-step derivation
      1. *-lft-identity86.3%

        \[\leadsto x + \color{blue}{1 \cdot \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}} \]
      2. metadata-eval86.3%

        \[\leadsto x + \color{blue}{\frac{-1}{-1}} \cdot \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
      3. times-frac86.3%

        \[\leadsto x + \color{blue}{\frac{-1 \cdot y}{-1 \cdot \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      4. neg-mul-186.3%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{-\left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      5. sub0-neg86.3%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{0 - \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      6. associate-+l-86.3%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{\left(0 - 1.1283791670955126 \cdot e^{z}\right) + x \cdot y}} \]
      7. neg-sub086.6%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{\left(-1.1283791670955126 \cdot e^{z}\right)} + x \cdot y} \]
      8. +-commutative86.6%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{x \cdot y + \left(-1.1283791670955126 \cdot e^{z}\right)}} \]
      9. sub-neg86.6%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{x \cdot y - 1.1283791670955126 \cdot e^{z}}} \]
      10. associate-/l*86.7%

        \[\leadsto x + \color{blue}{\frac{-1}{\frac{x \cdot y - 1.1283791670955126 \cdot e^{z}}{y}}} \]
      11. div-sub86.6%

        \[\leadsto x + \frac{-1}{\color{blue}{\frac{x \cdot y}{y} - \frac{1.1283791670955126 \cdot e^{z}}{y}}} \]
      12. associate-*r/100.0%

        \[\leadsto x + \frac{-1}{\color{blue}{x \cdot \frac{y}{y}} - \frac{1.1283791670955126 \cdot e^{z}}{y}} \]
      13. *-inverses100.0%

        \[\leadsto x + \frac{-1}{x \cdot \color{blue}{1} - \frac{1.1283791670955126 \cdot e^{z}}{y}} \]
      14. *-rgt-identity100.0%

        \[\leadsto x + \frac{-1}{\color{blue}{x} - \frac{1.1283791670955126 \cdot e^{z}}{y}} \]
      15. associate-*l/100.0%

        \[\leadsto x + \frac{-1}{x - \color{blue}{\frac{1.1283791670955126}{y} \cdot e^{z}}} \]
      16. cancel-sign-sub-inv100.0%

        \[\leadsto x + \frac{-1}{\color{blue}{x + \left(-\frac{1.1283791670955126}{y}\right) \cdot e^{z}}} \]
      17. distribute-lft-neg-in100.0%

        \[\leadsto x + \frac{-1}{x + \color{blue}{\left(-\frac{1.1283791670955126}{y} \cdot e^{z}\right)}} \]
      18. distribute-rgt-neg-in100.0%

        \[\leadsto x + \frac{-1}{x + \color{blue}{\frac{1.1283791670955126}{y} \cdot \left(-e^{z}\right)}} \]
      19. associate-*l/100.0%

        \[\leadsto x + \frac{-1}{x + \color{blue}{\frac{1.1283791670955126 \cdot \left(-e^{z}\right)}{y}}} \]
      20. distribute-rgt-neg-in100.0%

        \[\leadsto x + \frac{-1}{x + \frac{\color{blue}{-1.1283791670955126 \cdot e^{z}}}{y}} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{x + \frac{-1}{\mathsf{fma}\left(e^{z}, \frac{-1.1283791670955126}{y}, x\right)}} \]
    4. Taylor expanded in x around inf 100.0%

      \[\leadsto \color{blue}{x - \frac{1}{x}} \]

    if -1.55e10 < z < 3.0499999999999998

    1. Initial program 99.9%

      \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
    2. Taylor expanded in z around 0 99.7%

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

    if 3.0499999999999998 < z

    1. Initial program 91.2%

      \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
    2. Step-by-step derivation
      1. +-commutative91.2%

        \[\leadsto \color{blue}{\frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} + x} \]
      2. clear-num91.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{1.1283791670955126 \cdot e^{z} - x \cdot y}{y}}} + x \]
      3. associate-/r/91.2%

        \[\leadsto \color{blue}{\frac{1}{1.1283791670955126 \cdot e^{z} - x \cdot y} \cdot y} + x \]
      4. fma-def91.2%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{1.1283791670955126 \cdot e^{z} - x \cdot y}, y, x\right)} \]
      5. *-commutative91.2%

        \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{e^{z} \cdot 1.1283791670955126} - x \cdot y}, y, x\right) \]
      6. *-commutative91.2%

        \[\leadsto \mathsf{fma}\left(\frac{1}{e^{z} \cdot 1.1283791670955126 - \color{blue}{y \cdot x}}, y, x\right) \]
    3. Applied egg-rr91.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{e^{z} \cdot 1.1283791670955126 - y \cdot x}, y, x\right)} \]
    4. Taylor expanded in y around 0 100.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -15500000000:\\ \;\;\;\;x + \frac{-1}{x}\\ \mathbf{elif}\;z \leq 3.05:\\ \;\;\;\;x + \frac{y}{\left(1.1283791670955126 + z \cdot 1.1283791670955126\right) - x \cdot y}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 5: 86.8% accurate, 8.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x + \frac{-1}{x}\\ \mathbf{if}\;z \leq -3 \cdot 10^{-11}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{-92}:\\ \;\;\;\;x + \frac{y}{1.1283791670955126}\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{-36}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 0.000205:\\ \;\;\;\;x - y \cdot -0.8862269254527579\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (+ x (/ -1.0 x))))
   (if (<= z -3e-11)
     t_0
     (if (<= z 8.2e-92)
       (+ x (/ y 1.1283791670955126))
       (if (<= z 9.5e-36)
         t_0
         (if (<= z 0.000205) (- x (* y -0.8862269254527579)) x))))))
double code(double x, double y, double z) {
	double t_0 = x + (-1.0 / x);
	double tmp;
	if (z <= -3e-11) {
		tmp = t_0;
	} else if (z <= 8.2e-92) {
		tmp = x + (y / 1.1283791670955126);
	} else if (z <= 9.5e-36) {
		tmp = t_0;
	} else if (z <= 0.000205) {
		tmp = x - (y * -0.8862269254527579);
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: t_0
    real(8) :: tmp
    t_0 = x + ((-1.0d0) / x)
    if (z <= (-3d-11)) then
        tmp = t_0
    else if (z <= 8.2d-92) then
        tmp = x + (y / 1.1283791670955126d0)
    else if (z <= 9.5d-36) then
        tmp = t_0
    else if (z <= 0.000205d0) then
        tmp = x - (y * (-0.8862269254527579d0))
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = x + (-1.0 / x);
	double tmp;
	if (z <= -3e-11) {
		tmp = t_0;
	} else if (z <= 8.2e-92) {
		tmp = x + (y / 1.1283791670955126);
	} else if (z <= 9.5e-36) {
		tmp = t_0;
	} else if (z <= 0.000205) {
		tmp = x - (y * -0.8862269254527579);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = x + (-1.0 / x)
	tmp = 0
	if z <= -3e-11:
		tmp = t_0
	elif z <= 8.2e-92:
		tmp = x + (y / 1.1283791670955126)
	elif z <= 9.5e-36:
		tmp = t_0
	elif z <= 0.000205:
		tmp = x - (y * -0.8862269254527579)
	else:
		tmp = x
	return tmp
function code(x, y, z)
	t_0 = Float64(x + Float64(-1.0 / x))
	tmp = 0.0
	if (z <= -3e-11)
		tmp = t_0;
	elseif (z <= 8.2e-92)
		tmp = Float64(x + Float64(y / 1.1283791670955126));
	elseif (z <= 9.5e-36)
		tmp = t_0;
	elseif (z <= 0.000205)
		tmp = Float64(x - Float64(y * -0.8862269254527579));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = x + (-1.0 / x);
	tmp = 0.0;
	if (z <= -3e-11)
		tmp = t_0;
	elseif (z <= 8.2e-92)
		tmp = x + (y / 1.1283791670955126);
	elseif (z <= 9.5e-36)
		tmp = t_0;
	elseif (z <= 0.000205)
		tmp = x - (y * -0.8862269254527579);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3e-11], t$95$0, If[LessEqual[z, 8.2e-92], N[(x + N[(y / 1.1283791670955126), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.5e-36], t$95$0, If[LessEqual[z, 0.000205], N[(x - N[(y * -0.8862269254527579), $MachinePrecision]), $MachinePrecision], x]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x + \frac{-1}{x}\\
\mathbf{if}\;z \leq -3 \cdot 10^{-11}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;z \leq 8.2 \cdot 10^{-92}:\\
\;\;\;\;x + \frac{y}{1.1283791670955126}\\

\mathbf{elif}\;z \leq 9.5 \cdot 10^{-36}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;z \leq 0.000205:\\
\;\;\;\;x - y \cdot -0.8862269254527579\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3e-11 or 8.2000000000000005e-92 < z < 9.5000000000000003e-36

    1. Initial program 89.4%

      \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
    2. Step-by-step derivation
      1. *-lft-identity89.4%

        \[\leadsto x + \color{blue}{1 \cdot \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}} \]
      2. metadata-eval89.4%

        \[\leadsto x + \color{blue}{\frac{-1}{-1}} \cdot \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
      3. times-frac89.4%

        \[\leadsto x + \color{blue}{\frac{-1 \cdot y}{-1 \cdot \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      4. neg-mul-189.4%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{-\left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      5. sub0-neg89.4%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{0 - \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      6. associate-+l-89.4%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{\left(0 - 1.1283791670955126 \cdot e^{z}\right) + x \cdot y}} \]
      7. neg-sub089.7%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{\left(-1.1283791670955126 \cdot e^{z}\right)} + x \cdot y} \]
      8. +-commutative89.7%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{x \cdot y + \left(-1.1283791670955126 \cdot e^{z}\right)}} \]
      9. sub-neg89.7%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{x \cdot y - 1.1283791670955126 \cdot e^{z}}} \]
      10. associate-/l*89.7%

        \[\leadsto x + \color{blue}{\frac{-1}{\frac{x \cdot y - 1.1283791670955126 \cdot e^{z}}{y}}} \]
      11. div-sub89.6%

        \[\leadsto x + \frac{-1}{\color{blue}{\frac{x \cdot y}{y} - \frac{1.1283791670955126 \cdot e^{z}}{y}}} \]
      12. associate-*r/100.0%

        \[\leadsto x + \frac{-1}{\color{blue}{x \cdot \frac{y}{y}} - \frac{1.1283791670955126 \cdot e^{z}}{y}} \]
      13. *-inverses100.0%

        \[\leadsto x + \frac{-1}{x \cdot \color{blue}{1} - \frac{1.1283791670955126 \cdot e^{z}}{y}} \]
      14. *-rgt-identity100.0%

        \[\leadsto x + \frac{-1}{\color{blue}{x} - \frac{1.1283791670955126 \cdot e^{z}}{y}} \]
      15. associate-*l/100.0%

        \[\leadsto x + \frac{-1}{x - \color{blue}{\frac{1.1283791670955126}{y} \cdot e^{z}}} \]
      16. cancel-sign-sub-inv100.0%

        \[\leadsto x + \frac{-1}{\color{blue}{x + \left(-\frac{1.1283791670955126}{y}\right) \cdot e^{z}}} \]
      17. distribute-lft-neg-in100.0%

        \[\leadsto x + \frac{-1}{x + \color{blue}{\left(-\frac{1.1283791670955126}{y} \cdot e^{z}\right)}} \]
      18. distribute-rgt-neg-in100.0%

        \[\leadsto x + \frac{-1}{x + \color{blue}{\frac{1.1283791670955126}{y} \cdot \left(-e^{z}\right)}} \]
      19. associate-*l/100.0%

        \[\leadsto x + \frac{-1}{x + \color{blue}{\frac{1.1283791670955126 \cdot \left(-e^{z}\right)}{y}}} \]
      20. distribute-rgt-neg-in100.0%

        \[\leadsto x + \frac{-1}{x + \frac{\color{blue}{-1.1283791670955126 \cdot e^{z}}}{y}} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{x + \frac{-1}{\mathsf{fma}\left(e^{z}, \frac{-1.1283791670955126}{y}, x\right)}} \]
    4. Taylor expanded in x around inf 98.5%

      \[\leadsto \color{blue}{x - \frac{1}{x}} \]

    if -3e-11 < z < 8.2000000000000005e-92

    1. Initial program 99.9%

      \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
    2. Taylor expanded in z around 0 99.9%

      \[\leadsto \color{blue}{\frac{y}{1.1283791670955126 - y \cdot x} + x} \]
    3. Taylor expanded in y around 0 81.2%

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

    if 9.5000000000000003e-36 < z < 2.05e-4

    1. Initial program 99.6%

      \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
    2. Step-by-step derivation
      1. *-lft-identity99.6%

        \[\leadsto x + \color{blue}{1 \cdot \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}} \]
      2. metadata-eval99.6%

        \[\leadsto x + \color{blue}{\frac{-1}{-1}} \cdot \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
      3. times-frac99.6%

        \[\leadsto x + \color{blue}{\frac{-1 \cdot y}{-1 \cdot \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      4. neg-mul-199.6%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{-\left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      5. sub0-neg99.6%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{0 - \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      6. associate-+l-99.6%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{\left(0 - 1.1283791670955126 \cdot e^{z}\right) + x \cdot y}} \]
      7. neg-sub099.6%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{\left(-1.1283791670955126 \cdot e^{z}\right)} + x \cdot y} \]
      8. +-commutative99.6%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{x \cdot y + \left(-1.1283791670955126 \cdot e^{z}\right)}} \]
      9. sub-neg99.6%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{x \cdot y - 1.1283791670955126 \cdot e^{z}}} \]
      10. associate-/l*99.6%

        \[\leadsto x + \color{blue}{\frac{-1}{\frac{x \cdot y - 1.1283791670955126 \cdot e^{z}}{y}}} \]
      11. div-sub99.6%

        \[\leadsto x + \frac{-1}{\color{blue}{\frac{x \cdot y}{y} - \frac{1.1283791670955126 \cdot e^{z}}{y}}} \]
      12. associate-*r/99.6%

        \[\leadsto x + \frac{-1}{\color{blue}{x \cdot \frac{y}{y}} - \frac{1.1283791670955126 \cdot e^{z}}{y}} \]
      13. *-inverses99.6%

        \[\leadsto x + \frac{-1}{x \cdot \color{blue}{1} - \frac{1.1283791670955126 \cdot e^{z}}{y}} \]
      14. *-rgt-identity99.6%

        \[\leadsto x + \frac{-1}{\color{blue}{x} - \frac{1.1283791670955126 \cdot e^{z}}{y}} \]
      15. associate-*l/99.2%

        \[\leadsto x + \frac{-1}{x - \color{blue}{\frac{1.1283791670955126}{y} \cdot e^{z}}} \]
      16. cancel-sign-sub-inv99.2%

        \[\leadsto x + \frac{-1}{\color{blue}{x + \left(-\frac{1.1283791670955126}{y}\right) \cdot e^{z}}} \]
      17. distribute-lft-neg-in99.2%

        \[\leadsto x + \frac{-1}{x + \color{blue}{\left(-\frac{1.1283791670955126}{y} \cdot e^{z}\right)}} \]
      18. distribute-rgt-neg-in99.2%

        \[\leadsto x + \frac{-1}{x + \color{blue}{\frac{1.1283791670955126}{y} \cdot \left(-e^{z}\right)}} \]
      19. associate-*l/99.6%

        \[\leadsto x + \frac{-1}{x + \color{blue}{\frac{1.1283791670955126 \cdot \left(-e^{z}\right)}{y}}} \]
      20. distribute-rgt-neg-in99.6%

        \[\leadsto x + \frac{-1}{x + \frac{\color{blue}{-1.1283791670955126 \cdot e^{z}}}{y}} \]
    3. Simplified99.2%

      \[\leadsto \color{blue}{x + \frac{-1}{\mathsf{fma}\left(e^{z}, \frac{-1.1283791670955126}{y}, x\right)}} \]
    4. Taylor expanded in z around 0 85.2%

      \[\leadsto \color{blue}{x - \frac{1}{x - 1.1283791670955126 \cdot \frac{1}{y}}} \]
    5. Taylor expanded in x around 0 85.6%

      \[\leadsto x - \color{blue}{-0.8862269254527579 \cdot y} \]
    6. Step-by-step derivation
      1. *-commutative85.6%

        \[\leadsto x - \color{blue}{y \cdot -0.8862269254527579} \]
    7. Simplified85.6%

      \[\leadsto x - \color{blue}{y \cdot -0.8862269254527579} \]

    if 2.05e-4 < z

    1. Initial program 91.2%

      \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
    2. Step-by-step derivation
      1. +-commutative91.2%

        \[\leadsto \color{blue}{\frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} + x} \]
      2. clear-num91.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{1.1283791670955126 \cdot e^{z} - x \cdot y}{y}}} + x \]
      3. associate-/r/91.2%

        \[\leadsto \color{blue}{\frac{1}{1.1283791670955126 \cdot e^{z} - x \cdot y} \cdot y} + x \]
      4. fma-def91.2%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{1.1283791670955126 \cdot e^{z} - x \cdot y}, y, x\right)} \]
      5. *-commutative91.2%

        \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{e^{z} \cdot 1.1283791670955126} - x \cdot y}, y, x\right) \]
      6. *-commutative91.2%

        \[\leadsto \mathsf{fma}\left(\frac{1}{e^{z} \cdot 1.1283791670955126 - \color{blue}{y \cdot x}}, y, x\right) \]
    3. Applied egg-rr91.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{e^{z} \cdot 1.1283791670955126 - y \cdot x}, y, x\right)} \]
    4. Taylor expanded in y around 0 100.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{-11}:\\ \;\;\;\;x + \frac{-1}{x}\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{-92}:\\ \;\;\;\;x + \frac{y}{1.1283791670955126}\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{-36}:\\ \;\;\;\;x + \frac{-1}{x}\\ \mathbf{elif}\;z \leq 0.000205:\\ \;\;\;\;x - y \cdot -0.8862269254527579\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 6: 99.2% accurate, 8.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -15500000000:\\ \;\;\;\;x + \frac{-1}{x}\\ \mathbf{elif}\;z \leq 3.05:\\ \;\;\;\;x + \frac{y}{1.1283791670955126 - x \cdot y}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -15500000000.0)
   (+ x (/ -1.0 x))
   (if (<= z 3.05) (+ x (/ y (- 1.1283791670955126 (* x y)))) x)))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -15500000000.0) {
		tmp = x + (-1.0 / x);
	} else if (z <= 3.05) {
		tmp = x + (y / (1.1283791670955126 - (x * y)));
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (z <= (-15500000000.0d0)) then
        tmp = x + ((-1.0d0) / x)
    else if (z <= 3.05d0) then
        tmp = x + (y / (1.1283791670955126d0 - (x * y)))
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (z <= -15500000000.0) {
		tmp = x + (-1.0 / x);
	} else if (z <= 3.05) {
		tmp = x + (y / (1.1283791670955126 - (x * y)));
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -15500000000.0:
		tmp = x + (-1.0 / x)
	elif z <= 3.05:
		tmp = x + (y / (1.1283791670955126 - (x * y)))
	else:
		tmp = x
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -15500000000.0)
		tmp = Float64(x + Float64(-1.0 / x));
	elseif (z <= 3.05)
		tmp = Float64(x + Float64(y / Float64(1.1283791670955126 - Float64(x * y))));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -15500000000.0)
		tmp = x + (-1.0 / x);
	elseif (z <= 3.05)
		tmp = x + (y / (1.1283791670955126 - (x * y)));
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -15500000000.0], N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.05], N[(x + N[(y / N[(1.1283791670955126 - N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -15500000000:\\
\;\;\;\;x + \frac{-1}{x}\\

\mathbf{elif}\;z \leq 3.05:\\
\;\;\;\;x + \frac{y}{1.1283791670955126 - x \cdot y}\\

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


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

    1. Initial program 86.3%

      \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
    2. Step-by-step derivation
      1. *-lft-identity86.3%

        \[\leadsto x + \color{blue}{1 \cdot \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}} \]
      2. metadata-eval86.3%

        \[\leadsto x + \color{blue}{\frac{-1}{-1}} \cdot \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
      3. times-frac86.3%

        \[\leadsto x + \color{blue}{\frac{-1 \cdot y}{-1 \cdot \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      4. neg-mul-186.3%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{-\left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      5. sub0-neg86.3%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{0 - \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      6. associate-+l-86.3%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{\left(0 - 1.1283791670955126 \cdot e^{z}\right) + x \cdot y}} \]
      7. neg-sub086.6%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{\left(-1.1283791670955126 \cdot e^{z}\right)} + x \cdot y} \]
      8. +-commutative86.6%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{x \cdot y + \left(-1.1283791670955126 \cdot e^{z}\right)}} \]
      9. sub-neg86.6%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{x \cdot y - 1.1283791670955126 \cdot e^{z}}} \]
      10. associate-/l*86.7%

        \[\leadsto x + \color{blue}{\frac{-1}{\frac{x \cdot y - 1.1283791670955126 \cdot e^{z}}{y}}} \]
      11. div-sub86.6%

        \[\leadsto x + \frac{-1}{\color{blue}{\frac{x \cdot y}{y} - \frac{1.1283791670955126 \cdot e^{z}}{y}}} \]
      12. associate-*r/100.0%

        \[\leadsto x + \frac{-1}{\color{blue}{x \cdot \frac{y}{y}} - \frac{1.1283791670955126 \cdot e^{z}}{y}} \]
      13. *-inverses100.0%

        \[\leadsto x + \frac{-1}{x \cdot \color{blue}{1} - \frac{1.1283791670955126 \cdot e^{z}}{y}} \]
      14. *-rgt-identity100.0%

        \[\leadsto x + \frac{-1}{\color{blue}{x} - \frac{1.1283791670955126 \cdot e^{z}}{y}} \]
      15. associate-*l/100.0%

        \[\leadsto x + \frac{-1}{x - \color{blue}{\frac{1.1283791670955126}{y} \cdot e^{z}}} \]
      16. cancel-sign-sub-inv100.0%

        \[\leadsto x + \frac{-1}{\color{blue}{x + \left(-\frac{1.1283791670955126}{y}\right) \cdot e^{z}}} \]
      17. distribute-lft-neg-in100.0%

        \[\leadsto x + \frac{-1}{x + \color{blue}{\left(-\frac{1.1283791670955126}{y} \cdot e^{z}\right)}} \]
      18. distribute-rgt-neg-in100.0%

        \[\leadsto x + \frac{-1}{x + \color{blue}{\frac{1.1283791670955126}{y} \cdot \left(-e^{z}\right)}} \]
      19. associate-*l/100.0%

        \[\leadsto x + \frac{-1}{x + \color{blue}{\frac{1.1283791670955126 \cdot \left(-e^{z}\right)}{y}}} \]
      20. distribute-rgt-neg-in100.0%

        \[\leadsto x + \frac{-1}{x + \frac{\color{blue}{-1.1283791670955126 \cdot e^{z}}}{y}} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{x + \frac{-1}{\mathsf{fma}\left(e^{z}, \frac{-1.1283791670955126}{y}, x\right)}} \]
    4. Taylor expanded in x around inf 100.0%

      \[\leadsto \color{blue}{x - \frac{1}{x}} \]

    if -1.55e10 < z < 3.0499999999999998

    1. Initial program 99.9%

      \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
    2. Taylor expanded in z around 0 99.5%

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

    if 3.0499999999999998 < z

    1. Initial program 91.2%

      \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
    2. Step-by-step derivation
      1. +-commutative91.2%

        \[\leadsto \color{blue}{\frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} + x} \]
      2. clear-num91.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{1.1283791670955126 \cdot e^{z} - x \cdot y}{y}}} + x \]
      3. associate-/r/91.2%

        \[\leadsto \color{blue}{\frac{1}{1.1283791670955126 \cdot e^{z} - x \cdot y} \cdot y} + x \]
      4. fma-def91.2%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{1.1283791670955126 \cdot e^{z} - x \cdot y}, y, x\right)} \]
      5. *-commutative91.2%

        \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{e^{z} \cdot 1.1283791670955126} - x \cdot y}, y, x\right) \]
      6. *-commutative91.2%

        \[\leadsto \mathsf{fma}\left(\frac{1}{e^{z} \cdot 1.1283791670955126 - \color{blue}{y \cdot x}}, y, x\right) \]
    3. Applied egg-rr91.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{e^{z} \cdot 1.1283791670955126 - y \cdot x}, y, x\right)} \]
    4. Taylor expanded in y around 0 100.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -15500000000:\\ \;\;\;\;x + \frac{-1}{x}\\ \mathbf{elif}\;z \leq 3.05:\\ \;\;\;\;x + \frac{y}{1.1283791670955126 - x \cdot y}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 7: 75.2% accurate, 9.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.3 \cdot 10^{+121}:\\
\;\;\;\;\frac{-1}{x}\\

\mathbf{elif}\;z \leq -2.7 \cdot 10^{-21}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 0.17:\\
\;\;\;\;x + \frac{y}{1.1283791670955126}\\

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


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

    1. Initial program 86.5%

      \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
    2. Step-by-step derivation
      1. *-lft-identity86.5%

        \[\leadsto x + \color{blue}{1 \cdot \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}} \]
      2. metadata-eval86.5%

        \[\leadsto x + \color{blue}{\frac{-1}{-1}} \cdot \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
      3. times-frac86.5%

        \[\leadsto x + \color{blue}{\frac{-1 \cdot y}{-1 \cdot \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      4. neg-mul-186.5%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{-\left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      5. sub0-neg86.4%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{0 - \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      6. associate-+l-86.4%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{\left(0 - 1.1283791670955126 \cdot e^{z}\right) + x \cdot y}} \]
      7. neg-sub086.8%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{\left(-1.1283791670955126 \cdot e^{z}\right)} + x \cdot y} \]
      8. +-commutative86.8%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{x \cdot y + \left(-1.1283791670955126 \cdot e^{z}\right)}} \]
      9. sub-neg86.8%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{x \cdot y - 1.1283791670955126 \cdot e^{z}}} \]
      10. associate-/l*86.9%

        \[\leadsto x + \color{blue}{\frac{-1}{\frac{x \cdot y - 1.1283791670955126 \cdot e^{z}}{y}}} \]
      11. div-sub86.8%

        \[\leadsto x + \frac{-1}{\color{blue}{\frac{x \cdot y}{y} - \frac{1.1283791670955126 \cdot e^{z}}{y}}} \]
      12. associate-*r/99.9%

        \[\leadsto x + \frac{-1}{\color{blue}{x \cdot \frac{y}{y}} - \frac{1.1283791670955126 \cdot e^{z}}{y}} \]
      13. *-inverses99.9%

        \[\leadsto x + \frac{-1}{x \cdot \color{blue}{1} - \frac{1.1283791670955126 \cdot e^{z}}{y}} \]
      14. *-rgt-identity99.9%

        \[\leadsto x + \frac{-1}{\color{blue}{x} - \frac{1.1283791670955126 \cdot e^{z}}{y}} \]
      15. associate-*l/99.9%

        \[\leadsto x + \frac{-1}{x - \color{blue}{\frac{1.1283791670955126}{y} \cdot e^{z}}} \]
      16. cancel-sign-sub-inv99.9%

        \[\leadsto x + \frac{-1}{\color{blue}{x + \left(-\frac{1.1283791670955126}{y}\right) \cdot e^{z}}} \]
      17. distribute-lft-neg-in99.9%

        \[\leadsto x + \frac{-1}{x + \color{blue}{\left(-\frac{1.1283791670955126}{y} \cdot e^{z}\right)}} \]
      18. distribute-rgt-neg-in99.9%

        \[\leadsto x + \frac{-1}{x + \color{blue}{\frac{1.1283791670955126}{y} \cdot \left(-e^{z}\right)}} \]
      19. associate-*l/99.9%

        \[\leadsto x + \frac{-1}{x + \color{blue}{\frac{1.1283791670955126 \cdot \left(-e^{z}\right)}{y}}} \]
      20. distribute-rgt-neg-in99.9%

        \[\leadsto x + \frac{-1}{x + \frac{\color{blue}{-1.1283791670955126 \cdot e^{z}}}{y}} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x + \frac{-1}{\mathsf{fma}\left(e^{z}, \frac{-1.1283791670955126}{y}, x\right)}} \]
    4. Taylor expanded in x around inf 99.9%

      \[\leadsto \color{blue}{x - \frac{1}{x}} \]
    5. Taylor expanded in x around 0 67.1%

      \[\leadsto \color{blue}{\frac{-1}{x}} \]

    if -5.30000000000000009e121 < z < -2.7000000000000001e-21 or 0.170000000000000012 < z

    1. Initial program 90.8%

      \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
    2. Step-by-step derivation
      1. +-commutative90.8%

        \[\leadsto \color{blue}{\frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} + x} \]
      2. clear-num90.8%

        \[\leadsto \color{blue}{\frac{1}{\frac{1.1283791670955126 \cdot e^{z} - x \cdot y}{y}}} + x \]
      3. associate-/r/90.8%

        \[\leadsto \color{blue}{\frac{1}{1.1283791670955126 \cdot e^{z} - x \cdot y} \cdot y} + x \]
      4. fma-def90.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{1.1283791670955126 \cdot e^{z} - x \cdot y}, y, x\right)} \]
      5. *-commutative90.8%

        \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{e^{z} \cdot 1.1283791670955126} - x \cdot y}, y, x\right) \]
      6. *-commutative90.8%

        \[\leadsto \mathsf{fma}\left(\frac{1}{e^{z} \cdot 1.1283791670955126 - \color{blue}{y \cdot x}}, y, x\right) \]
    3. Applied egg-rr90.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{e^{z} \cdot 1.1283791670955126 - y \cdot x}, y, x\right)} \]
    4. Taylor expanded in y around 0 88.9%

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

    if -2.7000000000000001e-21 < z < 0.170000000000000012

    1. Initial program 99.9%

      \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
    2. Taylor expanded in z around 0 99.4%

      \[\leadsto \color{blue}{\frac{y}{1.1283791670955126 - y \cdot x} + x} \]
    3. Taylor expanded in y around 0 79.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.3 \cdot 10^{+121}:\\ \;\;\;\;\frac{-1}{x}\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{-21}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 0.17:\\ \;\;\;\;x + \frac{y}{1.1283791670955126}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 8: 70.7% accurate, 15.6× speedup?

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

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

\mathbf{elif}\;x \leq 1.45 \cdot 10^{-142}:\\
\;\;\;\;y \cdot 0.8862269254527579\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.9e-168 or 1.44999999999999995e-142 < x

    1. Initial program 95.3%

      \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
    2. Step-by-step derivation
      1. +-commutative95.3%

        \[\leadsto \color{blue}{\frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} + x} \]
      2. clear-num95.3%

        \[\leadsto \color{blue}{\frac{1}{\frac{1.1283791670955126 \cdot e^{z} - x \cdot y}{y}}} + x \]
      3. associate-/r/94.8%

        \[\leadsto \color{blue}{\frac{1}{1.1283791670955126 \cdot e^{z} - x \cdot y} \cdot y} + x \]
      4. fma-def94.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{1.1283791670955126 \cdot e^{z} - x \cdot y}, y, x\right)} \]
      5. *-commutative94.8%

        \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{e^{z} \cdot 1.1283791670955126} - x \cdot y}, y, x\right) \]
      6. *-commutative94.8%

        \[\leadsto \mathsf{fma}\left(\frac{1}{e^{z} \cdot 1.1283791670955126 - \color{blue}{y \cdot x}}, y, x\right) \]
    3. Applied egg-rr94.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{e^{z} \cdot 1.1283791670955126 - y \cdot x}, y, x\right)} \]
    4. Taylor expanded in y around 0 83.5%

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

    if -1.9e-168 < x < 1.44999999999999995e-142

    1. Initial program 93.5%

      \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
    2. Step-by-step derivation
      1. +-commutative93.5%

        \[\leadsto \color{blue}{\frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} + x} \]
      2. clear-num93.5%

        \[\leadsto \color{blue}{\frac{1}{\frac{1.1283791670955126 \cdot e^{z} - x \cdot y}{y}}} + x \]
      3. associate-/r/93.4%

        \[\leadsto \color{blue}{\frac{1}{1.1283791670955126 \cdot e^{z} - x \cdot y} \cdot y} + x \]
      4. fma-def93.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{1.1283791670955126 \cdot e^{z} - x \cdot y}, y, x\right)} \]
      5. *-commutative93.4%

        \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{e^{z} \cdot 1.1283791670955126} - x \cdot y}, y, x\right) \]
      6. *-commutative93.4%

        \[\leadsto \mathsf{fma}\left(\frac{1}{e^{z} \cdot 1.1283791670955126 - \color{blue}{y \cdot x}}, y, x\right) \]
    3. Applied egg-rr93.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{e^{z} \cdot 1.1283791670955126 - y \cdot x}, y, x\right)} \]
    4. Taylor expanded in x around 0 46.6%

      \[\leadsto \color{blue}{0.8862269254527579 \cdot \frac{y}{e^{z}}} \]
    5. Step-by-step derivation
      1. associate-*r/46.6%

        \[\leadsto \color{blue}{\frac{0.8862269254527579 \cdot y}{e^{z}}} \]
      2. *-commutative46.6%

        \[\leadsto \frac{\color{blue}{y \cdot 0.8862269254527579}}{e^{z}} \]
    6. Simplified46.6%

      \[\leadsto \color{blue}{\frac{y \cdot 0.8862269254527579}{e^{z}}} \]
    7. Taylor expanded in z around 0 46.0%

      \[\leadsto \color{blue}{0.8862269254527579 \cdot y + -0.8862269254527579 \cdot \left(y \cdot z\right)} \]
    8. Step-by-step derivation
      1. *-commutative46.0%

        \[\leadsto \color{blue}{y \cdot 0.8862269254527579} + -0.8862269254527579 \cdot \left(y \cdot z\right) \]
      2. metadata-eval46.0%

        \[\leadsto y \cdot \color{blue}{\left(-0.8862269254527579 \cdot -1\right)} + -0.8862269254527579 \cdot \left(y \cdot z\right) \]
      3. associate-*l*46.0%

        \[\leadsto \color{blue}{\left(y \cdot -0.8862269254527579\right) \cdot -1} + -0.8862269254527579 \cdot \left(y \cdot z\right) \]
      4. associate-*r*46.0%

        \[\leadsto \left(y \cdot -0.8862269254527579\right) \cdot -1 + \color{blue}{\left(-0.8862269254527579 \cdot y\right) \cdot z} \]
      5. *-commutative46.0%

        \[\leadsto \left(y \cdot -0.8862269254527579\right) \cdot -1 + \color{blue}{\left(y \cdot -0.8862269254527579\right)} \cdot z \]
      6. distribute-lft-out46.0%

        \[\leadsto \color{blue}{\left(y \cdot -0.8862269254527579\right) \cdot \left(-1 + z\right)} \]
      7. *-commutative46.0%

        \[\leadsto \color{blue}{\left(-0.8862269254527579 \cdot y\right)} \cdot \left(-1 + z\right) \]
    9. Simplified46.0%

      \[\leadsto \color{blue}{\left(-0.8862269254527579 \cdot y\right) \cdot \left(-1 + z\right)} \]
    10. Taylor expanded in z around 0 46.1%

      \[\leadsto \color{blue}{0.8862269254527579 \cdot y} \]
    11. Step-by-step derivation
      1. *-commutative46.1%

        \[\leadsto \color{blue}{y \cdot 0.8862269254527579} \]
    12. Simplified46.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.9 \cdot 10^{-168}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.45 \cdot 10^{-142}:\\ \;\;\;\;y \cdot 0.8862269254527579\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 9: 69.4% accurate, 21.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+121}:\\
\;\;\;\;\frac{-1}{x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.00000000000000015e121

    1. Initial program 86.5%

      \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
    2. Step-by-step derivation
      1. *-lft-identity86.5%

        \[\leadsto x + \color{blue}{1 \cdot \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}} \]
      2. metadata-eval86.5%

        \[\leadsto x + \color{blue}{\frac{-1}{-1}} \cdot \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
      3. times-frac86.5%

        \[\leadsto x + \color{blue}{\frac{-1 \cdot y}{-1 \cdot \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      4. neg-mul-186.5%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{-\left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      5. sub0-neg86.4%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{0 - \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      6. associate-+l-86.4%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{\left(0 - 1.1283791670955126 \cdot e^{z}\right) + x \cdot y}} \]
      7. neg-sub086.8%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{\left(-1.1283791670955126 \cdot e^{z}\right)} + x \cdot y} \]
      8. +-commutative86.8%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{x \cdot y + \left(-1.1283791670955126 \cdot e^{z}\right)}} \]
      9. sub-neg86.8%

        \[\leadsto x + \frac{-1 \cdot y}{\color{blue}{x \cdot y - 1.1283791670955126 \cdot e^{z}}} \]
      10. associate-/l*86.9%

        \[\leadsto x + \color{blue}{\frac{-1}{\frac{x \cdot y - 1.1283791670955126 \cdot e^{z}}{y}}} \]
      11. div-sub86.8%

        \[\leadsto x + \frac{-1}{\color{blue}{\frac{x \cdot y}{y} - \frac{1.1283791670955126 \cdot e^{z}}{y}}} \]
      12. associate-*r/99.9%

        \[\leadsto x + \frac{-1}{\color{blue}{x \cdot \frac{y}{y}} - \frac{1.1283791670955126 \cdot e^{z}}{y}} \]
      13. *-inverses99.9%

        \[\leadsto x + \frac{-1}{x \cdot \color{blue}{1} - \frac{1.1283791670955126 \cdot e^{z}}{y}} \]
      14. *-rgt-identity99.9%

        \[\leadsto x + \frac{-1}{\color{blue}{x} - \frac{1.1283791670955126 \cdot e^{z}}{y}} \]
      15. associate-*l/99.9%

        \[\leadsto x + \frac{-1}{x - \color{blue}{\frac{1.1283791670955126}{y} \cdot e^{z}}} \]
      16. cancel-sign-sub-inv99.9%

        \[\leadsto x + \frac{-1}{\color{blue}{x + \left(-\frac{1.1283791670955126}{y}\right) \cdot e^{z}}} \]
      17. distribute-lft-neg-in99.9%

        \[\leadsto x + \frac{-1}{x + \color{blue}{\left(-\frac{1.1283791670955126}{y} \cdot e^{z}\right)}} \]
      18. distribute-rgt-neg-in99.9%

        \[\leadsto x + \frac{-1}{x + \color{blue}{\frac{1.1283791670955126}{y} \cdot \left(-e^{z}\right)}} \]
      19. associate-*l/99.9%

        \[\leadsto x + \frac{-1}{x + \color{blue}{\frac{1.1283791670955126 \cdot \left(-e^{z}\right)}{y}}} \]
      20. distribute-rgt-neg-in99.9%

        \[\leadsto x + \frac{-1}{x + \frac{\color{blue}{-1.1283791670955126 \cdot e^{z}}}{y}} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x + \frac{-1}{\mathsf{fma}\left(e^{z}, \frac{-1.1283791670955126}{y}, x\right)}} \]
    4. Taylor expanded in x around inf 99.9%

      \[\leadsto \color{blue}{x - \frac{1}{x}} \]
    5. Taylor expanded in x around 0 67.1%

      \[\leadsto \color{blue}{\frac{-1}{x}} \]

    if -4.00000000000000015e121 < z

    1. Initial program 96.0%

      \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
    2. Step-by-step derivation
      1. +-commutative96.0%

        \[\leadsto \color{blue}{\frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} + x} \]
      2. clear-num95.9%

        \[\leadsto \color{blue}{\frac{1}{\frac{1.1283791670955126 \cdot e^{z} - x \cdot y}{y}}} + x \]
      3. associate-/r/95.9%

        \[\leadsto \color{blue}{\frac{1}{1.1283791670955126 \cdot e^{z} - x \cdot y} \cdot y} + x \]
      4. fma-def95.9%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{1.1283791670955126 \cdot e^{z} - x \cdot y}, y, x\right)} \]
      5. *-commutative95.9%

        \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{e^{z} \cdot 1.1283791670955126} - x \cdot y}, y, x\right) \]
      6. *-commutative95.9%

        \[\leadsto \mathsf{fma}\left(\frac{1}{e^{z} \cdot 1.1283791670955126 - \color{blue}{y \cdot x}}, y, x\right) \]
    3. Applied egg-rr95.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{e^{z} \cdot 1.1283791670955126 - y \cdot x}, y, x\right)} \]
    4. Taylor expanded in y around 0 74.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{+121}:\\ \;\;\;\;\frac{-1}{x}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 10: 69.4% accurate, 111.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z) :precision binary64 x)
double code(double x, double y, double z) {
	return x;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = x
end function
public static double code(double x, double y, double z) {
	return x;
}
def code(x, y, z):
	return x
function code(x, y, z)
	return x
end
function tmp = code(x, y, z)
	tmp = x;
end
code[x_, y_, z_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 94.9%

    \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
  2. Step-by-step derivation
    1. +-commutative94.9%

      \[\leadsto \color{blue}{\frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} + x} \]
    2. clear-num94.9%

      \[\leadsto \color{blue}{\frac{1}{\frac{1.1283791670955126 \cdot e^{z} - x \cdot y}{y}}} + x \]
    3. associate-/r/94.5%

      \[\leadsto \color{blue}{\frac{1}{1.1283791670955126 \cdot e^{z} - x \cdot y} \cdot y} + x \]
    4. fma-def94.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{1.1283791670955126 \cdot e^{z} - x \cdot y}, y, x\right)} \]
    5. *-commutative94.5%

      \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{e^{z} \cdot 1.1283791670955126} - x \cdot y}, y, x\right) \]
    6. *-commutative94.5%

      \[\leadsto \mathsf{fma}\left(\frac{1}{e^{z} \cdot 1.1283791670955126 - \color{blue}{y \cdot x}}, y, x\right) \]
  3. Applied egg-rr94.5%

    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{e^{z} \cdot 1.1283791670955126 - y \cdot x}, y, x\right)} \]
  4. Taylor expanded in y around 0 69.6%

    \[\leadsto \color{blue}{x} \]
  5. Final simplification69.6%

    \[\leadsto x \]

Developer target: 99.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \frac{1}{\frac{1.1283791670955126}{y} \cdot e^{z} - x} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (+ x (/ 1.0 (- (* (/ 1.1283791670955126 y) (exp z)) x))))
double code(double x, double y, double z) {
	return x + (1.0 / (((1.1283791670955126 / y) * exp(z)) - x));
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = x + (1.0d0 / (((1.1283791670955126d0 / y) * exp(z)) - x))
end function
public static double code(double x, double y, double z) {
	return x + (1.0 / (((1.1283791670955126 / y) * Math.exp(z)) - x));
}
def code(x, y, z):
	return x + (1.0 / (((1.1283791670955126 / y) * math.exp(z)) - x))
function code(x, y, z)
	return Float64(x + Float64(1.0 / Float64(Float64(Float64(1.1283791670955126 / y) * exp(z)) - x)))
end
function tmp = code(x, y, z)
	tmp = x + (1.0 / (((1.1283791670955126 / y) * exp(z)) - x));
end
code[x_, y_, z_] := N[(x + N[(1.0 / N[(N[(N[(1.1283791670955126 / y), $MachinePrecision] * N[Exp[z], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \frac{1}{\frac{1.1283791670955126}{y} \cdot e^{z} - x}
\end{array}

Reproduce

?
herbie shell --seed 2023195 
(FPCore (x y z)
  :name "Numeric.SpecFunctions:invErfc from math-functions-0.1.5.2, A"
  :precision binary64

  :herbie-target
  (+ x (/ 1.0 (- (* (/ 1.1283791670955126 y) (exp z)) x)))

  (+ x (/ y (- (* 1.1283791670955126 (exp z)) (* x y)))))