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

Percentage Accurate: 95.0% → 99.8%
Time: 14.0s
Alternatives: 12
Speedup: 5.8×

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 12 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.0% 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.8% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;e^{z} \leq 1.05:\\
\;\;\;\;x + \frac{y}{1.1283791670955126 \cdot \left(1 + z \cdot \left(1 + z \cdot \left(0.5 + z \cdot 0.16666666666666666\right)\right)\right) - x \cdot y}\\

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


\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. Step-by-step derivation
      1. remove-double-neg93.4%

        \[\leadsto x + \frac{\color{blue}{-\left(-y\right)}}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
      2. distribute-frac-neg93.4%

        \[\leadsto x + \color{blue}{\left(-\frac{-y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\right)} \]
      3. unsub-neg93.4%

        \[\leadsto \color{blue}{x - \frac{-y}{1.1283791670955126 \cdot e^{z} - x \cdot y}} \]
      4. distribute-frac-neg93.4%

        \[\leadsto x - \color{blue}{\left(-\frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\right)} \]
      5. distribute-neg-frac293.4%

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

        \[\leadsto x - \frac{y}{\color{blue}{0 - \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      7. associate--r-93.1%

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

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

        \[\leadsto x - \frac{y}{\color{blue}{x \cdot y + \left(-1.1283791670955126 \cdot e^{z}\right)}} \]
      10. fma-define93.5%

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

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, -\color{blue}{e^{z} \cdot 1.1283791670955126}\right)} \]
      12. distribute-rgt-neg-in93.5%

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

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

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

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

    if 0.0 < (exp.f64 z) < 1.05000000000000004

    1. Initial program 99.7%

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

      \[\leadsto x + \frac{y}{1.1283791670955126 \cdot \color{blue}{\left(1 + z \cdot \left(1 + z \cdot \left(0.5 + 0.16666666666666666 \cdot z\right)\right)\right)} - x \cdot y} \]
    4. Step-by-step derivation
      1. *-commutative99.2%

        \[\leadsto x + \frac{y}{1.1283791670955126 \cdot \left(1 + z \cdot \left(1 + z \cdot \left(0.5 + \color{blue}{z \cdot 0.16666666666666666}\right)\right)\right) - x \cdot y} \]
    5. Simplified99.2%

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

    if 1.05000000000000004 < (exp.f64 z)

    1. Initial program 95.6%

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

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

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

        \[\leadsto \color{blue}{x - \frac{-y}{1.1283791670955126 \cdot e^{z} - x \cdot y}} \]
      4. distribute-frac-neg95.6%

        \[\leadsto x - \color{blue}{\left(-\frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\right)} \]
      5. distribute-neg-frac295.6%

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

        \[\leadsto x - \frac{y}{\color{blue}{0 - \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      7. associate--r-95.6%

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

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

        \[\leadsto x - \frac{y}{\color{blue}{x \cdot y + \left(-1.1283791670955126 \cdot e^{z}\right)}} \]
      10. fma-define100.0%

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

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

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, \color{blue}{e^{z} \cdot \left(-1.1283791670955126\right)}\right)} \]
      13. metadata-eval100.0%

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, e^{z} \cdot \color{blue}{-1.1283791670955126}\right)} \]
    3. Simplified100.0%

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

      \[\leadsto x - \color{blue}{-0.8862269254527579 \cdot \frac{y}{e^{z}}} \]
    6. Step-by-step derivation
      1. *-commutative100.0%

        \[\leadsto x - \color{blue}{\frac{y}{e^{z}} \cdot -0.8862269254527579} \]
    7. Simplified100.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;e^{z} \leq 0:\\ \;\;\;\;x + \frac{-1}{x}\\ \mathbf{elif}\;e^{z} \leq 1.05:\\ \;\;\;\;x + \frac{y}{1.1283791670955126 \cdot \left(1 + z \cdot \left(1 + z \cdot \left(0.5 + z \cdot 0.16666666666666666\right)\right)\right) - x \cdot y}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{e^{z}} \cdot -0.8862269254527579\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 99.8% 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 2:\\ \;\;\;\;x + \frac{y}{1.1283791670955126 \cdot \left(1 + z \cdot \left(1 + z \cdot \left(0.5 + z \cdot 0.16666666666666666\right)\right)\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) 2.0)
     (+
      x
      (/
       y
       (-
        (*
         1.1283791670955126
         (+ 1.0 (* z (+ 1.0 (* z (+ 0.5 (* z 0.16666666666666666)))))))
        (* 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) <= 2.0) {
		tmp = x + (y / ((1.1283791670955126 * (1.0 + (z * (1.0 + (z * (0.5 + (z * 0.16666666666666666))))))) - (x * y)));
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (exp(z) <= 0.0d0) then
        tmp = x + ((-1.0d0) / x)
    else if (exp(z) <= 2.0d0) then
        tmp = x + (y / ((1.1283791670955126d0 * (1.0d0 + (z * (1.0d0 + (z * (0.5d0 + (z * 0.16666666666666666d0))))))) - (x * y)))
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (Math.exp(z) <= 0.0) {
		tmp = x + (-1.0 / x);
	} else if (Math.exp(z) <= 2.0) {
		tmp = x + (y / ((1.1283791670955126 * (1.0 + (z * (1.0 + (z * (0.5 + (z * 0.16666666666666666))))))) - (x * y)));
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if math.exp(z) <= 0.0:
		tmp = x + (-1.0 / x)
	elif math.exp(z) <= 2.0:
		tmp = x + (y / ((1.1283791670955126 * (1.0 + (z * (1.0 + (z * (0.5 + (z * 0.16666666666666666))))))) - (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) <= 2.0)
		tmp = Float64(x + Float64(y / Float64(Float64(1.1283791670955126 * Float64(1.0 + Float64(z * Float64(1.0 + Float64(z * Float64(0.5 + Float64(z * 0.16666666666666666))))))) - Float64(x * y))));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (exp(z) <= 0.0)
		tmp = x + (-1.0 / x);
	elseif (exp(z) <= 2.0)
		tmp = x + (y / ((1.1283791670955126 * (1.0 + (z * (1.0 + (z * (0.5 + (z * 0.16666666666666666))))))) - (x * y)));
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[N[Exp[z], $MachinePrecision], 0.0], N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Exp[z], $MachinePrecision], 2.0], N[(x + N[(y / N[(N[(1.1283791670955126 * N[(1.0 + N[(z * N[(1.0 + N[(z * N[(0.5 + N[(z * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 2:\\
\;\;\;\;x + \frac{y}{1.1283791670955126 \cdot \left(1 + z \cdot \left(1 + z \cdot \left(0.5 + z \cdot 0.16666666666666666\right)\right)\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 93.4%

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

        \[\leadsto x + \frac{\color{blue}{-\left(-y\right)}}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
      2. distribute-frac-neg93.4%

        \[\leadsto x + \color{blue}{\left(-\frac{-y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\right)} \]
      3. unsub-neg93.4%

        \[\leadsto \color{blue}{x - \frac{-y}{1.1283791670955126 \cdot e^{z} - x \cdot y}} \]
      4. distribute-frac-neg93.4%

        \[\leadsto x - \color{blue}{\left(-\frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\right)} \]
      5. distribute-neg-frac293.4%

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

        \[\leadsto x - \frac{y}{\color{blue}{0 - \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      7. associate--r-93.1%

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

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

        \[\leadsto x - \frac{y}{\color{blue}{x \cdot y + \left(-1.1283791670955126 \cdot e^{z}\right)}} \]
      10. fma-define93.5%

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

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, -\color{blue}{e^{z} \cdot 1.1283791670955126}\right)} \]
      12. distribute-rgt-neg-in93.5%

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

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

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

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

    if 0.0 < (exp.f64 z) < 2

    1. Initial program 99.7%

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

      \[\leadsto x + \frac{y}{1.1283791670955126 \cdot \color{blue}{\left(1 + z \cdot \left(1 + z \cdot \left(0.5 + 0.16666666666666666 \cdot z\right)\right)\right)} - x \cdot y} \]
    4. Step-by-step derivation
      1. *-commutative98.8%

        \[\leadsto x + \frac{y}{1.1283791670955126 \cdot \left(1 + z \cdot \left(1 + z \cdot \left(0.5 + \color{blue}{z \cdot 0.16666666666666666}\right)\right)\right) - x \cdot y} \]
    5. Simplified98.8%

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

    if 2 < (exp.f64 z)

    1. Initial program 95.6%

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

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

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

        \[\leadsto \color{blue}{x - \frac{-y}{1.1283791670955126 \cdot e^{z} - x \cdot y}} \]
      4. distribute-frac-neg95.6%

        \[\leadsto x - \color{blue}{\left(-\frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\right)} \]
      5. distribute-neg-frac295.6%

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

        \[\leadsto x - \frac{y}{\color{blue}{0 - \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      7. associate--r-95.6%

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

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

        \[\leadsto x - \frac{y}{\color{blue}{x \cdot y + \left(-1.1283791670955126 \cdot e^{z}\right)}} \]
      10. fma-define100.0%

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

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

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, \color{blue}{e^{z} \cdot \left(-1.1283791670955126\right)}\right)} \]
      13. metadata-eval100.0%

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, e^{z} \cdot \color{blue}{-1.1283791670955126}\right)} \]
    3. Simplified100.0%

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

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

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

Alternative 3: 97.9% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 99.0%

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

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

    1. Initial program 83.2%

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

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

        \[\leadsto x + \color{blue}{\left(-\frac{-y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\right)} \]
      3. unsub-neg83.2%

        \[\leadsto \color{blue}{x - \frac{-y}{1.1283791670955126 \cdot e^{z} - x \cdot y}} \]
      4. distribute-frac-neg83.2%

        \[\leadsto x - \color{blue}{\left(-\frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\right)} \]
      5. distribute-neg-frac283.2%

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

        \[\leadsto x - \frac{y}{\color{blue}{0 - \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      7. associate--r-82.7%

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

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

        \[\leadsto x - \frac{y}{\color{blue}{x \cdot y + \left(-1.1283791670955126 \cdot e^{z}\right)}} \]
      10. fma-define93.5%

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

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, -\color{blue}{e^{z} \cdot 1.1283791670955126}\right)} \]
      12. distribute-rgt-neg-in93.5%

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

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

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

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

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

Alternative 4: 97.1% accurate, 0.5× speedup?

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

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

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

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

      \[\leadsto x + \color{blue}{\left(-\frac{-y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\right)} \]
    3. unsub-neg97.2%

      \[\leadsto \color{blue}{x - \frac{-y}{1.1283791670955126 \cdot e^{z} - x \cdot y}} \]
    4. distribute-frac-neg97.2%

      \[\leadsto x - \color{blue}{\left(-\frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\right)} \]
    5. distribute-neg-frac297.2%

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

      \[\leadsto x - \frac{y}{\color{blue}{0 - \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
    7. associate--r-97.1%

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

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

      \[\leadsto x - \frac{y}{\color{blue}{x \cdot y + \left(-1.1283791670955126 \cdot e^{z}\right)}} \]
    10. fma-define98.4%

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

      \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, -\color{blue}{e^{z} \cdot 1.1283791670955126}\right)} \]
    12. distribute-rgt-neg-in98.4%

      \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, \color{blue}{e^{z} \cdot \left(-1.1283791670955126\right)}\right)} \]
    13. metadata-eval98.4%

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

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

Alternative 5: 97.0% accurate, 1.0× speedup?

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

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

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

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

      \[\leadsto x + \color{blue}{\left(-\frac{-y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\right)} \]
    3. unsub-neg97.2%

      \[\leadsto \color{blue}{x - \frac{-y}{1.1283791670955126 \cdot e^{z} - x \cdot y}} \]
    4. distribute-frac-neg97.2%

      \[\leadsto x - \color{blue}{\left(-\frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\right)} \]
    5. distribute-neg-frac297.2%

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

      \[\leadsto x - \frac{y}{\color{blue}{0 - \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
    7. associate--r-97.1%

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

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

      \[\leadsto x - \frac{y}{\color{blue}{x \cdot y + \left(-1.1283791670955126 \cdot e^{z}\right)}} \]
    10. fma-define98.4%

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

      \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, -\color{blue}{e^{z} \cdot 1.1283791670955126}\right)} \]
    12. distribute-rgt-neg-in98.4%

      \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, \color{blue}{e^{z} \cdot \left(-1.1283791670955126\right)}\right)} \]
    13. metadata-eval98.4%

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

    \[\leadsto \color{blue}{x - \frac{y}{\mathsf{fma}\left(x, y, e^{z} \cdot -1.1283791670955126\right)}} \]
  4. Add Preprocessing
  5. Taylor expanded in x around inf 98.4%

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

Alternative 6: 99.8% accurate, 3.6× speedup?

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

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

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

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


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

    1. Initial program 93.4%

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

        \[\leadsto x + \frac{\color{blue}{-\left(-y\right)}}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
      2. distribute-frac-neg93.4%

        \[\leadsto x + \color{blue}{\left(-\frac{-y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\right)} \]
      3. unsub-neg93.4%

        \[\leadsto \color{blue}{x - \frac{-y}{1.1283791670955126 \cdot e^{z} - x \cdot y}} \]
      4. distribute-frac-neg93.4%

        \[\leadsto x - \color{blue}{\left(-\frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\right)} \]
      5. distribute-neg-frac293.4%

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

        \[\leadsto x - \frac{y}{\color{blue}{0 - \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      7. associate--r-93.1%

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

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

        \[\leadsto x - \frac{y}{\color{blue}{x \cdot y + \left(-1.1283791670955126 \cdot e^{z}\right)}} \]
      10. fma-define93.5%

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

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, -\color{blue}{e^{z} \cdot 1.1283791670955126}\right)} \]
      12. distribute-rgt-neg-in93.5%

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

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

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

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

    if -95 < z < 220

    1. Initial program 99.7%

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

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

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

        \[\leadsto \color{blue}{x - \frac{-y}{1.1283791670955126 \cdot e^{z} - x \cdot y}} \]
      4. distribute-frac-neg99.7%

        \[\leadsto x - \color{blue}{\left(-\frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\right)} \]
      5. distribute-neg-frac299.7%

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

        \[\leadsto x - \frac{y}{\color{blue}{0 - \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      7. associate--r-99.7%

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

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

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

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

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, -\color{blue}{e^{z} \cdot 1.1283791670955126}\right)} \]
      12. distribute-rgt-neg-in99.7%

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, \color{blue}{e^{z} \cdot \left(-1.1283791670955126\right)}\right)} \]
      13. metadata-eval99.7%

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

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

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

    if 220 < z

    1. Initial program 95.6%

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

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

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

        \[\leadsto \color{blue}{x - \frac{-y}{1.1283791670955126 \cdot e^{z} - x \cdot y}} \]
      4. distribute-frac-neg95.6%

        \[\leadsto x - \color{blue}{\left(-\frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\right)} \]
      5. distribute-neg-frac295.6%

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

        \[\leadsto x - \frac{y}{\color{blue}{0 - \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      7. associate--r-95.6%

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

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

        \[\leadsto x - \frac{y}{\color{blue}{x \cdot y + \left(-1.1283791670955126 \cdot e^{z}\right)}} \]
      10. fma-define100.0%

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

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

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, \color{blue}{e^{z} \cdot \left(-1.1283791670955126\right)}\right)} \]
      13. metadata-eval100.0%

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, e^{z} \cdot \color{blue}{-1.1283791670955126}\right)} \]
    3. Simplified100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -95:\\ \;\;\;\;x - \frac{1}{x}\\ \mathbf{elif}\;z \leq 220:\\ \;\;\;\;x + \frac{y}{1.1283791670955126 + \left(z \cdot \left(1.1283791670955126 - z \cdot \left(z \cdot -0.18806319451591877 - 0.5641895835477563\right)\right) - x \cdot y\right)}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 99.8% accurate, 4.1× speedup?

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

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

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

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


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

    1. Initial program 93.4%

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

        \[\leadsto x + \frac{\color{blue}{-\left(-y\right)}}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
      2. distribute-frac-neg93.4%

        \[\leadsto x + \color{blue}{\left(-\frac{-y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\right)} \]
      3. unsub-neg93.4%

        \[\leadsto \color{blue}{x - \frac{-y}{1.1283791670955126 \cdot e^{z} - x \cdot y}} \]
      4. distribute-frac-neg93.4%

        \[\leadsto x - \color{blue}{\left(-\frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\right)} \]
      5. distribute-neg-frac293.4%

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

        \[\leadsto x - \frac{y}{\color{blue}{0 - \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      7. associate--r-93.1%

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

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

        \[\leadsto x - \frac{y}{\color{blue}{x \cdot y + \left(-1.1283791670955126 \cdot e^{z}\right)}} \]
      10. fma-define93.5%

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

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, -\color{blue}{e^{z} \cdot 1.1283791670955126}\right)} \]
      12. distribute-rgt-neg-in93.5%

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

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

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

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

    if -125 < z < 200

    1. Initial program 99.7%

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

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

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

        \[\leadsto \color{blue}{x - \frac{-y}{1.1283791670955126 \cdot e^{z} - x \cdot y}} \]
      4. distribute-frac-neg99.7%

        \[\leadsto x - \color{blue}{\left(-\frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\right)} \]
      5. distribute-neg-frac299.7%

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

        \[\leadsto x - \frac{y}{\color{blue}{0 - \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      7. associate--r-99.7%

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

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

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

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

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, -\color{blue}{e^{z} \cdot 1.1283791670955126}\right)} \]
      12. distribute-rgt-neg-in99.7%

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, \color{blue}{e^{z} \cdot \left(-1.1283791670955126\right)}\right)} \]
      13. metadata-eval99.7%

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

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

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

    if 200 < z

    1. Initial program 95.6%

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

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

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

        \[\leadsto \color{blue}{x - \frac{-y}{1.1283791670955126 \cdot e^{z} - x \cdot y}} \]
      4. distribute-frac-neg95.6%

        \[\leadsto x - \color{blue}{\left(-\frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\right)} \]
      5. distribute-neg-frac295.6%

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

        \[\leadsto x - \frac{y}{\color{blue}{0 - \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      7. associate--r-95.6%

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

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

        \[\leadsto x - \frac{y}{\color{blue}{x \cdot y + \left(-1.1283791670955126 \cdot e^{z}\right)}} \]
      10. fma-define100.0%

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

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

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, \color{blue}{e^{z} \cdot \left(-1.1283791670955126\right)}\right)} \]
      13. metadata-eval100.0%

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, e^{z} \cdot \color{blue}{-1.1283791670955126}\right)} \]
    3. Simplified100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -125:\\ \;\;\;\;x - \frac{1}{x}\\ \mathbf{elif}\;z \leq 200:\\ \;\;\;\;x + \frac{y}{1.1283791670955126 + \left(z \cdot \left(1.1283791670955126 - z \cdot -0.5641895835477563\right) - x \cdot y\right)}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 99.8% accurate, 4.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -270:\\ \;\;\;\;x + \frac{-1}{x}\\ \mathbf{elif}\;z \leq 190:\\ \;\;\;\;x + \frac{y}{1.1283791670955126 - \left(x \cdot y + z \cdot -1.1283791670955126\right)}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -270.0)
   (+ x (/ -1.0 x))
   (if (<= z 190.0)
     (+ x (/ y (- 1.1283791670955126 (+ (* x y) (* z -1.1283791670955126)))))
     x)))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -270.0) {
		tmp = x + (-1.0 / x);
	} else if (z <= 190.0) {
		tmp = x + (y / (1.1283791670955126 - ((x * y) + (z * -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 <= (-270.0d0)) then
        tmp = x + ((-1.0d0) / x)
    else if (z <= 190.0d0) then
        tmp = x + (y / (1.1283791670955126d0 - ((x * y) + (z * (-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 <= -270.0) {
		tmp = x + (-1.0 / x);
	} else if (z <= 190.0) {
		tmp = x + (y / (1.1283791670955126 - ((x * y) + (z * -1.1283791670955126))));
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -270.0:
		tmp = x + (-1.0 / x)
	elif z <= 190.0:
		tmp = x + (y / (1.1283791670955126 - ((x * y) + (z * -1.1283791670955126))))
	else:
		tmp = x
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -270.0)
		tmp = Float64(x + Float64(-1.0 / x));
	elseif (z <= 190.0)
		tmp = Float64(x + Float64(y / Float64(1.1283791670955126 - Float64(Float64(x * y) + Float64(z * -1.1283791670955126)))));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -270.0)
		tmp = x + (-1.0 / x);
	elseif (z <= 190.0)
		tmp = x + (y / (1.1283791670955126 - ((x * y) + (z * -1.1283791670955126))));
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -270.0], N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 190.0], N[(x + N[(y / N[(1.1283791670955126 - N[(N[(x * y), $MachinePrecision] + N[(z * -1.1283791670955126), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}

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

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

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


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

    1. Initial program 93.4%

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

        \[\leadsto x + \frac{\color{blue}{-\left(-y\right)}}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
      2. distribute-frac-neg93.4%

        \[\leadsto x + \color{blue}{\left(-\frac{-y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\right)} \]
      3. unsub-neg93.4%

        \[\leadsto \color{blue}{x - \frac{-y}{1.1283791670955126 \cdot e^{z} - x \cdot y}} \]
      4. distribute-frac-neg93.4%

        \[\leadsto x - \color{blue}{\left(-\frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\right)} \]
      5. distribute-neg-frac293.4%

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

        \[\leadsto x - \frac{y}{\color{blue}{0 - \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      7. associate--r-93.1%

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

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

        \[\leadsto x - \frac{y}{\color{blue}{x \cdot y + \left(-1.1283791670955126 \cdot e^{z}\right)}} \]
      10. fma-define93.5%

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

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, -\color{blue}{e^{z} \cdot 1.1283791670955126}\right)} \]
      12. distribute-rgt-neg-in93.5%

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

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

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

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

    if -270 < z < 190

    1. Initial program 99.7%

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

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

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

        \[\leadsto \color{blue}{x - \frac{-y}{1.1283791670955126 \cdot e^{z} - x \cdot y}} \]
      4. distribute-frac-neg99.7%

        \[\leadsto x - \color{blue}{\left(-\frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\right)} \]
      5. distribute-neg-frac299.7%

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

        \[\leadsto x - \frac{y}{\color{blue}{0 - \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      7. associate--r-99.7%

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

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

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

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

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, -\color{blue}{e^{z} \cdot 1.1283791670955126}\right)} \]
      12. distribute-rgt-neg-in99.7%

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, \color{blue}{e^{z} \cdot \left(-1.1283791670955126\right)}\right)} \]
      13. metadata-eval99.7%

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

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

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

    if 190 < z

    1. Initial program 95.6%

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

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

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

        \[\leadsto \color{blue}{x - \frac{-y}{1.1283791670955126 \cdot e^{z} - x \cdot y}} \]
      4. distribute-frac-neg95.6%

        \[\leadsto x - \color{blue}{\left(-\frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\right)} \]
      5. distribute-neg-frac295.6%

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

        \[\leadsto x - \frac{y}{\color{blue}{0 - \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      7. associate--r-95.6%

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

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

        \[\leadsto x - \frac{y}{\color{blue}{x \cdot y + \left(-1.1283791670955126 \cdot e^{z}\right)}} \]
      10. fma-define100.0%

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

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

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, \color{blue}{e^{z} \cdot \left(-1.1283791670955126\right)}\right)} \]
      13. metadata-eval100.0%

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, e^{z} \cdot \color{blue}{-1.1283791670955126}\right)} \]
    3. Simplified100.0%

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

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

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

Alternative 9: 99.7% accurate, 5.8× speedup?

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

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

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

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


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

    1. Initial program 93.4%

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

        \[\leadsto x + \frac{\color{blue}{-\left(-y\right)}}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
      2. distribute-frac-neg93.4%

        \[\leadsto x + \color{blue}{\left(-\frac{-y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\right)} \]
      3. unsub-neg93.4%

        \[\leadsto \color{blue}{x - \frac{-y}{1.1283791670955126 \cdot e^{z} - x \cdot y}} \]
      4. distribute-frac-neg93.4%

        \[\leadsto x - \color{blue}{\left(-\frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\right)} \]
      5. distribute-neg-frac293.4%

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

        \[\leadsto x - \frac{y}{\color{blue}{0 - \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      7. associate--r-93.1%

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

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

        \[\leadsto x - \frac{y}{\color{blue}{x \cdot y + \left(-1.1283791670955126 \cdot e^{z}\right)}} \]
      10. fma-define93.5%

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

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, -\color{blue}{e^{z} \cdot 1.1283791670955126}\right)} \]
      12. distribute-rgt-neg-in93.5%

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

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

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

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

    if -24 < z < 320

    1. Initial program 99.7%

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

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

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

        \[\leadsto \color{blue}{x - \frac{-y}{1.1283791670955126 \cdot e^{z} - x \cdot y}} \]
      4. distribute-frac-neg99.7%

        \[\leadsto x - \color{blue}{\left(-\frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\right)} \]
      5. distribute-neg-frac299.7%

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

        \[\leadsto x - \frac{y}{\color{blue}{0 - \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      7. associate--r-99.7%

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

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

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

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

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, -\color{blue}{e^{z} \cdot 1.1283791670955126}\right)} \]
      12. distribute-rgt-neg-in99.7%

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, \color{blue}{e^{z} \cdot \left(-1.1283791670955126\right)}\right)} \]
      13. metadata-eval99.7%

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

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

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

    if 320 < z

    1. Initial program 95.6%

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

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

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

        \[\leadsto \color{blue}{x - \frac{-y}{1.1283791670955126 \cdot e^{z} - x \cdot y}} \]
      4. distribute-frac-neg95.6%

        \[\leadsto x - \color{blue}{\left(-\frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\right)} \]
      5. distribute-neg-frac295.6%

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

        \[\leadsto x - \frac{y}{\color{blue}{0 - \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      7. associate--r-95.6%

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

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

        \[\leadsto x - \frac{y}{\color{blue}{x \cdot y + \left(-1.1283791670955126 \cdot e^{z}\right)}} \]
      10. fma-define100.0%

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

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

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, \color{blue}{e^{z} \cdot \left(-1.1283791670955126\right)}\right)} \]
      13. metadata-eval100.0%

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, e^{z} \cdot \color{blue}{-1.1283791670955126}\right)} \]
    3. Simplified100.0%

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

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

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

Alternative 10: 87.0% accurate, 7.4× speedup?

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

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

\mathbf{elif}\;z \leq 1.04 \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 < -3.0999999999999999e-23

    1. Initial program 94.0%

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

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

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

        \[\leadsto \color{blue}{x - \frac{-y}{1.1283791670955126 \cdot e^{z} - x \cdot y}} \]
      4. distribute-frac-neg94.0%

        \[\leadsto x - \color{blue}{\left(-\frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\right)} \]
      5. distribute-neg-frac294.0%

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

        \[\leadsto x - \frac{y}{\color{blue}{0 - \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      7. associate--r-93.7%

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

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

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

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

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, -\color{blue}{e^{z} \cdot 1.1283791670955126}\right)} \]
      12. distribute-rgt-neg-in94.1%

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

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

      \[\leadsto \color{blue}{x - \frac{y}{\mathsf{fma}\left(x, y, e^{z} \cdot -1.1283791670955126\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 97.8%

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

    if -3.0999999999999999e-23 < z < 1.04e-23

    1. Initial program 99.7%

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

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

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

        \[\leadsto \color{blue}{x - \frac{-y}{1.1283791670955126 \cdot e^{z} - x \cdot y}} \]
      4. distribute-frac-neg99.7%

        \[\leadsto x - \color{blue}{\left(-\frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\right)} \]
      5. distribute-neg-frac299.7%

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

        \[\leadsto x - \frac{y}{\color{blue}{0 - \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      7. associate--r-99.7%

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

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

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

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

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, -\color{blue}{e^{z} \cdot 1.1283791670955126}\right)} \]
      12. distribute-rgt-neg-in99.7%

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, \color{blue}{e^{z} \cdot \left(-1.1283791670955126\right)}\right)} \]
      13. metadata-eval99.7%

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

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

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

      \[\leadsto x - \frac{y}{\color{blue}{-1.1283791670955126 \cdot z} - 1.1283791670955126} \]
    7. Step-by-step derivation
      1. *-commutative80.7%

        \[\leadsto x - \frac{y}{\color{blue}{z \cdot -1.1283791670955126} - 1.1283791670955126} \]
    8. Simplified80.7%

      \[\leadsto x - \frac{y}{\color{blue}{z \cdot -1.1283791670955126} - 1.1283791670955126} \]
    9. Taylor expanded in z around 0 80.7%

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

    if 1.04e-23 < z

    1. Initial program 95.9%

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

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

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

        \[\leadsto \color{blue}{x - \frac{-y}{1.1283791670955126 \cdot e^{z} - x \cdot y}} \]
      4. distribute-frac-neg95.9%

        \[\leadsto x - \color{blue}{\left(-\frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\right)} \]
      5. distribute-neg-frac295.9%

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

        \[\leadsto x - \frac{y}{\color{blue}{0 - \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      7. associate--r-95.9%

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

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

        \[\leadsto x - \frac{y}{\color{blue}{x \cdot y + \left(-1.1283791670955126 \cdot e^{z}\right)}} \]
      10. fma-define100.0%

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

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

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, \color{blue}{e^{z} \cdot \left(-1.1283791670955126\right)}\right)} \]
      13. metadata-eval100.0%

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, e^{z} \cdot \color{blue}{-1.1283791670955126}\right)} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{x - \frac{y}{\mathsf{fma}\left(x, y, e^{z} \cdot -1.1283791670955126\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 97.4%

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

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

Alternative 11: 81.9% accurate, 11.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.9000000000000003e-17

    1. Initial program 93.8%

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

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

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

        \[\leadsto \color{blue}{x - \frac{-y}{1.1283791670955126 \cdot e^{z} - x \cdot y}} \]
      4. distribute-frac-neg93.8%

        \[\leadsto x - \color{blue}{\left(-\frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\right)} \]
      5. distribute-neg-frac293.8%

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

        \[\leadsto x - \frac{y}{\color{blue}{0 - \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      7. associate--r-93.5%

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

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

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

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

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, -\color{blue}{e^{z} \cdot 1.1283791670955126}\right)} \]
      12. distribute-rgt-neg-in93.9%

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, \color{blue}{e^{z} \cdot \left(-1.1283791670955126\right)}\right)} \]
      13. metadata-eval93.9%

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

      \[\leadsto \color{blue}{x - \frac{y}{\mathsf{fma}\left(x, y, e^{z} \cdot -1.1283791670955126\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 97.7%

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

    if -2.9000000000000003e-17 < z

    1. Initial program 98.3%

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

        \[\leadsto x + \frac{\color{blue}{-\left(-y\right)}}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
      2. distribute-frac-neg98.3%

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

        \[\leadsto \color{blue}{x - \frac{-y}{1.1283791670955126 \cdot e^{z} - x \cdot y}} \]
      4. distribute-frac-neg98.3%

        \[\leadsto x - \color{blue}{\left(-\frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\right)} \]
      5. distribute-neg-frac298.3%

        \[\leadsto x - \color{blue}{\frac{y}{-\left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      6. neg-sub098.3%

        \[\leadsto x - \frac{y}{\color{blue}{0 - \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
      7. associate--r-98.3%

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

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

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

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

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, -\color{blue}{e^{z} \cdot 1.1283791670955126}\right)} \]
      12. distribute-rgt-neg-in99.8%

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, \color{blue}{e^{z} \cdot \left(-1.1283791670955126\right)}\right)} \]
      13. metadata-eval99.8%

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

      \[\leadsto \color{blue}{x - \frac{y}{\mathsf{fma}\left(x, y, e^{z} \cdot -1.1283791670955126\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 78.7%

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

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

Alternative 12: 69.7% accurate, 111.0× speedup?

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

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

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

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

      \[\leadsto x + \color{blue}{\left(-\frac{-y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\right)} \]
    3. unsub-neg97.2%

      \[\leadsto \color{blue}{x - \frac{-y}{1.1283791670955126 \cdot e^{z} - x \cdot y}} \]
    4. distribute-frac-neg97.2%

      \[\leadsto x - \color{blue}{\left(-\frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\right)} \]
    5. distribute-neg-frac297.2%

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

      \[\leadsto x - \frac{y}{\color{blue}{0 - \left(1.1283791670955126 \cdot e^{z} - x \cdot y\right)}} \]
    7. associate--r-97.1%

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

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

      \[\leadsto x - \frac{y}{\color{blue}{x \cdot y + \left(-1.1283791670955126 \cdot e^{z}\right)}} \]
    10. fma-define98.4%

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

      \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, -\color{blue}{e^{z} \cdot 1.1283791670955126}\right)} \]
    12. distribute-rgt-neg-in98.4%

      \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, \color{blue}{e^{z} \cdot \left(-1.1283791670955126\right)}\right)} \]
    13. metadata-eval98.4%

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

    \[\leadsto \color{blue}{x - \frac{y}{\mathsf{fma}\left(x, y, e^{z} \cdot -1.1283791670955126\right)}} \]
  4. Add Preprocessing
  5. Taylor expanded in x around inf 73.8%

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

Developer target: 99.9% accurate, 1.0× speedup?

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

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

Reproduce

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

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

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