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

Percentage Accurate: 95.6% → 98.2%
Time: 11.2s
Alternatives: 11
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 11 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.6% 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.2% 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 89.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}} \]

    if 0.0 < (exp.f64 z)

    1. Initial program 99.4%

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

    \[\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.7% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;e^{z} \leq 5 \cdot 10^{-20}:\\ \;\;\;\;x + \frac{-1}{x}\\ \mathbf{elif}\;e^{z} \leq 1.02:\\ \;\;\;\;x + \frac{y}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.18806319451591877, 0.5641895835477563\right), 1.1283791670955126\right), \mathsf{fma}\left(y, -x, 1.1283791670955126\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= (exp z) 5e-20)
   (+ x (/ -1.0 x))
   (if (<= (exp z) 1.02)
     (+
      x
      (/
       y
       (fma
        z
        (fma
         z
         (fma z 0.18806319451591877 0.5641895835477563)
         1.1283791670955126)
        (fma y (- x) 1.1283791670955126))))
     x)))
double code(double x, double y, double z) {
	double tmp;
	if (exp(z) <= 5e-20) {
		tmp = x + (-1.0 / x);
	} else if (exp(z) <= 1.02) {
		tmp = x + (y / fma(z, fma(z, fma(z, 0.18806319451591877, 0.5641895835477563), 1.1283791670955126), fma(y, -x, 1.1283791670955126)));
	} else {
		tmp = x;
	}
	return tmp;
}
function code(x, y, z)
	tmp = 0.0
	if (exp(z) <= 5e-20)
		tmp = Float64(x + Float64(-1.0 / x));
	elseif (exp(z) <= 1.02)
		tmp = Float64(x + Float64(y / fma(z, fma(z, fma(z, 0.18806319451591877, 0.5641895835477563), 1.1283791670955126), fma(y, Float64(-x), 1.1283791670955126))));
	else
		tmp = x;
	end
	return tmp
end
code[x_, y_, z_] := If[LessEqual[N[Exp[z], $MachinePrecision], 5e-20], N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Exp[z], $MachinePrecision], 1.02], N[(x + N[(y / N[(z * N[(z * N[(z * 0.18806319451591877 + 0.5641895835477563), $MachinePrecision] + 1.1283791670955126), $MachinePrecision] + N[(y * (-x) + 1.1283791670955126), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}

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

\mathbf{elif}\;e^{z} \leq 1.02:\\
\;\;\;\;x + \frac{y}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.18806319451591877, 0.5641895835477563\right), 1.1283791670955126\right), \mathsf{fma}\left(y, -x, 1.1283791670955126\right)\right)}\\

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


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

    1. Initial program 89.4%

      \[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-/.f6498.3

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

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

    if 4.9999999999999999e-20 < (exp.f64 z) < 1.02

    1. Initial program 99.9%

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

      \[\leadsto x + \frac{y}{\color{blue}{\left(\frac{5641895835477563}{5000000000000000} + z \cdot \left(\frac{5641895835477563}{5000000000000000} + z \cdot \left(\frac{5641895835477563}{10000000000000000} + \frac{5641895835477563}{30000000000000000} \cdot z\right)\right)\right) - x \cdot y}} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto x + \frac{y}{\color{blue}{\left(z \cdot \left(\frac{5641895835477563}{5000000000000000} + z \cdot \left(\frac{5641895835477563}{10000000000000000} + \frac{5641895835477563}{30000000000000000} \cdot z\right)\right) + \frac{5641895835477563}{5000000000000000}\right)} - x \cdot y} \]
      2. associate--l+N/A

        \[\leadsto x + \frac{y}{\color{blue}{z \cdot \left(\frac{5641895835477563}{5000000000000000} + z \cdot \left(\frac{5641895835477563}{10000000000000000} + \frac{5641895835477563}{30000000000000000} \cdot z\right)\right) + \left(\frac{5641895835477563}{5000000000000000} - x \cdot y\right)}} \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto x + \frac{y}{\color{blue}{\mathsf{fma}\left(z, \frac{5641895835477563}{5000000000000000} + z \cdot \left(\frac{5641895835477563}{10000000000000000} + \frac{5641895835477563}{30000000000000000} \cdot z\right), \frac{5641895835477563}{5000000000000000} - x \cdot y\right)}} \]
      4. +-commutativeN/A

        \[\leadsto x + \frac{y}{\mathsf{fma}\left(z, \color{blue}{z \cdot \left(\frac{5641895835477563}{10000000000000000} + \frac{5641895835477563}{30000000000000000} \cdot z\right) + \frac{5641895835477563}{5000000000000000}}, \frac{5641895835477563}{5000000000000000} - x \cdot y\right)} \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto x + \frac{y}{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, \frac{5641895835477563}{10000000000000000} + \frac{5641895835477563}{30000000000000000} \cdot z, \frac{5641895835477563}{5000000000000000}\right)}, \frac{5641895835477563}{5000000000000000} - x \cdot y\right)} \]
      6. +-commutativeN/A

        \[\leadsto x + \frac{y}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \color{blue}{\frac{5641895835477563}{30000000000000000} \cdot z + \frac{5641895835477563}{10000000000000000}}, \frac{5641895835477563}{5000000000000000}\right), \frac{5641895835477563}{5000000000000000} - x \cdot y\right)} \]
      7. *-commutativeN/A

        \[\leadsto x + \frac{y}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \color{blue}{z \cdot \frac{5641895835477563}{30000000000000000}} + \frac{5641895835477563}{10000000000000000}, \frac{5641895835477563}{5000000000000000}\right), \frac{5641895835477563}{5000000000000000} - x \cdot y\right)} \]
      8. accelerator-lowering-fma.f64N/A

        \[\leadsto x + \frac{y}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, \frac{5641895835477563}{30000000000000000}, \frac{5641895835477563}{10000000000000000}\right)}, \frac{5641895835477563}{5000000000000000}\right), \frac{5641895835477563}{5000000000000000} - x \cdot y\right)} \]
      9. sub-negN/A

        \[\leadsto x + \frac{y}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, \frac{5641895835477563}{30000000000000000}, \frac{5641895835477563}{10000000000000000}\right), \frac{5641895835477563}{5000000000000000}\right), \color{blue}{\frac{5641895835477563}{5000000000000000} + \left(\mathsf{neg}\left(x \cdot y\right)\right)}\right)} \]
      10. +-commutativeN/A

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

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

        \[\leadsto x + \frac{y}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, \frac{5641895835477563}{30000000000000000}, \frac{5641895835477563}{10000000000000000}\right), \frac{5641895835477563}{5000000000000000}\right), \color{blue}{y \cdot \left(\mathsf{neg}\left(x\right)\right)} + \frac{5641895835477563}{5000000000000000}\right)} \]
      13. mul-1-negN/A

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

        \[\leadsto x + \frac{y}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, \frac{5641895835477563}{30000000000000000}, \frac{5641895835477563}{10000000000000000}\right), \frac{5641895835477563}{5000000000000000}\right), \color{blue}{\mathsf{fma}\left(y, -1 \cdot x, \frac{5641895835477563}{5000000000000000}\right)}\right)} \]
      15. mul-1-negN/A

        \[\leadsto x + \frac{y}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, \frac{5641895835477563}{30000000000000000}, \frac{5641895835477563}{10000000000000000}\right), \frac{5641895835477563}{5000000000000000}\right), \mathsf{fma}\left(y, \color{blue}{\mathsf{neg}\left(x\right)}, \frac{5641895835477563}{5000000000000000}\right)\right)} \]
      16. neg-lowering-neg.f6499.8

        \[\leadsto x + \frac{y}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.18806319451591877, 0.5641895835477563\right), 1.1283791670955126\right), \mathsf{fma}\left(y, \color{blue}{-x}, 1.1283791670955126\right)\right)} \]
    5. Simplified99.8%

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

    if 1.02 < (exp.f64 z)

    1. Initial program 98.4%

      \[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.6% 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.02:\\ \;\;\;\;x + \frac{y}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5641895835477563, 1.1283791670955126\right), 1.1283791670955126\right) - x \cdot 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.02)
         (+
          x
          (/
           y
           (-
            (fma
             z
             (fma z 0.5641895835477563 1.1283791670955126)
             1.1283791670955126)
            (* x 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.02) {
    		tmp = x + (y / (fma(z, fma(z, 0.5641895835477563, 1.1283791670955126), 1.1283791670955126) - (x * 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.02)
    		tmp = Float64(x + Float64(y / Float64(fma(z, fma(z, 0.5641895835477563, 1.1283791670955126), 1.1283791670955126) - Float64(x * y))));
    	else
    		tmp = x;
    	end
    	return 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.02], N[(x + N[(y / N[(N[(z * N[(z * 0.5641895835477563 + 1.1283791670955126), $MachinePrecision] + 1.1283791670955126), $MachinePrecision] - N[(x * 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.02:\\
    \;\;\;\;x + \frac{y}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5641895835477563, 1.1283791670955126\right), 1.1283791670955126\right) - x \cdot 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 89.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}} \]

      if 0.0 < (exp.f64 z) < 1.02

      1. Initial program 99.9%

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

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

          \[\leadsto x + \frac{y}{\color{blue}{\left(\frac{5641895835477563}{5000000000000000} + z \cdot \left(\frac{5641895835477563}{5000000000000000} + \frac{5641895835477563}{10000000000000000} \cdot z\right)\right) - x \cdot y}} \]
        2. +-commutativeN/A

          \[\leadsto x + \frac{y}{\color{blue}{\left(z \cdot \left(\frac{5641895835477563}{5000000000000000} + \frac{5641895835477563}{10000000000000000} \cdot z\right) + \frac{5641895835477563}{5000000000000000}\right)} - x \cdot y} \]
        3. accelerator-lowering-fma.f64N/A

          \[\leadsto x + \frac{y}{\color{blue}{\mathsf{fma}\left(z, \frac{5641895835477563}{5000000000000000} + \frac{5641895835477563}{10000000000000000} \cdot z, \frac{5641895835477563}{5000000000000000}\right)} - x \cdot y} \]
        4. +-commutativeN/A

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

          \[\leadsto x + \frac{y}{\mathsf{fma}\left(z, \color{blue}{z \cdot \frac{5641895835477563}{10000000000000000}} + \frac{5641895835477563}{5000000000000000}, \frac{5641895835477563}{5000000000000000}\right) - x \cdot y} \]
        6. accelerator-lowering-fma.f64N/A

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

          \[\leadsto x + \frac{y}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \frac{5641895835477563}{10000000000000000}, \frac{5641895835477563}{5000000000000000}\right), \frac{5641895835477563}{5000000000000000}\right) - \color{blue}{y \cdot x}} \]
        8. *-lowering-*.f6499.0

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

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

      if 1.02 < (exp.f64 z)

      1. Initial program 98.4%

        \[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. Final simplification99.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;e^{z} \leq 0:\\ \;\;\;\;x + \frac{-1}{x}\\ \mathbf{elif}\;e^{z} \leq 1.02:\\ \;\;\;\;x + \frac{y}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5641895835477563, 1.1283791670955126\right), 1.1283791670955126\right) - x \cdot y}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
      7. Add Preprocessing

      Alternative 4: 99.6% accurate, 0.5× speedup?

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

        1. Initial program 89.4%

          \[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-/.f6498.3

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

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

        if 4.9999999999999999e-20 < (exp.f64 z) < 1.02

        1. Initial program 99.9%

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

          \[\leadsto x + \frac{y}{\color{blue}{\left(\frac{5641895835477563}{5000000000000000} + \frac{5641895835477563}{5000000000000000} \cdot z\right) - x \cdot y}} \]
        4. Step-by-step derivation
          1. sub-negN/A

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

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

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

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

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

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

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

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

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

            \[\leadsto x + \frac{y}{\mathsf{fma}\left(y, \mathsf{neg}\left(x\right), \color{blue}{z \cdot \frac{5641895835477563}{5000000000000000}} + \frac{5641895835477563}{5000000000000000}\right)} \]
          11. accelerator-lowering-fma.f6499.5

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

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

        if 1.02 < (exp.f64 z)

        1. Initial program 98.4%

          \[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 5: 99.5% 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.02:\\ \;\;\;\;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) 0.0)
           (+ x (/ -1.0 x))
           (if (<= (exp z) 1.02) (+ x (/ y (fma y (- x) 1.1283791670955126))) 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.02) {
        		tmp = x + (y / fma(y, -x, 1.1283791670955126));
        	} 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.02)
        		tmp = Float64(x + Float64(y / fma(y, Float64(-x), 1.1283791670955126)));
        	else
        		tmp = x;
        	end
        	return 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.02], N[(x + N[(y / N[(y * (-x) + 1.1283791670955126), $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.02:\\
        \;\;\;\;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) < 0.0

          1. Initial program 89.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}} \]

          if 0.0 < (exp.f64 z) < 1.02

          1. Initial program 99.9%

            \[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. sub-negN/A

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

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

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

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

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

              \[\leadsto x + \frac{y}{\color{blue}{\mathsf{fma}\left(y, -1 \cdot x, \frac{5641895835477563}{5000000000000000}\right)}} \]
            9. mul-1-negN/A

              \[\leadsto x + \frac{y}{\mathsf{fma}\left(y, \color{blue}{\mathsf{neg}\left(x\right)}, \frac{5641895835477563}{5000000000000000}\right)} \]
            10. neg-lowering-neg.f6498.4

              \[\leadsto x + \frac{y}{\mathsf{fma}\left(y, \color{blue}{-x}, 1.1283791670955126\right)} \]
          5. Simplified98.4%

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

          if 1.02 < (exp.f64 z)

          1. Initial program 98.4%

            \[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: 85.2% accurate, 4.7× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -9.5 \cdot 10^{-91}:\\ \;\;\;\;x + \frac{-1}{x}\\ \mathbf{elif}\;z \leq 7.4 \cdot 10^{-23}:\\ \;\;\;\;x + \frac{y}{1.1283791670955126}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
          (FPCore (x y z)
           :precision binary64
           (if (<= z -9.5e-91)
             (+ x (/ -1.0 x))
             (if (<= z 7.4e-23) (+ x (/ y 1.1283791670955126)) x)))
          double code(double x, double y, double z) {
          	double tmp;
          	if (z <= -9.5e-91) {
          		tmp = x + (-1.0 / x);
          	} else if (z <= 7.4e-23) {
          		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 <= (-9.5d-91)) then
                  tmp = x + ((-1.0d0) / x)
              else if (z <= 7.4d-23) 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 <= -9.5e-91) {
          		tmp = x + (-1.0 / x);
          	} else if (z <= 7.4e-23) {
          		tmp = x + (y / 1.1283791670955126);
          	} else {
          		tmp = x;
          	}
          	return tmp;
          }
          
          def code(x, y, z):
          	tmp = 0
          	if z <= -9.5e-91:
          		tmp = x + (-1.0 / x)
          	elif z <= 7.4e-23:
          		tmp = x + (y / 1.1283791670955126)
          	else:
          		tmp = x
          	return tmp
          
          function code(x, y, z)
          	tmp = 0.0
          	if (z <= -9.5e-91)
          		tmp = Float64(x + Float64(-1.0 / x));
          	elseif (z <= 7.4e-23)
          		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 <= -9.5e-91)
          		tmp = x + (-1.0 / x);
          	elseif (z <= 7.4e-23)
          		tmp = x + (y / 1.1283791670955126);
          	else
          		tmp = x;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_] := If[LessEqual[z, -9.5e-91], N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.4e-23], N[(x + N[(y / 1.1283791670955126), $MachinePrecision]), $MachinePrecision], x]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;z \leq -9.5 \cdot 10^{-91}:\\
          \;\;\;\;x + \frac{-1}{x}\\
          
          \mathbf{elif}\;z \leq 7.4 \cdot 10^{-23}:\\
          \;\;\;\;x + \frac{y}{1.1283791670955126}\\
          
          \mathbf{else}:\\
          \;\;\;\;x\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if z < -9.5e-91

            1. Initial program 92.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-/.f6491.9

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

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

            if -9.5e-91 < z < 7.4000000000000005e-23

            1. Initial program 99.9%

              \[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. sub-negN/A

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

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

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

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

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

                \[\leadsto x + \frac{y}{\color{blue}{\mathsf{fma}\left(y, -1 \cdot x, \frac{5641895835477563}{5000000000000000}\right)}} \]
              9. mul-1-negN/A

                \[\leadsto x + \frac{y}{\mathsf{fma}\left(y, \color{blue}{\mathsf{neg}\left(x\right)}, \frac{5641895835477563}{5000000000000000}\right)} \]
              10. neg-lowering-neg.f6499.9

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

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

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

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

              if 7.4000000000000005e-23 < z

              1. Initial program 98.4%

                \[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. Simplified98.5%

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

              Alternative 7: 85.2% accurate, 6.1× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.45 \cdot 10^{-89}:\\ \;\;\;\;x + \frac{-1}{x}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-23}:\\ \;\;\;\;\mathsf{fma}\left(y, 0.8862269254527579, x\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
              (FPCore (x y z)
               :precision binary64
               (if (<= z -1.45e-89)
                 (+ x (/ -1.0 x))
                 (if (<= z 8e-23) (fma y 0.8862269254527579 x) x)))
              double code(double x, double y, double z) {
              	double tmp;
              	if (z <= -1.45e-89) {
              		tmp = x + (-1.0 / x);
              	} else if (z <= 8e-23) {
              		tmp = fma(y, 0.8862269254527579, x);
              	} else {
              		tmp = x;
              	}
              	return tmp;
              }
              
              function code(x, y, z)
              	tmp = 0.0
              	if (z <= -1.45e-89)
              		tmp = Float64(x + Float64(-1.0 / x));
              	elseif (z <= 8e-23)
              		tmp = fma(y, 0.8862269254527579, x);
              	else
              		tmp = x;
              	end
              	return tmp
              end
              
              code[x_, y_, z_] := If[LessEqual[z, -1.45e-89], N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8e-23], N[(y * 0.8862269254527579 + x), $MachinePrecision], x]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;z \leq -1.45 \cdot 10^{-89}:\\
              \;\;\;\;x + \frac{-1}{x}\\
              
              \mathbf{elif}\;z \leq 8 \cdot 10^{-23}:\\
              \;\;\;\;\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.44999999999999996e-89

                1. Initial program 92.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-/.f6491.9

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

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

                if -1.44999999999999996e-89 < z < 7.99999999999999968e-23

                1. Initial program 99.9%

                  \[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. sub-negN/A

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

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

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

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

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

                    \[\leadsto x + \frac{y}{\color{blue}{\mathsf{fma}\left(y, -1 \cdot x, \frac{5641895835477563}{5000000000000000}\right)}} \]
                  9. mul-1-negN/A

                    \[\leadsto x + \frac{y}{\mathsf{fma}\left(y, \color{blue}{\mathsf{neg}\left(x\right)}, \frac{5641895835477563}{5000000000000000}\right)} \]
                  10. neg-lowering-neg.f6499.9

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

                  \[\leadsto \color{blue}{x + \frac{y}{\mathsf{fma}\left(y, -x, 1.1283791670955126\right)}} \]
                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.f6479.3

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

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

                if 7.99999999999999968e-23 < z

                1. Initial program 98.4%

                  \[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. Simplified98.5%

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

                Alternative 8: 74.2% accurate, 6.7× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.2 \cdot 10^{+45}:\\ \;\;\;\;\frac{-1}{x}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-23}:\\ \;\;\;\;\mathsf{fma}\left(y, 0.8862269254527579, x\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
                (FPCore (x y z)
                 :precision binary64
                 (if (<= z -1.2e+45)
                   (/ -1.0 x)
                   (if (<= z 8e-23) (fma y 0.8862269254527579 x) x)))
                double code(double x, double y, double z) {
                	double tmp;
                	if (z <= -1.2e+45) {
                		tmp = -1.0 / x;
                	} else if (z <= 8e-23) {
                		tmp = fma(y, 0.8862269254527579, x);
                	} else {
                		tmp = x;
                	}
                	return tmp;
                }
                
                function code(x, y, z)
                	tmp = 0.0
                	if (z <= -1.2e+45)
                		tmp = Float64(-1.0 / x);
                	elseif (z <= 8e-23)
                		tmp = fma(y, 0.8862269254527579, x);
                	else
                		tmp = x;
                	end
                	return tmp
                end
                
                code[x_, y_, z_] := If[LessEqual[z, -1.2e+45], N[(-1.0 / x), $MachinePrecision], If[LessEqual[z, 8e-23], N[(y * 0.8862269254527579 + x), $MachinePrecision], x]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;z \leq -1.2 \cdot 10^{+45}:\\
                \;\;\;\;\frac{-1}{x}\\
                
                \mathbf{elif}\;z \leq 8 \cdot 10^{-23}:\\
                \;\;\;\;\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.19999999999999995e45

                  1. Initial program 89.4%

                    \[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 \cdot \left(1 - \frac{1}{{x}^{2}}\right)} \]
                  4. Step-by-step derivation
                    1. sub-negN/A

                      \[\leadsto x \cdot \color{blue}{\left(1 + \left(\mathsf{neg}\left(\frac{1}{{x}^{2}}\right)\right)\right)} \]
                    2. distribute-rgt-inN/A

                      \[\leadsto \color{blue}{1 \cdot x + \left(\mathsf{neg}\left(\frac{1}{{x}^{2}}\right)\right) \cdot x} \]
                    3. *-lft-identityN/A

                      \[\leadsto \color{blue}{x} + \left(\mathsf{neg}\left(\frac{1}{{x}^{2}}\right)\right) \cdot x \]
                    4. distribute-lft-neg-outN/A

                      \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{{x}^{2}} \cdot x\right)\right)} \]
                    5. distribute-rgt-neg-outN/A

                      \[\leadsto x + \color{blue}{\frac{1}{{x}^{2}} \cdot \left(\mathsf{neg}\left(x\right)\right)} \]
                    6. mul-1-negN/A

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

                      \[\leadsto \color{blue}{x + \frac{1}{{x}^{2}} \cdot \left(-1 \cdot x\right)} \]
                    8. mul-1-negN/A

                      \[\leadsto x + \frac{1}{{x}^{2}} \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)} \]
                    9. distribute-rgt-neg-outN/A

                      \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{{x}^{2}} \cdot x\right)\right)} \]
                    10. distribute-lft-neg-outN/A

                      \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{{x}^{2}}\right)\right) \cdot x} \]
                    11. distribute-neg-frac2N/A

                      \[\leadsto x + \color{blue}{\frac{1}{\mathsf{neg}\left({x}^{2}\right)}} \cdot x \]
                    12. associate-*l/N/A

                      \[\leadsto x + \color{blue}{\frac{1 \cdot x}{\mathsf{neg}\left({x}^{2}\right)}} \]
                    13. *-lft-identityN/A

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

                      \[\leadsto x + \color{blue}{\frac{x}{\mathsf{neg}\left({x}^{2}\right)}} \]
                    15. unpow2N/A

                      \[\leadsto x + \frac{x}{\mathsf{neg}\left(\color{blue}{x \cdot x}\right)} \]
                    16. distribute-rgt-neg-inN/A

                      \[\leadsto x + \frac{x}{\color{blue}{x \cdot \left(\mathsf{neg}\left(x\right)\right)}} \]
                    17. mul-1-negN/A

                      \[\leadsto x + \frac{x}{x \cdot \color{blue}{\left(-1 \cdot x\right)}} \]
                    18. *-lowering-*.f64N/A

                      \[\leadsto x + \frac{x}{\color{blue}{x \cdot \left(-1 \cdot x\right)}} \]
                    19. mul-1-negN/A

                      \[\leadsto x + \frac{x}{x \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)}} \]
                    20. neg-lowering-neg.f6472.6

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

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

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

                      \[\leadsto \color{blue}{\frac{-1}{x}} \]
                  8. Simplified54.9%

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

                  if -1.19999999999999995e45 < z < 7.99999999999999968e-23

                  1. Initial program 99.3%

                    \[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. sub-negN/A

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

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

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

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

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

                      \[\leadsto x + \frac{y}{\color{blue}{\mathsf{fma}\left(y, -1 \cdot x, \frac{5641895835477563}{5000000000000000}\right)}} \]
                    9. mul-1-negN/A

                      \[\leadsto x + \frac{y}{\mathsf{fma}\left(y, \color{blue}{\mathsf{neg}\left(x\right)}, \frac{5641895835477563}{5000000000000000}\right)} \]
                    10. neg-lowering-neg.f6496.7

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

                    \[\leadsto \color{blue}{x + \frac{y}{\mathsf{fma}\left(y, -x, 1.1283791670955126\right)}} \]
                  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.f6476.9

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

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

                  if 7.99999999999999968e-23 < z

                  1. Initial program 98.4%

                    \[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. Simplified98.5%

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

                  Alternative 9: 72.2% accurate, 6.7× speedup?

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

                    1. Initial program 99.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. Simplified95.3%

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

                      if -9.00000000000000031e-67 < x < 2.7500000000000001e-27

                      1. Initial program 94.3%

                        \[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. sub-negN/A

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

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

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

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

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

                          \[\leadsto x + \frac{y}{\color{blue}{\mathsf{fma}\left(y, -1 \cdot x, \frac{5641895835477563}{5000000000000000}\right)}} \]
                        9. mul-1-negN/A

                          \[\leadsto x + \frac{y}{\mathsf{fma}\left(y, \color{blue}{\mathsf{neg}\left(x\right)}, \frac{5641895835477563}{5000000000000000}\right)} \]
                        10. neg-lowering-neg.f6466.3

                          \[\leadsto x + \frac{y}{\mathsf{fma}\left(y, \color{blue}{-x}, 1.1283791670955126\right)} \]
                      5. Simplified66.3%

                        \[\leadsto \color{blue}{x + \frac{y}{\mathsf{fma}\left(y, -x, 1.1283791670955126\right)}} \]
                      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.f6454.0

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

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

                    Alternative 10: 70.2% accurate, 7.1× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.6 \cdot 10^{-152}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.85 \cdot 10^{-183}:\\ \;\;\;\;y \cdot 0.8862269254527579\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
                    (FPCore (x y z)
                     :precision binary64
                     (if (<= x -1.6e-152) x (if (<= x 1.85e-183) (* y 0.8862269254527579) x)))
                    double code(double x, double y, double z) {
                    	double tmp;
                    	if (x <= -1.6e-152) {
                    		tmp = x;
                    	} else if (x <= 1.85e-183) {
                    		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.6d-152)) then
                            tmp = x
                        else if (x <= 1.85d-183) 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.6e-152) {
                    		tmp = x;
                    	} else if (x <= 1.85e-183) {
                    		tmp = y * 0.8862269254527579;
                    	} else {
                    		tmp = x;
                    	}
                    	return tmp;
                    }
                    
                    def code(x, y, z):
                    	tmp = 0
                    	if x <= -1.6e-152:
                    		tmp = x
                    	elif x <= 1.85e-183:
                    		tmp = y * 0.8862269254527579
                    	else:
                    		tmp = x
                    	return tmp
                    
                    function code(x, y, z)
                    	tmp = 0.0
                    	if (x <= -1.6e-152)
                    		tmp = x;
                    	elseif (x <= 1.85e-183)
                    		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.6e-152)
                    		tmp = x;
                    	elseif (x <= 1.85e-183)
                    		tmp = y * 0.8862269254527579;
                    	else
                    		tmp = x;
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[x_, y_, z_] := If[LessEqual[x, -1.6e-152], x, If[LessEqual[x, 1.85e-183], N[(y * 0.8862269254527579), $MachinePrecision], x]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;x \leq -1.6 \cdot 10^{-152}:\\
                    \;\;\;\;x\\
                    
                    \mathbf{elif}\;x \leq 1.85 \cdot 10^{-183}:\\
                    \;\;\;\;y \cdot 0.8862269254527579\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;x\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if x < -1.60000000000000006e-152 or 1.8499999999999999e-183 < x

                      1. Initial program 98.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. Simplified83.1%

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

                        if -1.60000000000000006e-152 < x < 1.8499999999999999e-183

                        1. Initial program 91.2%

                          \[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. sub-negN/A

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

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

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

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

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

                            \[\leadsto x + \frac{y}{\color{blue}{\mathsf{fma}\left(y, -1 \cdot x, \frac{5641895835477563}{5000000000000000}\right)}} \]
                          9. mul-1-negN/A

                            \[\leadsto x + \frac{y}{\mathsf{fma}\left(y, \color{blue}{\mathsf{neg}\left(x\right)}, \frac{5641895835477563}{5000000000000000}\right)} \]
                          10. neg-lowering-neg.f6458.7

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

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

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

                            \[\leadsto \color{blue}{y \cdot \frac{5000000000000000}{5641895835477563}} \]
                          2. *-lowering-*.f6446.5

                            \[\leadsto \color{blue}{y \cdot 0.8862269254527579} \]
                        8. Simplified46.5%

                          \[\leadsto \color{blue}{y \cdot 0.8862269254527579} \]
                      5. Recombined 2 regimes into one program.
                      6. Add Preprocessing

                      Alternative 11: 68.3% 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 97.2%

                        \[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. Simplified70.2%

                          \[\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 2024204 
                        (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)))))