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

Percentage Accurate: 95.3% → 98.3%
Time: 9.9s
Alternatives: 7
Speedup: 0.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 7 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.3% 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.3% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;e^{z} \leq 0:\\ \;\;\;\;x + \frac{-1}{x}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{e^{z} \cdot 1.1283791670955126 - x \cdot y}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= (exp z) 0.0)
   (+ x (/ -1.0 x))
   (+ x (/ y (- (* (exp z) 1.1283791670955126) (* x y))))))
double code(double x, double y, double z) {
	double tmp;
	if (exp(z) <= 0.0) {
		tmp = x + (-1.0 / x);
	} else {
		tmp = x + (y / ((exp(z) * 1.1283791670955126) - (x * y)));
	}
	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 (exp(z) <= 0.0d0) then
        tmp = x + ((-1.0d0) / x)
    else
        tmp = x + (y / ((exp(z) * 1.1283791670955126d0) - (x * y)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (Math.exp(z) <= 0.0) {
		tmp = x + (-1.0 / x);
	} else {
		tmp = x + (y / ((Math.exp(z) * 1.1283791670955126) - (x * y)));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if math.exp(z) <= 0.0:
		tmp = x + (-1.0 / x)
	else:
		tmp = x + (y / ((math.exp(z) * 1.1283791670955126) - (x * y)))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (exp(z) <= 0.0)
		tmp = Float64(x + Float64(-1.0 / x));
	else
		tmp = Float64(x + Float64(y / Float64(Float64(exp(z) * 1.1283791670955126) - Float64(x * y))));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (exp(z) <= 0.0)
		tmp = x + (-1.0 / x);
	else
		tmp = x + (y / ((exp(z) * 1.1283791670955126) - (x * y)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[N[Exp[z], $MachinePrecision], 0.0], N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(N[Exp[z], $MachinePrecision] * 1.1283791670955126), $MachinePrecision] - N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (exp.f64 z) < 0.0

    1. Initial program 86.8%

      \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf

      \[\leadsto \color{blue}{x - \frac{1}{x}} \]
    4. Step-by-step derivation
      1. sub-negN/A

        \[\leadsto \color{blue}{x + \left(\mathsf{neg}\left(\frac{1}{x}\right)\right)} \]
      2. +-lowering-+.f64N/A

        \[\leadsto \color{blue}{x + \left(\mathsf{neg}\left(\frac{1}{x}\right)\right)} \]
      3. distribute-neg-fracN/A

        \[\leadsto x + \color{blue}{\frac{\mathsf{neg}\left(1\right)}{x}} \]
      4. metadata-evalN/A

        \[\leadsto x + \frac{\color{blue}{-1}}{x} \]
      5. /-lowering-/.f64100.0

        \[\leadsto x + \color{blue}{\frac{-1}{x}} \]
    5. Simplified100.0%

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

    if 0.0 < (exp.f64 z)

    1. Initial program 99.9%

      \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification99.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;e^{z} \leq 0:\\ \;\;\;\;x + \frac{-1}{x}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{e^{z} \cdot 1.1283791670955126 - x \cdot y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 99.3% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;e^{z} \leq 0:\\ \;\;\;\;x + \frac{-1}{x}\\ \mathbf{elif}\;e^{z} \leq 1.000000000002:\\ \;\;\;\;x + \frac{-1}{x + \frac{-1.1283791670955126}{y}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= (exp z) 0.0)
   (+ x (/ -1.0 x))
   (if (<= (exp z) 1.000000000002)
     (+ x (/ -1.0 (+ x (/ -1.1283791670955126 y))))
     x)))
double code(double x, double y, double z) {
	double tmp;
	if (exp(z) <= 0.0) {
		tmp = x + (-1.0 / x);
	} else if (exp(z) <= 1.000000000002) {
		tmp = x + (-1.0 / (x + (-1.1283791670955126 / 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 (exp(z) <= 0.0d0) then
        tmp = x + ((-1.0d0) / x)
    else if (exp(z) <= 1.000000000002d0) then
        tmp = x + ((-1.0d0) / (x + ((-1.1283791670955126d0) / y)))
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (Math.exp(z) <= 0.0) {
		tmp = x + (-1.0 / x);
	} else if (Math.exp(z) <= 1.000000000002) {
		tmp = x + (-1.0 / (x + (-1.1283791670955126 / y)));
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if math.exp(z) <= 0.0:
		tmp = x + (-1.0 / x)
	elif math.exp(z) <= 1.000000000002:
		tmp = x + (-1.0 / (x + (-1.1283791670955126 / y)))
	else:
		tmp = x
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (exp(z) <= 0.0)
		tmp = Float64(x + Float64(-1.0 / x));
	elseif (exp(z) <= 1.000000000002)
		tmp = Float64(x + Float64(-1.0 / Float64(x + Float64(-1.1283791670955126 / y))));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (exp(z) <= 0.0)
		tmp = x + (-1.0 / x);
	elseif (exp(z) <= 1.000000000002)
		tmp = x + (-1.0 / (x + (-1.1283791670955126 / y)));
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[N[Exp[z], $MachinePrecision], 0.0], N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Exp[z], $MachinePrecision], 1.000000000002], N[(x + N[(-1.0 / N[(x + N[(-1.1283791670955126 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}

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

\mathbf{elif}\;e^{z} \leq 1.000000000002:\\
\;\;\;\;x + \frac{-1}{x + \frac{-1.1283791670955126}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (exp.f64 z) < 0.0

    1. Initial program 86.8%

      \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf

      \[\leadsto \color{blue}{x - \frac{1}{x}} \]
    4. Step-by-step derivation
      1. sub-negN/A

        \[\leadsto \color{blue}{x + \left(\mathsf{neg}\left(\frac{1}{x}\right)\right)} \]
      2. +-lowering-+.f64N/A

        \[\leadsto \color{blue}{x + \left(\mathsf{neg}\left(\frac{1}{x}\right)\right)} \]
      3. distribute-neg-fracN/A

        \[\leadsto x + \color{blue}{\frac{\mathsf{neg}\left(1\right)}{x}} \]
      4. metadata-evalN/A

        \[\leadsto x + \frac{\color{blue}{-1}}{x} \]
      5. /-lowering-/.f64100.0

        \[\leadsto x + \color{blue}{\frac{-1}{x}} \]
    5. Simplified100.0%

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

    if 0.0 < (exp.f64 z) < 1.00000000000199996

    1. Initial program 99.8%

      \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{5641895835477563}{5000000000000000} \cdot e^{z} - x \cdot y}{y}}} \]
      2. frac-2negN/A

        \[\leadsto x + \color{blue}{\frac{\mathsf{neg}\left(1\right)}{\mathsf{neg}\left(\frac{\frac{5641895835477563}{5000000000000000} \cdot e^{z} - x \cdot y}{y}\right)}} \]
      3. metadata-evalN/A

        \[\leadsto x + \frac{\color{blue}{-1}}{\mathsf{neg}\left(\frac{\frac{5641895835477563}{5000000000000000} \cdot e^{z} - x \cdot y}{y}\right)} \]
      4. /-lowering-/.f64N/A

        \[\leadsto x + \color{blue}{\frac{-1}{\mathsf{neg}\left(\frac{\frac{5641895835477563}{5000000000000000} \cdot e^{z} - x \cdot y}{y}\right)}} \]
      5. distribute-neg-fracN/A

        \[\leadsto x + \frac{-1}{\color{blue}{\frac{\mathsf{neg}\left(\left(\frac{5641895835477563}{5000000000000000} \cdot e^{z} - x \cdot y\right)\right)}{y}}} \]
      6. /-lowering-/.f64N/A

        \[\leadsto x + \frac{-1}{\color{blue}{\frac{\mathsf{neg}\left(\left(\frac{5641895835477563}{5000000000000000} \cdot e^{z} - x \cdot y\right)\right)}{y}}} \]
      7. sub-negN/A

        \[\leadsto x + \frac{-1}{\frac{\mathsf{neg}\left(\color{blue}{\left(\frac{5641895835477563}{5000000000000000} \cdot e^{z} + \left(\mathsf{neg}\left(x \cdot y\right)\right)\right)}\right)}{y}} \]
      8. +-commutativeN/A

        \[\leadsto x + \frac{-1}{\frac{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(x \cdot y\right)\right) + \frac{5641895835477563}{5000000000000000} \cdot e^{z}\right)}\right)}{y}} \]
      9. distribute-neg-inN/A

        \[\leadsto x + \frac{-1}{\frac{\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x \cdot y\right)\right)\right)\right) + \left(\mathsf{neg}\left(\frac{5641895835477563}{5000000000000000} \cdot e^{z}\right)\right)}}{y}} \]
      10. remove-double-negN/A

        \[\leadsto x + \frac{-1}{\frac{\color{blue}{x \cdot y} + \left(\mathsf{neg}\left(\frac{5641895835477563}{5000000000000000} \cdot e^{z}\right)\right)}{y}} \]
      11. accelerator-lowering-fma.f64N/A

        \[\leadsto x + \frac{-1}{\frac{\color{blue}{\mathsf{fma}\left(x, y, \mathsf{neg}\left(\frac{5641895835477563}{5000000000000000} \cdot e^{z}\right)\right)}}{y}} \]
      12. *-commutativeN/A

        \[\leadsto x + \frac{-1}{\frac{\mathsf{fma}\left(x, y, \mathsf{neg}\left(\color{blue}{e^{z} \cdot \frac{5641895835477563}{5000000000000000}}\right)\right)}{y}} \]
      13. distribute-rgt-neg-inN/A

        \[\leadsto x + \frac{-1}{\frac{\mathsf{fma}\left(x, y, \color{blue}{e^{z} \cdot \left(\mathsf{neg}\left(\frac{5641895835477563}{5000000000000000}\right)\right)}\right)}{y}} \]
      14. *-lowering-*.f64N/A

        \[\leadsto x + \frac{-1}{\frac{\mathsf{fma}\left(x, y, \color{blue}{e^{z} \cdot \left(\mathsf{neg}\left(\frac{5641895835477563}{5000000000000000}\right)\right)}\right)}{y}} \]
      15. exp-lowering-exp.f64N/A

        \[\leadsto x + \frac{-1}{\frac{\mathsf{fma}\left(x, y, \color{blue}{e^{z}} \cdot \left(\mathsf{neg}\left(\frac{5641895835477563}{5000000000000000}\right)\right)\right)}{y}} \]
      16. metadata-eval99.8

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

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

      \[\leadsto x + \frac{-1}{\color{blue}{\frac{x \cdot y - \frac{5641895835477563}{5000000000000000}}{y}}} \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto x + \frac{-1}{\color{blue}{\frac{x \cdot y - \frac{5641895835477563}{5000000000000000}}{y}}} \]
      2. sub-negN/A

        \[\leadsto x + \frac{-1}{\frac{\color{blue}{x \cdot y + \left(\mathsf{neg}\left(\frac{5641895835477563}{5000000000000000}\right)\right)}}{y}} \]
      3. *-commutativeN/A

        \[\leadsto x + \frac{-1}{\frac{\color{blue}{y \cdot x} + \left(\mathsf{neg}\left(\frac{5641895835477563}{5000000000000000}\right)\right)}{y}} \]
      4. metadata-evalN/A

        \[\leadsto x + \frac{-1}{\frac{y \cdot x + \color{blue}{\frac{-5641895835477563}{5000000000000000}}}{y}} \]
      5. accelerator-lowering-fma.f6499.0

        \[\leadsto x + \frac{-1}{\frac{\color{blue}{\mathsf{fma}\left(y, x, -1.1283791670955126\right)}}{y}} \]
    7. Simplified99.0%

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

      \[\leadsto x + \frac{-1}{\color{blue}{\frac{x \cdot y - \frac{5641895835477563}{5000000000000000}}{y}}} \]
    9. Step-by-step derivation
      1. div-subN/A

        \[\leadsto x + \frac{-1}{\color{blue}{\frac{x \cdot y}{y} - \frac{\frac{5641895835477563}{5000000000000000}}{y}}} \]
      2. associate-/l*N/A

        \[\leadsto x + \frac{-1}{\color{blue}{x \cdot \frac{y}{y}} - \frac{\frac{5641895835477563}{5000000000000000}}{y}} \]
      3. *-inversesN/A

        \[\leadsto x + \frac{-1}{x \cdot \color{blue}{1} - \frac{\frac{5641895835477563}{5000000000000000}}{y}} \]
      4. *-rgt-identityN/A

        \[\leadsto x + \frac{-1}{\color{blue}{x} - \frac{\frac{5641895835477563}{5000000000000000}}{y}} \]
      5. metadata-evalN/A

        \[\leadsto x + \frac{-1}{x - \frac{\color{blue}{\frac{5641895835477563}{5000000000000000} \cdot 1}}{y}} \]
      6. associate-*r/N/A

        \[\leadsto x + \frac{-1}{x - \color{blue}{\frac{5641895835477563}{5000000000000000} \cdot \frac{1}{y}}} \]
      7. sub-negN/A

        \[\leadsto x + \frac{-1}{\color{blue}{x + \left(\mathsf{neg}\left(\frac{5641895835477563}{5000000000000000} \cdot \frac{1}{y}\right)\right)}} \]
      8. +-lowering-+.f64N/A

        \[\leadsto x + \frac{-1}{\color{blue}{x + \left(\mathsf{neg}\left(\frac{5641895835477563}{5000000000000000} \cdot \frac{1}{y}\right)\right)}} \]
      9. associate-*r/N/A

        \[\leadsto x + \frac{-1}{x + \left(\mathsf{neg}\left(\color{blue}{\frac{\frac{5641895835477563}{5000000000000000} \cdot 1}{y}}\right)\right)} \]
      10. metadata-evalN/A

        \[\leadsto x + \frac{-1}{x + \left(\mathsf{neg}\left(\frac{\color{blue}{\frac{5641895835477563}{5000000000000000}}}{y}\right)\right)} \]
      11. distribute-neg-fracN/A

        \[\leadsto x + \frac{-1}{x + \color{blue}{\frac{\mathsf{neg}\left(\frac{5641895835477563}{5000000000000000}\right)}{y}}} \]
      12. metadata-evalN/A

        \[\leadsto x + \frac{-1}{x + \frac{\color{blue}{\frac{-5641895835477563}{5000000000000000}}}{y}} \]
      13. /-lowering-/.f6499.1

        \[\leadsto x + \frac{-1}{x + \color{blue}{\frac{-1.1283791670955126}{y}}} \]
    10. Simplified99.1%

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

    if 1.00000000000199996 < (exp.f64 z)

    1. Initial program 100.0%

      \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf

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

        \[\leadsto \color{blue}{x} \]
    5. Recombined 3 regimes into one program.
    6. Add Preprocessing

    Alternative 3: 99.3% accurate, 0.5× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;e^{z} \leq 7.5 \cdot 10^{-107}:\\ \;\;\;\;x + \frac{-1}{x}\\ \mathbf{elif}\;e^{z} \leq 1.000000000002:\\ \;\;\;\;x - \frac{y}{\mathsf{fma}\left(y, x, -1.1283791670955126\right)}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
    (FPCore (x y z)
     :precision binary64
     (if (<= (exp z) 7.5e-107)
       (+ x (/ -1.0 x))
       (if (<= (exp z) 1.000000000002)
         (- x (/ y (fma y x -1.1283791670955126)))
         x)))
    double code(double x, double y, double z) {
    	double tmp;
    	if (exp(z) <= 7.5e-107) {
    		tmp = x + (-1.0 / x);
    	} else if (exp(z) <= 1.000000000002) {
    		tmp = x - (y / fma(y, x, -1.1283791670955126));
    	} else {
    		tmp = x;
    	}
    	return tmp;
    }
    
    function code(x, y, z)
    	tmp = 0.0
    	if (exp(z) <= 7.5e-107)
    		tmp = Float64(x + Float64(-1.0 / x));
    	elseif (exp(z) <= 1.000000000002)
    		tmp = Float64(x - Float64(y / fma(y, x, -1.1283791670955126)));
    	else
    		tmp = x;
    	end
    	return tmp
    end
    
    code[x_, y_, z_] := If[LessEqual[N[Exp[z], $MachinePrecision], 7.5e-107], N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Exp[z], $MachinePrecision], 1.000000000002], N[(x - N[(y / N[(y * x + -1.1283791670955126), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;e^{z} \leq 7.5 \cdot 10^{-107}:\\
    \;\;\;\;x + \frac{-1}{x}\\
    
    \mathbf{elif}\;e^{z} \leq 1.000000000002:\\
    \;\;\;\;x - \frac{y}{\mathsf{fma}\left(y, x, -1.1283791670955126\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;x\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if (exp.f64 z) < 7.50000000000000047e-107

      1. Initial program 86.8%

        \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
      2. Add Preprocessing
      3. Taylor expanded in y around inf

        \[\leadsto \color{blue}{x - \frac{1}{x}} \]
      4. Step-by-step derivation
        1. sub-negN/A

          \[\leadsto \color{blue}{x + \left(\mathsf{neg}\left(\frac{1}{x}\right)\right)} \]
        2. +-lowering-+.f64N/A

          \[\leadsto \color{blue}{x + \left(\mathsf{neg}\left(\frac{1}{x}\right)\right)} \]
        3. distribute-neg-fracN/A

          \[\leadsto x + \color{blue}{\frac{\mathsf{neg}\left(1\right)}{x}} \]
        4. metadata-evalN/A

          \[\leadsto x + \frac{\color{blue}{-1}}{x} \]
        5. /-lowering-/.f64100.0

          \[\leadsto x + \color{blue}{\frac{-1}{x}} \]
      5. Simplified100.0%

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

      if 7.50000000000000047e-107 < (exp.f64 z) < 1.00000000000199996

      1. Initial program 99.8%

        \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. clear-numN/A

          \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{5641895835477563}{5000000000000000} \cdot e^{z} - x \cdot y}{y}}} \]
        2. frac-2negN/A

          \[\leadsto x + \color{blue}{\frac{\mathsf{neg}\left(1\right)}{\mathsf{neg}\left(\frac{\frac{5641895835477563}{5000000000000000} \cdot e^{z} - x \cdot y}{y}\right)}} \]
        3. metadata-evalN/A

          \[\leadsto x + \frac{\color{blue}{-1}}{\mathsf{neg}\left(\frac{\frac{5641895835477563}{5000000000000000} \cdot e^{z} - x \cdot y}{y}\right)} \]
        4. /-lowering-/.f64N/A

          \[\leadsto x + \color{blue}{\frac{-1}{\mathsf{neg}\left(\frac{\frac{5641895835477563}{5000000000000000} \cdot e^{z} - x \cdot y}{y}\right)}} \]
        5. distribute-neg-fracN/A

          \[\leadsto x + \frac{-1}{\color{blue}{\frac{\mathsf{neg}\left(\left(\frac{5641895835477563}{5000000000000000} \cdot e^{z} - x \cdot y\right)\right)}{y}}} \]
        6. /-lowering-/.f64N/A

          \[\leadsto x + \frac{-1}{\color{blue}{\frac{\mathsf{neg}\left(\left(\frac{5641895835477563}{5000000000000000} \cdot e^{z} - x \cdot y\right)\right)}{y}}} \]
        7. sub-negN/A

          \[\leadsto x + \frac{-1}{\frac{\mathsf{neg}\left(\color{blue}{\left(\frac{5641895835477563}{5000000000000000} \cdot e^{z} + \left(\mathsf{neg}\left(x \cdot y\right)\right)\right)}\right)}{y}} \]
        8. +-commutativeN/A

          \[\leadsto x + \frac{-1}{\frac{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(x \cdot y\right)\right) + \frac{5641895835477563}{5000000000000000} \cdot e^{z}\right)}\right)}{y}} \]
        9. distribute-neg-inN/A

          \[\leadsto x + \frac{-1}{\frac{\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x \cdot y\right)\right)\right)\right) + \left(\mathsf{neg}\left(\frac{5641895835477563}{5000000000000000} \cdot e^{z}\right)\right)}}{y}} \]
        10. remove-double-negN/A

          \[\leadsto x + \frac{-1}{\frac{\color{blue}{x \cdot y} + \left(\mathsf{neg}\left(\frac{5641895835477563}{5000000000000000} \cdot e^{z}\right)\right)}{y}} \]
        11. accelerator-lowering-fma.f64N/A

          \[\leadsto x + \frac{-1}{\frac{\color{blue}{\mathsf{fma}\left(x, y, \mathsf{neg}\left(\frac{5641895835477563}{5000000000000000} \cdot e^{z}\right)\right)}}{y}} \]
        12. *-commutativeN/A

          \[\leadsto x + \frac{-1}{\frac{\mathsf{fma}\left(x, y, \mathsf{neg}\left(\color{blue}{e^{z} \cdot \frac{5641895835477563}{5000000000000000}}\right)\right)}{y}} \]
        13. distribute-rgt-neg-inN/A

          \[\leadsto x + \frac{-1}{\frac{\mathsf{fma}\left(x, y, \color{blue}{e^{z} \cdot \left(\mathsf{neg}\left(\frac{5641895835477563}{5000000000000000}\right)\right)}\right)}{y}} \]
        14. *-lowering-*.f64N/A

          \[\leadsto x + \frac{-1}{\frac{\mathsf{fma}\left(x, y, \color{blue}{e^{z} \cdot \left(\mathsf{neg}\left(\frac{5641895835477563}{5000000000000000}\right)\right)}\right)}{y}} \]
        15. exp-lowering-exp.f64N/A

          \[\leadsto x + \frac{-1}{\frac{\mathsf{fma}\left(x, y, \color{blue}{e^{z}} \cdot \left(\mathsf{neg}\left(\frac{5641895835477563}{5000000000000000}\right)\right)\right)}{y}} \]
        16. metadata-eval99.8

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

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

        \[\leadsto \color{blue}{x + -1 \cdot \frac{y}{x \cdot y - \frac{5641895835477563}{5000000000000000}}} \]
      6. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(\frac{y}{x \cdot y - \frac{5641895835477563}{5000000000000000}}\right)\right)} \]
        2. unsub-negN/A

          \[\leadsto \color{blue}{x - \frac{y}{x \cdot y - \frac{5641895835477563}{5000000000000000}}} \]
        3. --lowering--.f64N/A

          \[\leadsto \color{blue}{x - \frac{y}{x \cdot y - \frac{5641895835477563}{5000000000000000}}} \]
        4. /-lowering-/.f64N/A

          \[\leadsto x - \color{blue}{\frac{y}{x \cdot y - \frac{5641895835477563}{5000000000000000}}} \]
        5. sub-negN/A

          \[\leadsto x - \frac{y}{\color{blue}{x \cdot y + \left(\mathsf{neg}\left(\frac{5641895835477563}{5000000000000000}\right)\right)}} \]
        6. *-commutativeN/A

          \[\leadsto x - \frac{y}{\color{blue}{y \cdot x} + \left(\mathsf{neg}\left(\frac{5641895835477563}{5000000000000000}\right)\right)} \]
        7. metadata-evalN/A

          \[\leadsto x - \frac{y}{y \cdot x + \color{blue}{\frac{-5641895835477563}{5000000000000000}}} \]
        8. accelerator-lowering-fma.f6499.0

          \[\leadsto x - \frac{y}{\color{blue}{\mathsf{fma}\left(y, x, -1.1283791670955126\right)}} \]
      7. Simplified99.0%

        \[\leadsto \color{blue}{x - \frac{y}{\mathsf{fma}\left(y, x, -1.1283791670955126\right)}} \]

      if 1.00000000000199996 < (exp.f64 z)

      1. Initial program 100.0%

        \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
      2. Add Preprocessing
      3. Taylor expanded in x around inf

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

          \[\leadsto \color{blue}{x} \]
      5. Recombined 3 regimes into one program.
      6. Add Preprocessing

      Alternative 4: 74.1% accurate, 5.1× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{+263}:\\ \;\;\;\;\frac{-1}{x}\\ \mathbf{elif}\;z \leq -9.5 \cdot 10^{-42}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{-15}:\\ \;\;\;\;\mathsf{fma}\left(y, 0.8862269254527579, x\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
      (FPCore (x y z)
       :precision binary64
       (if (<= z -2.9e+263)
         (/ -1.0 x)
         (if (<= z -9.5e-42) x (if (<= z 5.5e-15) (fma y 0.8862269254527579 x) x))))
      double code(double x, double y, double z) {
      	double tmp;
      	if (z <= -2.9e+263) {
      		tmp = -1.0 / x;
      	} else if (z <= -9.5e-42) {
      		tmp = x;
      	} else if (z <= 5.5e-15) {
      		tmp = fma(y, 0.8862269254527579, x);
      	} else {
      		tmp = x;
      	}
      	return tmp;
      }
      
      function code(x, y, z)
      	tmp = 0.0
      	if (z <= -2.9e+263)
      		tmp = Float64(-1.0 / x);
      	elseif (z <= -9.5e-42)
      		tmp = x;
      	elseif (z <= 5.5e-15)
      		tmp = fma(y, 0.8862269254527579, x);
      	else
      		tmp = x;
      	end
      	return tmp
      end
      
      code[x_, y_, z_] := If[LessEqual[z, -2.9e+263], N[(-1.0 / x), $MachinePrecision], If[LessEqual[z, -9.5e-42], x, If[LessEqual[z, 5.5e-15], N[(y * 0.8862269254527579 + x), $MachinePrecision], x]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;z \leq -2.9 \cdot 10^{+263}:\\
      \;\;\;\;\frac{-1}{x}\\
      
      \mathbf{elif}\;z \leq -9.5 \cdot 10^{-42}:\\
      \;\;\;\;x\\
      
      \mathbf{elif}\;z \leq 5.5 \cdot 10^{-15}:\\
      \;\;\;\;\mathsf{fma}\left(y, 0.8862269254527579, x\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;x\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if z < -2.90000000000000012e263

        1. Initial program 73.1%

          \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
        2. Add Preprocessing
        3. Taylor expanded in y around inf

          \[\leadsto \color{blue}{x - \frac{1}{x}} \]
        4. Step-by-step derivation
          1. sub-negN/A

            \[\leadsto \color{blue}{x + \left(\mathsf{neg}\left(\frac{1}{x}\right)\right)} \]
          2. +-lowering-+.f64N/A

            \[\leadsto \color{blue}{x + \left(\mathsf{neg}\left(\frac{1}{x}\right)\right)} \]
          3. distribute-neg-fracN/A

            \[\leadsto x + \color{blue}{\frac{\mathsf{neg}\left(1\right)}{x}} \]
          4. metadata-evalN/A

            \[\leadsto x + \frac{\color{blue}{-1}}{x} \]
          5. /-lowering-/.f64100.0

            \[\leadsto x + \color{blue}{\frac{-1}{x}} \]
        5. Simplified100.0%

          \[\leadsto \color{blue}{x + \frac{-1}{x}} \]
        6. Taylor expanded in x around 0

          \[\leadsto \color{blue}{\frac{-1}{x}} \]
        7. Step-by-step derivation
          1. /-lowering-/.f64100.0

            \[\leadsto \color{blue}{\frac{-1}{x}} \]
        8. Simplified100.0%

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

        if -2.90000000000000012e263 < z < -9.49999999999999948e-42 or 5.5000000000000002e-15 < z

        1. Initial program 94.9%

          \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
        2. Add Preprocessing
        3. Taylor expanded in x around inf

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

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

          if -9.49999999999999948e-42 < z < 5.5000000000000002e-15

          1. Initial program 99.8%

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

            \[\leadsto \color{blue}{x + \frac{y}{\frac{5641895835477563}{5000000000000000} - x \cdot y}} \]
          4. Step-by-step derivation
            1. +-lowering-+.f64N/A

              \[\leadsto \color{blue}{x + \frac{y}{\frac{5641895835477563}{5000000000000000} - x \cdot y}} \]
            2. /-lowering-/.f64N/A

              \[\leadsto x + \color{blue}{\frac{y}{\frac{5641895835477563}{5000000000000000} - x \cdot y}} \]
            3. --lowering--.f64N/A

              \[\leadsto x + \frac{y}{\color{blue}{\frac{5641895835477563}{5000000000000000} - x \cdot y}} \]
            4. *-commutativeN/A

              \[\leadsto x + \frac{y}{\frac{5641895835477563}{5000000000000000} - \color{blue}{y \cdot x}} \]
            5. *-lowering-*.f6499.8

              \[\leadsto x + \frac{y}{1.1283791670955126 - \color{blue}{y \cdot x}} \]
          5. Simplified99.8%

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

            \[\leadsto \color{blue}{x + \frac{5000000000000000}{5641895835477563} \cdot y} \]
          7. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \color{blue}{\frac{5000000000000000}{5641895835477563} \cdot y + x} \]
            2. *-commutativeN/A

              \[\leadsto \color{blue}{y \cdot \frac{5000000000000000}{5641895835477563}} + x \]
            3. accelerator-lowering-fma.f6475.0

              \[\leadsto \color{blue}{\mathsf{fma}\left(y, 0.8862269254527579, x\right)} \]
          8. Simplified75.0%

            \[\leadsto \color{blue}{\mathsf{fma}\left(y, 0.8862269254527579, x\right)} \]
        5. Recombined 3 regimes into one program.
        6. Add Preprocessing

        Alternative 5: 85.3% accurate, 6.1× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{-133}:\\ \;\;\;\;x + \frac{-1}{x}\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{-13}:\\ \;\;\;\;\mathsf{fma}\left(y, 0.8862269254527579, x\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (if (<= z -1.15e-133)
           (+ x (/ -1.0 x))
           (if (<= z 2.7e-13) (fma y 0.8862269254527579 x) x)))
        double code(double x, double y, double z) {
        	double tmp;
        	if (z <= -1.15e-133) {
        		tmp = x + (-1.0 / x);
        	} else if (z <= 2.7e-13) {
        		tmp = fma(y, 0.8862269254527579, x);
        	} else {
        		tmp = x;
        	}
        	return tmp;
        }
        
        function code(x, y, z)
        	tmp = 0.0
        	if (z <= -1.15e-133)
        		tmp = Float64(x + Float64(-1.0 / x));
        	elseif (z <= 2.7e-13)
        		tmp = fma(y, 0.8862269254527579, x);
        	else
        		tmp = x;
        	end
        	return tmp
        end
        
        code[x_, y_, z_] := If[LessEqual[z, -1.15e-133], N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.7e-13], N[(y * 0.8862269254527579 + x), $MachinePrecision], x]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;z \leq -1.15 \cdot 10^{-133}:\\
        \;\;\;\;x + \frac{-1}{x}\\
        
        \mathbf{elif}\;z \leq 2.7 \cdot 10^{-13}:\\
        \;\;\;\;\mathsf{fma}\left(y, 0.8862269254527579, x\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;x\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if z < -1.15e-133

          1. Initial program 90.1%

            \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
          2. Add Preprocessing
          3. Taylor expanded in y around inf

            \[\leadsto \color{blue}{x - \frac{1}{x}} \]
          4. Step-by-step derivation
            1. sub-negN/A

              \[\leadsto \color{blue}{x + \left(\mathsf{neg}\left(\frac{1}{x}\right)\right)} \]
            2. +-lowering-+.f64N/A

              \[\leadsto \color{blue}{x + \left(\mathsf{neg}\left(\frac{1}{x}\right)\right)} \]
            3. distribute-neg-fracN/A

              \[\leadsto x + \color{blue}{\frac{\mathsf{neg}\left(1\right)}{x}} \]
            4. metadata-evalN/A

              \[\leadsto x + \frac{\color{blue}{-1}}{x} \]
            5. /-lowering-/.f6494.1

              \[\leadsto x + \color{blue}{\frac{-1}{x}} \]
          5. Simplified94.1%

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

          if -1.15e-133 < z < 2.70000000000000011e-13

          1. Initial program 99.8%

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

            \[\leadsto \color{blue}{x + \frac{y}{\frac{5641895835477563}{5000000000000000} - x \cdot y}} \]
          4. Step-by-step derivation
            1. +-lowering-+.f64N/A

              \[\leadsto \color{blue}{x + \frac{y}{\frac{5641895835477563}{5000000000000000} - x \cdot y}} \]
            2. /-lowering-/.f64N/A

              \[\leadsto x + \color{blue}{\frac{y}{\frac{5641895835477563}{5000000000000000} - x \cdot y}} \]
            3. --lowering--.f64N/A

              \[\leadsto x + \frac{y}{\color{blue}{\frac{5641895835477563}{5000000000000000} - x \cdot y}} \]
            4. *-commutativeN/A

              \[\leadsto x + \frac{y}{\frac{5641895835477563}{5000000000000000} - \color{blue}{y \cdot x}} \]
            5. *-lowering-*.f6499.8

              \[\leadsto x + \frac{y}{1.1283791670955126 - \color{blue}{y \cdot x}} \]
          5. Simplified99.8%

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

            \[\leadsto \color{blue}{x + \frac{5000000000000000}{5641895835477563} \cdot y} \]
          7. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \color{blue}{\frac{5000000000000000}{5641895835477563} \cdot y + x} \]
            2. *-commutativeN/A

              \[\leadsto \color{blue}{y \cdot \frac{5000000000000000}{5641895835477563}} + x \]
            3. accelerator-lowering-fma.f6478.7

              \[\leadsto \color{blue}{\mathsf{fma}\left(y, 0.8862269254527579, x\right)} \]
          8. Simplified78.7%

            \[\leadsto \color{blue}{\mathsf{fma}\left(y, 0.8862269254527579, x\right)} \]

          if 2.70000000000000011e-13 < z

          1. Initial program 100.0%

            \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
          2. Add Preprocessing
          3. Taylor expanded in x around inf

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

              \[\leadsto \color{blue}{x} \]
          5. Recombined 3 regimes into one program.
          6. Add Preprocessing

          Alternative 6: 74.3% accurate, 6.7× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.1 \cdot 10^{-41}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{-12}:\\ \;\;\;\;\mathsf{fma}\left(y, 0.8862269254527579, x\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
          (FPCore (x y z)
           :precision binary64
           (if (<= z -1.1e-41) x (if (<= z 2.3e-12) (fma y 0.8862269254527579 x) x)))
          double code(double x, double y, double z) {
          	double tmp;
          	if (z <= -1.1e-41) {
          		tmp = x;
          	} else if (z <= 2.3e-12) {
          		tmp = fma(y, 0.8862269254527579, x);
          	} else {
          		tmp = x;
          	}
          	return tmp;
          }
          
          function code(x, y, z)
          	tmp = 0.0
          	if (z <= -1.1e-41)
          		tmp = x;
          	elseif (z <= 2.3e-12)
          		tmp = fma(y, 0.8862269254527579, x);
          	else
          		tmp = x;
          	end
          	return tmp
          end
          
          code[x_, y_, z_] := If[LessEqual[z, -1.1e-41], x, If[LessEqual[z, 2.3e-12], N[(y * 0.8862269254527579 + x), $MachinePrecision], x]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;z \leq -1.1 \cdot 10^{-41}:\\
          \;\;\;\;x\\
          
          \mathbf{elif}\;z \leq 2.3 \cdot 10^{-12}:\\
          \;\;\;\;\mathsf{fma}\left(y, 0.8862269254527579, x\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;x\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if z < -1.1e-41 or 2.29999999999999989e-12 < z

            1. Initial program 93.9%

              \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
            2. Add Preprocessing
            3. Taylor expanded in x around inf

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

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

              if -1.1e-41 < z < 2.29999999999999989e-12

              1. Initial program 99.8%

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

                \[\leadsto \color{blue}{x + \frac{y}{\frac{5641895835477563}{5000000000000000} - x \cdot y}} \]
              4. Step-by-step derivation
                1. +-lowering-+.f64N/A

                  \[\leadsto \color{blue}{x + \frac{y}{\frac{5641895835477563}{5000000000000000} - x \cdot y}} \]
                2. /-lowering-/.f64N/A

                  \[\leadsto x + \color{blue}{\frac{y}{\frac{5641895835477563}{5000000000000000} - x \cdot y}} \]
                3. --lowering--.f64N/A

                  \[\leadsto x + \frac{y}{\color{blue}{\frac{5641895835477563}{5000000000000000} - x \cdot y}} \]
                4. *-commutativeN/A

                  \[\leadsto x + \frac{y}{\frac{5641895835477563}{5000000000000000} - \color{blue}{y \cdot x}} \]
                5. *-lowering-*.f6499.8

                  \[\leadsto x + \frac{y}{1.1283791670955126 - \color{blue}{y \cdot x}} \]
              5. Simplified99.8%

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

                \[\leadsto \color{blue}{x + \frac{5000000000000000}{5641895835477563} \cdot y} \]
              7. Step-by-step derivation
                1. +-commutativeN/A

                  \[\leadsto \color{blue}{\frac{5000000000000000}{5641895835477563} \cdot y + x} \]
                2. *-commutativeN/A

                  \[\leadsto \color{blue}{y \cdot \frac{5000000000000000}{5641895835477563}} + x \]
                3. accelerator-lowering-fma.f6475.0

                  \[\leadsto \color{blue}{\mathsf{fma}\left(y, 0.8862269254527579, x\right)} \]
              8. Simplified75.0%

                \[\leadsto \color{blue}{\mathsf{fma}\left(y, 0.8862269254527579, x\right)} \]
            5. Recombined 2 regimes into one program.
            6. Add Preprocessing

            Alternative 7: 68.7% accurate, 128.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 96.3%

              \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
            2. Add Preprocessing
            3. Taylor expanded in x around inf

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

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

              Developer Target 1: 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 2024195 
              (FPCore (x y z)
                :name "Numeric.SpecFunctions:invErfc from math-functions-0.1.5.2, A"
                :precision binary64
              
                :alt
                (! :herbie-platform default (+ x (/ 1 (- (* (/ 5641895835477563/5000000000000000 y) (exp z)) x))))
              
                (+ x (/ y (- (* 1.1283791670955126 (exp z)) (* x y)))))