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

Percentage Accurate: 95.7% → 99.9%
Time: 12.5s
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.7% accurate, 1.0× speedup?

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

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

Alternative 1: 99.9% accurate, 0.4× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;x - \frac{y}{\mathsf{fma}\left(x, y, e^{z} \cdot -1.1283791670955126\right)}\\


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

    1. Initial program 87.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, e^{z} \cdot \color{blue}{-1.1283791670955126}\right)} \]
    3. Simplified87.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 y around inf 100.0%

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

    if 0.0 < (exp.f64 z)

    1. Initial program 96.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 98.2% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x + \frac{y}{e^{z} \cdot 1.1283791670955126 - x \cdot y}\\ \mathbf{if}\;t\_0 \leq 5 \cdot 10^{+240}:\\ \;\;\;\;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 5e+240) 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 <= 5e+240) {
		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 <= 5d+240) 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 <= 5e+240) {
		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 <= 5e+240:
		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 <= 5e+240)
		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 <= 5e+240)
		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, 5e+240], 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 5 \cdot 10^{+240}:\\
\;\;\;\;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)))) < 5.0000000000000003e240

    1. Initial program 99.3%

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

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

    1. Initial program 45.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, e^{z} \cdot \color{blue}{-1.1283791670955126}\right)} \]
    3. Simplified73.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 100.0%

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

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

Alternative 3: 85.0% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x + \frac{-1}{x}\\ t_1 := x - \frac{y}{-1.1283791670955126}\\ \mathbf{if}\;z \leq -8 \cdot 10^{-90}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq -5.3 \cdot 10^{-225}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -2.4 \cdot 10^{-237}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.1 \cdot 10^{-289}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -8.4 \cdot 10^{-290}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 6.4 \cdot 10^{-268}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3.25 \cdot 10^{-230}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq 2.25 \cdot 10^{-187}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-173}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{-101}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-84}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (+ x (/ -1.0 x))) (t_1 (- x (/ y -1.1283791670955126))))
   (if (<= z -8e-90)
     t_0
     (if (<= z -5.3e-225)
       t_1
       (if (<= z -2.4e-237)
         x
         (if (<= z -1.1e-289)
           t_1
           (if (<= z -8.4e-290)
             x
             (if (<= z 6.4e-268)
               t_1
               (if (<= z 3.25e-230)
                 t_0
                 (if (<= z 2.25e-187)
                   t_1
                   (if (<= z 1.7e-173)
                     x
                     (if (<= z 2.05e-101)
                       t_1
                       (if (<= z 5.2e-84) t_0 x)))))))))))))
double code(double x, double y, double z) {
	double t_0 = x + (-1.0 / x);
	double t_1 = x - (y / -1.1283791670955126);
	double tmp;
	if (z <= -8e-90) {
		tmp = t_0;
	} else if (z <= -5.3e-225) {
		tmp = t_1;
	} else if (z <= -2.4e-237) {
		tmp = x;
	} else if (z <= -1.1e-289) {
		tmp = t_1;
	} else if (z <= -8.4e-290) {
		tmp = x;
	} else if (z <= 6.4e-268) {
		tmp = t_1;
	} else if (z <= 3.25e-230) {
		tmp = t_0;
	} else if (z <= 2.25e-187) {
		tmp = t_1;
	} else if (z <= 1.7e-173) {
		tmp = x;
	} else if (z <= 2.05e-101) {
		tmp = t_1;
	} else if (z <= 5.2e-84) {
		tmp = t_0;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = x + ((-1.0d0) / x)
    t_1 = x - (y / (-1.1283791670955126d0))
    if (z <= (-8d-90)) then
        tmp = t_0
    else if (z <= (-5.3d-225)) then
        tmp = t_1
    else if (z <= (-2.4d-237)) then
        tmp = x
    else if (z <= (-1.1d-289)) then
        tmp = t_1
    else if (z <= (-8.4d-290)) then
        tmp = x
    else if (z <= 6.4d-268) then
        tmp = t_1
    else if (z <= 3.25d-230) then
        tmp = t_0
    else if (z <= 2.25d-187) then
        tmp = t_1
    else if (z <= 1.7d-173) then
        tmp = x
    else if (z <= 2.05d-101) then
        tmp = t_1
    else if (z <= 5.2d-84) then
        tmp = t_0
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = x + (-1.0 / x);
	double t_1 = x - (y / -1.1283791670955126);
	double tmp;
	if (z <= -8e-90) {
		tmp = t_0;
	} else if (z <= -5.3e-225) {
		tmp = t_1;
	} else if (z <= -2.4e-237) {
		tmp = x;
	} else if (z <= -1.1e-289) {
		tmp = t_1;
	} else if (z <= -8.4e-290) {
		tmp = x;
	} else if (z <= 6.4e-268) {
		tmp = t_1;
	} else if (z <= 3.25e-230) {
		tmp = t_0;
	} else if (z <= 2.25e-187) {
		tmp = t_1;
	} else if (z <= 1.7e-173) {
		tmp = x;
	} else if (z <= 2.05e-101) {
		tmp = t_1;
	} else if (z <= 5.2e-84) {
		tmp = t_0;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = x + (-1.0 / x)
	t_1 = x - (y / -1.1283791670955126)
	tmp = 0
	if z <= -8e-90:
		tmp = t_0
	elif z <= -5.3e-225:
		tmp = t_1
	elif z <= -2.4e-237:
		tmp = x
	elif z <= -1.1e-289:
		tmp = t_1
	elif z <= -8.4e-290:
		tmp = x
	elif z <= 6.4e-268:
		tmp = t_1
	elif z <= 3.25e-230:
		tmp = t_0
	elif z <= 2.25e-187:
		tmp = t_1
	elif z <= 1.7e-173:
		tmp = x
	elif z <= 2.05e-101:
		tmp = t_1
	elif z <= 5.2e-84:
		tmp = t_0
	else:
		tmp = x
	return tmp
function code(x, y, z)
	t_0 = Float64(x + Float64(-1.0 / x))
	t_1 = Float64(x - Float64(y / -1.1283791670955126))
	tmp = 0.0
	if (z <= -8e-90)
		tmp = t_0;
	elseif (z <= -5.3e-225)
		tmp = t_1;
	elseif (z <= -2.4e-237)
		tmp = x;
	elseif (z <= -1.1e-289)
		tmp = t_1;
	elseif (z <= -8.4e-290)
		tmp = x;
	elseif (z <= 6.4e-268)
		tmp = t_1;
	elseif (z <= 3.25e-230)
		tmp = t_0;
	elseif (z <= 2.25e-187)
		tmp = t_1;
	elseif (z <= 1.7e-173)
		tmp = x;
	elseif (z <= 2.05e-101)
		tmp = t_1;
	elseif (z <= 5.2e-84)
		tmp = t_0;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = x + (-1.0 / x);
	t_1 = x - (y / -1.1283791670955126);
	tmp = 0.0;
	if (z <= -8e-90)
		tmp = t_0;
	elseif (z <= -5.3e-225)
		tmp = t_1;
	elseif (z <= -2.4e-237)
		tmp = x;
	elseif (z <= -1.1e-289)
		tmp = t_1;
	elseif (z <= -8.4e-290)
		tmp = x;
	elseif (z <= 6.4e-268)
		tmp = t_1;
	elseif (z <= 3.25e-230)
		tmp = t_0;
	elseif (z <= 2.25e-187)
		tmp = t_1;
	elseif (z <= 1.7e-173)
		tmp = x;
	elseif (z <= 2.05e-101)
		tmp = t_1;
	elseif (z <= 5.2e-84)
		tmp = t_0;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x - N[(y / -1.1283791670955126), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8e-90], t$95$0, If[LessEqual[z, -5.3e-225], t$95$1, If[LessEqual[z, -2.4e-237], x, If[LessEqual[z, -1.1e-289], t$95$1, If[LessEqual[z, -8.4e-290], x, If[LessEqual[z, 6.4e-268], t$95$1, If[LessEqual[z, 3.25e-230], t$95$0, If[LessEqual[z, 2.25e-187], t$95$1, If[LessEqual[z, 1.7e-173], x, If[LessEqual[z, 2.05e-101], t$95$1, If[LessEqual[z, 5.2e-84], t$95$0, x]]]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -5.3 \cdot 10^{-225}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -2.4 \cdot 10^{-237}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq -1.1 \cdot 10^{-289}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -8.4 \cdot 10^{-290}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 6.4 \cdot 10^{-268}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 3.25 \cdot 10^{-230}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;z \leq 2.25 \cdot 10^{-187}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.7 \cdot 10^{-173}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 2.05 \cdot 10^{-101}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 5.2 \cdot 10^{-84}:\\
\;\;\;\;t\_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -7.99999999999999996e-90 or 6.3999999999999997e-268 < z < 3.2500000000000002e-230 or 2.05000000000000013e-101 < z < 5.2e-84

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, e^{z} \cdot \color{blue}{-1.1283791670955126}\right)} \]
    3. Simplified91.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 93.6%

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

    if -7.99999999999999996e-90 < z < -5.30000000000000005e-225 or -2.4e-237 < z < -1.1e-289 or -8.4000000000000005e-290 < z < 6.3999999999999997e-268 or 3.2500000000000002e-230 < z < 2.2499999999999999e-187 or 1.6999999999999999e-173 < z < 2.05000000000000013e-101

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

        \[\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 z around 0 99.8%

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

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

    if -5.30000000000000005e-225 < z < -2.4e-237 or -1.1e-289 < z < -8.4000000000000005e-290 or 2.2499999999999999e-187 < z < 1.6999999999999999e-173 or 5.2e-84 < z

    1. Initial program 92.1%

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

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

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

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

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

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

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

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

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

        \[\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 inf 53.6%

      \[\leadsto x - \color{blue}{\frac{1}{x}} \]
    6. Taylor expanded in x around inf 90.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8 \cdot 10^{-90}:\\ \;\;\;\;x + \frac{-1}{x}\\ \mathbf{elif}\;z \leq -5.3 \cdot 10^{-225}:\\ \;\;\;\;x - \frac{y}{-1.1283791670955126}\\ \mathbf{elif}\;z \leq -2.4 \cdot 10^{-237}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.1 \cdot 10^{-289}:\\ \;\;\;\;x - \frac{y}{-1.1283791670955126}\\ \mathbf{elif}\;z \leq -8.4 \cdot 10^{-290}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 6.4 \cdot 10^{-268}:\\ \;\;\;\;x - \frac{y}{-1.1283791670955126}\\ \mathbf{elif}\;z \leq 3.25 \cdot 10^{-230}:\\ \;\;\;\;x + \frac{-1}{x}\\ \mathbf{elif}\;z \leq 2.25 \cdot 10^{-187}:\\ \;\;\;\;x - \frac{y}{-1.1283791670955126}\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-173}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{-101}:\\ \;\;\;\;x - \frac{y}{-1.1283791670955126}\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-84}:\\ \;\;\;\;x + \frac{-1}{x}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 85.2% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x + \frac{-1}{x}\\ t_1 := x - \frac{y}{-1.1283791670955126}\\ \mathbf{if}\;z \leq -2.3 \cdot 10^{-90}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq -4.9 \cdot 10^{-173}:\\ \;\;\;\;x - \left(y \cdot \left(1 - z\right)\right) \cdot -0.8862269254527579\\ \mathbf{elif}\;z \leq -2.55 \cdot 10^{-191}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{-256}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{-230}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{-187}:\\ \;\;\;\;x + -0.8862269254527579 \cdot \left(z \cdot y - y\right)\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{-166}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-122}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-83}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-21}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (+ x (/ -1.0 x))) (t_1 (- x (/ y -1.1283791670955126))))
   (if (<= z -2.3e-90)
     t_0
     (if (<= z -4.9e-173)
       (- x (* (* y (- 1.0 z)) -0.8862269254527579))
       (if (<= z -2.55e-191)
         t_0
         (if (<= z 1.45e-256)
           t_1
           (if (<= z 4.6e-230)
             t_0
             (if (<= z 3.3e-187)
               (+ x (* -0.8862269254527579 (- (* z y) y)))
               (if (<= z 2.3e-166)
                 x
                 (if (<= z 1.4e-122)
                   t_1
                   (if (<= z 4.5e-83) t_0 (if (<= z 5e-21) t_1 x))))))))))))
double code(double x, double y, double z) {
	double t_0 = x + (-1.0 / x);
	double t_1 = x - (y / -1.1283791670955126);
	double tmp;
	if (z <= -2.3e-90) {
		tmp = t_0;
	} else if (z <= -4.9e-173) {
		tmp = x - ((y * (1.0 - z)) * -0.8862269254527579);
	} else if (z <= -2.55e-191) {
		tmp = t_0;
	} else if (z <= 1.45e-256) {
		tmp = t_1;
	} else if (z <= 4.6e-230) {
		tmp = t_0;
	} else if (z <= 3.3e-187) {
		tmp = x + (-0.8862269254527579 * ((z * y) - y));
	} else if (z <= 2.3e-166) {
		tmp = x;
	} else if (z <= 1.4e-122) {
		tmp = t_1;
	} else if (z <= 4.5e-83) {
		tmp = t_0;
	} else if (z <= 5e-21) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = x + ((-1.0d0) / x)
    t_1 = x - (y / (-1.1283791670955126d0))
    if (z <= (-2.3d-90)) then
        tmp = t_0
    else if (z <= (-4.9d-173)) then
        tmp = x - ((y * (1.0d0 - z)) * (-0.8862269254527579d0))
    else if (z <= (-2.55d-191)) then
        tmp = t_0
    else if (z <= 1.45d-256) then
        tmp = t_1
    else if (z <= 4.6d-230) then
        tmp = t_0
    else if (z <= 3.3d-187) then
        tmp = x + ((-0.8862269254527579d0) * ((z * y) - y))
    else if (z <= 2.3d-166) then
        tmp = x
    else if (z <= 1.4d-122) then
        tmp = t_1
    else if (z <= 4.5d-83) then
        tmp = t_0
    else if (z <= 5d-21) then
        tmp = t_1
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = x + (-1.0 / x);
	double t_1 = x - (y / -1.1283791670955126);
	double tmp;
	if (z <= -2.3e-90) {
		tmp = t_0;
	} else if (z <= -4.9e-173) {
		tmp = x - ((y * (1.0 - z)) * -0.8862269254527579);
	} else if (z <= -2.55e-191) {
		tmp = t_0;
	} else if (z <= 1.45e-256) {
		tmp = t_1;
	} else if (z <= 4.6e-230) {
		tmp = t_0;
	} else if (z <= 3.3e-187) {
		tmp = x + (-0.8862269254527579 * ((z * y) - y));
	} else if (z <= 2.3e-166) {
		tmp = x;
	} else if (z <= 1.4e-122) {
		tmp = t_1;
	} else if (z <= 4.5e-83) {
		tmp = t_0;
	} else if (z <= 5e-21) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = x + (-1.0 / x)
	t_1 = x - (y / -1.1283791670955126)
	tmp = 0
	if z <= -2.3e-90:
		tmp = t_0
	elif z <= -4.9e-173:
		tmp = x - ((y * (1.0 - z)) * -0.8862269254527579)
	elif z <= -2.55e-191:
		tmp = t_0
	elif z <= 1.45e-256:
		tmp = t_1
	elif z <= 4.6e-230:
		tmp = t_0
	elif z <= 3.3e-187:
		tmp = x + (-0.8862269254527579 * ((z * y) - y))
	elif z <= 2.3e-166:
		tmp = x
	elif z <= 1.4e-122:
		tmp = t_1
	elif z <= 4.5e-83:
		tmp = t_0
	elif z <= 5e-21:
		tmp = t_1
	else:
		tmp = x
	return tmp
function code(x, y, z)
	t_0 = Float64(x + Float64(-1.0 / x))
	t_1 = Float64(x - Float64(y / -1.1283791670955126))
	tmp = 0.0
	if (z <= -2.3e-90)
		tmp = t_0;
	elseif (z <= -4.9e-173)
		tmp = Float64(x - Float64(Float64(y * Float64(1.0 - z)) * -0.8862269254527579));
	elseif (z <= -2.55e-191)
		tmp = t_0;
	elseif (z <= 1.45e-256)
		tmp = t_1;
	elseif (z <= 4.6e-230)
		tmp = t_0;
	elseif (z <= 3.3e-187)
		tmp = Float64(x + Float64(-0.8862269254527579 * Float64(Float64(z * y) - y)));
	elseif (z <= 2.3e-166)
		tmp = x;
	elseif (z <= 1.4e-122)
		tmp = t_1;
	elseif (z <= 4.5e-83)
		tmp = t_0;
	elseif (z <= 5e-21)
		tmp = t_1;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = x + (-1.0 / x);
	t_1 = x - (y / -1.1283791670955126);
	tmp = 0.0;
	if (z <= -2.3e-90)
		tmp = t_0;
	elseif (z <= -4.9e-173)
		tmp = x - ((y * (1.0 - z)) * -0.8862269254527579);
	elseif (z <= -2.55e-191)
		tmp = t_0;
	elseif (z <= 1.45e-256)
		tmp = t_1;
	elseif (z <= 4.6e-230)
		tmp = t_0;
	elseif (z <= 3.3e-187)
		tmp = x + (-0.8862269254527579 * ((z * y) - y));
	elseif (z <= 2.3e-166)
		tmp = x;
	elseif (z <= 1.4e-122)
		tmp = t_1;
	elseif (z <= 4.5e-83)
		tmp = t_0;
	elseif (z <= 5e-21)
		tmp = t_1;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x - N[(y / -1.1283791670955126), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.3e-90], t$95$0, If[LessEqual[z, -4.9e-173], N[(x - N[(N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision] * -0.8862269254527579), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.55e-191], t$95$0, If[LessEqual[z, 1.45e-256], t$95$1, If[LessEqual[z, 4.6e-230], t$95$0, If[LessEqual[z, 3.3e-187], N[(x + N[(-0.8862269254527579 * N[(N[(z * y), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.3e-166], x, If[LessEqual[z, 1.4e-122], t$95$1, If[LessEqual[z, 4.5e-83], t$95$0, If[LessEqual[z, 5e-21], t$95$1, x]]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -4.9 \cdot 10^{-173}:\\
\;\;\;\;x - \left(y \cdot \left(1 - z\right)\right) \cdot -0.8862269254527579\\

\mathbf{elif}\;z \leq -2.55 \cdot 10^{-191}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;z \leq 1.45 \cdot 10^{-256}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 4.6 \cdot 10^{-230}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;z \leq 3.3 \cdot 10^{-187}:\\
\;\;\;\;x + -0.8862269254527579 \cdot \left(z \cdot y - y\right)\\

\mathbf{elif}\;z \leq 2.3 \cdot 10^{-166}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 1.4 \cdot 10^{-122}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 4.5 \cdot 10^{-83}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;z \leq 5 \cdot 10^{-21}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -2.2999999999999998e-90 or -4.89999999999999991e-173 < z < -2.5500000000000001e-191 or 1.44999999999999986e-256 < z < 4.5999999999999995e-230 or 1.3999999999999999e-122 < z < 4.49999999999999997e-83

    1. Initial program 92.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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 94.0%

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

    if -2.2999999999999998e-90 < z < -4.89999999999999991e-173

    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 y around 0 92.8%

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

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

      \[\leadsto x - \color{blue}{\frac{y}{e^{z}} \cdot -0.8862269254527579} \]
    8. Taylor expanded in z around 0 92.8%

      \[\leadsto x - \color{blue}{\left(y + -1 \cdot \left(y \cdot z\right)\right)} \cdot -0.8862269254527579 \]
    9. Step-by-step derivation
      1. mul-1-neg92.8%

        \[\leadsto x - \left(y + \color{blue}{\left(-y \cdot z\right)}\right) \cdot -0.8862269254527579 \]
      2. unsub-neg92.8%

        \[\leadsto x - \color{blue}{\left(y - y \cdot z\right)} \cdot -0.8862269254527579 \]
    10. Simplified92.8%

      \[\leadsto x - \color{blue}{\left(y - y \cdot z\right)} \cdot -0.8862269254527579 \]
    11. Taylor expanded in y around 0 92.8%

      \[\leadsto x - \color{blue}{\left(y \cdot \left(1 - z\right)\right)} \cdot -0.8862269254527579 \]

    if -2.5500000000000001e-191 < z < 1.44999999999999986e-256 or 2.29999999999999999e-166 < z < 1.3999999999999999e-122 or 4.49999999999999997e-83 < z < 4.99999999999999973e-21

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

        \[\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 z around 0 99.8%

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

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

    if 4.5999999999999995e-230 < z < 3.3e-187

    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 y around 0 94.5%

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

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

      \[\leadsto x - \color{blue}{\frac{y}{e^{z}} \cdot -0.8862269254527579} \]
    8. Taylor expanded in z around 0 94.5%

      \[\leadsto x - \color{blue}{\left(y + -1 \cdot \left(y \cdot z\right)\right)} \cdot -0.8862269254527579 \]
    9. Step-by-step derivation
      1. mul-1-neg94.5%

        \[\leadsto x - \left(y + \color{blue}{\left(-y \cdot z\right)}\right) \cdot -0.8862269254527579 \]
      2. unsub-neg94.5%

        \[\leadsto x - \color{blue}{\left(y - y \cdot z\right)} \cdot -0.8862269254527579 \]
    10. Simplified94.5%

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

    if 3.3e-187 < z < 2.29999999999999999e-166 or 4.99999999999999973e-21 < z

    1. Initial program 89.8%

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

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

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

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

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

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

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

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

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

        \[\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 inf 52.9%

      \[\leadsto x - \color{blue}{\frac{1}{x}} \]
    6. Taylor expanded in x around inf 98.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{-90}:\\ \;\;\;\;x + \frac{-1}{x}\\ \mathbf{elif}\;z \leq -4.9 \cdot 10^{-173}:\\ \;\;\;\;x - \left(y \cdot \left(1 - z\right)\right) \cdot -0.8862269254527579\\ \mathbf{elif}\;z \leq -2.55 \cdot 10^{-191}:\\ \;\;\;\;x + \frac{-1}{x}\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{-256}:\\ \;\;\;\;x - \frac{y}{-1.1283791670955126}\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{-230}:\\ \;\;\;\;x + \frac{-1}{x}\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{-187}:\\ \;\;\;\;x + -0.8862269254527579 \cdot \left(z \cdot y - y\right)\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{-166}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-122}:\\ \;\;\;\;x - \frac{y}{-1.1283791670955126}\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-83}:\\ \;\;\;\;x + \frac{-1}{x}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-21}:\\ \;\;\;\;x - \frac{y}{-1.1283791670955126}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 85.3% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x + \frac{-1}{x}\\ t_1 := x - \frac{y}{-1.1283791670955126}\\ t_2 := x - \left(y \cdot \left(1 - z\right)\right) \cdot -0.8862269254527579\\ \mathbf{if}\;z \leq -1.8 \cdot 10^{-86}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq -4.7 \cdot 10^{-172}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -1.1 \cdot 10^{-189}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-257}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-230}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{-187}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-168}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{-123}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-79}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{-21}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (+ x (/ -1.0 x)))
        (t_1 (- x (/ y -1.1283791670955126)))
        (t_2 (- x (* (* y (- 1.0 z)) -0.8862269254527579))))
   (if (<= z -1.8e-86)
     t_0
     (if (<= z -4.7e-172)
       t_2
       (if (<= z -1.1e-189)
         t_0
         (if (<= z 2.9e-257)
           t_1
           (if (<= z 6e-230)
             t_0
             (if (<= z 1.75e-187)
               t_2
               (if (<= z 2.6e-168)
                 x
                 (if (<= z 6.2e-123)
                   t_1
                   (if (<= z 8.5e-79) t_0 (if (<= z 1.45e-21) t_1 x))))))))))))
double code(double x, double y, double z) {
	double t_0 = x + (-1.0 / x);
	double t_1 = x - (y / -1.1283791670955126);
	double t_2 = x - ((y * (1.0 - z)) * -0.8862269254527579);
	double tmp;
	if (z <= -1.8e-86) {
		tmp = t_0;
	} else if (z <= -4.7e-172) {
		tmp = t_2;
	} else if (z <= -1.1e-189) {
		tmp = t_0;
	} else if (z <= 2.9e-257) {
		tmp = t_1;
	} else if (z <= 6e-230) {
		tmp = t_0;
	} else if (z <= 1.75e-187) {
		tmp = t_2;
	} else if (z <= 2.6e-168) {
		tmp = x;
	} else if (z <= 6.2e-123) {
		tmp = t_1;
	} else if (z <= 8.5e-79) {
		tmp = t_0;
	} else if (z <= 1.45e-21) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_0 = x + ((-1.0d0) / x)
    t_1 = x - (y / (-1.1283791670955126d0))
    t_2 = x - ((y * (1.0d0 - z)) * (-0.8862269254527579d0))
    if (z <= (-1.8d-86)) then
        tmp = t_0
    else if (z <= (-4.7d-172)) then
        tmp = t_2
    else if (z <= (-1.1d-189)) then
        tmp = t_0
    else if (z <= 2.9d-257) then
        tmp = t_1
    else if (z <= 6d-230) then
        tmp = t_0
    else if (z <= 1.75d-187) then
        tmp = t_2
    else if (z <= 2.6d-168) then
        tmp = x
    else if (z <= 6.2d-123) then
        tmp = t_1
    else if (z <= 8.5d-79) then
        tmp = t_0
    else if (z <= 1.45d-21) then
        tmp = t_1
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = x + (-1.0 / x);
	double t_1 = x - (y / -1.1283791670955126);
	double t_2 = x - ((y * (1.0 - z)) * -0.8862269254527579);
	double tmp;
	if (z <= -1.8e-86) {
		tmp = t_0;
	} else if (z <= -4.7e-172) {
		tmp = t_2;
	} else if (z <= -1.1e-189) {
		tmp = t_0;
	} else if (z <= 2.9e-257) {
		tmp = t_1;
	} else if (z <= 6e-230) {
		tmp = t_0;
	} else if (z <= 1.75e-187) {
		tmp = t_2;
	} else if (z <= 2.6e-168) {
		tmp = x;
	} else if (z <= 6.2e-123) {
		tmp = t_1;
	} else if (z <= 8.5e-79) {
		tmp = t_0;
	} else if (z <= 1.45e-21) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = x + (-1.0 / x)
	t_1 = x - (y / -1.1283791670955126)
	t_2 = x - ((y * (1.0 - z)) * -0.8862269254527579)
	tmp = 0
	if z <= -1.8e-86:
		tmp = t_0
	elif z <= -4.7e-172:
		tmp = t_2
	elif z <= -1.1e-189:
		tmp = t_0
	elif z <= 2.9e-257:
		tmp = t_1
	elif z <= 6e-230:
		tmp = t_0
	elif z <= 1.75e-187:
		tmp = t_2
	elif z <= 2.6e-168:
		tmp = x
	elif z <= 6.2e-123:
		tmp = t_1
	elif z <= 8.5e-79:
		tmp = t_0
	elif z <= 1.45e-21:
		tmp = t_1
	else:
		tmp = x
	return tmp
function code(x, y, z)
	t_0 = Float64(x + Float64(-1.0 / x))
	t_1 = Float64(x - Float64(y / -1.1283791670955126))
	t_2 = Float64(x - Float64(Float64(y * Float64(1.0 - z)) * -0.8862269254527579))
	tmp = 0.0
	if (z <= -1.8e-86)
		tmp = t_0;
	elseif (z <= -4.7e-172)
		tmp = t_2;
	elseif (z <= -1.1e-189)
		tmp = t_0;
	elseif (z <= 2.9e-257)
		tmp = t_1;
	elseif (z <= 6e-230)
		tmp = t_0;
	elseif (z <= 1.75e-187)
		tmp = t_2;
	elseif (z <= 2.6e-168)
		tmp = x;
	elseif (z <= 6.2e-123)
		tmp = t_1;
	elseif (z <= 8.5e-79)
		tmp = t_0;
	elseif (z <= 1.45e-21)
		tmp = t_1;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = x + (-1.0 / x);
	t_1 = x - (y / -1.1283791670955126);
	t_2 = x - ((y * (1.0 - z)) * -0.8862269254527579);
	tmp = 0.0;
	if (z <= -1.8e-86)
		tmp = t_0;
	elseif (z <= -4.7e-172)
		tmp = t_2;
	elseif (z <= -1.1e-189)
		tmp = t_0;
	elseif (z <= 2.9e-257)
		tmp = t_1;
	elseif (z <= 6e-230)
		tmp = t_0;
	elseif (z <= 1.75e-187)
		tmp = t_2;
	elseif (z <= 2.6e-168)
		tmp = x;
	elseif (z <= 6.2e-123)
		tmp = t_1;
	elseif (z <= 8.5e-79)
		tmp = t_0;
	elseif (z <= 1.45e-21)
		tmp = t_1;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x - N[(y / -1.1283791670955126), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision] * -0.8862269254527579), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.8e-86], t$95$0, If[LessEqual[z, -4.7e-172], t$95$2, If[LessEqual[z, -1.1e-189], t$95$0, If[LessEqual[z, 2.9e-257], t$95$1, If[LessEqual[z, 6e-230], t$95$0, If[LessEqual[z, 1.75e-187], t$95$2, If[LessEqual[z, 2.6e-168], x, If[LessEqual[z, 6.2e-123], t$95$1, If[LessEqual[z, 8.5e-79], t$95$0, If[LessEqual[z, 1.45e-21], t$95$1, x]]]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x + \frac{-1}{x}\\
t_1 := x - \frac{y}{-1.1283791670955126}\\
t_2 := x - \left(y \cdot \left(1 - z\right)\right) \cdot -0.8862269254527579\\
\mathbf{if}\;z \leq -1.8 \cdot 10^{-86}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;z \leq -4.7 \cdot 10^{-172}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq -1.1 \cdot 10^{-189}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;z \leq 2.9 \cdot 10^{-257}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 6 \cdot 10^{-230}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;z \leq 1.75 \cdot 10^{-187}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq 2.6 \cdot 10^{-168}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 6.2 \cdot 10^{-123}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 8.5 \cdot 10^{-79}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;z \leq 1.45 \cdot 10^{-21}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.79999999999999983e-86 or -4.69999999999999976e-172 < z < -1.1000000000000001e-189 or 2.9000000000000002e-257 < z < 6e-230 or 6.19999999999999996e-123 < z < 8.50000000000000029e-79

    1. Initial program 92.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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 94.0%

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

    if -1.79999999999999983e-86 < z < -4.69999999999999976e-172 or 6e-230 < z < 1.74999999999999989e-187

    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 y around 0 93.4%

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

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

      \[\leadsto x - \color{blue}{\frac{y}{e^{z}} \cdot -0.8862269254527579} \]
    8. Taylor expanded in z around 0 93.4%

      \[\leadsto x - \color{blue}{\left(y + -1 \cdot \left(y \cdot z\right)\right)} \cdot -0.8862269254527579 \]
    9. Step-by-step derivation
      1. mul-1-neg93.4%

        \[\leadsto x - \left(y + \color{blue}{\left(-y \cdot z\right)}\right) \cdot -0.8862269254527579 \]
      2. unsub-neg93.4%

        \[\leadsto x - \color{blue}{\left(y - y \cdot z\right)} \cdot -0.8862269254527579 \]
    10. Simplified93.4%

      \[\leadsto x - \color{blue}{\left(y - y \cdot z\right)} \cdot -0.8862269254527579 \]
    11. Taylor expanded in y around 0 93.4%

      \[\leadsto x - \color{blue}{\left(y \cdot \left(1 - z\right)\right)} \cdot -0.8862269254527579 \]

    if -1.1000000000000001e-189 < z < 2.9000000000000002e-257 or 2.6000000000000001e-168 < z < 6.19999999999999996e-123 or 8.50000000000000029e-79 < z < 1.45e-21

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

        \[\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 z around 0 99.8%

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

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

    if 1.74999999999999989e-187 < z < 2.6000000000000001e-168 or 1.45e-21 < z

    1. Initial program 89.8%

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

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

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

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

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

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

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

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

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

        \[\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 inf 52.9%

      \[\leadsto x - \color{blue}{\frac{1}{x}} \]
    6. Taylor expanded in x around inf 98.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.8 \cdot 10^{-86}:\\ \;\;\;\;x + \frac{-1}{x}\\ \mathbf{elif}\;z \leq -4.7 \cdot 10^{-172}:\\ \;\;\;\;x - \left(y \cdot \left(1 - z\right)\right) \cdot -0.8862269254527579\\ \mathbf{elif}\;z \leq -1.1 \cdot 10^{-189}:\\ \;\;\;\;x + \frac{-1}{x}\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-257}:\\ \;\;\;\;x - \frac{y}{-1.1283791670955126}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-230}:\\ \;\;\;\;x + \frac{-1}{x}\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{-187}:\\ \;\;\;\;x - \left(y \cdot \left(1 - z\right)\right) \cdot -0.8862269254527579\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-168}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{-123}:\\ \;\;\;\;x - \frac{y}{-1.1283791670955126}\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-79}:\\ \;\;\;\;x + \frac{-1}{x}\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{-21}:\\ \;\;\;\;x - \frac{y}{-1.1283791670955126}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 99.7% accurate, 3.6× speedup?

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

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

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

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


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

    1. Initial program 87.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, e^{z} \cdot \color{blue}{-1.1283791670955126}\right)} \]
    3. Simplified87.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 y around inf 100.0%

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

    if -100 < z < 2.60000000000000009

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

        \[\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 z around 0 99.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 2.60000000000000009 < z

    1. Initial program 88.5%

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

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

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

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

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

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

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

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

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

        \[\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 inf 50.0%

      \[\leadsto x - \color{blue}{\frac{1}{x}} \]
    6. Taylor expanded in x around inf 100.0%

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

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

Alternative 7: 98.6% accurate, 4.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.5 \cdot 10^{+19}:\\ \;\;\;\;x + \frac{-1}{x}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-21}:\\ \;\;\;\;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 -4.5e+19)
   (+ x (/ -1.0 x))
   (if (<= z 6e-21)
     (+
      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 <= -4.5e+19) {
		tmp = x + (-1.0 / x);
	} else if (z <= 6e-21) {
		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 <= (-4.5d+19)) then
        tmp = x + ((-1.0d0) / x)
    else if (z <= 6d-21) 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 <= -4.5e+19) {
		tmp = x + (-1.0 / x);
	} else if (z <= 6e-21) {
		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 <= -4.5e+19:
		tmp = x + (-1.0 / x)
	elif z <= 6e-21:
		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 <= -4.5e+19)
		tmp = Float64(x + Float64(-1.0 / x));
	elseif (z <= 6e-21)
		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 <= -4.5e+19)
		tmp = x + (-1.0 / x);
	elseif (z <= 6e-21)
		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, -4.5e+19], N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e-21], 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 -4.5 \cdot 10^{+19}:\\
\;\;\;\;x + \frac{-1}{x}\\

\mathbf{elif}\;z \leq 6 \cdot 10^{-21}:\\
\;\;\;\;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 < -4.5e19

    1. Initial program 86.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, e^{z} \cdot \color{blue}{-1.1283791670955126}\right)} \]
    3. Simplified86.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 -4.5e19 < z < 5.99999999999999982e-21

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

        \[\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 z around 0 96.9%

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

    if 5.99999999999999982e-21 < z

    1. Initial program 89.2%

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

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

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

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

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

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

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

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

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

        \[\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 inf 51.5%

      \[\leadsto x - \color{blue}{\frac{1}{x}} \]
    6. Taylor expanded in x around inf 98.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.5 \cdot 10^{+19}:\\ \;\;\;\;x + \frac{-1}{x}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-21}:\\ \;\;\;\;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: 98.8% accurate, 4.8× speedup?

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

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

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

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


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

    1. Initial program 87.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, e^{z} \cdot \color{blue}{-1.1283791670955126}\right)} \]
    3. Simplified87.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 y around inf 100.0%

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

    if -10.5 < z < 9.1999999999999996e24

    1. Initial program 98.4%

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

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

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

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

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

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

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

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

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

        \[\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 z around 0 97.9%

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

    if 9.1999999999999996e24 < z

    1. Initial program 90.7%

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

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

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

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

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

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

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

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

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

        \[\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 inf 49.0%

      \[\leadsto x - \color{blue}{\frac{1}{x}} \]
    6. Taylor expanded in x around inf 100.0%

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

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

Alternative 9: 80.2% accurate, 5.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -2.25 \cdot 10^{+157} \lor \neg \left(y \leq 3.1 \cdot 10^{+70}\right):\\ \;\;\;\;x + \frac{-1}{x}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{-1.1283791670955126 \cdot \left(z + 1\right)}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= y -2.25e+157) (not (<= y 3.1e+70)))
   (+ x (/ -1.0 x))
   (- x (/ y (* -1.1283791670955126 (+ z 1.0))))))
double code(double x, double y, double z) {
	double tmp;
	if ((y <= -2.25e+157) || !(y <= 3.1e+70)) {
		tmp = x + (-1.0 / x);
	} else {
		tmp = x - (y / (-1.1283791670955126 * (z + 1.0)));
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if ((y <= (-2.25d+157)) .or. (.not. (y <= 3.1d+70))) then
        tmp = x + ((-1.0d0) / x)
    else
        tmp = x - (y / ((-1.1283791670955126d0) * (z + 1.0d0)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((y <= -2.25e+157) || !(y <= 3.1e+70)) {
		tmp = x + (-1.0 / x);
	} else {
		tmp = x - (y / (-1.1283791670955126 * (z + 1.0)));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (y <= -2.25e+157) or not (y <= 3.1e+70):
		tmp = x + (-1.0 / x)
	else:
		tmp = x - (y / (-1.1283791670955126 * (z + 1.0)))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((y <= -2.25e+157) || !(y <= 3.1e+70))
		tmp = Float64(x + Float64(-1.0 / x));
	else
		tmp = Float64(x - Float64(y / Float64(-1.1283791670955126 * Float64(z + 1.0))));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((y <= -2.25e+157) || ~((y <= 3.1e+70)))
		tmp = x + (-1.0 / x);
	else
		tmp = x - (y / (-1.1283791670955126 * (z + 1.0)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[y, -2.25e+157], N[Not[LessEqual[y, 3.1e+70]], $MachinePrecision]], N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(-1.1283791670955126 * N[(z + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.25 \cdot 10^{+157} \lor \neg \left(y \leq 3.1 \cdot 10^{+70}\right):\\
\;\;\;\;x + \frac{-1}{x}\\

\mathbf{else}:\\
\;\;\;\;x - \frac{y}{-1.1283791670955126 \cdot \left(z + 1\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.24999999999999992e157 or 3.1000000000000003e70 < y

    1. Initial program 93.0%

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

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

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

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

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

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

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

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

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

        \[\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 y around inf 80.3%

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

    if -2.24999999999999992e157 < y < 3.1000000000000003e70

    1. Initial program 94.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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 86.3%

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

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

      \[\leadsto x - \color{blue}{\frac{y}{-1.1283791670955126 \cdot z - 1.1283791670955126}} \]
    8. Step-by-step derivation
      1. sub-neg81.5%

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

        \[\leadsto x - \frac{y}{\color{blue}{z \cdot -1.1283791670955126} + \left(-1.1283791670955126\right)} \]
      3. metadata-eval81.5%

        \[\leadsto x - \frac{y}{z \cdot -1.1283791670955126 + \color{blue}{-1.1283791670955126}} \]
      4. distribute-lft1-in81.5%

        \[\leadsto x - \frac{y}{\color{blue}{\left(z + 1\right) \cdot -1.1283791670955126}} \]
    9. Applied egg-rr81.5%

      \[\leadsto x - \frac{y}{\color{blue}{\left(z + 1\right) \cdot -1.1283791670955126}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification81.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.25 \cdot 10^{+157} \lor \neg \left(y \leq 3.1 \cdot 10^{+70}\right):\\ \;\;\;\;x + \frac{-1}{x}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{-1.1283791670955126 \cdot \left(z + 1\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 98.3% accurate, 5.8× speedup?

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

\mathbf{elif}\;z \leq 4.5 \cdot 10^{-37}:\\
\;\;\;\;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 < -2.7e13

    1. Initial program 86.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, e^{z} \cdot \color{blue}{-1.1283791670955126}\right)} \]
    3. Simplified87.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 100.0%

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

    if -2.7e13 < z < 4.5000000000000004e-37

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

        \[\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 z around 0 97.1%

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

    if 4.5000000000000004e-37 < z

    1. Initial program 89.8%

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

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

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

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

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

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

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

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

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

        \[\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 inf 51.5%

      \[\leadsto x - \color{blue}{\frac{1}{x}} \]
    6. Taylor expanded in x around inf 95.8%

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

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

Alternative 11: 81.2% accurate, 11.1× speedup?

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

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

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


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

    1. Initial program 89.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, e^{z} \cdot \color{blue}{-1.1283791670955126}\right)} \]
    3. Simplified89.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 y around inf 94.9%

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

    if -2.35000000000000002e-67 < z

    1. Initial program 96.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x - \color{blue}{\frac{1}{x}} \]
    6. Taylor expanded in x around inf 74.8%

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

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

Alternative 12: 69.1% accurate, 111.0× speedup?

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

\\
x
\end{array}
Derivation
  1. Initial program 94.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-sub094.1%

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

      \[\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-define96.9%

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

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

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

      \[\leadsto x - \frac{y}{\mathsf{fma}\left(x, y, e^{z} \cdot \color{blue}{-1.1283791670955126}\right)} \]
  3. Simplified96.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 67.5%

    \[\leadsto x - \color{blue}{\frac{1}{x}} \]
  6. Taylor expanded in x around inf 67.6%

    \[\leadsto \color{blue}{x} \]
  7. 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 2024107 
(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)))))