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

Percentage Accurate: 95.4% → 99.9%
Time: 4.1s
Alternatives: 11
Speedup: 3.7×

Specification

?
\[\begin{array}{l} \\ x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (+ x (/ y (- (* 1.1283791670955126 (exp z)) (* x y)))))
double code(double x, double y, double z) {
	return x + (y / ((1.1283791670955126 * exp(z)) - (x * y)));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 11 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 95.4% 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)));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z)
use fmin_fmax_functions
    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.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1950000:\\ \;\;\;\;x + \frac{-1}{x}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\left(\frac{e^{z}}{x} \cdot 1.1283791670955126 - y\right) \cdot x}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -1950000.0)
   (+ x (/ -1.0 x))
   (+ x (/ y (* (- (* (/ (exp z) x) 1.1283791670955126) y) x)))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -1950000.0) {
		tmp = x + (-1.0 / x);
	} else {
		tmp = x + (y / ((((exp(z) / x) * 1.1283791670955126) - y) * x));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (z <= (-1950000.0d0)) then
        tmp = x + ((-1.0d0) / x)
    else
        tmp = x + (y / ((((exp(z) / x) * 1.1283791670955126d0) - y) * x))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (z <= -1950000.0) {
		tmp = x + (-1.0 / x);
	} else {
		tmp = x + (y / ((((Math.exp(z) / x) * 1.1283791670955126) - y) * x));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -1950000.0:
		tmp = x + (-1.0 / x)
	else:
		tmp = x + (y / ((((math.exp(z) / x) * 1.1283791670955126) - y) * x))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -1950000.0)
		tmp = Float64(x + Float64(-1.0 / x));
	else
		tmp = Float64(x + Float64(y / Float64(Float64(Float64(Float64(exp(z) / x) * 1.1283791670955126) - y) * x)));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -1950000.0)
		tmp = x + (-1.0 / x);
	else
		tmp = x + (y / ((((exp(z) / x) * 1.1283791670955126) - y) * x));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -1950000.0], N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(N[(N[(N[Exp[z], $MachinePrecision] / x), $MachinePrecision] * 1.1283791670955126), $MachinePrecision] - y), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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

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


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

    1. Initial program 90.3%

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

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

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

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

    if -1.95e6 < z

    1. Initial program 95.9%

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

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

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

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

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

        \[\leadsto x + \frac{y}{\left(\frac{e^{z}}{x} \cdot \frac{5641895835477563}{5000000000000000} - y\right) \cdot x} \]
      5. lower-*.f64N/A

        \[\leadsto x + \frac{y}{\left(\frac{e^{z}}{x} \cdot \frac{5641895835477563}{5000000000000000} - y\right) \cdot x} \]
      6. lower-/.f64N/A

        \[\leadsto x + \frac{y}{\left(\frac{e^{z}}{x} \cdot \frac{5641895835477563}{5000000000000000} - y\right) \cdot x} \]
      7. lift-exp.f6499.9

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

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

Alternative 2: 86.2% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\\ \mathbf{if}\;t\_0 \leq -5000000000 \lor \neg \left(t\_0 \leq 500000\right):\\ \;\;\;\;x + \frac{-1}{x}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (+ x (/ y (- (* 1.1283791670955126 (exp z)) (* x y))))))
   (if (or (<= t_0 -5000000000.0) (not (<= t_0 500000.0)))
     (+ x (/ -1.0 x))
     x)))
double code(double x, double y, double z) {
	double t_0 = x + (y / ((1.1283791670955126 * exp(z)) - (x * y)));
	double tmp;
	if ((t_0 <= -5000000000.0) || !(t_0 <= 500000.0)) {
		tmp = x + (-1.0 / x);
	} else {
		tmp = x;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z)
use fmin_fmax_functions
    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 / ((1.1283791670955126d0 * exp(z)) - (x * y)))
    if ((t_0 <= (-5000000000.0d0)) .or. (.not. (t_0 <= 500000.0d0))) 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 t_0 = x + (y / ((1.1283791670955126 * Math.exp(z)) - (x * y)));
	double tmp;
	if ((t_0 <= -5000000000.0) || !(t_0 <= 500000.0)) {
		tmp = x + (-1.0 / x);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = x + (y / ((1.1283791670955126 * math.exp(z)) - (x * y)))
	tmp = 0
	if (t_0 <= -5000000000.0) or not (t_0 <= 500000.0):
		tmp = x + (-1.0 / x)
	else:
		tmp = x
	return tmp
function code(x, y, z)
	t_0 = Float64(x + Float64(y / Float64(Float64(1.1283791670955126 * exp(z)) - Float64(x * y))))
	tmp = 0.0
	if ((t_0 <= -5000000000.0) || !(t_0 <= 500000.0))
		tmp = Float64(x + Float64(-1.0 / x));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = x + (y / ((1.1283791670955126 * exp(z)) - (x * y)));
	tmp = 0.0;
	if ((t_0 <= -5000000000.0) || ~((t_0 <= 500000.0)))
		tmp = x + (-1.0 / x);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(x + N[(y / N[(N[(1.1283791670955126 * N[Exp[z], $MachinePrecision]), $MachinePrecision] - N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, -5000000000.0], N[Not[LessEqual[t$95$0, 500000.0]], $MachinePrecision]], N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\\
\mathbf{if}\;t\_0 \leq -5000000000 \lor \neg \left(t\_0 \leq 500000\right):\\
\;\;\;\;x + \frac{-1}{x}\\

\mathbf{else}:\\
\;\;\;\;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)))) < -5e9 or 5e5 < (+.f64 x (/.f64 y (-.f64 (*.f64 #s(literal 5641895835477563/5000000000000000 binary64) (exp.f64 z)) (*.f64 x y))))

    1. Initial program 93.0%

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

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

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

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

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

    1. Initial program 99.8%

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

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

        \[\leadsto \color{blue}{x} \]
    5. Recombined 2 regimes into one program.
    6. Final simplification87.1%

      \[\leadsto \begin{array}{l} \mathbf{if}\;x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \leq -5000000000 \lor \neg \left(x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \leq 500000\right):\\ \;\;\;\;x + \frac{-1}{x}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
    7. Add Preprocessing

    Alternative 3: 98.4% accurate, 0.5× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\\ \mathbf{if}\;t\_0 \leq 2 \cdot 10^{+297}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;x + \frac{-1}{x}\\ \end{array} \end{array} \]
    (FPCore (x y z)
     :precision binary64
     (let* ((t_0 (+ x (/ y (- (* 1.1283791670955126 (exp z)) (* x y))))))
       (if (<= t_0 2e+297) t_0 (+ x (/ -1.0 x)))))
    double code(double x, double y, double z) {
    	double t_0 = x + (y / ((1.1283791670955126 * exp(z)) - (x * y)));
    	double tmp;
    	if (t_0 <= 2e+297) {
    		tmp = t_0;
    	} else {
    		tmp = x + (-1.0 / x);
    	}
    	return tmp;
    }
    
    module fmin_fmax_functions
        implicit none
        private
        public fmax
        public fmin
    
        interface fmax
            module procedure fmax88
            module procedure fmax44
            module procedure fmax84
            module procedure fmax48
        end interface
        interface fmin
            module procedure fmin88
            module procedure fmin44
            module procedure fmin84
            module procedure fmin48
        end interface
    contains
        real(8) function fmax88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(4) function fmax44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(8) function fmax84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmax48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
        end function
        real(8) function fmin88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(4) function fmin44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(8) function fmin84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmin48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
        end function
    end module
    
    real(8) function code(x, y, z)
    use fmin_fmax_functions
        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 / ((1.1283791670955126d0 * exp(z)) - (x * y)))
        if (t_0 <= 2d+297) 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 / ((1.1283791670955126 * Math.exp(z)) - (x * y)));
    	double tmp;
    	if (t_0 <= 2e+297) {
    		tmp = t_0;
    	} else {
    		tmp = x + (-1.0 / x);
    	}
    	return tmp;
    }
    
    def code(x, y, z):
    	t_0 = x + (y / ((1.1283791670955126 * math.exp(z)) - (x * y)))
    	tmp = 0
    	if t_0 <= 2e+297:
    		tmp = t_0
    	else:
    		tmp = x + (-1.0 / x)
    	return tmp
    
    function code(x, y, z)
    	t_0 = Float64(x + Float64(y / Float64(Float64(1.1283791670955126 * exp(z)) - Float64(x * y))))
    	tmp = 0.0
    	if (t_0 <= 2e+297)
    		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 / ((1.1283791670955126 * exp(z)) - (x * y)));
    	tmp = 0.0;
    	if (t_0 <= 2e+297)
    		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[(1.1283791670955126 * N[Exp[z], $MachinePrecision]), $MachinePrecision] - N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 2e+297], t$95$0, N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\\
    \mathbf{if}\;t\_0 \leq 2 \cdot 10^{+297}:\\
    \;\;\;\;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)))) < 2e297

      1. Initial program 98.8%

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

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

      1. Initial program 9.4%

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

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

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

        \[\leadsto x + \color{blue}{\frac{-1}{x}} \]
    3. Recombined 2 regimes into one program.
    4. Add Preprocessing

    Alternative 4: 99.6% accurate, 2.4× speedup?

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

      1. Initial program 90.8%

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

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

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

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

      if -130 < z < 0.0091999999999999998

      1. Initial program 99.9%

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

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

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

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

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

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

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

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

          \[\leadsto x + \frac{y}{\mathsf{fma}\left(\mathsf{fma}\left(\frac{5641895835477563}{30000000000000000} \cdot z + \frac{5641895835477563}{10000000000000000}, z, \frac{5641895835477563}{5000000000000000}\right), z, \frac{5641895835477563}{5000000000000000}\right) - x \cdot y} \]
        8. lower-fma.f6499.9

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

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

      if 0.0091999999999999998 < z

      1. Initial program 84.6%

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

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

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

      Alternative 5: 99.6% accurate, 2.7× speedup?

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

        1. Initial program 90.8%

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

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

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

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

        if -130 < z < 0.0091999999999999998

        1. Initial program 99.9%

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

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

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

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

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

            \[\leadsto x + \frac{y}{\mathsf{fma}\left(\frac{5641895835477563}{10000000000000000} \cdot z + \frac{5641895835477563}{5000000000000000}, z, \frac{5641895835477563}{5000000000000000}\right) - x \cdot y} \]
          5. lower-fma.f6499.8

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

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

        if 0.0091999999999999998 < z

        1. Initial program 84.6%

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

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

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

        Alternative 6: 99.6% accurate, 3.0× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -130:\\ \;\;\;\;x + \frac{-1}{x}\\ \mathbf{elif}\;z \leq 0.0092:\\ \;\;\;\;x + \frac{y}{1.1283791670955126 \cdot \left(1 + z\right) - x \cdot y}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (if (<= z -130.0)
           (+ x (/ -1.0 x))
           (if (<= z 0.0092)
             (+ x (/ y (- (* 1.1283791670955126 (+ 1.0 z)) (* x y))))
             x)))
        double code(double x, double y, double z) {
        	double tmp;
        	if (z <= -130.0) {
        		tmp = x + (-1.0 / x);
        	} else if (z <= 0.0092) {
        		tmp = x + (y / ((1.1283791670955126 * (1.0 + z)) - (x * y)));
        	} else {
        		tmp = x;
        	}
        	return tmp;
        }
        
        module fmin_fmax_functions
            implicit none
            private
            public fmax
            public fmin
        
            interface fmax
                module procedure fmax88
                module procedure fmax44
                module procedure fmax84
                module procedure fmax48
            end interface
            interface fmin
                module procedure fmin88
                module procedure fmin44
                module procedure fmin84
                module procedure fmin48
            end interface
        contains
            real(8) function fmax88(x, y) result (res)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
            end function
            real(4) function fmax44(x, y) result (res)
                real(4), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
            end function
            real(8) function fmax84(x, y) result(res)
                real(8), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
            end function
            real(8) function fmax48(x, y) result(res)
                real(4), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
            end function
            real(8) function fmin88(x, y) result (res)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
            end function
            real(4) function fmin44(x, y) result (res)
                real(4), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
            end function
            real(8) function fmin84(x, y) result(res)
                real(8), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
            end function
            real(8) function fmin48(x, y) result(res)
                real(4), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
            end function
        end module
        
        real(8) function code(x, y, z)
        use fmin_fmax_functions
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            real(8) :: tmp
            if (z <= (-130.0d0)) then
                tmp = x + ((-1.0d0) / x)
            else if (z <= 0.0092d0) then
                tmp = x + (y / ((1.1283791670955126d0 * (1.0d0 + z)) - (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 <= -130.0) {
        		tmp = x + (-1.0 / x);
        	} else if (z <= 0.0092) {
        		tmp = x + (y / ((1.1283791670955126 * (1.0 + z)) - (x * y)));
        	} else {
        		tmp = x;
        	}
        	return tmp;
        }
        
        def code(x, y, z):
        	tmp = 0
        	if z <= -130.0:
        		tmp = x + (-1.0 / x)
        	elif z <= 0.0092:
        		tmp = x + (y / ((1.1283791670955126 * (1.0 + z)) - (x * y)))
        	else:
        		tmp = x
        	return tmp
        
        function code(x, y, z)
        	tmp = 0.0
        	if (z <= -130.0)
        		tmp = Float64(x + Float64(-1.0 / x));
        	elseif (z <= 0.0092)
        		tmp = Float64(x + Float64(y / Float64(Float64(1.1283791670955126 * Float64(1.0 + z)) - Float64(x * y))));
        	else
        		tmp = x;
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z)
        	tmp = 0.0;
        	if (z <= -130.0)
        		tmp = x + (-1.0 / x);
        	elseif (z <= 0.0092)
        		tmp = x + (y / ((1.1283791670955126 * (1.0 + z)) - (x * y)));
        	else
        		tmp = x;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_] := If[LessEqual[z, -130.0], N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.0092], N[(x + N[(y / N[(N[(1.1283791670955126 * N[(1.0 + z), $MachinePrecision]), $MachinePrecision] - N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;z \leq -130:\\
        \;\;\;\;x + \frac{-1}{x}\\
        
        \mathbf{elif}\;z \leq 0.0092:\\
        \;\;\;\;x + \frac{y}{1.1283791670955126 \cdot \left(1 + z\right) - x \cdot y}\\
        
        \mathbf{else}:\\
        \;\;\;\;x\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if z < -130

          1. Initial program 90.8%

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

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

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

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

          if -130 < z < 0.0091999999999999998

          1. Initial program 99.9%

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

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

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

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

          if 0.0091999999999999998 < z

          1. Initial program 84.6%

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

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

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

          Alternative 7: 99.6% accurate, 3.1× speedup?

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

            1. Initial program 90.8%

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

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

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

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

            if -130 < z < 0.0091999999999999998

            1. Initial program 99.9%

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

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

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

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

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

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

            if 0.0091999999999999998 < z

            1. Initial program 84.6%

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

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

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

            Alternative 8: 99.5% accurate, 3.7× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -150:\\ \;\;\;\;x + \frac{-1}{x}\\ \mathbf{elif}\;z \leq 0.0092:\\ \;\;\;\;x + \frac{y}{1.1283791670955126 - x \cdot y}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
            (FPCore (x y z)
             :precision binary64
             (if (<= z -150.0)
               (+ x (/ -1.0 x))
               (if (<= z 0.0092) (+ x (/ y (- 1.1283791670955126 (* x y)))) x)))
            double code(double x, double y, double z) {
            	double tmp;
            	if (z <= -150.0) {
            		tmp = x + (-1.0 / x);
            	} else if (z <= 0.0092) {
            		tmp = x + (y / (1.1283791670955126 - (x * y)));
            	} else {
            		tmp = x;
            	}
            	return tmp;
            }
            
            module fmin_fmax_functions
                implicit none
                private
                public fmax
                public fmin
            
                interface fmax
                    module procedure fmax88
                    module procedure fmax44
                    module procedure fmax84
                    module procedure fmax48
                end interface
                interface fmin
                    module procedure fmin88
                    module procedure fmin44
                    module procedure fmin84
                    module procedure fmin48
                end interface
            contains
                real(8) function fmax88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(4) function fmax44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(8) function fmax84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmax48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                end function
                real(8) function fmin88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(4) function fmin44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(8) function fmin84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmin48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                end function
            end module
            
            real(8) function code(x, y, z)
            use fmin_fmax_functions
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8) :: tmp
                if (z <= (-150.0d0)) then
                    tmp = x + ((-1.0d0) / x)
                else if (z <= 0.0092d0) 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 <= -150.0) {
            		tmp = x + (-1.0 / x);
            	} else if (z <= 0.0092) {
            		tmp = x + (y / (1.1283791670955126 - (x * y)));
            	} else {
            		tmp = x;
            	}
            	return tmp;
            }
            
            def code(x, y, z):
            	tmp = 0
            	if z <= -150.0:
            		tmp = x + (-1.0 / x)
            	elif z <= 0.0092:
            		tmp = x + (y / (1.1283791670955126 - (x * y)))
            	else:
            		tmp = x
            	return tmp
            
            function code(x, y, z)
            	tmp = 0.0
            	if (z <= -150.0)
            		tmp = Float64(x + Float64(-1.0 / x));
            	elseif (z <= 0.0092)
            		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 <= -150.0)
            		tmp = x + (-1.0 / x);
            	elseif (z <= 0.0092)
            		tmp = x + (y / (1.1283791670955126 - (x * y)));
            	else
            		tmp = x;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_] := If[LessEqual[z, -150.0], N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.0092], 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 -150:\\
            \;\;\;\;x + \frac{-1}{x}\\
            
            \mathbf{elif}\;z \leq 0.0092:\\
            \;\;\;\;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 < -150

              1. Initial program 90.8%

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

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

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

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

              if -150 < z < 0.0091999999999999998

              1. Initial program 99.9%

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

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

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

                if 0.0091999999999999998 < z

                1. Initial program 84.6%

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

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

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

                Alternative 9: 70.1% accurate, 4.9× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.1 \cdot 10^{-209} \lor \neg \left(x \leq 7.2 \cdot 10^{-236}\right):\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-y, z, y\right) \cdot 0.8862269254527579\\ \end{array} \end{array} \]
                (FPCore (x y z)
                 :precision binary64
                 (if (or (<= x -2.1e-209) (not (<= x 7.2e-236)))
                   x
                   (* (fma (- y) z y) 0.8862269254527579)))
                double code(double x, double y, double z) {
                	double tmp;
                	if ((x <= -2.1e-209) || !(x <= 7.2e-236)) {
                		tmp = x;
                	} else {
                		tmp = fma(-y, z, y) * 0.8862269254527579;
                	}
                	return tmp;
                }
                
                function code(x, y, z)
                	tmp = 0.0
                	if ((x <= -2.1e-209) || !(x <= 7.2e-236))
                		tmp = x;
                	else
                		tmp = Float64(fma(Float64(-y), z, y) * 0.8862269254527579);
                	end
                	return tmp
                end
                
                code[x_, y_, z_] := If[Or[LessEqual[x, -2.1e-209], N[Not[LessEqual[x, 7.2e-236]], $MachinePrecision]], x, N[(N[((-y) * z + y), $MachinePrecision] * 0.8862269254527579), $MachinePrecision]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;x \leq -2.1 \cdot 10^{-209} \lor \neg \left(x \leq 7.2 \cdot 10^{-236}\right):\\
                \;\;\;\;x\\
                
                \mathbf{else}:\\
                \;\;\;\;\mathsf{fma}\left(-y, z, y\right) \cdot 0.8862269254527579\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if x < -2.09999999999999996e-209 or 7.20000000000000015e-236 < x

                  1. Initial program 94.8%

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

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

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

                    if -2.09999999999999996e-209 < x < 7.20000000000000015e-236

                    1. Initial program 93.3%

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

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

                        \[\leadsto \frac{y}{e^{z}} \cdot \color{blue}{\frac{5000000000000000}{5641895835477563}} \]
                      2. lower-*.f64N/A

                        \[\leadsto \frac{y}{e^{z}} \cdot \color{blue}{\frac{5000000000000000}{5641895835477563}} \]
                      3. lower-/.f64N/A

                        \[\leadsto \frac{y}{e^{z}} \cdot \frac{5000000000000000}{5641895835477563} \]
                      4. lift-exp.f6463.5

                        \[\leadsto \frac{y}{e^{z}} \cdot 0.8862269254527579 \]
                    5. Applied rewrites63.5%

                      \[\leadsto \color{blue}{\frac{y}{e^{z}} \cdot 0.8862269254527579} \]
                    6. Taylor expanded in z around 0

                      \[\leadsto \left(y + -1 \cdot \left(y \cdot z\right)\right) \cdot \frac{5000000000000000}{5641895835477563} \]
                    7. Step-by-step derivation
                      1. +-commutativeN/A

                        \[\leadsto \left(-1 \cdot \left(y \cdot z\right) + y\right) \cdot \frac{5000000000000000}{5641895835477563} \]
                      2. associate-*r*N/A

                        \[\leadsto \left(\left(-1 \cdot y\right) \cdot z + y\right) \cdot \frac{5000000000000000}{5641895835477563} \]
                      3. lower-fma.f64N/A

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

                        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(y\right), z, y\right) \cdot \frac{5000000000000000}{5641895835477563} \]
                      5. lower-neg.f6462.2

                        \[\leadsto \mathsf{fma}\left(-y, z, y\right) \cdot 0.8862269254527579 \]
                    8. Applied rewrites62.2%

                      \[\leadsto \mathsf{fma}\left(-y, z, y\right) \cdot 0.8862269254527579 \]
                  5. Recombined 2 regimes into one program.
                  6. Final simplification77.4%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.1 \cdot 10^{-209} \lor \neg \left(x \leq 7.2 \cdot 10^{-236}\right):\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-y, z, y\right) \cdot 0.8862269254527579\\ \end{array} \]
                  7. Add Preprocessing

                  Alternative 10: 70.1% accurate, 7.1× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.1 \cdot 10^{-209}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.28 \cdot 10^{-235}:\\ \;\;\;\;y \cdot 0.8862269254527579\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
                  (FPCore (x y z)
                   :precision binary64
                   (if (<= x -2.1e-209) x (if (<= x 1.28e-235) (* y 0.8862269254527579) x)))
                  double code(double x, double y, double z) {
                  	double tmp;
                  	if (x <= -2.1e-209) {
                  		tmp = x;
                  	} else if (x <= 1.28e-235) {
                  		tmp = y * 0.8862269254527579;
                  	} else {
                  		tmp = x;
                  	}
                  	return tmp;
                  }
                  
                  module fmin_fmax_functions
                      implicit none
                      private
                      public fmax
                      public fmin
                  
                      interface fmax
                          module procedure fmax88
                          module procedure fmax44
                          module procedure fmax84
                          module procedure fmax48
                      end interface
                      interface fmin
                          module procedure fmin88
                          module procedure fmin44
                          module procedure fmin84
                          module procedure fmin48
                      end interface
                  contains
                      real(8) function fmax88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmax44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmax84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmax48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                      end function
                      real(8) function fmin88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmin44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmin84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmin48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                      end function
                  end module
                  
                  real(8) function code(x, y, z)
                  use fmin_fmax_functions
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      real(8), intent (in) :: z
                      real(8) :: tmp
                      if (x <= (-2.1d-209)) then
                          tmp = x
                      else if (x <= 1.28d-235) then
                          tmp = y * 0.8862269254527579d0
                      else
                          tmp = x
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double x, double y, double z) {
                  	double tmp;
                  	if (x <= -2.1e-209) {
                  		tmp = x;
                  	} else if (x <= 1.28e-235) {
                  		tmp = y * 0.8862269254527579;
                  	} else {
                  		tmp = x;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z):
                  	tmp = 0
                  	if x <= -2.1e-209:
                  		tmp = x
                  	elif x <= 1.28e-235:
                  		tmp = y * 0.8862269254527579
                  	else:
                  		tmp = x
                  	return tmp
                  
                  function code(x, y, z)
                  	tmp = 0.0
                  	if (x <= -2.1e-209)
                  		tmp = x;
                  	elseif (x <= 1.28e-235)
                  		tmp = Float64(y * 0.8862269254527579);
                  	else
                  		tmp = x;
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x, y, z)
                  	tmp = 0.0;
                  	if (x <= -2.1e-209)
                  		tmp = x;
                  	elseif (x <= 1.28e-235)
                  		tmp = y * 0.8862269254527579;
                  	else
                  		tmp = x;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_, z_] := If[LessEqual[x, -2.1e-209], x, If[LessEqual[x, 1.28e-235], N[(y * 0.8862269254527579), $MachinePrecision], x]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;x \leq -2.1 \cdot 10^{-209}:\\
                  \;\;\;\;x\\
                  
                  \mathbf{elif}\;x \leq 1.28 \cdot 10^{-235}:\\
                  \;\;\;\;y \cdot 0.8862269254527579\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;x\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if x < -2.09999999999999996e-209 or 1.28e-235 < x

                    1. Initial program 94.8%

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

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

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

                      if -2.09999999999999996e-209 < x < 1.28e-235

                      1. Initial program 93.3%

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

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

                          \[\leadsto \frac{y}{e^{z}} \cdot \color{blue}{\frac{5000000000000000}{5641895835477563}} \]
                        2. lower-*.f64N/A

                          \[\leadsto \frac{y}{e^{z}} \cdot \color{blue}{\frac{5000000000000000}{5641895835477563}} \]
                        3. lower-/.f64N/A

                          \[\leadsto \frac{y}{e^{z}} \cdot \frac{5000000000000000}{5641895835477563} \]
                        4. lift-exp.f6463.5

                          \[\leadsto \frac{y}{e^{z}} \cdot 0.8862269254527579 \]
                      5. Applied rewrites63.5%

                        \[\leadsto \color{blue}{\frac{y}{e^{z}} \cdot 0.8862269254527579} \]
                      6. Taylor expanded in z around 0

                        \[\leadsto y \cdot \frac{5000000000000000}{5641895835477563} \]
                      7. Step-by-step derivation
                        1. Applied rewrites60.8%

                          \[\leadsto y \cdot 0.8862269254527579 \]
                      8. Recombined 2 regimes into one program.
                      9. Add Preprocessing

                      Alternative 11: 68.4% accurate, 128.0× speedup?

                      \[\begin{array}{l} \\ x \end{array} \]
                      (FPCore (x y z) :precision binary64 x)
                      double code(double x, double y, double z) {
                      	return x;
                      }
                      
                      module fmin_fmax_functions
                          implicit none
                          private
                          public fmax
                          public fmin
                      
                          interface fmax
                              module procedure fmax88
                              module procedure fmax44
                              module procedure fmax84
                              module procedure fmax48
                          end interface
                          interface fmin
                              module procedure fmin88
                              module procedure fmin44
                              module procedure fmin84
                              module procedure fmin48
                          end interface
                      contains
                          real(8) function fmax88(x, y) result (res)
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                          end function
                          real(4) function fmax44(x, y) result (res)
                              real(4), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                          end function
                          real(8) function fmax84(x, y) result(res)
                              real(8), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                          end function
                          real(8) function fmax48(x, y) result(res)
                              real(4), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                          end function
                          real(8) function fmin88(x, y) result (res)
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                          end function
                          real(4) function fmin44(x, y) result (res)
                              real(4), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                          end function
                          real(8) function fmin84(x, y) result(res)
                              real(8), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                          end function
                          real(8) function fmin48(x, y) result(res)
                              real(4), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                          end function
                      end module
                      
                      real(8) function code(x, y, z)
                      use fmin_fmax_functions
                          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.6%

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

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

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

                        Developer Target 1: 99.9% accurate, 1.0× speedup?

                        \[\begin{array}{l} \\ x + \frac{1}{\frac{1.1283791670955126}{y} \cdot e^{z} - x} \end{array} \]
                        (FPCore (x y z)
                         :precision binary64
                         (+ x (/ 1.0 (- (* (/ 1.1283791670955126 y) (exp z)) x))))
                        double code(double x, double y, double z) {
                        	return x + (1.0 / (((1.1283791670955126 / y) * exp(z)) - x));
                        }
                        
                        module fmin_fmax_functions
                            implicit none
                            private
                            public fmax
                            public fmin
                        
                            interface fmax
                                module procedure fmax88
                                module procedure fmax44
                                module procedure fmax84
                                module procedure fmax48
                            end interface
                            interface fmin
                                module procedure fmin88
                                module procedure fmin44
                                module procedure fmin84
                                module procedure fmin48
                            end interface
                        contains
                            real(8) function fmax88(x, y) result (res)
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                            end function
                            real(4) function fmax44(x, y) result (res)
                                real(4), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                            end function
                            real(8) function fmax84(x, y) result(res)
                                real(8), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                            end function
                            real(8) function fmax48(x, y) result(res)
                                real(4), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                            end function
                            real(8) function fmin88(x, y) result (res)
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                            end function
                            real(4) function fmin44(x, y) result (res)
                                real(4), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                            end function
                            real(8) function fmin84(x, y) result(res)
                                real(8), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                            end function
                            real(8) function fmin48(x, y) result(res)
                                real(4), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                            end function
                        end module
                        
                        real(8) function code(x, y, z)
                        use fmin_fmax_functions
                            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 2025051 
                        (FPCore (x y z)
                          :name "Numeric.SpecFunctions:invErfc from math-functions-0.1.5.2, A"
                          :precision binary64
                        
                          :alt
                          (! :herbie-platform default (+ x (/ 1 (- (* (/ 5641895835477563/5000000000000000 y) (exp z)) x))))
                        
                          (+ x (/ y (- (* 1.1283791670955126 (exp z)) (* x y)))))