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

Percentage Accurate: 95.5% → 99.3%
Time: 8.6s
Alternatives: 8
Speedup: 3.7×

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 8 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.5% 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: 99.3% accurate, 0.5× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;-\left(-x\right)\\


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

    1. Initial program 93.4%

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

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

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

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

    if 0.0 < (exp.f64 z) < 1.0000005000000001

    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 x + \frac{y}{\color{blue}{\left(\frac{5641895835477563}{5000000000000000} + \frac{5641895835477563}{5000000000000000} \cdot z\right)} - x \cdot y} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

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

        \[\leadsto x + \frac{y}{\left(\color{blue}{z \cdot \frac{5641895835477563}{5000000000000000}} + \frac{5641895835477563}{5000000000000000}\right) - x \cdot y} \]
      3. lower-fma.f6499.8

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

      \[\leadsto x + \frac{y}{\color{blue}{\mathsf{fma}\left(z, 1.1283791670955126, 1.1283791670955126\right)} - x \cdot y} \]
    6. Step-by-step derivation
      1. lift-/.f64N/A

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{1}}{\frac{\mathsf{fma}\left(z, \frac{5641895835477563}{5000000000000000}, \frac{5641895835477563}{5000000000000000}\right) - x \cdot y}{y}} \]
      6. lower-/.f6499.9

        \[\leadsto x + \frac{1}{\color{blue}{\frac{\mathsf{fma}\left(z, 1.1283791670955126, 1.1283791670955126\right) - x \cdot y}{y}}} \]
      7. lift--.f64N/A

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

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

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

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

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

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

        \[\leadsto x + \frac{1}{\frac{\color{blue}{\left(-y\right)} \cdot x + \mathsf{fma}\left(z, \frac{5641895835477563}{5000000000000000}, \frac{5641895835477563}{5000000000000000}\right)}{y}} \]
      14. lower-fma.f6499.9

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

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

    if 1.0000005000000001 < (exp.f64 z)

    1. Initial program 90.8%

      \[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. +-commutativeN/A

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

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

        \[\leadsto x \cdot \color{blue}{\left(0 - \left(\frac{1}{{x}^{2}} - 1\right)\right)} \]
      5. neg-sub0N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\left(\frac{\color{blue}{x}}{{x}^{2}} - x\right) \]
      16. lower-/.f64N/A

        \[\leadsto -\left(\color{blue}{\frac{x}{{x}^{2}}} - x\right) \]
      17. unpow2N/A

        \[\leadsto -\left(\frac{x}{\color{blue}{x \cdot x}} - x\right) \]
      18. lower-*.f6440.3

        \[\leadsto -\left(\frac{x}{\color{blue}{x \cdot x}} - x\right) \]
    5. Applied rewrites40.3%

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

      \[\leadsto --1 \cdot x \]
    7. Step-by-step derivation
      1. Applied rewrites100.0%

        \[\leadsto -\left(-x\right) \]
    8. Recombined 3 regimes into one program.
    9. Final simplification99.9%

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

    Alternative 2: 87.2% accurate, 0.5× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{-1}{x} + x\\ t_1 := \frac{y}{e^{z} \cdot 1.1283791670955126 - y \cdot x} + x\\ \mathbf{if}\;t\_1 \leq -400000:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_1 \leq 1000:\\ \;\;\;\;-\left(-x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
    (FPCore (x y z)
     :precision binary64
     (let* ((t_0 (+ (/ -1.0 x) x))
            (t_1 (+ (/ y (- (* (exp z) 1.1283791670955126) (* y x))) x)))
       (if (<= t_1 -400000.0) t_0 (if (<= t_1 1000.0) (- (- x)) t_0))))
    double code(double x, double y, double z) {
    	double t_0 = (-1.0 / x) + x;
    	double t_1 = (y / ((exp(z) * 1.1283791670955126) - (y * x))) + x;
    	double tmp;
    	if (t_1 <= -400000.0) {
    		tmp = t_0;
    	} else if (t_1 <= 1000.0) {
    		tmp = -(-x);
    	} else {
    		tmp = t_0;
    	}
    	return tmp;
    }
    
    real(8) function code(x, y, z)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8) :: t_0
        real(8) :: t_1
        real(8) :: tmp
        t_0 = ((-1.0d0) / x) + x
        t_1 = (y / ((exp(z) * 1.1283791670955126d0) - (y * x))) + x
        if (t_1 <= (-400000.0d0)) then
            tmp = t_0
        else if (t_1 <= 1000.0d0) then
            tmp = -(-x)
        else
            tmp = t_0
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z) {
    	double t_0 = (-1.0 / x) + x;
    	double t_1 = (y / ((Math.exp(z) * 1.1283791670955126) - (y * x))) + x;
    	double tmp;
    	if (t_1 <= -400000.0) {
    		tmp = t_0;
    	} else if (t_1 <= 1000.0) {
    		tmp = -(-x);
    	} else {
    		tmp = t_0;
    	}
    	return tmp;
    }
    
    def code(x, y, z):
    	t_0 = (-1.0 / x) + x
    	t_1 = (y / ((math.exp(z) * 1.1283791670955126) - (y * x))) + x
    	tmp = 0
    	if t_1 <= -400000.0:
    		tmp = t_0
    	elif t_1 <= 1000.0:
    		tmp = -(-x)
    	else:
    		tmp = t_0
    	return tmp
    
    function code(x, y, z)
    	t_0 = Float64(Float64(-1.0 / x) + x)
    	t_1 = Float64(Float64(y / Float64(Float64(exp(z) * 1.1283791670955126) - Float64(y * x))) + x)
    	tmp = 0.0
    	if (t_1 <= -400000.0)
    		tmp = t_0;
    	elseif (t_1 <= 1000.0)
    		tmp = Float64(-Float64(-x));
    	else
    		tmp = t_0;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z)
    	t_0 = (-1.0 / x) + x;
    	t_1 = (y / ((exp(z) * 1.1283791670955126) - (y * x))) + x;
    	tmp = 0.0;
    	if (t_1 <= -400000.0)
    		tmp = t_0;
    	elseif (t_1 <= 1000.0)
    		tmp = -(-x);
    	else
    		tmp = t_0;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_] := Block[{t$95$0 = N[(N[(-1.0 / x), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$1 = N[(N[(y / N[(N[(N[Exp[z], $MachinePrecision] * 1.1283791670955126), $MachinePrecision] - N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[t$95$1, -400000.0], t$95$0, If[LessEqual[t$95$1, 1000.0], (-(-x)), t$95$0]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \frac{-1}{x} + x\\
    t_1 := \frac{y}{e^{z} \cdot 1.1283791670955126 - y \cdot x} + x\\
    \mathbf{if}\;t\_1 \leq -400000:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;t\_1 \leq 1000:\\
    \;\;\;\;-\left(-x\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_0\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (+.f64 x (/.f64 y (-.f64 (*.f64 #s(literal 5641895835477563/5000000000000000 binary64) (exp.f64 z)) (*.f64 x y)))) < -4e5 or 1e3 < (+.f64 x (/.f64 y (-.f64 (*.f64 #s(literal 5641895835477563/5000000000000000 binary64) (exp.f64 z)) (*.f64 x y))))

      1. Initial program 94.2%

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

        \[\leadsto x + \color{blue}{\frac{-1}{x}} \]
      4. Step-by-step derivation
        1. lower-/.f6490.9

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

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

      if -4e5 < (+.f64 x (/.f64 y (-.f64 (*.f64 #s(literal 5641895835477563/5000000000000000 binary64) (exp.f64 z)) (*.f64 x y)))) < 1e3

      1. Initial program 99.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 \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. +-commutativeN/A

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

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

          \[\leadsto x \cdot \color{blue}{\left(0 - \left(\frac{1}{{x}^{2}} - 1\right)\right)} \]
        5. neg-sub0N/A

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

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

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

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

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

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

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

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

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

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

          \[\leadsto -\left(\frac{\color{blue}{x}}{{x}^{2}} - x\right) \]
        16. lower-/.f64N/A

          \[\leadsto -\left(\color{blue}{\frac{x}{{x}^{2}}} - x\right) \]
        17. unpow2N/A

          \[\leadsto -\left(\frac{x}{\color{blue}{x \cdot x}} - x\right) \]
        18. lower-*.f645.1

          \[\leadsto -\left(\frac{x}{\color{blue}{x \cdot x}} - x\right) \]
      5. Applied rewrites5.1%

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

        \[\leadsto --1 \cdot x \]
      7. Step-by-step derivation
        1. Applied rewrites78.7%

          \[\leadsto -\left(-x\right) \]
      8. Recombined 2 regimes into one program.
      9. Final simplification87.3%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{y}{e^{z} \cdot 1.1283791670955126 - y \cdot x} + x \leq -400000:\\ \;\;\;\;\frac{-1}{x} + x\\ \mathbf{elif}\;\frac{y}{e^{z} \cdot 1.1283791670955126 - y \cdot x} + x \leq 1000:\\ \;\;\;\;-\left(-x\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{x} + x\\ \end{array} \]
      10. Add Preprocessing

      Alternative 3: 97.8% accurate, 0.5× speedup?

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

        1. Initial program 98.4%

          \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
        2. Add Preprocessing

        if 5.00000000000000004e154 < (+.f64 x (/.f64 y (-.f64 (*.f64 #s(literal 5641895835477563/5000000000000000 binary64) (exp.f64 z)) (*.f64 x y))))

        1. Initial program 78.7%

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

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

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

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

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

      Alternative 4: 98.9% accurate, 0.9× speedup?

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

        1. Initial program 93.9%

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

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

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

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

        if -2.9999999999999998e-25 < z

        1. Initial program 96.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto x + \frac{y}{\mathsf{neg}\left(y \cdot \color{blue}{\left(\frac{-5641895835477563}{5000000000000000} \cdot \frac{e^{z}}{y} - -1 \cdot x\right)}\right)} \]
        5. Applied rewrites99.9%

          \[\leadsto x + \frac{y}{\color{blue}{\mathsf{fma}\left(\frac{e^{z}}{y}, 1.1283791670955126, -x\right) \cdot y}} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification99.9%

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

      Alternative 5: 98.6% accurate, 3.1× speedup?

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

        1. Initial program 93.9%

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

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

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

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

        if -2.9999999999999998e-25 < z < 8.99999999999999959e-7

        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 x + \frac{y}{\color{blue}{\left(\frac{5641895835477563}{5000000000000000} + \frac{5641895835477563}{5000000000000000} \cdot z\right)} - x \cdot y} \]
        4. Step-by-step derivation
          1. +-commutativeN/A

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

            \[\leadsto x + \frac{y}{\left(\color{blue}{z \cdot \frac{5641895835477563}{5000000000000000}} + \frac{5641895835477563}{5000000000000000}\right) - x \cdot y} \]
          3. lower-fma.f6499.8

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

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

        if 8.99999999999999959e-7 < z

        1. Initial program 90.8%

          \[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. +-commutativeN/A

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

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

            \[\leadsto x \cdot \color{blue}{\left(0 - \left(\frac{1}{{x}^{2}} - 1\right)\right)} \]
          5. neg-sub0N/A

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

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

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

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

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

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

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

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

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

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

            \[\leadsto -\left(\frac{\color{blue}{x}}{{x}^{2}} - x\right) \]
          16. lower-/.f64N/A

            \[\leadsto -\left(\color{blue}{\frac{x}{{x}^{2}}} - x\right) \]
          17. unpow2N/A

            \[\leadsto -\left(\frac{x}{\color{blue}{x \cdot x}} - x\right) \]
          18. lower-*.f6440.3

            \[\leadsto -\left(\frac{x}{\color{blue}{x \cdot x}} - x\right) \]
        5. Applied rewrites40.3%

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

          \[\leadsto --1 \cdot x \]
        7. Step-by-step derivation
          1. Applied rewrites100.0%

            \[\leadsto -\left(-x\right) \]
        8. Recombined 3 regimes into one program.
        9. Final simplification99.9%

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

        Alternative 6: 98.5% accurate, 3.7× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{-25}:\\ \;\;\;\;\frac{-1}{x} + x\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-7}:\\ \;\;\;\;\frac{y}{1.1283791670955126 - y \cdot x} + x\\ \mathbf{else}:\\ \;\;\;\;-\left(-x\right)\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (if (<= z -3e-25)
           (+ (/ -1.0 x) x)
           (if (<= z 9e-7) (+ (/ y (- 1.1283791670955126 (* y x))) x) (- (- x)))))
        double code(double x, double y, double z) {
        	double tmp;
        	if (z <= -3e-25) {
        		tmp = (-1.0 / x) + x;
        	} else if (z <= 9e-7) {
        		tmp = (y / (1.1283791670955126 - (y * x))) + x;
        	} else {
        		tmp = -(-x);
        	}
        	return tmp;
        }
        
        real(8) function code(x, y, z)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            real(8) :: tmp
            if (z <= (-3d-25)) then
                tmp = ((-1.0d0) / x) + x
            else if (z <= 9d-7) then
                tmp = (y / (1.1283791670955126d0 - (y * x))) + x
            else
                tmp = -(-x)
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z) {
        	double tmp;
        	if (z <= -3e-25) {
        		tmp = (-1.0 / x) + x;
        	} else if (z <= 9e-7) {
        		tmp = (y / (1.1283791670955126 - (y * x))) + x;
        	} else {
        		tmp = -(-x);
        	}
        	return tmp;
        }
        
        def code(x, y, z):
        	tmp = 0
        	if z <= -3e-25:
        		tmp = (-1.0 / x) + x
        	elif z <= 9e-7:
        		tmp = (y / (1.1283791670955126 - (y * x))) + x
        	else:
        		tmp = -(-x)
        	return tmp
        
        function code(x, y, z)
        	tmp = 0.0
        	if (z <= -3e-25)
        		tmp = Float64(Float64(-1.0 / x) + x);
        	elseif (z <= 9e-7)
        		tmp = Float64(Float64(y / Float64(1.1283791670955126 - Float64(y * x))) + x);
        	else
        		tmp = Float64(-Float64(-x));
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z)
        	tmp = 0.0;
        	if (z <= -3e-25)
        		tmp = (-1.0 / x) + x;
        	elseif (z <= 9e-7)
        		tmp = (y / (1.1283791670955126 - (y * x))) + x;
        	else
        		tmp = -(-x);
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_] := If[LessEqual[z, -3e-25], N[(N[(-1.0 / x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 9e-7], N[(N[(y / N[(1.1283791670955126 - N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], (-(-x))]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;z \leq -3 \cdot 10^{-25}:\\
        \;\;\;\;\frac{-1}{x} + x\\
        
        \mathbf{elif}\;z \leq 9 \cdot 10^{-7}:\\
        \;\;\;\;\frac{y}{1.1283791670955126 - y \cdot x} + x\\
        
        \mathbf{else}:\\
        \;\;\;\;-\left(-x\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if z < -2.9999999999999998e-25

          1. Initial program 93.9%

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

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

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

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

          if -2.9999999999999998e-25 < z < 8.99999999999999959e-7

          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 x + \frac{y}{\color{blue}{\frac{5641895835477563}{5000000000000000}} - x \cdot y} \]
          4. Step-by-step derivation
            1. Applied rewrites99.3%

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

            if 8.99999999999999959e-7 < z

            1. Initial program 90.8%

              \[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. +-commutativeN/A

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

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

                \[\leadsto x \cdot \color{blue}{\left(0 - \left(\frac{1}{{x}^{2}} - 1\right)\right)} \]
              5. neg-sub0N/A

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

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

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

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

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

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

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

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

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

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

                \[\leadsto -\left(\frac{\color{blue}{x}}{{x}^{2}} - x\right) \]
              16. lower-/.f64N/A

                \[\leadsto -\left(\color{blue}{\frac{x}{{x}^{2}}} - x\right) \]
              17. unpow2N/A

                \[\leadsto -\left(\frac{x}{\color{blue}{x \cdot x}} - x\right) \]
              18. lower-*.f6440.3

                \[\leadsto -\left(\frac{x}{\color{blue}{x \cdot x}} - x\right) \]
            5. Applied rewrites40.3%

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

              \[\leadsto --1 \cdot x \]
            7. Step-by-step derivation
              1. Applied rewrites100.0%

                \[\leadsto -\left(-x\right) \]
            8. Recombined 3 regimes into one program.
            9. Final simplification99.7%

              \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{-25}:\\ \;\;\;\;\frac{-1}{x} + x\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-7}:\\ \;\;\;\;\frac{y}{1.1283791670955126 - y \cdot x} + x\\ \mathbf{else}:\\ \;\;\;\;-\left(-x\right)\\ \end{array} \]
            10. Add Preprocessing

            Alternative 7: 69.5% accurate, 7.1× speedup?

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

              1. Initial program 97.1%

                \[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. +-commutativeN/A

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

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

                  \[\leadsto x \cdot \color{blue}{\left(0 - \left(\frac{1}{{x}^{2}} - 1\right)\right)} \]
                5. neg-sub0N/A

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto -\left(\frac{\color{blue}{x}}{{x}^{2}} - x\right) \]
                16. lower-/.f64N/A

                  \[\leadsto -\left(\color{blue}{\frac{x}{{x}^{2}}} - x\right) \]
                17. unpow2N/A

                  \[\leadsto -\left(\frac{x}{\color{blue}{x \cdot x}} - x\right) \]
                18. lower-*.f6484.4

                  \[\leadsto -\left(\frac{x}{\color{blue}{x \cdot x}} - x\right) \]
              5. Applied rewrites84.4%

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

                \[\leadsto \frac{-1}{\color{blue}{x}} \]
              7. Step-by-step derivation
                1. Applied rewrites57.0%

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

                if -1.6999999999999999e86 < z

                1. Initial program 95.6%

                  \[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. +-commutativeN/A

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

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

                    \[\leadsto x \cdot \color{blue}{\left(0 - \left(\frac{1}{{x}^{2}} - 1\right)\right)} \]
                  5. neg-sub0N/A

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto -\left(\frac{\color{blue}{x}}{{x}^{2}} - x\right) \]
                  16. lower-/.f64N/A

                    \[\leadsto -\left(\color{blue}{\frac{x}{{x}^{2}}} - x\right) \]
                  17. unpow2N/A

                    \[\leadsto -\left(\frac{x}{\color{blue}{x \cdot x}} - x\right) \]
                  18. lower-*.f6453.6

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

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

                  \[\leadsto --1 \cdot x \]
                7. Step-by-step derivation
                  1. Applied rewrites74.3%

                    \[\leadsto -\left(-x\right) \]
                8. Recombined 2 regimes into one program.
                9. Add Preprocessing

                Alternative 8: 69.0% accurate, 25.6× speedup?

                \[\begin{array}{l} \\ -\left(-x\right) \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 Float64(-Float64(-x))
                end
                
                function tmp = code(x, y, z)
                	tmp = -(-x);
                end
                
                code[x_, y_, z_] := (-(-x))
                
                \begin{array}{l}
                
                \\
                -\left(-x\right)
                \end{array}
                
                Derivation
                1. Initial program 95.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 \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. +-commutativeN/A

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

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

                    \[\leadsto x \cdot \color{blue}{\left(0 - \left(\frac{1}{{x}^{2}} - 1\right)\right)} \]
                  5. neg-sub0N/A

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto -\left(\frac{\color{blue}{x}}{{x}^{2}} - x\right) \]
                  16. lower-/.f64N/A

                    \[\leadsto -\left(\color{blue}{\frac{x}{{x}^{2}}} - x\right) \]
                  17. unpow2N/A

                    \[\leadsto -\left(\frac{x}{\color{blue}{x \cdot x}} - x\right) \]
                  18. lower-*.f6459.4

                    \[\leadsto -\left(\frac{x}{\color{blue}{x \cdot x}} - x\right) \]
                5. Applied rewrites59.4%

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

                  \[\leadsto --1 \cdot x \]
                7. Step-by-step derivation
                  1. Applied rewrites68.4%

                    \[\leadsto -\left(-x\right) \]
                  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 2024268 
                  (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)))))