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

Percentage Accurate: 68.3% → 99.8%
Time: 3.7s
Alternatives: 23
Speedup: 0.9×

Specification

?
\[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
(FPCore (x y)
 :precision binary64
 (/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))
double code(double x, double y) {
	return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
}
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)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0d0))
end function
public static double code(double x, double y) {
	return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
}
def code(x, y):
	return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0))
function code(x, y)
	return Float64(Float64(x * y) / Float64(Float64(Float64(x + y) * Float64(x + y)) * Float64(Float64(x + y) + 1.0)))
end
function tmp = code(x, y)
	tmp = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
end
code[x_, y_] := N[(N[(x * y), $MachinePrecision] / N[(N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(N[(x + y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}

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 23 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: 68.3% accurate, 1.0× speedup?

\[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
(FPCore (x y)
 :precision binary64
 (/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))
double code(double x, double y) {
	return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
}
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)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0d0))
end function
public static double code(double x, double y) {
	return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
}
def code(x, y):
	return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0))
function code(x, y)
	return Float64(Float64(x * y) / Float64(Float64(Float64(x + y) * Float64(x + y)) * Float64(Float64(x + y) + 1.0)))
end
function tmp = code(x, y)
	tmp = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
end
code[x_, y_] := N[(N[(x * y), $MachinePrecision] / N[(N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(N[(x + y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}

Alternative 1: 99.8% accurate, 0.4× speedup?

\[\begin{array}{l} t_0 := \mathsf{max}\left(x, y\right) + \mathsf{min}\left(x, y\right)\\ t_1 := \mathsf{min}\left(x, y\right) + \mathsf{max}\left(x, y\right)\\ \mathbf{if}\;\mathsf{max}\left(x, y\right) \leq 2 \cdot 10^{-34}:\\ \;\;\;\;\frac{\mathsf{min}\left(x, y\right)}{t\_1} \cdot \frac{\frac{\mathsf{max}\left(x, y\right)}{\mathsf{min}\left(x, y\right) - -1}}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{\mathsf{max}\left(x, y\right)}{\mathsf{max}\left(x, y\right) - \left(-1 - \mathsf{min}\left(x, y\right)\right)} \cdot \mathsf{min}\left(x, y\right)}{t\_0}}{t\_0}\\ \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (+ (fmax x y) (fmin x y))) (t_1 (+ (fmin x y) (fmax x y))))
   (if (<= (fmax x y) 2e-34)
     (* (/ (fmin x y) t_1) (/ (/ (fmax x y) (- (fmin x y) -1.0)) t_1))
     (/
      (/ (* (/ (fmax x y) (- (fmax x y) (- -1.0 (fmin x y)))) (fmin x y)) t_0)
      t_0))))
double code(double x, double y) {
	double t_0 = fmax(x, y) + fmin(x, y);
	double t_1 = fmin(x, y) + fmax(x, y);
	double tmp;
	if (fmax(x, y) <= 2e-34) {
		tmp = (fmin(x, y) / t_1) * ((fmax(x, y) / (fmin(x, y) - -1.0)) / t_1);
	} else {
		tmp = (((fmax(x, y) / (fmax(x, y) - (-1.0 - fmin(x, y)))) * fmin(x, y)) / t_0) / t_0;
	}
	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)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = fmax(x, y) + fmin(x, y)
    t_1 = fmin(x, y) + fmax(x, y)
    if (fmax(x, y) <= 2d-34) then
        tmp = (fmin(x, y) / t_1) * ((fmax(x, y) / (fmin(x, y) - (-1.0d0))) / t_1)
    else
        tmp = (((fmax(x, y) / (fmax(x, y) - ((-1.0d0) - fmin(x, y)))) * fmin(x, y)) / t_0) / t_0
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double t_0 = fmax(x, y) + fmin(x, y);
	double t_1 = fmin(x, y) + fmax(x, y);
	double tmp;
	if (fmax(x, y) <= 2e-34) {
		tmp = (fmin(x, y) / t_1) * ((fmax(x, y) / (fmin(x, y) - -1.0)) / t_1);
	} else {
		tmp = (((fmax(x, y) / (fmax(x, y) - (-1.0 - fmin(x, y)))) * fmin(x, y)) / t_0) / t_0;
	}
	return tmp;
}
def code(x, y):
	t_0 = fmax(x, y) + fmin(x, y)
	t_1 = fmin(x, y) + fmax(x, y)
	tmp = 0
	if fmax(x, y) <= 2e-34:
		tmp = (fmin(x, y) / t_1) * ((fmax(x, y) / (fmin(x, y) - -1.0)) / t_1)
	else:
		tmp = (((fmax(x, y) / (fmax(x, y) - (-1.0 - fmin(x, y)))) * fmin(x, y)) / t_0) / t_0
	return tmp
function code(x, y)
	t_0 = Float64(fmax(x, y) + fmin(x, y))
	t_1 = Float64(fmin(x, y) + fmax(x, y))
	tmp = 0.0
	if (fmax(x, y) <= 2e-34)
		tmp = Float64(Float64(fmin(x, y) / t_1) * Float64(Float64(fmax(x, y) / Float64(fmin(x, y) - -1.0)) / t_1));
	else
		tmp = Float64(Float64(Float64(Float64(fmax(x, y) / Float64(fmax(x, y) - Float64(-1.0 - fmin(x, y)))) * fmin(x, y)) / t_0) / t_0);
	end
	return tmp
end
function tmp_2 = code(x, y)
	t_0 = max(x, y) + min(x, y);
	t_1 = min(x, y) + max(x, y);
	tmp = 0.0;
	if (max(x, y) <= 2e-34)
		tmp = (min(x, y) / t_1) * ((max(x, y) / (min(x, y) - -1.0)) / t_1);
	else
		tmp = (((max(x, y) / (max(x, y) - (-1.0 - min(x, y)))) * min(x, y)) / t_0) / t_0;
	end
	tmp_2 = tmp;
end
code[x_, y_] := Block[{t$95$0 = N[(N[Max[x, y], $MachinePrecision] + N[Min[x, y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Min[x, y], $MachinePrecision] + N[Max[x, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Max[x, y], $MachinePrecision], 2e-34], N[(N[(N[Min[x, y], $MachinePrecision] / t$95$1), $MachinePrecision] * N[(N[(N[Max[x, y], $MachinePrecision] / N[(N[Min[x, y], $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[Max[x, y], $MachinePrecision] / N[(N[Max[x, y], $MachinePrecision] - N[(-1.0 - N[Min[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Min[x, y], $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision] / t$95$0), $MachinePrecision]]]]
\begin{array}{l}
t_0 := \mathsf{max}\left(x, y\right) + \mathsf{min}\left(x, y\right)\\
t_1 := \mathsf{min}\left(x, y\right) + \mathsf{max}\left(x, y\right)\\
\mathbf{if}\;\mathsf{max}\left(x, y\right) \leq 2 \cdot 10^{-34}:\\
\;\;\;\;\frac{\mathsf{min}\left(x, y\right)}{t\_1} \cdot \frac{\frac{\mathsf{max}\left(x, y\right)}{\mathsf{min}\left(x, y\right) - -1}}{t\_1}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{\mathsf{max}\left(x, y\right)}{\mathsf{max}\left(x, y\right) - \left(-1 - \mathsf{min}\left(x, y\right)\right)} \cdot \mathsf{min}\left(x, y\right)}{t\_0}}{t\_0}\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 1.99999999999999986e-34

    1. Initial program 68.3%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Taylor expanded in y around 0

      \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(1 + x\right)}} \]
    3. Step-by-step derivation
      1. lower-+.f6458.0

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + \color{blue}{x}\right)} \]
    4. Applied rewrites58.0%

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

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

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

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + x\right)}} \]
      4. times-fracN/A

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

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

        \[\leadsto \frac{x \cdot \frac{y}{1 + x}}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}} \]
      7. times-fracN/A

        \[\leadsto \color{blue}{\frac{x}{x + y} \cdot \frac{\frac{y}{1 + x}}{x + y}} \]
      8. lift-+.f64N/A

        \[\leadsto \frac{x}{\color{blue}{x + y}} \cdot \frac{\frac{y}{1 + x}}{x + y} \]
      9. +-commutativeN/A

        \[\leadsto \frac{x}{\color{blue}{y + x}} \cdot \frac{\frac{y}{1 + x}}{x + y} \]
      10. add-flipN/A

        \[\leadsto \frac{x}{\color{blue}{y - \left(\mathsf{neg}\left(x\right)\right)}} \cdot \frac{\frac{y}{1 + x}}{x + y} \]
      11. lift-neg.f64N/A

        \[\leadsto \frac{x}{y - \color{blue}{\left(-x\right)}} \cdot \frac{\frac{y}{1 + x}}{x + y} \]
      12. sub-negate-revN/A

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

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

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{x}{\left(-x\right) - y}\right)\right)} \cdot \frac{\frac{y}{1 + x}}{x + y} \]
      15. lift-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{\left(-x\right) - y}}\right)\right) \cdot \frac{\frac{y}{1 + x}}{x + y} \]
      16. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{x}{\left(-x\right) - y}\right)\right) \cdot \frac{\frac{y}{1 + x}}{x + y}} \]
    6. Applied rewrites75.1%

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

    if 1.99999999999999986e-34 < y

    1. Initial program 68.3%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. lift-/.f64N/A

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

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

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      4. associate-/r*N/A

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

        \[\leadsto \frac{\frac{x \cdot y}{\left(x + y\right) + 1}}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}} \]
      6. associate-/r*N/A

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

        \[\leadsto \color{blue}{\frac{\frac{\frac{x \cdot y}{\left(x + y\right) + 1}}{x + y}}{x + y}} \]
    3. Applied rewrites88.2%

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

Alternative 2: 99.4% accurate, 0.9× speedup?

\[\begin{array}{l} t_0 := \left(-x\right) - y\\ \frac{y}{t\_0} \cdot \frac{\frac{x}{t\_0}}{y - \left(-1 - x\right)} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (- (- x) y))) (* (/ y t_0) (/ (/ x t_0) (- y (- -1.0 x))))))
double code(double x, double y) {
	double t_0 = -x - y;
	return (y / t_0) * ((x / t_0) / (y - (-1.0 - 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)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: t_0
    t_0 = -x - y
    code = (y / t_0) * ((x / t_0) / (y - ((-1.0d0) - x)))
end function
public static double code(double x, double y) {
	double t_0 = -x - y;
	return (y / t_0) * ((x / t_0) / (y - (-1.0 - x)));
}
def code(x, y):
	t_0 = -x - y
	return (y / t_0) * ((x / t_0) / (y - (-1.0 - x)))
function code(x, y)
	t_0 = Float64(Float64(-x) - y)
	return Float64(Float64(y / t_0) * Float64(Float64(x / t_0) / Float64(y - Float64(-1.0 - x))))
end
function tmp = code(x, y)
	t_0 = -x - y;
	tmp = (y / t_0) * ((x / t_0) / (y - (-1.0 - x)));
end
code[x_, y_] := Block[{t$95$0 = N[((-x) - y), $MachinePrecision]}, N[(N[(y / t$95$0), $MachinePrecision] * N[(N[(x / t$95$0), $MachinePrecision] / N[(y - N[(-1.0 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
t_0 := \left(-x\right) - y\\
\frac{y}{t\_0} \cdot \frac{\frac{x}{t\_0}}{y - \left(-1 - x\right)}
\end{array}
Derivation
  1. Initial program 68.3%

    \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
  2. Step-by-step derivation
    1. lift-/.f64N/A

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

      \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
    3. associate-/r*N/A

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

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

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

      \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}}}{\left(x + y\right) + 1} \]
    7. sqr-neg-revN/A

      \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(\mathsf{neg}\left(\left(x + y\right)\right)\right) \cdot \left(\mathsf{neg}\left(\left(x + y\right)\right)\right)}}}{\left(x + y\right) + 1} \]
    8. times-fracN/A

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

      \[\leadsto \color{blue}{\frac{y}{\mathsf{neg}\left(\left(x + y\right)\right)} \cdot \frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1}} \]
    10. lower-*.f64N/A

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

      \[\leadsto \color{blue}{\frac{y}{\mathsf{neg}\left(\left(x + y\right)\right)}} \cdot \frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1} \]
    12. lift-+.f64N/A

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

      \[\leadsto \frac{y}{\color{blue}{\left(\mathsf{neg}\left(x\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}} \cdot \frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1} \]
    14. sub-flip-reverseN/A

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

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

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

      \[\leadsto \frac{y}{\left(-x\right) - y} \cdot \color{blue}{\frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1}} \]
  3. Applied rewrites99.8%

    \[\leadsto \color{blue}{\frac{y}{\left(-x\right) - y} \cdot \frac{\frac{x}{\left(-x\right) - y}}{y - \left(-1 - x\right)}} \]
  4. Add Preprocessing

Alternative 3: 96.6% accurate, 0.4× speedup?

\[\begin{array}{l} t_0 := \mathsf{max}\left(x, y\right) - \left(-1 - \mathsf{min}\left(x, y\right)\right)\\ t_1 := \mathsf{max}\left(x, y\right) + \mathsf{min}\left(x, y\right)\\ t_2 := \mathsf{min}\left(x, y\right) + \mathsf{max}\left(x, y\right)\\ \mathbf{if}\;\mathsf{max}\left(x, y\right) \leq 5 \cdot 10^{-31}:\\ \;\;\;\;\frac{\mathsf{min}\left(x, y\right)}{t\_2} \cdot \frac{\frac{\mathsf{max}\left(x, y\right)}{\mathsf{min}\left(x, y\right) - -1}}{t\_2}\\ \mathbf{elif}\;\mathsf{max}\left(x, y\right) \leq 2.15 \cdot 10^{+170}:\\ \;\;\;\;\frac{\mathsf{max}\left(x, y\right)}{t\_0} \cdot \frac{\mathsf{min}\left(x, y\right)}{t\_1 \cdot t\_1}\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \frac{\frac{\mathsf{min}\left(x, y\right)}{\left(-\mathsf{min}\left(x, y\right)\right) - \mathsf{max}\left(x, y\right)}}{t\_0}\\ \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (- (fmax x y) (- -1.0 (fmin x y))))
        (t_1 (+ (fmax x y) (fmin x y)))
        (t_2 (+ (fmin x y) (fmax x y))))
   (if (<= (fmax x y) 5e-31)
     (* (/ (fmin x y) t_2) (/ (/ (fmax x y) (- (fmin x y) -1.0)) t_2))
     (if (<= (fmax x y) 2.15e+170)
       (* (/ (fmax x y) t_0) (/ (fmin x y) (* t_1 t_1)))
       (* -1.0 (/ (/ (fmin x y) (- (- (fmin x y)) (fmax x y))) t_0))))))
double code(double x, double y) {
	double t_0 = fmax(x, y) - (-1.0 - fmin(x, y));
	double t_1 = fmax(x, y) + fmin(x, y);
	double t_2 = fmin(x, y) + fmax(x, y);
	double tmp;
	if (fmax(x, y) <= 5e-31) {
		tmp = (fmin(x, y) / t_2) * ((fmax(x, y) / (fmin(x, y) - -1.0)) / t_2);
	} else if (fmax(x, y) <= 2.15e+170) {
		tmp = (fmax(x, y) / t_0) * (fmin(x, y) / (t_1 * t_1));
	} else {
		tmp = -1.0 * ((fmin(x, y) / (-fmin(x, y) - fmax(x, y))) / t_0);
	}
	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)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_0 = fmax(x, y) - ((-1.0d0) - fmin(x, y))
    t_1 = fmax(x, y) + fmin(x, y)
    t_2 = fmin(x, y) + fmax(x, y)
    if (fmax(x, y) <= 5d-31) then
        tmp = (fmin(x, y) / t_2) * ((fmax(x, y) / (fmin(x, y) - (-1.0d0))) / t_2)
    else if (fmax(x, y) <= 2.15d+170) then
        tmp = (fmax(x, y) / t_0) * (fmin(x, y) / (t_1 * t_1))
    else
        tmp = (-1.0d0) * ((fmin(x, y) / (-fmin(x, y) - fmax(x, y))) / t_0)
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double t_0 = fmax(x, y) - (-1.0 - fmin(x, y));
	double t_1 = fmax(x, y) + fmin(x, y);
	double t_2 = fmin(x, y) + fmax(x, y);
	double tmp;
	if (fmax(x, y) <= 5e-31) {
		tmp = (fmin(x, y) / t_2) * ((fmax(x, y) / (fmin(x, y) - -1.0)) / t_2);
	} else if (fmax(x, y) <= 2.15e+170) {
		tmp = (fmax(x, y) / t_0) * (fmin(x, y) / (t_1 * t_1));
	} else {
		tmp = -1.0 * ((fmin(x, y) / (-fmin(x, y) - fmax(x, y))) / t_0);
	}
	return tmp;
}
def code(x, y):
	t_0 = fmax(x, y) - (-1.0 - fmin(x, y))
	t_1 = fmax(x, y) + fmin(x, y)
	t_2 = fmin(x, y) + fmax(x, y)
	tmp = 0
	if fmax(x, y) <= 5e-31:
		tmp = (fmin(x, y) / t_2) * ((fmax(x, y) / (fmin(x, y) - -1.0)) / t_2)
	elif fmax(x, y) <= 2.15e+170:
		tmp = (fmax(x, y) / t_0) * (fmin(x, y) / (t_1 * t_1))
	else:
		tmp = -1.0 * ((fmin(x, y) / (-fmin(x, y) - fmax(x, y))) / t_0)
	return tmp
function code(x, y)
	t_0 = Float64(fmax(x, y) - Float64(-1.0 - fmin(x, y)))
	t_1 = Float64(fmax(x, y) + fmin(x, y))
	t_2 = Float64(fmin(x, y) + fmax(x, y))
	tmp = 0.0
	if (fmax(x, y) <= 5e-31)
		tmp = Float64(Float64(fmin(x, y) / t_2) * Float64(Float64(fmax(x, y) / Float64(fmin(x, y) - -1.0)) / t_2));
	elseif (fmax(x, y) <= 2.15e+170)
		tmp = Float64(Float64(fmax(x, y) / t_0) * Float64(fmin(x, y) / Float64(t_1 * t_1)));
	else
		tmp = Float64(-1.0 * Float64(Float64(fmin(x, y) / Float64(Float64(-fmin(x, y)) - fmax(x, y))) / t_0));
	end
	return tmp
end
function tmp_2 = code(x, y)
	t_0 = max(x, y) - (-1.0 - min(x, y));
	t_1 = max(x, y) + min(x, y);
	t_2 = min(x, y) + max(x, y);
	tmp = 0.0;
	if (max(x, y) <= 5e-31)
		tmp = (min(x, y) / t_2) * ((max(x, y) / (min(x, y) - -1.0)) / t_2);
	elseif (max(x, y) <= 2.15e+170)
		tmp = (max(x, y) / t_0) * (min(x, y) / (t_1 * t_1));
	else
		tmp = -1.0 * ((min(x, y) / (-min(x, y) - max(x, y))) / t_0);
	end
	tmp_2 = tmp;
end
code[x_, y_] := Block[{t$95$0 = N[(N[Max[x, y], $MachinePrecision] - N[(-1.0 - N[Min[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Max[x, y], $MachinePrecision] + N[Min[x, y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Min[x, y], $MachinePrecision] + N[Max[x, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Max[x, y], $MachinePrecision], 5e-31], N[(N[(N[Min[x, y], $MachinePrecision] / t$95$2), $MachinePrecision] * N[(N[(N[Max[x, y], $MachinePrecision] / N[(N[Min[x, y], $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Max[x, y], $MachinePrecision], 2.15e+170], N[(N[(N[Max[x, y], $MachinePrecision] / t$95$0), $MachinePrecision] * N[(N[Min[x, y], $MachinePrecision] / N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 * N[(N[(N[Min[x, y], $MachinePrecision] / N[((-N[Min[x, y], $MachinePrecision]) - N[Max[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
t_0 := \mathsf{max}\left(x, y\right) - \left(-1 - \mathsf{min}\left(x, y\right)\right)\\
t_1 := \mathsf{max}\left(x, y\right) + \mathsf{min}\left(x, y\right)\\
t_2 := \mathsf{min}\left(x, y\right) + \mathsf{max}\left(x, y\right)\\
\mathbf{if}\;\mathsf{max}\left(x, y\right) \leq 5 \cdot 10^{-31}:\\
\;\;\;\;\frac{\mathsf{min}\left(x, y\right)}{t\_2} \cdot \frac{\frac{\mathsf{max}\left(x, y\right)}{\mathsf{min}\left(x, y\right) - -1}}{t\_2}\\

\mathbf{elif}\;\mathsf{max}\left(x, y\right) \leq 2.15 \cdot 10^{+170}:\\
\;\;\;\;\frac{\mathsf{max}\left(x, y\right)}{t\_0} \cdot \frac{\mathsf{min}\left(x, y\right)}{t\_1 \cdot t\_1}\\

\mathbf{else}:\\
\;\;\;\;-1 \cdot \frac{\frac{\mathsf{min}\left(x, y\right)}{\left(-\mathsf{min}\left(x, y\right)\right) - \mathsf{max}\left(x, y\right)}}{t\_0}\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < 5e-31

    1. Initial program 68.3%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Taylor expanded in y around 0

      \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(1 + x\right)}} \]
    3. Step-by-step derivation
      1. lower-+.f6458.0

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + \color{blue}{x}\right)} \]
    4. Applied rewrites58.0%

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

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

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

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + x\right)}} \]
      4. times-fracN/A

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

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

        \[\leadsto \frac{x \cdot \frac{y}{1 + x}}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}} \]
      7. times-fracN/A

        \[\leadsto \color{blue}{\frac{x}{x + y} \cdot \frac{\frac{y}{1 + x}}{x + y}} \]
      8. lift-+.f64N/A

        \[\leadsto \frac{x}{\color{blue}{x + y}} \cdot \frac{\frac{y}{1 + x}}{x + y} \]
      9. +-commutativeN/A

        \[\leadsto \frac{x}{\color{blue}{y + x}} \cdot \frac{\frac{y}{1 + x}}{x + y} \]
      10. add-flipN/A

        \[\leadsto \frac{x}{\color{blue}{y - \left(\mathsf{neg}\left(x\right)\right)}} \cdot \frac{\frac{y}{1 + x}}{x + y} \]
      11. lift-neg.f64N/A

        \[\leadsto \frac{x}{y - \color{blue}{\left(-x\right)}} \cdot \frac{\frac{y}{1 + x}}{x + y} \]
      12. sub-negate-revN/A

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

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

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{x}{\left(-x\right) - y}\right)\right)} \cdot \frac{\frac{y}{1 + x}}{x + y} \]
      15. lift-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{\left(-x\right) - y}}\right)\right) \cdot \frac{\frac{y}{1 + x}}{x + y} \]
      16. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{x}{\left(-x\right) - y}\right)\right) \cdot \frac{\frac{y}{1 + x}}{x + y}} \]
    6. Applied rewrites75.1%

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

    if 5e-31 < y < 2.1499999999999999e170

    1. Initial program 68.3%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. lift-/.f64N/A

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

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

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
      4. times-fracN/A

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

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

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

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

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right) + 1}} \cdot \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \]
      9. +-commutativeN/A

        \[\leadsto \frac{y}{\color{blue}{1 + \left(x + y\right)}} \cdot \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \]
      10. lift-+.f64N/A

        \[\leadsto \frac{y}{1 + \color{blue}{\left(x + y\right)}} \cdot \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \]
      11. +-commutativeN/A

        \[\leadsto \frac{y}{1 + \color{blue}{\left(y + x\right)}} \cdot \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \]
      12. associate-+r+N/A

        \[\leadsto \frac{y}{\color{blue}{\left(1 + y\right) + x}} \cdot \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \]
      13. +-commutativeN/A

        \[\leadsto \frac{y}{\color{blue}{\left(y + 1\right)} + x} \cdot \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \]
      14. add-flipN/A

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

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

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

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

        \[\leadsto \frac{y}{y - \left(\color{blue}{-1} - x\right)} \cdot \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \]
      19. lower-/.f6487.8

        \[\leadsto \frac{y}{y - \left(-1 - x\right)} \cdot \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)}} \]
      20. lift-+.f64N/A

        \[\leadsto \frac{y}{y - \left(-1 - x\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} \cdot \left(x + y\right)} \]
      21. +-commutativeN/A

        \[\leadsto \frac{y}{y - \left(-1 - x\right)} \cdot \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \]
      22. lower-+.f6487.8

        \[\leadsto \frac{y}{y - \left(-1 - x\right)} \cdot \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \]
      23. lift-+.f64N/A

        \[\leadsto \frac{y}{y - \left(-1 - x\right)} \cdot \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(x + y\right)}} \]
      24. +-commutativeN/A

        \[\leadsto \frac{y}{y - \left(-1 - x\right)} \cdot \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \]
      25. lower-+.f6487.8

        \[\leadsto \frac{y}{y - \left(-1 - x\right)} \cdot \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \]
    3. Applied rewrites87.8%

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

    if 2.1499999999999999e170 < y

    1. Initial program 68.3%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. lift-/.f64N/A

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

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
      3. associate-/r*N/A

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

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

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

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}}}{\left(x + y\right) + 1} \]
      7. sqr-neg-revN/A

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(\mathsf{neg}\left(\left(x + y\right)\right)\right) \cdot \left(\mathsf{neg}\left(\left(x + y\right)\right)\right)}}}{\left(x + y\right) + 1} \]
      8. times-fracN/A

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

        \[\leadsto \color{blue}{\frac{y}{\mathsf{neg}\left(\left(x + y\right)\right)} \cdot \frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1}} \]
      10. lower-*.f64N/A

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

        \[\leadsto \color{blue}{\frac{y}{\mathsf{neg}\left(\left(x + y\right)\right)}} \cdot \frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1} \]
      12. lift-+.f64N/A

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

        \[\leadsto \frac{y}{\color{blue}{\left(\mathsf{neg}\left(x\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}} \cdot \frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1} \]
      14. sub-flip-reverseN/A

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

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

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

        \[\leadsto \frac{y}{\left(-x\right) - y} \cdot \color{blue}{\frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1}} \]
    3. Applied rewrites99.8%

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

      \[\leadsto \color{blue}{-1} \cdot \frac{\frac{x}{\left(-x\right) - y}}{y - \left(-1 - x\right)} \]
    5. Step-by-step derivation
      1. Applied rewrites51.8%

        \[\leadsto \color{blue}{-1} \cdot \frac{\frac{x}{\left(-x\right) - y}}{y - \left(-1 - x\right)} \]
    6. Recombined 3 regimes into one program.
    7. Add Preprocessing

    Alternative 4: 96.6% accurate, 0.4× speedup?

    \[\begin{array}{l} t_0 := \mathsf{max}\left(x, y\right) + \mathsf{min}\left(x, y\right)\\ t_1 := \mathsf{max}\left(x, y\right) - \left(-1 - \mathsf{min}\left(x, y\right)\right)\\ t_2 := \mathsf{min}\left(x, y\right) + \mathsf{max}\left(x, y\right)\\ \mathbf{if}\;\mathsf{max}\left(x, y\right) \leq 10^{-42}:\\ \;\;\;\;\frac{\mathsf{min}\left(x, y\right)}{t\_2} \cdot \frac{\frac{\mathsf{max}\left(x, y\right)}{\mathsf{min}\left(x, y\right) - -1}}{t\_2}\\ \mathbf{elif}\;\mathsf{max}\left(x, y\right) \leq 2.15 \cdot 10^{+170}:\\ \;\;\;\;\frac{\mathsf{max}\left(x, y\right)}{t\_0 \cdot t\_0} \cdot \frac{\mathsf{min}\left(x, y\right)}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \frac{\frac{\mathsf{min}\left(x, y\right)}{\left(-\mathsf{min}\left(x, y\right)\right) - \mathsf{max}\left(x, y\right)}}{t\_1}\\ \end{array} \]
    (FPCore (x y)
     :precision binary64
     (let* ((t_0 (+ (fmax x y) (fmin x y)))
            (t_1 (- (fmax x y) (- -1.0 (fmin x y))))
            (t_2 (+ (fmin x y) (fmax x y))))
       (if (<= (fmax x y) 1e-42)
         (* (/ (fmin x y) t_2) (/ (/ (fmax x y) (- (fmin x y) -1.0)) t_2))
         (if (<= (fmax x y) 2.15e+170)
           (* (/ (fmax x y) (* t_0 t_0)) (/ (fmin x y) t_1))
           (* -1.0 (/ (/ (fmin x y) (- (- (fmin x y)) (fmax x y))) t_1))))))
    double code(double x, double y) {
    	double t_0 = fmax(x, y) + fmin(x, y);
    	double t_1 = fmax(x, y) - (-1.0 - fmin(x, y));
    	double t_2 = fmin(x, y) + fmax(x, y);
    	double tmp;
    	if (fmax(x, y) <= 1e-42) {
    		tmp = (fmin(x, y) / t_2) * ((fmax(x, y) / (fmin(x, y) - -1.0)) / t_2);
    	} else if (fmax(x, y) <= 2.15e+170) {
    		tmp = (fmax(x, y) / (t_0 * t_0)) * (fmin(x, y) / t_1);
    	} else {
    		tmp = -1.0 * ((fmin(x, y) / (-fmin(x, y) - fmax(x, y))) / t_1);
    	}
    	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)
    use fmin_fmax_functions
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8) :: t_0
        real(8) :: t_1
        real(8) :: t_2
        real(8) :: tmp
        t_0 = fmax(x, y) + fmin(x, y)
        t_1 = fmax(x, y) - ((-1.0d0) - fmin(x, y))
        t_2 = fmin(x, y) + fmax(x, y)
        if (fmax(x, y) <= 1d-42) then
            tmp = (fmin(x, y) / t_2) * ((fmax(x, y) / (fmin(x, y) - (-1.0d0))) / t_2)
        else if (fmax(x, y) <= 2.15d+170) then
            tmp = (fmax(x, y) / (t_0 * t_0)) * (fmin(x, y) / t_1)
        else
            tmp = (-1.0d0) * ((fmin(x, y) / (-fmin(x, y) - fmax(x, y))) / t_1)
        end if
        code = tmp
    end function
    
    public static double code(double x, double y) {
    	double t_0 = fmax(x, y) + fmin(x, y);
    	double t_1 = fmax(x, y) - (-1.0 - fmin(x, y));
    	double t_2 = fmin(x, y) + fmax(x, y);
    	double tmp;
    	if (fmax(x, y) <= 1e-42) {
    		tmp = (fmin(x, y) / t_2) * ((fmax(x, y) / (fmin(x, y) - -1.0)) / t_2);
    	} else if (fmax(x, y) <= 2.15e+170) {
    		tmp = (fmax(x, y) / (t_0 * t_0)) * (fmin(x, y) / t_1);
    	} else {
    		tmp = -1.0 * ((fmin(x, y) / (-fmin(x, y) - fmax(x, y))) / t_1);
    	}
    	return tmp;
    }
    
    def code(x, y):
    	t_0 = fmax(x, y) + fmin(x, y)
    	t_1 = fmax(x, y) - (-1.0 - fmin(x, y))
    	t_2 = fmin(x, y) + fmax(x, y)
    	tmp = 0
    	if fmax(x, y) <= 1e-42:
    		tmp = (fmin(x, y) / t_2) * ((fmax(x, y) / (fmin(x, y) - -1.0)) / t_2)
    	elif fmax(x, y) <= 2.15e+170:
    		tmp = (fmax(x, y) / (t_0 * t_0)) * (fmin(x, y) / t_1)
    	else:
    		tmp = -1.0 * ((fmin(x, y) / (-fmin(x, y) - fmax(x, y))) / t_1)
    	return tmp
    
    function code(x, y)
    	t_0 = Float64(fmax(x, y) + fmin(x, y))
    	t_1 = Float64(fmax(x, y) - Float64(-1.0 - fmin(x, y)))
    	t_2 = Float64(fmin(x, y) + fmax(x, y))
    	tmp = 0.0
    	if (fmax(x, y) <= 1e-42)
    		tmp = Float64(Float64(fmin(x, y) / t_2) * Float64(Float64(fmax(x, y) / Float64(fmin(x, y) - -1.0)) / t_2));
    	elseif (fmax(x, y) <= 2.15e+170)
    		tmp = Float64(Float64(fmax(x, y) / Float64(t_0 * t_0)) * Float64(fmin(x, y) / t_1));
    	else
    		tmp = Float64(-1.0 * Float64(Float64(fmin(x, y) / Float64(Float64(-fmin(x, y)) - fmax(x, y))) / t_1));
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y)
    	t_0 = max(x, y) + min(x, y);
    	t_1 = max(x, y) - (-1.0 - min(x, y));
    	t_2 = min(x, y) + max(x, y);
    	tmp = 0.0;
    	if (max(x, y) <= 1e-42)
    		tmp = (min(x, y) / t_2) * ((max(x, y) / (min(x, y) - -1.0)) / t_2);
    	elseif (max(x, y) <= 2.15e+170)
    		tmp = (max(x, y) / (t_0 * t_0)) * (min(x, y) / t_1);
    	else
    		tmp = -1.0 * ((min(x, y) / (-min(x, y) - max(x, y))) / t_1);
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_] := Block[{t$95$0 = N[(N[Max[x, y], $MachinePrecision] + N[Min[x, y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Max[x, y], $MachinePrecision] - N[(-1.0 - N[Min[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Min[x, y], $MachinePrecision] + N[Max[x, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Max[x, y], $MachinePrecision], 1e-42], N[(N[(N[Min[x, y], $MachinePrecision] / t$95$2), $MachinePrecision] * N[(N[(N[Max[x, y], $MachinePrecision] / N[(N[Min[x, y], $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Max[x, y], $MachinePrecision], 2.15e+170], N[(N[(N[Max[x, y], $MachinePrecision] / N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision] * N[(N[Min[x, y], $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], N[(-1.0 * N[(N[(N[Min[x, y], $MachinePrecision] / N[((-N[Min[x, y], $MachinePrecision]) - N[Max[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]
    
    \begin{array}{l}
    t_0 := \mathsf{max}\left(x, y\right) + \mathsf{min}\left(x, y\right)\\
    t_1 := \mathsf{max}\left(x, y\right) - \left(-1 - \mathsf{min}\left(x, y\right)\right)\\
    t_2 := \mathsf{min}\left(x, y\right) + \mathsf{max}\left(x, y\right)\\
    \mathbf{if}\;\mathsf{max}\left(x, y\right) \leq 10^{-42}:\\
    \;\;\;\;\frac{\mathsf{min}\left(x, y\right)}{t\_2} \cdot \frac{\frac{\mathsf{max}\left(x, y\right)}{\mathsf{min}\left(x, y\right) - -1}}{t\_2}\\
    
    \mathbf{elif}\;\mathsf{max}\left(x, y\right) \leq 2.15 \cdot 10^{+170}:\\
    \;\;\;\;\frac{\mathsf{max}\left(x, y\right)}{t\_0 \cdot t\_0} \cdot \frac{\mathsf{min}\left(x, y\right)}{t\_1}\\
    
    \mathbf{else}:\\
    \;\;\;\;-1 \cdot \frac{\frac{\mathsf{min}\left(x, y\right)}{\left(-\mathsf{min}\left(x, y\right)\right) - \mathsf{max}\left(x, y\right)}}{t\_1}\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if y < 1.00000000000000004e-42

      1. Initial program 68.3%

        \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      2. Taylor expanded in y around 0

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(1 + x\right)}} \]
      3. Step-by-step derivation
        1. lower-+.f6458.0

          \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + \color{blue}{x}\right)} \]
      4. Applied rewrites58.0%

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

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

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

          \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + x\right)}} \]
        4. times-fracN/A

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

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

          \[\leadsto \frac{x \cdot \frac{y}{1 + x}}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}} \]
        7. times-fracN/A

          \[\leadsto \color{blue}{\frac{x}{x + y} \cdot \frac{\frac{y}{1 + x}}{x + y}} \]
        8. lift-+.f64N/A

          \[\leadsto \frac{x}{\color{blue}{x + y}} \cdot \frac{\frac{y}{1 + x}}{x + y} \]
        9. +-commutativeN/A

          \[\leadsto \frac{x}{\color{blue}{y + x}} \cdot \frac{\frac{y}{1 + x}}{x + y} \]
        10. add-flipN/A

          \[\leadsto \frac{x}{\color{blue}{y - \left(\mathsf{neg}\left(x\right)\right)}} \cdot \frac{\frac{y}{1 + x}}{x + y} \]
        11. lift-neg.f64N/A

          \[\leadsto \frac{x}{y - \color{blue}{\left(-x\right)}} \cdot \frac{\frac{y}{1 + x}}{x + y} \]
        12. sub-negate-revN/A

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

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

          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{x}{\left(-x\right) - y}\right)\right)} \cdot \frac{\frac{y}{1 + x}}{x + y} \]
        15. lift-/.f64N/A

          \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{\left(-x\right) - y}}\right)\right) \cdot \frac{\frac{y}{1 + x}}{x + y} \]
        16. lower-*.f64N/A

          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{x}{\left(-x\right) - y}\right)\right) \cdot \frac{\frac{y}{1 + x}}{x + y}} \]
      6. Applied rewrites75.1%

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

      if 1.00000000000000004e-42 < y < 2.1499999999999999e170

      1. Initial program 68.3%

        \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      2. Step-by-step derivation
        1. lift-/.f64N/A

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

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

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

          \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        5. times-fracN/A

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

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

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

          \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(x + y\right)} \cdot \frac{x}{\left(x + y\right) + 1} \]
        9. +-commutativeN/A

          \[\leadsto \frac{y}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{x}{\left(x + y\right) + 1} \]
        10. lower-+.f64N/A

          \[\leadsto \frac{y}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{x}{\left(x + y\right) + 1} \]
        11. lift-+.f64N/A

          \[\leadsto \frac{y}{\left(y + x\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{x}{\left(x + y\right) + 1} \]
        12. +-commutativeN/A

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

          \[\leadsto \frac{y}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{x}{\left(x + y\right) + 1} \]
        14. lower-/.f6487.8

          \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \color{blue}{\frac{x}{\left(x + y\right) + 1}} \]
        15. lift-+.f64N/A

          \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right) + 1}} \]
        16. +-commutativeN/A

          \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\color{blue}{1 + \left(x + y\right)}} \]
        17. lift-+.f64N/A

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

          \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{1 + \color{blue}{\left(y + x\right)}} \]
        19. associate-+r+N/A

          \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\color{blue}{\left(1 + y\right) + x}} \]
        20. +-commutativeN/A

          \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\color{blue}{\left(y + 1\right)} + x} \]
        21. add-flipN/A

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

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

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

          \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{y - \color{blue}{\left(\left(\mathsf{neg}\left(1\right)\right) - x\right)}} \]
        25. metadata-eval87.8

          \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{y - \left(\color{blue}{-1} - x\right)} \]
      3. Applied rewrites87.8%

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

      if 2.1499999999999999e170 < y

      1. Initial program 68.3%

        \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      2. Step-by-step derivation
        1. lift-/.f64N/A

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

          \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        3. associate-/r*N/A

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

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

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

          \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}}}{\left(x + y\right) + 1} \]
        7. sqr-neg-revN/A

          \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(\mathsf{neg}\left(\left(x + y\right)\right)\right) \cdot \left(\mathsf{neg}\left(\left(x + y\right)\right)\right)}}}{\left(x + y\right) + 1} \]
        8. times-fracN/A

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

          \[\leadsto \color{blue}{\frac{y}{\mathsf{neg}\left(\left(x + y\right)\right)} \cdot \frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1}} \]
        10. lower-*.f64N/A

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

          \[\leadsto \color{blue}{\frac{y}{\mathsf{neg}\left(\left(x + y\right)\right)}} \cdot \frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1} \]
        12. lift-+.f64N/A

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

          \[\leadsto \frac{y}{\color{blue}{\left(\mathsf{neg}\left(x\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}} \cdot \frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1} \]
        14. sub-flip-reverseN/A

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

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

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

          \[\leadsto \frac{y}{\left(-x\right) - y} \cdot \color{blue}{\frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1}} \]
      3. Applied rewrites99.8%

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

        \[\leadsto \color{blue}{-1} \cdot \frac{\frac{x}{\left(-x\right) - y}}{y - \left(-1 - x\right)} \]
      5. Step-by-step derivation
        1. Applied rewrites51.8%

          \[\leadsto \color{blue}{-1} \cdot \frac{\frac{x}{\left(-x\right) - y}}{y - \left(-1 - x\right)} \]
      6. Recombined 3 regimes into one program.
      7. Add Preprocessing

      Alternative 5: 95.3% accurate, 0.4× speedup?

      \[\begin{array}{l} t_0 := \mathsf{max}\left(x, y\right) - \left(-1 - \mathsf{min}\left(x, y\right)\right)\\ t_1 := \mathsf{max}\left(x, y\right) + \mathsf{min}\left(x, y\right)\\ t_2 := \mathsf{min}\left(x, y\right) + \mathsf{max}\left(x, y\right)\\ \mathbf{if}\;\mathsf{max}\left(x, y\right) \leq 5 \cdot 10^{-31}:\\ \;\;\;\;\frac{\mathsf{min}\left(x, y\right)}{t\_2} \cdot \frac{\frac{\mathsf{max}\left(x, y\right)}{\mathsf{min}\left(x, y\right) - -1}}{t\_2}\\ \mathbf{elif}\;\mathsf{max}\left(x, y\right) \leq 1.36 \cdot 10^{+105}:\\ \;\;\;\;\frac{\mathsf{max}\left(x, y\right)}{t\_0 \cdot \left(t\_1 \cdot t\_1\right)} \cdot \mathsf{min}\left(x, y\right)\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \frac{\frac{\mathsf{min}\left(x, y\right)}{\left(-\mathsf{min}\left(x, y\right)\right) - \mathsf{max}\left(x, y\right)}}{t\_0}\\ \end{array} \]
      (FPCore (x y)
       :precision binary64
       (let* ((t_0 (- (fmax x y) (- -1.0 (fmin x y))))
              (t_1 (+ (fmax x y) (fmin x y)))
              (t_2 (+ (fmin x y) (fmax x y))))
         (if (<= (fmax x y) 5e-31)
           (* (/ (fmin x y) t_2) (/ (/ (fmax x y) (- (fmin x y) -1.0)) t_2))
           (if (<= (fmax x y) 1.36e+105)
             (* (/ (fmax x y) (* t_0 (* t_1 t_1))) (fmin x y))
             (* -1.0 (/ (/ (fmin x y) (- (- (fmin x y)) (fmax x y))) t_0))))))
      double code(double x, double y) {
      	double t_0 = fmax(x, y) - (-1.0 - fmin(x, y));
      	double t_1 = fmax(x, y) + fmin(x, y);
      	double t_2 = fmin(x, y) + fmax(x, y);
      	double tmp;
      	if (fmax(x, y) <= 5e-31) {
      		tmp = (fmin(x, y) / t_2) * ((fmax(x, y) / (fmin(x, y) - -1.0)) / t_2);
      	} else if (fmax(x, y) <= 1.36e+105) {
      		tmp = (fmax(x, y) / (t_0 * (t_1 * t_1))) * fmin(x, y);
      	} else {
      		tmp = -1.0 * ((fmin(x, y) / (-fmin(x, y) - fmax(x, y))) / t_0);
      	}
      	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)
      use fmin_fmax_functions
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8) :: t_0
          real(8) :: t_1
          real(8) :: t_2
          real(8) :: tmp
          t_0 = fmax(x, y) - ((-1.0d0) - fmin(x, y))
          t_1 = fmax(x, y) + fmin(x, y)
          t_2 = fmin(x, y) + fmax(x, y)
          if (fmax(x, y) <= 5d-31) then
              tmp = (fmin(x, y) / t_2) * ((fmax(x, y) / (fmin(x, y) - (-1.0d0))) / t_2)
          else if (fmax(x, y) <= 1.36d+105) then
              tmp = (fmax(x, y) / (t_0 * (t_1 * t_1))) * fmin(x, y)
          else
              tmp = (-1.0d0) * ((fmin(x, y) / (-fmin(x, y) - fmax(x, y))) / t_0)
          end if
          code = tmp
      end function
      
      public static double code(double x, double y) {
      	double t_0 = fmax(x, y) - (-1.0 - fmin(x, y));
      	double t_1 = fmax(x, y) + fmin(x, y);
      	double t_2 = fmin(x, y) + fmax(x, y);
      	double tmp;
      	if (fmax(x, y) <= 5e-31) {
      		tmp = (fmin(x, y) / t_2) * ((fmax(x, y) / (fmin(x, y) - -1.0)) / t_2);
      	} else if (fmax(x, y) <= 1.36e+105) {
      		tmp = (fmax(x, y) / (t_0 * (t_1 * t_1))) * fmin(x, y);
      	} else {
      		tmp = -1.0 * ((fmin(x, y) / (-fmin(x, y) - fmax(x, y))) / t_0);
      	}
      	return tmp;
      }
      
      def code(x, y):
      	t_0 = fmax(x, y) - (-1.0 - fmin(x, y))
      	t_1 = fmax(x, y) + fmin(x, y)
      	t_2 = fmin(x, y) + fmax(x, y)
      	tmp = 0
      	if fmax(x, y) <= 5e-31:
      		tmp = (fmin(x, y) / t_2) * ((fmax(x, y) / (fmin(x, y) - -1.0)) / t_2)
      	elif fmax(x, y) <= 1.36e+105:
      		tmp = (fmax(x, y) / (t_0 * (t_1 * t_1))) * fmin(x, y)
      	else:
      		tmp = -1.0 * ((fmin(x, y) / (-fmin(x, y) - fmax(x, y))) / t_0)
      	return tmp
      
      function code(x, y)
      	t_0 = Float64(fmax(x, y) - Float64(-1.0 - fmin(x, y)))
      	t_1 = Float64(fmax(x, y) + fmin(x, y))
      	t_2 = Float64(fmin(x, y) + fmax(x, y))
      	tmp = 0.0
      	if (fmax(x, y) <= 5e-31)
      		tmp = Float64(Float64(fmin(x, y) / t_2) * Float64(Float64(fmax(x, y) / Float64(fmin(x, y) - -1.0)) / t_2));
      	elseif (fmax(x, y) <= 1.36e+105)
      		tmp = Float64(Float64(fmax(x, y) / Float64(t_0 * Float64(t_1 * t_1))) * fmin(x, y));
      	else
      		tmp = Float64(-1.0 * Float64(Float64(fmin(x, y) / Float64(Float64(-fmin(x, y)) - fmax(x, y))) / t_0));
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y)
      	t_0 = max(x, y) - (-1.0 - min(x, y));
      	t_1 = max(x, y) + min(x, y);
      	t_2 = min(x, y) + max(x, y);
      	tmp = 0.0;
      	if (max(x, y) <= 5e-31)
      		tmp = (min(x, y) / t_2) * ((max(x, y) / (min(x, y) - -1.0)) / t_2);
      	elseif (max(x, y) <= 1.36e+105)
      		tmp = (max(x, y) / (t_0 * (t_1 * t_1))) * min(x, y);
      	else
      		tmp = -1.0 * ((min(x, y) / (-min(x, y) - max(x, y))) / t_0);
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_] := Block[{t$95$0 = N[(N[Max[x, y], $MachinePrecision] - N[(-1.0 - N[Min[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Max[x, y], $MachinePrecision] + N[Min[x, y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Min[x, y], $MachinePrecision] + N[Max[x, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Max[x, y], $MachinePrecision], 5e-31], N[(N[(N[Min[x, y], $MachinePrecision] / t$95$2), $MachinePrecision] * N[(N[(N[Max[x, y], $MachinePrecision] / N[(N[Min[x, y], $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Max[x, y], $MachinePrecision], 1.36e+105], N[(N[(N[Max[x, y], $MachinePrecision] / N[(t$95$0 * N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Min[x, y], $MachinePrecision]), $MachinePrecision], N[(-1.0 * N[(N[(N[Min[x, y], $MachinePrecision] / N[((-N[Min[x, y], $MachinePrecision]) - N[Max[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]]]]]]
      
      \begin{array}{l}
      t_0 := \mathsf{max}\left(x, y\right) - \left(-1 - \mathsf{min}\left(x, y\right)\right)\\
      t_1 := \mathsf{max}\left(x, y\right) + \mathsf{min}\left(x, y\right)\\
      t_2 := \mathsf{min}\left(x, y\right) + \mathsf{max}\left(x, y\right)\\
      \mathbf{if}\;\mathsf{max}\left(x, y\right) \leq 5 \cdot 10^{-31}:\\
      \;\;\;\;\frac{\mathsf{min}\left(x, y\right)}{t\_2} \cdot \frac{\frac{\mathsf{max}\left(x, y\right)}{\mathsf{min}\left(x, y\right) - -1}}{t\_2}\\
      
      \mathbf{elif}\;\mathsf{max}\left(x, y\right) \leq 1.36 \cdot 10^{+105}:\\
      \;\;\;\;\frac{\mathsf{max}\left(x, y\right)}{t\_0 \cdot \left(t\_1 \cdot t\_1\right)} \cdot \mathsf{min}\left(x, y\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;-1 \cdot \frac{\frac{\mathsf{min}\left(x, y\right)}{\left(-\mathsf{min}\left(x, y\right)\right) - \mathsf{max}\left(x, y\right)}}{t\_0}\\
      
      
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if y < 5e-31

        1. Initial program 68.3%

          \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        2. Taylor expanded in y around 0

          \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(1 + x\right)}} \]
        3. Step-by-step derivation
          1. lower-+.f6458.0

            \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + \color{blue}{x}\right)} \]
        4. Applied rewrites58.0%

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

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

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

            \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + x\right)}} \]
          4. times-fracN/A

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

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

            \[\leadsto \frac{x \cdot \frac{y}{1 + x}}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}} \]
          7. times-fracN/A

            \[\leadsto \color{blue}{\frac{x}{x + y} \cdot \frac{\frac{y}{1 + x}}{x + y}} \]
          8. lift-+.f64N/A

            \[\leadsto \frac{x}{\color{blue}{x + y}} \cdot \frac{\frac{y}{1 + x}}{x + y} \]
          9. +-commutativeN/A

            \[\leadsto \frac{x}{\color{blue}{y + x}} \cdot \frac{\frac{y}{1 + x}}{x + y} \]
          10. add-flipN/A

            \[\leadsto \frac{x}{\color{blue}{y - \left(\mathsf{neg}\left(x\right)\right)}} \cdot \frac{\frac{y}{1 + x}}{x + y} \]
          11. lift-neg.f64N/A

            \[\leadsto \frac{x}{y - \color{blue}{\left(-x\right)}} \cdot \frac{\frac{y}{1 + x}}{x + y} \]
          12. sub-negate-revN/A

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

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

            \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{x}{\left(-x\right) - y}\right)\right)} \cdot \frac{\frac{y}{1 + x}}{x + y} \]
          15. lift-/.f64N/A

            \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{\left(-x\right) - y}}\right)\right) \cdot \frac{\frac{y}{1 + x}}{x + y} \]
          16. lower-*.f64N/A

            \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{x}{\left(-x\right) - y}\right)\right) \cdot \frac{\frac{y}{1 + x}}{x + y}} \]
        6. Applied rewrites75.1%

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

        if 5e-31 < y < 1.3599999999999999e105

        1. Initial program 68.3%

          \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        2. Step-by-step derivation
          1. lift-/.f64N/A

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

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

            \[\leadsto \color{blue}{x \cdot \frac{y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
          4. *-commutativeN/A

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

            \[\leadsto \color{blue}{\frac{y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \cdot x} \]
        3. Applied rewrites81.5%

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

        if 1.3599999999999999e105 < y

        1. Initial program 68.3%

          \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        2. Step-by-step derivation
          1. lift-/.f64N/A

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

            \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
          3. associate-/r*N/A

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

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

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

            \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}}}{\left(x + y\right) + 1} \]
          7. sqr-neg-revN/A

            \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(\mathsf{neg}\left(\left(x + y\right)\right)\right) \cdot \left(\mathsf{neg}\left(\left(x + y\right)\right)\right)}}}{\left(x + y\right) + 1} \]
          8. times-fracN/A

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

            \[\leadsto \color{blue}{\frac{y}{\mathsf{neg}\left(\left(x + y\right)\right)} \cdot \frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1}} \]
          10. lower-*.f64N/A

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

            \[\leadsto \color{blue}{\frac{y}{\mathsf{neg}\left(\left(x + y\right)\right)}} \cdot \frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1} \]
          12. lift-+.f64N/A

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

            \[\leadsto \frac{y}{\color{blue}{\left(\mathsf{neg}\left(x\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}} \cdot \frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1} \]
          14. sub-flip-reverseN/A

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

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

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

            \[\leadsto \frac{y}{\left(-x\right) - y} \cdot \color{blue}{\frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1}} \]
        3. Applied rewrites99.8%

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

          \[\leadsto \color{blue}{-1} \cdot \frac{\frac{x}{\left(-x\right) - y}}{y - \left(-1 - x\right)} \]
        5. Step-by-step derivation
          1. Applied rewrites51.8%

            \[\leadsto \color{blue}{-1} \cdot \frac{\frac{x}{\left(-x\right) - y}}{y - \left(-1 - x\right)} \]
        6. Recombined 3 regimes into one program.
        7. Add Preprocessing

        Alternative 6: 94.3% accurate, 0.4× speedup?

        \[\begin{array}{l} t_0 := \mathsf{min}\left(x, y\right) + \mathsf{max}\left(x, y\right)\\ \mathbf{if}\;\mathsf{max}\left(x, y\right) \leq -4.8 \cdot 10^{+36}:\\ \;\;\;\;\frac{\frac{\mathsf{max}\left(x, y\right)}{\mathsf{min}\left(x, y\right)}}{\mathsf{max}\left(x, y\right) + \mathsf{min}\left(x, y\right)}\\ \mathbf{elif}\;\mathsf{max}\left(x, y\right) \leq 0.0013:\\ \;\;\;\;\frac{\frac{\mathsf{min}\left(x, y\right)}{t\_0} \cdot \mathsf{max}\left(x, y\right)}{\left(\mathsf{min}\left(x, y\right) - -1\right) \cdot t\_0}\\ \mathbf{elif}\;\mathsf{max}\left(x, y\right) \leq 1.36 \cdot 10^{+105}:\\ \;\;\;\;\frac{\mathsf{max}\left(x, y\right)}{\left(\mathsf{max}\left(x, y\right) - -1\right) \cdot \left(t\_0 \cdot t\_0\right)} \cdot \mathsf{min}\left(x, y\right)\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \frac{\frac{\mathsf{min}\left(x, y\right)}{\left(-\mathsf{min}\left(x, y\right)\right) - \mathsf{max}\left(x, y\right)}}{\mathsf{max}\left(x, y\right) - \left(-1 - \mathsf{min}\left(x, y\right)\right)}\\ \end{array} \]
        (FPCore (x y)
         :precision binary64
         (let* ((t_0 (+ (fmin x y) (fmax x y))))
           (if (<= (fmax x y) -4.8e+36)
             (/ (/ (fmax x y) (fmin x y)) (+ (fmax x y) (fmin x y)))
             (if (<= (fmax x y) 0.0013)
               (/ (* (/ (fmin x y) t_0) (fmax x y)) (* (- (fmin x y) -1.0) t_0))
               (if (<= (fmax x y) 1.36e+105)
                 (* (/ (fmax x y) (* (- (fmax x y) -1.0) (* t_0 t_0))) (fmin x y))
                 (*
                  -1.0
                  (/
                   (/ (fmin x y) (- (- (fmin x y)) (fmax x y)))
                   (- (fmax x y) (- -1.0 (fmin x y))))))))))
        double code(double x, double y) {
        	double t_0 = fmin(x, y) + fmax(x, y);
        	double tmp;
        	if (fmax(x, y) <= -4.8e+36) {
        		tmp = (fmax(x, y) / fmin(x, y)) / (fmax(x, y) + fmin(x, y));
        	} else if (fmax(x, y) <= 0.0013) {
        		tmp = ((fmin(x, y) / t_0) * fmax(x, y)) / ((fmin(x, y) - -1.0) * t_0);
        	} else if (fmax(x, y) <= 1.36e+105) {
        		tmp = (fmax(x, y) / ((fmax(x, y) - -1.0) * (t_0 * t_0))) * fmin(x, y);
        	} else {
        		tmp = -1.0 * ((fmin(x, y) / (-fmin(x, y) - fmax(x, y))) / (fmax(x, y) - (-1.0 - fmin(x, y))));
        	}
        	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)
        use fmin_fmax_functions
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8) :: t_0
            real(8) :: tmp
            t_0 = fmin(x, y) + fmax(x, y)
            if (fmax(x, y) <= (-4.8d+36)) then
                tmp = (fmax(x, y) / fmin(x, y)) / (fmax(x, y) + fmin(x, y))
            else if (fmax(x, y) <= 0.0013d0) then
                tmp = ((fmin(x, y) / t_0) * fmax(x, y)) / ((fmin(x, y) - (-1.0d0)) * t_0)
            else if (fmax(x, y) <= 1.36d+105) then
                tmp = (fmax(x, y) / ((fmax(x, y) - (-1.0d0)) * (t_0 * t_0))) * fmin(x, y)
            else
                tmp = (-1.0d0) * ((fmin(x, y) / (-fmin(x, y) - fmax(x, y))) / (fmax(x, y) - ((-1.0d0) - fmin(x, y))))
            end if
            code = tmp
        end function
        
        public static double code(double x, double y) {
        	double t_0 = fmin(x, y) + fmax(x, y);
        	double tmp;
        	if (fmax(x, y) <= -4.8e+36) {
        		tmp = (fmax(x, y) / fmin(x, y)) / (fmax(x, y) + fmin(x, y));
        	} else if (fmax(x, y) <= 0.0013) {
        		tmp = ((fmin(x, y) / t_0) * fmax(x, y)) / ((fmin(x, y) - -1.0) * t_0);
        	} else if (fmax(x, y) <= 1.36e+105) {
        		tmp = (fmax(x, y) / ((fmax(x, y) - -1.0) * (t_0 * t_0))) * fmin(x, y);
        	} else {
        		tmp = -1.0 * ((fmin(x, y) / (-fmin(x, y) - fmax(x, y))) / (fmax(x, y) - (-1.0 - fmin(x, y))));
        	}
        	return tmp;
        }
        
        def code(x, y):
        	t_0 = fmin(x, y) + fmax(x, y)
        	tmp = 0
        	if fmax(x, y) <= -4.8e+36:
        		tmp = (fmax(x, y) / fmin(x, y)) / (fmax(x, y) + fmin(x, y))
        	elif fmax(x, y) <= 0.0013:
        		tmp = ((fmin(x, y) / t_0) * fmax(x, y)) / ((fmin(x, y) - -1.0) * t_0)
        	elif fmax(x, y) <= 1.36e+105:
        		tmp = (fmax(x, y) / ((fmax(x, y) - -1.0) * (t_0 * t_0))) * fmin(x, y)
        	else:
        		tmp = -1.0 * ((fmin(x, y) / (-fmin(x, y) - fmax(x, y))) / (fmax(x, y) - (-1.0 - fmin(x, y))))
        	return tmp
        
        function code(x, y)
        	t_0 = Float64(fmin(x, y) + fmax(x, y))
        	tmp = 0.0
        	if (fmax(x, y) <= -4.8e+36)
        		tmp = Float64(Float64(fmax(x, y) / fmin(x, y)) / Float64(fmax(x, y) + fmin(x, y)));
        	elseif (fmax(x, y) <= 0.0013)
        		tmp = Float64(Float64(Float64(fmin(x, y) / t_0) * fmax(x, y)) / Float64(Float64(fmin(x, y) - -1.0) * t_0));
        	elseif (fmax(x, y) <= 1.36e+105)
        		tmp = Float64(Float64(fmax(x, y) / Float64(Float64(fmax(x, y) - -1.0) * Float64(t_0 * t_0))) * fmin(x, y));
        	else
        		tmp = Float64(-1.0 * Float64(Float64(fmin(x, y) / Float64(Float64(-fmin(x, y)) - fmax(x, y))) / Float64(fmax(x, y) - Float64(-1.0 - fmin(x, y)))));
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y)
        	t_0 = min(x, y) + max(x, y);
        	tmp = 0.0;
        	if (max(x, y) <= -4.8e+36)
        		tmp = (max(x, y) / min(x, y)) / (max(x, y) + min(x, y));
        	elseif (max(x, y) <= 0.0013)
        		tmp = ((min(x, y) / t_0) * max(x, y)) / ((min(x, y) - -1.0) * t_0);
        	elseif (max(x, y) <= 1.36e+105)
        		tmp = (max(x, y) / ((max(x, y) - -1.0) * (t_0 * t_0))) * min(x, y);
        	else
        		tmp = -1.0 * ((min(x, y) / (-min(x, y) - max(x, y))) / (max(x, y) - (-1.0 - min(x, y))));
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_] := Block[{t$95$0 = N[(N[Min[x, y], $MachinePrecision] + N[Max[x, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Max[x, y], $MachinePrecision], -4.8e+36], N[(N[(N[Max[x, y], $MachinePrecision] / N[Min[x, y], $MachinePrecision]), $MachinePrecision] / N[(N[Max[x, y], $MachinePrecision] + N[Min[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Max[x, y], $MachinePrecision], 0.0013], N[(N[(N[(N[Min[x, y], $MachinePrecision] / t$95$0), $MachinePrecision] * N[Max[x, y], $MachinePrecision]), $MachinePrecision] / N[(N[(N[Min[x, y], $MachinePrecision] - -1.0), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Max[x, y], $MachinePrecision], 1.36e+105], N[(N[(N[Max[x, y], $MachinePrecision] / N[(N[(N[Max[x, y], $MachinePrecision] - -1.0), $MachinePrecision] * N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Min[x, y], $MachinePrecision]), $MachinePrecision], N[(-1.0 * N[(N[(N[Min[x, y], $MachinePrecision] / N[((-N[Min[x, y], $MachinePrecision]) - N[Max[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Max[x, y], $MachinePrecision] - N[(-1.0 - N[Min[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
        
        \begin{array}{l}
        t_0 := \mathsf{min}\left(x, y\right) + \mathsf{max}\left(x, y\right)\\
        \mathbf{if}\;\mathsf{max}\left(x, y\right) \leq -4.8 \cdot 10^{+36}:\\
        \;\;\;\;\frac{\frac{\mathsf{max}\left(x, y\right)}{\mathsf{min}\left(x, y\right)}}{\mathsf{max}\left(x, y\right) + \mathsf{min}\left(x, y\right)}\\
        
        \mathbf{elif}\;\mathsf{max}\left(x, y\right) \leq 0.0013:\\
        \;\;\;\;\frac{\frac{\mathsf{min}\left(x, y\right)}{t\_0} \cdot \mathsf{max}\left(x, y\right)}{\left(\mathsf{min}\left(x, y\right) - -1\right) \cdot t\_0}\\
        
        \mathbf{elif}\;\mathsf{max}\left(x, y\right) \leq 1.36 \cdot 10^{+105}:\\
        \;\;\;\;\frac{\mathsf{max}\left(x, y\right)}{\left(\mathsf{max}\left(x, y\right) - -1\right) \cdot \left(t\_0 \cdot t\_0\right)} \cdot \mathsf{min}\left(x, y\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;-1 \cdot \frac{\frac{\mathsf{min}\left(x, y\right)}{\left(-\mathsf{min}\left(x, y\right)\right) - \mathsf{max}\left(x, y\right)}}{\mathsf{max}\left(x, y\right) - \left(-1 - \mathsf{min}\left(x, y\right)\right)}\\
        
        
        \end{array}
        
        Derivation
        1. Split input into 4 regimes
        2. if y < -4.79999999999999985e36

          1. Initial program 68.3%

            \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          2. Step-by-step derivation
            1. lift-/.f64N/A

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

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

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

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

              \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right) \cdot \left(x + y\right)}} \]
            6. associate-/r*N/A

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

              \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}}{x + y}} \]
          3. Applied rewrites73.6%

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

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

              \[\leadsto \frac{\frac{y}{\color{blue}{x}}}{y + x} \]
          6. Applied rewrites38.2%

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

          if -4.79999999999999985e36 < y < 0.0012999999999999999

          1. Initial program 68.3%

            \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          2. Taylor expanded in y around 0

            \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(1 + x\right)}} \]
          3. Step-by-step derivation
            1. lower-+.f6458.0

              \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + \color{blue}{x}\right)} \]
          4. Applied rewrites58.0%

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

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

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

              \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + x\right)}} \]
            4. times-fracN/A

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

              \[\leadsto \frac{x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{1 + x} \]
            6. associate-/r*N/A

              \[\leadsto \color{blue}{\frac{\frac{x}{x + y}}{x + y}} \cdot \frac{y}{1 + x} \]
            7. lift-+.f64N/A

              \[\leadsto \frac{\frac{x}{\color{blue}{x + y}}}{x + y} \cdot \frac{y}{1 + x} \]
            8. +-commutativeN/A

              \[\leadsto \frac{\frac{x}{\color{blue}{y + x}}}{x + y} \cdot \frac{y}{1 + x} \]
            9. add-flipN/A

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

              \[\leadsto \frac{\frac{x}{y - \color{blue}{\left(-x\right)}}}{x + y} \cdot \frac{y}{1 + x} \]
            11. sub-negate-revN/A

              \[\leadsto \frac{\frac{x}{\color{blue}{\mathsf{neg}\left(\left(\left(-x\right) - y\right)\right)}}}{x + y} \cdot \frac{y}{1 + x} \]
            12. lift--.f64N/A

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

              \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\frac{x}{\left(-x\right) - y}\right)}}{x + y} \cdot \frac{y}{1 + x} \]
            14. lift-/.f64N/A

              \[\leadsto \frac{\mathsf{neg}\left(\color{blue}{\frac{x}{\left(-x\right) - y}}\right)}{x + y} \cdot \frac{y}{1 + x} \]
            15. frac-timesN/A

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

              \[\leadsto \color{blue}{\frac{\left(\mathsf{neg}\left(\frac{x}{\left(-x\right) - y}\right)\right) \cdot y}{\left(x + y\right) \cdot \left(1 + x\right)}} \]
          6. Applied rewrites75.8%

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

          if 0.0012999999999999999 < y < 1.3599999999999999e105

          1. Initial program 68.3%

            \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          2. Taylor expanded in x around 0

            \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(1 + y\right)}} \]
          3. Step-by-step derivation
            1. lower-+.f6458.5

              \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + \color{blue}{y}\right)} \]
          4. Applied rewrites58.5%

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

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

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

              \[\leadsto \color{blue}{x \cdot \frac{y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + y\right)}} \]
            4. *-commutativeN/A

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

              \[\leadsto \color{blue}{\frac{y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + y\right)} \cdot x} \]
            6. lower-/.f6475.2

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

              \[\leadsto \frac{y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + y\right)}} \cdot x \]
            8. *-commutativeN/A

              \[\leadsto \frac{y}{\color{blue}{\left(1 + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \cdot x \]
            9. lower-*.f6475.2

              \[\leadsto \frac{y}{\color{blue}{\left(1 + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \cdot x \]
            10. lift-+.f64N/A

              \[\leadsto \frac{y}{\left(1 + \color{blue}{y}\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot x \]
            11. +-commutativeN/A

              \[\leadsto \frac{y}{\left(y + \color{blue}{1}\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot x \]
            12. add-flip-revN/A

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

              \[\leadsto \frac{y}{\left(y - -1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot x \]
            14. lower--.f6475.2

              \[\leadsto \frac{y}{\left(y - \color{blue}{-1}\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot x \]
          6. Applied rewrites75.2%

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

          if 1.3599999999999999e105 < y

          1. Initial program 68.3%

            \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          2. Step-by-step derivation
            1. lift-/.f64N/A

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

              \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
            3. associate-/r*N/A

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

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

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

              \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}}}{\left(x + y\right) + 1} \]
            7. sqr-neg-revN/A

              \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(\mathsf{neg}\left(\left(x + y\right)\right)\right) \cdot \left(\mathsf{neg}\left(\left(x + y\right)\right)\right)}}}{\left(x + y\right) + 1} \]
            8. times-fracN/A

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

              \[\leadsto \color{blue}{\frac{y}{\mathsf{neg}\left(\left(x + y\right)\right)} \cdot \frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1}} \]
            10. lower-*.f64N/A

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

              \[\leadsto \color{blue}{\frac{y}{\mathsf{neg}\left(\left(x + y\right)\right)}} \cdot \frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1} \]
            12. lift-+.f64N/A

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

              \[\leadsto \frac{y}{\color{blue}{\left(\mathsf{neg}\left(x\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}} \cdot \frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1} \]
            14. sub-flip-reverseN/A

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

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

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

              \[\leadsto \frac{y}{\left(-x\right) - y} \cdot \color{blue}{\frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1}} \]
          3. Applied rewrites99.8%

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

            \[\leadsto \color{blue}{-1} \cdot \frac{\frac{x}{\left(-x\right) - y}}{y - \left(-1 - x\right)} \]
          5. Step-by-step derivation
            1. Applied rewrites51.8%

              \[\leadsto \color{blue}{-1} \cdot \frac{\frac{x}{\left(-x\right) - y}}{y - \left(-1 - x\right)} \]
          6. Recombined 4 regimes into one program.
          7. Add Preprocessing

          Alternative 7: 94.2% accurate, 0.4× speedup?

          \[\begin{array}{l} t_0 := \mathsf{min}\left(x, y\right) + \mathsf{max}\left(x, y\right)\\ \mathbf{if}\;\mathsf{max}\left(x, y\right) \leq 0.0013:\\ \;\;\;\;\frac{\mathsf{min}\left(x, y\right)}{t\_0} \cdot \frac{\frac{\mathsf{max}\left(x, y\right)}{\mathsf{min}\left(x, y\right) - -1}}{t\_0}\\ \mathbf{elif}\;\mathsf{max}\left(x, y\right) \leq 1.36 \cdot 10^{+105}:\\ \;\;\;\;\frac{\mathsf{max}\left(x, y\right)}{\left(\mathsf{max}\left(x, y\right) - -1\right) \cdot \left(t\_0 \cdot t\_0\right)} \cdot \mathsf{min}\left(x, y\right)\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \frac{\frac{\mathsf{min}\left(x, y\right)}{\left(-\mathsf{min}\left(x, y\right)\right) - \mathsf{max}\left(x, y\right)}}{\mathsf{max}\left(x, y\right) - \left(-1 - \mathsf{min}\left(x, y\right)\right)}\\ \end{array} \]
          (FPCore (x y)
           :precision binary64
           (let* ((t_0 (+ (fmin x y) (fmax x y))))
             (if (<= (fmax x y) 0.0013)
               (* (/ (fmin x y) t_0) (/ (/ (fmax x y) (- (fmin x y) -1.0)) t_0))
               (if (<= (fmax x y) 1.36e+105)
                 (* (/ (fmax x y) (* (- (fmax x y) -1.0) (* t_0 t_0))) (fmin x y))
                 (*
                  -1.0
                  (/
                   (/ (fmin x y) (- (- (fmin x y)) (fmax x y)))
                   (- (fmax x y) (- -1.0 (fmin x y)))))))))
          double code(double x, double y) {
          	double t_0 = fmin(x, y) + fmax(x, y);
          	double tmp;
          	if (fmax(x, y) <= 0.0013) {
          		tmp = (fmin(x, y) / t_0) * ((fmax(x, y) / (fmin(x, y) - -1.0)) / t_0);
          	} else if (fmax(x, y) <= 1.36e+105) {
          		tmp = (fmax(x, y) / ((fmax(x, y) - -1.0) * (t_0 * t_0))) * fmin(x, y);
          	} else {
          		tmp = -1.0 * ((fmin(x, y) / (-fmin(x, y) - fmax(x, y))) / (fmax(x, y) - (-1.0 - fmin(x, y))));
          	}
          	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)
          use fmin_fmax_functions
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8) :: t_0
              real(8) :: tmp
              t_0 = fmin(x, y) + fmax(x, y)
              if (fmax(x, y) <= 0.0013d0) then
                  tmp = (fmin(x, y) / t_0) * ((fmax(x, y) / (fmin(x, y) - (-1.0d0))) / t_0)
              else if (fmax(x, y) <= 1.36d+105) then
                  tmp = (fmax(x, y) / ((fmax(x, y) - (-1.0d0)) * (t_0 * t_0))) * fmin(x, y)
              else
                  tmp = (-1.0d0) * ((fmin(x, y) / (-fmin(x, y) - fmax(x, y))) / (fmax(x, y) - ((-1.0d0) - fmin(x, y))))
              end if
              code = tmp
          end function
          
          public static double code(double x, double y) {
          	double t_0 = fmin(x, y) + fmax(x, y);
          	double tmp;
          	if (fmax(x, y) <= 0.0013) {
          		tmp = (fmin(x, y) / t_0) * ((fmax(x, y) / (fmin(x, y) - -1.0)) / t_0);
          	} else if (fmax(x, y) <= 1.36e+105) {
          		tmp = (fmax(x, y) / ((fmax(x, y) - -1.0) * (t_0 * t_0))) * fmin(x, y);
          	} else {
          		tmp = -1.0 * ((fmin(x, y) / (-fmin(x, y) - fmax(x, y))) / (fmax(x, y) - (-1.0 - fmin(x, y))));
          	}
          	return tmp;
          }
          
          def code(x, y):
          	t_0 = fmin(x, y) + fmax(x, y)
          	tmp = 0
          	if fmax(x, y) <= 0.0013:
          		tmp = (fmin(x, y) / t_0) * ((fmax(x, y) / (fmin(x, y) - -1.0)) / t_0)
          	elif fmax(x, y) <= 1.36e+105:
          		tmp = (fmax(x, y) / ((fmax(x, y) - -1.0) * (t_0 * t_0))) * fmin(x, y)
          	else:
          		tmp = -1.0 * ((fmin(x, y) / (-fmin(x, y) - fmax(x, y))) / (fmax(x, y) - (-1.0 - fmin(x, y))))
          	return tmp
          
          function code(x, y)
          	t_0 = Float64(fmin(x, y) + fmax(x, y))
          	tmp = 0.0
          	if (fmax(x, y) <= 0.0013)
          		tmp = Float64(Float64(fmin(x, y) / t_0) * Float64(Float64(fmax(x, y) / Float64(fmin(x, y) - -1.0)) / t_0));
          	elseif (fmax(x, y) <= 1.36e+105)
          		tmp = Float64(Float64(fmax(x, y) / Float64(Float64(fmax(x, y) - -1.0) * Float64(t_0 * t_0))) * fmin(x, y));
          	else
          		tmp = Float64(-1.0 * Float64(Float64(fmin(x, y) / Float64(Float64(-fmin(x, y)) - fmax(x, y))) / Float64(fmax(x, y) - Float64(-1.0 - fmin(x, y)))));
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y)
          	t_0 = min(x, y) + max(x, y);
          	tmp = 0.0;
          	if (max(x, y) <= 0.0013)
          		tmp = (min(x, y) / t_0) * ((max(x, y) / (min(x, y) - -1.0)) / t_0);
          	elseif (max(x, y) <= 1.36e+105)
          		tmp = (max(x, y) / ((max(x, y) - -1.0) * (t_0 * t_0))) * min(x, y);
          	else
          		tmp = -1.0 * ((min(x, y) / (-min(x, y) - max(x, y))) / (max(x, y) - (-1.0 - min(x, y))));
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_] := Block[{t$95$0 = N[(N[Min[x, y], $MachinePrecision] + N[Max[x, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Max[x, y], $MachinePrecision], 0.0013], N[(N[(N[Min[x, y], $MachinePrecision] / t$95$0), $MachinePrecision] * N[(N[(N[Max[x, y], $MachinePrecision] / N[(N[Min[x, y], $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Max[x, y], $MachinePrecision], 1.36e+105], N[(N[(N[Max[x, y], $MachinePrecision] / N[(N[(N[Max[x, y], $MachinePrecision] - -1.0), $MachinePrecision] * N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Min[x, y], $MachinePrecision]), $MachinePrecision], N[(-1.0 * N[(N[(N[Min[x, y], $MachinePrecision] / N[((-N[Min[x, y], $MachinePrecision]) - N[Max[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Max[x, y], $MachinePrecision] - N[(-1.0 - N[Min[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
          
          \begin{array}{l}
          t_0 := \mathsf{min}\left(x, y\right) + \mathsf{max}\left(x, y\right)\\
          \mathbf{if}\;\mathsf{max}\left(x, y\right) \leq 0.0013:\\
          \;\;\;\;\frac{\mathsf{min}\left(x, y\right)}{t\_0} \cdot \frac{\frac{\mathsf{max}\left(x, y\right)}{\mathsf{min}\left(x, y\right) - -1}}{t\_0}\\
          
          \mathbf{elif}\;\mathsf{max}\left(x, y\right) \leq 1.36 \cdot 10^{+105}:\\
          \;\;\;\;\frac{\mathsf{max}\left(x, y\right)}{\left(\mathsf{max}\left(x, y\right) - -1\right) \cdot \left(t\_0 \cdot t\_0\right)} \cdot \mathsf{min}\left(x, y\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;-1 \cdot \frac{\frac{\mathsf{min}\left(x, y\right)}{\left(-\mathsf{min}\left(x, y\right)\right) - \mathsf{max}\left(x, y\right)}}{\mathsf{max}\left(x, y\right) - \left(-1 - \mathsf{min}\left(x, y\right)\right)}\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if y < 0.0012999999999999999

            1. Initial program 68.3%

              \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
            2. Taylor expanded in y around 0

              \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(1 + x\right)}} \]
            3. Step-by-step derivation
              1. lower-+.f6458.0

                \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + \color{blue}{x}\right)} \]
            4. Applied rewrites58.0%

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

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

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

                \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + x\right)}} \]
              4. times-fracN/A

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

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

                \[\leadsto \frac{x \cdot \frac{y}{1 + x}}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}} \]
              7. times-fracN/A

                \[\leadsto \color{blue}{\frac{x}{x + y} \cdot \frac{\frac{y}{1 + x}}{x + y}} \]
              8. lift-+.f64N/A

                \[\leadsto \frac{x}{\color{blue}{x + y}} \cdot \frac{\frac{y}{1 + x}}{x + y} \]
              9. +-commutativeN/A

                \[\leadsto \frac{x}{\color{blue}{y + x}} \cdot \frac{\frac{y}{1 + x}}{x + y} \]
              10. add-flipN/A

                \[\leadsto \frac{x}{\color{blue}{y - \left(\mathsf{neg}\left(x\right)\right)}} \cdot \frac{\frac{y}{1 + x}}{x + y} \]
              11. lift-neg.f64N/A

                \[\leadsto \frac{x}{y - \color{blue}{\left(-x\right)}} \cdot \frac{\frac{y}{1 + x}}{x + y} \]
              12. sub-negate-revN/A

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

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

                \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{x}{\left(-x\right) - y}\right)\right)} \cdot \frac{\frac{y}{1 + x}}{x + y} \]
              15. lift-/.f64N/A

                \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{\left(-x\right) - y}}\right)\right) \cdot \frac{\frac{y}{1 + x}}{x + y} \]
              16. lower-*.f64N/A

                \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{x}{\left(-x\right) - y}\right)\right) \cdot \frac{\frac{y}{1 + x}}{x + y}} \]
            6. Applied rewrites75.1%

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

            if 0.0012999999999999999 < y < 1.3599999999999999e105

            1. Initial program 68.3%

              \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
            2. Taylor expanded in x around 0

              \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(1 + y\right)}} \]
            3. Step-by-step derivation
              1. lower-+.f6458.5

                \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + \color{blue}{y}\right)} \]
            4. Applied rewrites58.5%

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

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

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

                \[\leadsto \color{blue}{x \cdot \frac{y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + y\right)}} \]
              4. *-commutativeN/A

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

                \[\leadsto \color{blue}{\frac{y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + y\right)} \cdot x} \]
              6. lower-/.f6475.2

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

                \[\leadsto \frac{y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + y\right)}} \cdot x \]
              8. *-commutativeN/A

                \[\leadsto \frac{y}{\color{blue}{\left(1 + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \cdot x \]
              9. lower-*.f6475.2

                \[\leadsto \frac{y}{\color{blue}{\left(1 + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \cdot x \]
              10. lift-+.f64N/A

                \[\leadsto \frac{y}{\left(1 + \color{blue}{y}\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot x \]
              11. +-commutativeN/A

                \[\leadsto \frac{y}{\left(y + \color{blue}{1}\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot x \]
              12. add-flip-revN/A

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

                \[\leadsto \frac{y}{\left(y - -1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot x \]
              14. lower--.f6475.2

                \[\leadsto \frac{y}{\left(y - \color{blue}{-1}\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot x \]
            6. Applied rewrites75.2%

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

            if 1.3599999999999999e105 < y

            1. Initial program 68.3%

              \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
            2. Step-by-step derivation
              1. lift-/.f64N/A

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

                \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
              3. associate-/r*N/A

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

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

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

                \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}}}{\left(x + y\right) + 1} \]
              7. sqr-neg-revN/A

                \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(\mathsf{neg}\left(\left(x + y\right)\right)\right) \cdot \left(\mathsf{neg}\left(\left(x + y\right)\right)\right)}}}{\left(x + y\right) + 1} \]
              8. times-fracN/A

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

                \[\leadsto \color{blue}{\frac{y}{\mathsf{neg}\left(\left(x + y\right)\right)} \cdot \frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1}} \]
              10. lower-*.f64N/A

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

                \[\leadsto \color{blue}{\frac{y}{\mathsf{neg}\left(\left(x + y\right)\right)}} \cdot \frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1} \]
              12. lift-+.f64N/A

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

                \[\leadsto \frac{y}{\color{blue}{\left(\mathsf{neg}\left(x\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}} \cdot \frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1} \]
              14. sub-flip-reverseN/A

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

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

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

                \[\leadsto \frac{y}{\left(-x\right) - y} \cdot \color{blue}{\frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1}} \]
            3. Applied rewrites99.8%

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

              \[\leadsto \color{blue}{-1} \cdot \frac{\frac{x}{\left(-x\right) - y}}{y - \left(-1 - x\right)} \]
            5. Step-by-step derivation
              1. Applied rewrites51.8%

                \[\leadsto \color{blue}{-1} \cdot \frac{\frac{x}{\left(-x\right) - y}}{y - \left(-1 - x\right)} \]
            6. Recombined 3 regimes into one program.
            7. Add Preprocessing

            Alternative 8: 94.2% accurate, 0.4× speedup?

            \[\begin{array}{l} t_0 := \mathsf{min}\left(x, y\right) + \mathsf{max}\left(x, y\right)\\ t_1 := \mathsf{max}\left(x, y\right) + \mathsf{min}\left(x, y\right)\\ \mathbf{if}\;\mathsf{max}\left(x, y\right) \leq 0.0013:\\ \;\;\;\;\frac{\mathsf{min}\left(x, y\right)}{\mathsf{min}\left(x, y\right) - -1} \cdot \frac{\frac{\mathsf{max}\left(x, y\right)}{t\_1}}{t\_1}\\ \mathbf{elif}\;\mathsf{max}\left(x, y\right) \leq 1.36 \cdot 10^{+105}:\\ \;\;\;\;\frac{\mathsf{max}\left(x, y\right)}{\left(\mathsf{max}\left(x, y\right) - -1\right) \cdot \left(t\_0 \cdot t\_0\right)} \cdot \mathsf{min}\left(x, y\right)\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \frac{\frac{\mathsf{min}\left(x, y\right)}{\left(-\mathsf{min}\left(x, y\right)\right) - \mathsf{max}\left(x, y\right)}}{\mathsf{max}\left(x, y\right) - \left(-1 - \mathsf{min}\left(x, y\right)\right)}\\ \end{array} \]
            (FPCore (x y)
             :precision binary64
             (let* ((t_0 (+ (fmin x y) (fmax x y))) (t_1 (+ (fmax x y) (fmin x y))))
               (if (<= (fmax x y) 0.0013)
                 (* (/ (fmin x y) (- (fmin x y) -1.0)) (/ (/ (fmax x y) t_1) t_1))
                 (if (<= (fmax x y) 1.36e+105)
                   (* (/ (fmax x y) (* (- (fmax x y) -1.0) (* t_0 t_0))) (fmin x y))
                   (*
                    -1.0
                    (/
                     (/ (fmin x y) (- (- (fmin x y)) (fmax x y)))
                     (- (fmax x y) (- -1.0 (fmin x y)))))))))
            double code(double x, double y) {
            	double t_0 = fmin(x, y) + fmax(x, y);
            	double t_1 = fmax(x, y) + fmin(x, y);
            	double tmp;
            	if (fmax(x, y) <= 0.0013) {
            		tmp = (fmin(x, y) / (fmin(x, y) - -1.0)) * ((fmax(x, y) / t_1) / t_1);
            	} else if (fmax(x, y) <= 1.36e+105) {
            		tmp = (fmax(x, y) / ((fmax(x, y) - -1.0) * (t_0 * t_0))) * fmin(x, y);
            	} else {
            		tmp = -1.0 * ((fmin(x, y) / (-fmin(x, y) - fmax(x, y))) / (fmax(x, y) - (-1.0 - fmin(x, y))));
            	}
            	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)
            use fmin_fmax_functions
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8) :: t_0
                real(8) :: t_1
                real(8) :: tmp
                t_0 = fmin(x, y) + fmax(x, y)
                t_1 = fmax(x, y) + fmin(x, y)
                if (fmax(x, y) <= 0.0013d0) then
                    tmp = (fmin(x, y) / (fmin(x, y) - (-1.0d0))) * ((fmax(x, y) / t_1) / t_1)
                else if (fmax(x, y) <= 1.36d+105) then
                    tmp = (fmax(x, y) / ((fmax(x, y) - (-1.0d0)) * (t_0 * t_0))) * fmin(x, y)
                else
                    tmp = (-1.0d0) * ((fmin(x, y) / (-fmin(x, y) - fmax(x, y))) / (fmax(x, y) - ((-1.0d0) - fmin(x, y))))
                end if
                code = tmp
            end function
            
            public static double code(double x, double y) {
            	double t_0 = fmin(x, y) + fmax(x, y);
            	double t_1 = fmax(x, y) + fmin(x, y);
            	double tmp;
            	if (fmax(x, y) <= 0.0013) {
            		tmp = (fmin(x, y) / (fmin(x, y) - -1.0)) * ((fmax(x, y) / t_1) / t_1);
            	} else if (fmax(x, y) <= 1.36e+105) {
            		tmp = (fmax(x, y) / ((fmax(x, y) - -1.0) * (t_0 * t_0))) * fmin(x, y);
            	} else {
            		tmp = -1.0 * ((fmin(x, y) / (-fmin(x, y) - fmax(x, y))) / (fmax(x, y) - (-1.0 - fmin(x, y))));
            	}
            	return tmp;
            }
            
            def code(x, y):
            	t_0 = fmin(x, y) + fmax(x, y)
            	t_1 = fmax(x, y) + fmin(x, y)
            	tmp = 0
            	if fmax(x, y) <= 0.0013:
            		tmp = (fmin(x, y) / (fmin(x, y) - -1.0)) * ((fmax(x, y) / t_1) / t_1)
            	elif fmax(x, y) <= 1.36e+105:
            		tmp = (fmax(x, y) / ((fmax(x, y) - -1.0) * (t_0 * t_0))) * fmin(x, y)
            	else:
            		tmp = -1.0 * ((fmin(x, y) / (-fmin(x, y) - fmax(x, y))) / (fmax(x, y) - (-1.0 - fmin(x, y))))
            	return tmp
            
            function code(x, y)
            	t_0 = Float64(fmin(x, y) + fmax(x, y))
            	t_1 = Float64(fmax(x, y) + fmin(x, y))
            	tmp = 0.0
            	if (fmax(x, y) <= 0.0013)
            		tmp = Float64(Float64(fmin(x, y) / Float64(fmin(x, y) - -1.0)) * Float64(Float64(fmax(x, y) / t_1) / t_1));
            	elseif (fmax(x, y) <= 1.36e+105)
            		tmp = Float64(Float64(fmax(x, y) / Float64(Float64(fmax(x, y) - -1.0) * Float64(t_0 * t_0))) * fmin(x, y));
            	else
            		tmp = Float64(-1.0 * Float64(Float64(fmin(x, y) / Float64(Float64(-fmin(x, y)) - fmax(x, y))) / Float64(fmax(x, y) - Float64(-1.0 - fmin(x, y)))));
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y)
            	t_0 = min(x, y) + max(x, y);
            	t_1 = max(x, y) + min(x, y);
            	tmp = 0.0;
            	if (max(x, y) <= 0.0013)
            		tmp = (min(x, y) / (min(x, y) - -1.0)) * ((max(x, y) / t_1) / t_1);
            	elseif (max(x, y) <= 1.36e+105)
            		tmp = (max(x, y) / ((max(x, y) - -1.0) * (t_0 * t_0))) * min(x, y);
            	else
            		tmp = -1.0 * ((min(x, y) / (-min(x, y) - max(x, y))) / (max(x, y) - (-1.0 - min(x, y))));
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_] := Block[{t$95$0 = N[(N[Min[x, y], $MachinePrecision] + N[Max[x, y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Max[x, y], $MachinePrecision] + N[Min[x, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Max[x, y], $MachinePrecision], 0.0013], N[(N[(N[Min[x, y], $MachinePrecision] / N[(N[Min[x, y], $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Max[x, y], $MachinePrecision] / t$95$1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Max[x, y], $MachinePrecision], 1.36e+105], N[(N[(N[Max[x, y], $MachinePrecision] / N[(N[(N[Max[x, y], $MachinePrecision] - -1.0), $MachinePrecision] * N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Min[x, y], $MachinePrecision]), $MachinePrecision], N[(-1.0 * N[(N[(N[Min[x, y], $MachinePrecision] / N[((-N[Min[x, y], $MachinePrecision]) - N[Max[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Max[x, y], $MachinePrecision] - N[(-1.0 - N[Min[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
            
            \begin{array}{l}
            t_0 := \mathsf{min}\left(x, y\right) + \mathsf{max}\left(x, y\right)\\
            t_1 := \mathsf{max}\left(x, y\right) + \mathsf{min}\left(x, y\right)\\
            \mathbf{if}\;\mathsf{max}\left(x, y\right) \leq 0.0013:\\
            \;\;\;\;\frac{\mathsf{min}\left(x, y\right)}{\mathsf{min}\left(x, y\right) - -1} \cdot \frac{\frac{\mathsf{max}\left(x, y\right)}{t\_1}}{t\_1}\\
            
            \mathbf{elif}\;\mathsf{max}\left(x, y\right) \leq 1.36 \cdot 10^{+105}:\\
            \;\;\;\;\frac{\mathsf{max}\left(x, y\right)}{\left(\mathsf{max}\left(x, y\right) - -1\right) \cdot \left(t\_0 \cdot t\_0\right)} \cdot \mathsf{min}\left(x, y\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;-1 \cdot \frac{\frac{\mathsf{min}\left(x, y\right)}{\left(-\mathsf{min}\left(x, y\right)\right) - \mathsf{max}\left(x, y\right)}}{\mathsf{max}\left(x, y\right) - \left(-1 - \mathsf{min}\left(x, y\right)\right)}\\
            
            
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if y < 0.0012999999999999999

              1. Initial program 68.3%

                \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
              2. Taylor expanded in y around 0

                \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(1 + x\right)}} \]
              3. Step-by-step derivation
                1. lower-+.f6458.0

                  \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + \color{blue}{x}\right)} \]
              4. Applied rewrites58.0%

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

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

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

                  \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + x\right)}} \]
                4. times-fracN/A

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

                  \[\leadsto \frac{x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{1 + x} \]
                6. associate-/r*N/A

                  \[\leadsto \color{blue}{\frac{\frac{x}{x + y}}{x + y}} \cdot \frac{y}{1 + x} \]
                7. lift-+.f64N/A

                  \[\leadsto \frac{\frac{x}{\color{blue}{x + y}}}{x + y} \cdot \frac{y}{1 + x} \]
                8. +-commutativeN/A

                  \[\leadsto \frac{\frac{x}{\color{blue}{y + x}}}{x + y} \cdot \frac{y}{1 + x} \]
                9. add-flipN/A

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

                  \[\leadsto \frac{\frac{x}{y - \color{blue}{\left(-x\right)}}}{x + y} \cdot \frac{y}{1 + x} \]
                11. sub-negate-revN/A

                  \[\leadsto \frac{\frac{x}{\color{blue}{\mathsf{neg}\left(\left(\left(-x\right) - y\right)\right)}}}{x + y} \cdot \frac{y}{1 + x} \]
                12. lift--.f64N/A

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

                  \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\frac{x}{\left(-x\right) - y}\right)}}{x + y} \cdot \frac{y}{1 + x} \]
                14. lift-/.f64N/A

                  \[\leadsto \frac{\mathsf{neg}\left(\color{blue}{\frac{x}{\left(-x\right) - y}}\right)}{x + y} \cdot \frac{y}{1 + x} \]
                15. frac-timesN/A

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

                  \[\leadsto \color{blue}{\frac{\left(\mathsf{neg}\left(\frac{x}{\left(-x\right) - y}\right)\right) \cdot y}{\left(x + y\right) \cdot \left(1 + x\right)}} \]
              6. Applied rewrites75.8%

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

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

                  \[\leadsto \frac{\color{blue}{\frac{x}{x + y} \cdot y}}{\left(x - -1\right) \cdot \left(x + y\right)} \]
                3. lift-/.f64N/A

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

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

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

                  \[\leadsto \frac{x \cdot \frac{y}{x + y}}{\color{blue}{\left(x - -1\right) \cdot \left(x + y\right)}} \]
                7. times-fracN/A

                  \[\leadsto \color{blue}{\frac{x}{x - -1} \cdot \frac{\frac{y}{x + y}}{x + y}} \]
                8. lower-*.f64N/A

                  \[\leadsto \color{blue}{\frac{x}{x - -1} \cdot \frac{\frac{y}{x + y}}{x + y}} \]
                9. lower-/.f64N/A

                  \[\leadsto \color{blue}{\frac{x}{x - -1}} \cdot \frac{\frac{y}{x + y}}{x + y} \]
                10. lower-/.f64N/A

                  \[\leadsto \frac{x}{x - -1} \cdot \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \]
                11. lower-/.f6475.0

                  \[\leadsto \frac{x}{x - -1} \cdot \frac{\color{blue}{\frac{y}{x + y}}}{x + y} \]
                12. lift-+.f64N/A

                  \[\leadsto \frac{x}{x - -1} \cdot \frac{\frac{y}{\color{blue}{x + y}}}{x + y} \]
                13. +-commutativeN/A

                  \[\leadsto \frac{x}{x - -1} \cdot \frac{\frac{y}{\color{blue}{y + x}}}{x + y} \]
                14. lower-+.f6475.0

                  \[\leadsto \frac{x}{x - -1} \cdot \frac{\frac{y}{\color{blue}{y + x}}}{x + y} \]
                15. lift-+.f64N/A

                  \[\leadsto \frac{x}{x - -1} \cdot \frac{\frac{y}{y + x}}{\color{blue}{x + y}} \]
                16. +-commutativeN/A

                  \[\leadsto \frac{x}{x - -1} \cdot \frac{\frac{y}{y + x}}{\color{blue}{y + x}} \]
                17. lower-+.f6475.0

                  \[\leadsto \frac{x}{x - -1} \cdot \frac{\frac{y}{y + x}}{\color{blue}{y + x}} \]
              8. Applied rewrites75.0%

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

              if 0.0012999999999999999 < y < 1.3599999999999999e105

              1. Initial program 68.3%

                \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
              2. Taylor expanded in x around 0

                \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(1 + y\right)}} \]
              3. Step-by-step derivation
                1. lower-+.f6458.5

                  \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + \color{blue}{y}\right)} \]
              4. Applied rewrites58.5%

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

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

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

                  \[\leadsto \color{blue}{x \cdot \frac{y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + y\right)}} \]
                4. *-commutativeN/A

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

                  \[\leadsto \color{blue}{\frac{y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + y\right)} \cdot x} \]
                6. lower-/.f6475.2

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

                  \[\leadsto \frac{y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + y\right)}} \cdot x \]
                8. *-commutativeN/A

                  \[\leadsto \frac{y}{\color{blue}{\left(1 + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \cdot x \]
                9. lower-*.f6475.2

                  \[\leadsto \frac{y}{\color{blue}{\left(1 + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \cdot x \]
                10. lift-+.f64N/A

                  \[\leadsto \frac{y}{\left(1 + \color{blue}{y}\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot x \]
                11. +-commutativeN/A

                  \[\leadsto \frac{y}{\left(y + \color{blue}{1}\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot x \]
                12. add-flip-revN/A

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

                  \[\leadsto \frac{y}{\left(y - -1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot x \]
                14. lower--.f6475.2

                  \[\leadsto \frac{y}{\left(y - \color{blue}{-1}\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot x \]
              6. Applied rewrites75.2%

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

              if 1.3599999999999999e105 < y

              1. Initial program 68.3%

                \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
              2. Step-by-step derivation
                1. lift-/.f64N/A

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

                  \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
                3. associate-/r*N/A

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

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

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

                  \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}}}{\left(x + y\right) + 1} \]
                7. sqr-neg-revN/A

                  \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(\mathsf{neg}\left(\left(x + y\right)\right)\right) \cdot \left(\mathsf{neg}\left(\left(x + y\right)\right)\right)}}}{\left(x + y\right) + 1} \]
                8. times-fracN/A

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

                  \[\leadsto \color{blue}{\frac{y}{\mathsf{neg}\left(\left(x + y\right)\right)} \cdot \frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1}} \]
                10. lower-*.f64N/A

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

                  \[\leadsto \color{blue}{\frac{y}{\mathsf{neg}\left(\left(x + y\right)\right)}} \cdot \frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1} \]
                12. lift-+.f64N/A

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

                  \[\leadsto \frac{y}{\color{blue}{\left(\mathsf{neg}\left(x\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}} \cdot \frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1} \]
                14. sub-flip-reverseN/A

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

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

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

                  \[\leadsto \frac{y}{\left(-x\right) - y} \cdot \color{blue}{\frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1}} \]
              3. Applied rewrites99.8%

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

                \[\leadsto \color{blue}{-1} \cdot \frac{\frac{x}{\left(-x\right) - y}}{y - \left(-1 - x\right)} \]
              5. Step-by-step derivation
                1. Applied rewrites51.8%

                  \[\leadsto \color{blue}{-1} \cdot \frac{\frac{x}{\left(-x\right) - y}}{y - \left(-1 - x\right)} \]
              6. Recombined 3 regimes into one program.
              7. Add Preprocessing

              Alternative 9: 91.6% accurate, 0.3× speedup?

              \[\begin{array}{l} t_0 := \mathsf{min}\left(x, y\right) + \mathsf{max}\left(x, y\right)\\ t_1 := t\_0 \cdot t\_0\\ \mathbf{if}\;\mathsf{max}\left(x, y\right) \leq -9.5 \cdot 10^{-277}:\\ \;\;\;\;\frac{\frac{\mathsf{max}\left(x, y\right)}{1 + \mathsf{min}\left(x, y\right)}}{\mathsf{max}\left(x, y\right) + \mathsf{min}\left(x, y\right)}\\ \mathbf{elif}\;\mathsf{max}\left(x, y\right) \leq 1.6 \cdot 10^{-172}:\\ \;\;\;\;\frac{\frac{\mathsf{min}\left(x, y\right)}{t\_0} \cdot \mathsf{max}\left(x, y\right)}{1 \cdot t\_0}\\ \mathbf{elif}\;\mathsf{max}\left(x, y\right) \leq 0.0235:\\ \;\;\;\;\mathsf{max}\left(x, y\right) \cdot \frac{\mathsf{min}\left(x, y\right)}{\left(\mathsf{min}\left(x, y\right) - -1\right) \cdot t\_1}\\ \mathbf{elif}\;\mathsf{max}\left(x, y\right) \leq 1.36 \cdot 10^{+105}:\\ \;\;\;\;\frac{\mathsf{max}\left(x, y\right)}{\left(\mathsf{max}\left(x, y\right) - -1\right) \cdot t\_1} \cdot \mathsf{min}\left(x, y\right)\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \frac{\frac{\mathsf{min}\left(x, y\right)}{\left(-\mathsf{min}\left(x, y\right)\right) - \mathsf{max}\left(x, y\right)}}{\mathsf{max}\left(x, y\right) - \left(-1 - \mathsf{min}\left(x, y\right)\right)}\\ \end{array} \]
              (FPCore (x y)
               :precision binary64
               (let* ((t_0 (+ (fmin x y) (fmax x y))) (t_1 (* t_0 t_0)))
                 (if (<= (fmax x y) -9.5e-277)
                   (/ (/ (fmax x y) (+ 1.0 (fmin x y))) (+ (fmax x y) (fmin x y)))
                   (if (<= (fmax x y) 1.6e-172)
                     (/ (* (/ (fmin x y) t_0) (fmax x y)) (* 1.0 t_0))
                     (if (<= (fmax x y) 0.0235)
                       (* (fmax x y) (/ (fmin x y) (* (- (fmin x y) -1.0) t_1)))
                       (if (<= (fmax x y) 1.36e+105)
                         (* (/ (fmax x y) (* (- (fmax x y) -1.0) t_1)) (fmin x y))
                         (*
                          -1.0
                          (/
                           (/ (fmin x y) (- (- (fmin x y)) (fmax x y)))
                           (- (fmax x y) (- -1.0 (fmin x y)))))))))))
              double code(double x, double y) {
              	double t_0 = fmin(x, y) + fmax(x, y);
              	double t_1 = t_0 * t_0;
              	double tmp;
              	if (fmax(x, y) <= -9.5e-277) {
              		tmp = (fmax(x, y) / (1.0 + fmin(x, y))) / (fmax(x, y) + fmin(x, y));
              	} else if (fmax(x, y) <= 1.6e-172) {
              		tmp = ((fmin(x, y) / t_0) * fmax(x, y)) / (1.0 * t_0);
              	} else if (fmax(x, y) <= 0.0235) {
              		tmp = fmax(x, y) * (fmin(x, y) / ((fmin(x, y) - -1.0) * t_1));
              	} else if (fmax(x, y) <= 1.36e+105) {
              		tmp = (fmax(x, y) / ((fmax(x, y) - -1.0) * t_1)) * fmin(x, y);
              	} else {
              		tmp = -1.0 * ((fmin(x, y) / (-fmin(x, y) - fmax(x, y))) / (fmax(x, y) - (-1.0 - fmin(x, y))));
              	}
              	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)
              use fmin_fmax_functions
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  real(8) :: t_0
                  real(8) :: t_1
                  real(8) :: tmp
                  t_0 = fmin(x, y) + fmax(x, y)
                  t_1 = t_0 * t_0
                  if (fmax(x, y) <= (-9.5d-277)) then
                      tmp = (fmax(x, y) / (1.0d0 + fmin(x, y))) / (fmax(x, y) + fmin(x, y))
                  else if (fmax(x, y) <= 1.6d-172) then
                      tmp = ((fmin(x, y) / t_0) * fmax(x, y)) / (1.0d0 * t_0)
                  else if (fmax(x, y) <= 0.0235d0) then
                      tmp = fmax(x, y) * (fmin(x, y) / ((fmin(x, y) - (-1.0d0)) * t_1))
                  else if (fmax(x, y) <= 1.36d+105) then
                      tmp = (fmax(x, y) / ((fmax(x, y) - (-1.0d0)) * t_1)) * fmin(x, y)
                  else
                      tmp = (-1.0d0) * ((fmin(x, y) / (-fmin(x, y) - fmax(x, y))) / (fmax(x, y) - ((-1.0d0) - fmin(x, y))))
                  end if
                  code = tmp
              end function
              
              public static double code(double x, double y) {
              	double t_0 = fmin(x, y) + fmax(x, y);
              	double t_1 = t_0 * t_0;
              	double tmp;
              	if (fmax(x, y) <= -9.5e-277) {
              		tmp = (fmax(x, y) / (1.0 + fmin(x, y))) / (fmax(x, y) + fmin(x, y));
              	} else if (fmax(x, y) <= 1.6e-172) {
              		tmp = ((fmin(x, y) / t_0) * fmax(x, y)) / (1.0 * t_0);
              	} else if (fmax(x, y) <= 0.0235) {
              		tmp = fmax(x, y) * (fmin(x, y) / ((fmin(x, y) - -1.0) * t_1));
              	} else if (fmax(x, y) <= 1.36e+105) {
              		tmp = (fmax(x, y) / ((fmax(x, y) - -1.0) * t_1)) * fmin(x, y);
              	} else {
              		tmp = -1.0 * ((fmin(x, y) / (-fmin(x, y) - fmax(x, y))) / (fmax(x, y) - (-1.0 - fmin(x, y))));
              	}
              	return tmp;
              }
              
              def code(x, y):
              	t_0 = fmin(x, y) + fmax(x, y)
              	t_1 = t_0 * t_0
              	tmp = 0
              	if fmax(x, y) <= -9.5e-277:
              		tmp = (fmax(x, y) / (1.0 + fmin(x, y))) / (fmax(x, y) + fmin(x, y))
              	elif fmax(x, y) <= 1.6e-172:
              		tmp = ((fmin(x, y) / t_0) * fmax(x, y)) / (1.0 * t_0)
              	elif fmax(x, y) <= 0.0235:
              		tmp = fmax(x, y) * (fmin(x, y) / ((fmin(x, y) - -1.0) * t_1))
              	elif fmax(x, y) <= 1.36e+105:
              		tmp = (fmax(x, y) / ((fmax(x, y) - -1.0) * t_1)) * fmin(x, y)
              	else:
              		tmp = -1.0 * ((fmin(x, y) / (-fmin(x, y) - fmax(x, y))) / (fmax(x, y) - (-1.0 - fmin(x, y))))
              	return tmp
              
              function code(x, y)
              	t_0 = Float64(fmin(x, y) + fmax(x, y))
              	t_1 = Float64(t_0 * t_0)
              	tmp = 0.0
              	if (fmax(x, y) <= -9.5e-277)
              		tmp = Float64(Float64(fmax(x, y) / Float64(1.0 + fmin(x, y))) / Float64(fmax(x, y) + fmin(x, y)));
              	elseif (fmax(x, y) <= 1.6e-172)
              		tmp = Float64(Float64(Float64(fmin(x, y) / t_0) * fmax(x, y)) / Float64(1.0 * t_0));
              	elseif (fmax(x, y) <= 0.0235)
              		tmp = Float64(fmax(x, y) * Float64(fmin(x, y) / Float64(Float64(fmin(x, y) - -1.0) * t_1)));
              	elseif (fmax(x, y) <= 1.36e+105)
              		tmp = Float64(Float64(fmax(x, y) / Float64(Float64(fmax(x, y) - -1.0) * t_1)) * fmin(x, y));
              	else
              		tmp = Float64(-1.0 * Float64(Float64(fmin(x, y) / Float64(Float64(-fmin(x, y)) - fmax(x, y))) / Float64(fmax(x, y) - Float64(-1.0 - fmin(x, y)))));
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y)
              	t_0 = min(x, y) + max(x, y);
              	t_1 = t_0 * t_0;
              	tmp = 0.0;
              	if (max(x, y) <= -9.5e-277)
              		tmp = (max(x, y) / (1.0 + min(x, y))) / (max(x, y) + min(x, y));
              	elseif (max(x, y) <= 1.6e-172)
              		tmp = ((min(x, y) / t_0) * max(x, y)) / (1.0 * t_0);
              	elseif (max(x, y) <= 0.0235)
              		tmp = max(x, y) * (min(x, y) / ((min(x, y) - -1.0) * t_1));
              	elseif (max(x, y) <= 1.36e+105)
              		tmp = (max(x, y) / ((max(x, y) - -1.0) * t_1)) * min(x, y);
              	else
              		tmp = -1.0 * ((min(x, y) / (-min(x, y) - max(x, y))) / (max(x, y) - (-1.0 - min(x, y))));
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_] := Block[{t$95$0 = N[(N[Min[x, y], $MachinePrecision] + N[Max[x, y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * t$95$0), $MachinePrecision]}, If[LessEqual[N[Max[x, y], $MachinePrecision], -9.5e-277], N[(N[(N[Max[x, y], $MachinePrecision] / N[(1.0 + N[Min[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Max[x, y], $MachinePrecision] + N[Min[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Max[x, y], $MachinePrecision], 1.6e-172], N[(N[(N[(N[Min[x, y], $MachinePrecision] / t$95$0), $MachinePrecision] * N[Max[x, y], $MachinePrecision]), $MachinePrecision] / N[(1.0 * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Max[x, y], $MachinePrecision], 0.0235], N[(N[Max[x, y], $MachinePrecision] * N[(N[Min[x, y], $MachinePrecision] / N[(N[(N[Min[x, y], $MachinePrecision] - -1.0), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Max[x, y], $MachinePrecision], 1.36e+105], N[(N[(N[Max[x, y], $MachinePrecision] / N[(N[(N[Max[x, y], $MachinePrecision] - -1.0), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision] * N[Min[x, y], $MachinePrecision]), $MachinePrecision], N[(-1.0 * N[(N[(N[Min[x, y], $MachinePrecision] / N[((-N[Min[x, y], $MachinePrecision]) - N[Max[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Max[x, y], $MachinePrecision] - N[(-1.0 - N[Min[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
              
              \begin{array}{l}
              t_0 := \mathsf{min}\left(x, y\right) + \mathsf{max}\left(x, y\right)\\
              t_1 := t\_0 \cdot t\_0\\
              \mathbf{if}\;\mathsf{max}\left(x, y\right) \leq -9.5 \cdot 10^{-277}:\\
              \;\;\;\;\frac{\frac{\mathsf{max}\left(x, y\right)}{1 + \mathsf{min}\left(x, y\right)}}{\mathsf{max}\left(x, y\right) + \mathsf{min}\left(x, y\right)}\\
              
              \mathbf{elif}\;\mathsf{max}\left(x, y\right) \leq 1.6 \cdot 10^{-172}:\\
              \;\;\;\;\frac{\frac{\mathsf{min}\left(x, y\right)}{t\_0} \cdot \mathsf{max}\left(x, y\right)}{1 \cdot t\_0}\\
              
              \mathbf{elif}\;\mathsf{max}\left(x, y\right) \leq 0.0235:\\
              \;\;\;\;\mathsf{max}\left(x, y\right) \cdot \frac{\mathsf{min}\left(x, y\right)}{\left(\mathsf{min}\left(x, y\right) - -1\right) \cdot t\_1}\\
              
              \mathbf{elif}\;\mathsf{max}\left(x, y\right) \leq 1.36 \cdot 10^{+105}:\\
              \;\;\;\;\frac{\mathsf{max}\left(x, y\right)}{\left(\mathsf{max}\left(x, y\right) - -1\right) \cdot t\_1} \cdot \mathsf{min}\left(x, y\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;-1 \cdot \frac{\frac{\mathsf{min}\left(x, y\right)}{\left(-\mathsf{min}\left(x, y\right)\right) - \mathsf{max}\left(x, y\right)}}{\mathsf{max}\left(x, y\right) - \left(-1 - \mathsf{min}\left(x, y\right)\right)}\\
              
              
              \end{array}
              
              Derivation
              1. Split input into 5 regimes
              2. if y < -9.5e-277

                1. Initial program 68.3%

                  \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                2. Step-by-step derivation
                  1. lift-/.f64N/A

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

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

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

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

                    \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right) \cdot \left(x + y\right)}} \]
                  6. associate-/r*N/A

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

                    \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}}{x + y}} \]
                3. Applied rewrites73.6%

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

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

                    \[\leadsto \frac{\frac{y}{\color{blue}{1 + x}}}{y + x} \]
                  2. lower-+.f6450.7

                    \[\leadsto \frac{\frac{y}{1 + \color{blue}{x}}}{y + x} \]
                6. Applied rewrites50.7%

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

                if -9.5e-277 < y < 1.6000000000000001e-172

                1. Initial program 68.3%

                  \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                2. Taylor expanded in y around 0

                  \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(1 + x\right)}} \]
                3. Step-by-step derivation
                  1. lower-+.f6458.0

                    \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + \color{blue}{x}\right)} \]
                4. Applied rewrites58.0%

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

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

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

                    \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + x\right)}} \]
                  4. times-fracN/A

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

                    \[\leadsto \frac{x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{1 + x} \]
                  6. associate-/r*N/A

                    \[\leadsto \color{blue}{\frac{\frac{x}{x + y}}{x + y}} \cdot \frac{y}{1 + x} \]
                  7. lift-+.f64N/A

                    \[\leadsto \frac{\frac{x}{\color{blue}{x + y}}}{x + y} \cdot \frac{y}{1 + x} \]
                  8. +-commutativeN/A

                    \[\leadsto \frac{\frac{x}{\color{blue}{y + x}}}{x + y} \cdot \frac{y}{1 + x} \]
                  9. add-flipN/A

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

                    \[\leadsto \frac{\frac{x}{y - \color{blue}{\left(-x\right)}}}{x + y} \cdot \frac{y}{1 + x} \]
                  11. sub-negate-revN/A

                    \[\leadsto \frac{\frac{x}{\color{blue}{\mathsf{neg}\left(\left(\left(-x\right) - y\right)\right)}}}{x + y} \cdot \frac{y}{1 + x} \]
                  12. lift--.f64N/A

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

                    \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\frac{x}{\left(-x\right) - y}\right)}}{x + y} \cdot \frac{y}{1 + x} \]
                  14. lift-/.f64N/A

                    \[\leadsto \frac{\mathsf{neg}\left(\color{blue}{\frac{x}{\left(-x\right) - y}}\right)}{x + y} \cdot \frac{y}{1 + x} \]
                  15. frac-timesN/A

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

                    \[\leadsto \color{blue}{\frac{\left(\mathsf{neg}\left(\frac{x}{\left(-x\right) - y}\right)\right) \cdot y}{\left(x + y\right) \cdot \left(1 + x\right)}} \]
                6. Applied rewrites75.8%

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

                  \[\leadsto \frac{\frac{x}{x + y} \cdot y}{1 \cdot \left(x + y\right)} \]
                8. Step-by-step derivation
                  1. Applied rewrites50.8%

                    \[\leadsto \frac{\frac{x}{x + y} \cdot y}{1 \cdot \left(x + y\right)} \]

                  if 1.6000000000000001e-172 < y < 0.0235

                  1. Initial program 68.3%

                    \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                  2. Taylor expanded in y around 0

                    \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(1 + x\right)}} \]
                  3. Step-by-step derivation
                    1. lower-+.f6458.0

                      \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + \color{blue}{x}\right)} \]
                  4. Applied rewrites58.0%

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

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

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

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

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

                      \[\leadsto \color{blue}{y \cdot \frac{x}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + x\right)}} \]
                    6. lower-/.f6475.0

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

                      \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + x\right)}} \]
                    8. *-commutativeN/A

                      \[\leadsto y \cdot \frac{x}{\color{blue}{\left(1 + x\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
                    9. lower-*.f6475.0

                      \[\leadsto y \cdot \frac{x}{\color{blue}{\left(1 + x\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
                    10. lift-+.f64N/A

                      \[\leadsto y \cdot \frac{x}{\left(1 + \color{blue}{x}\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
                    11. +-commutativeN/A

                      \[\leadsto y \cdot \frac{x}{\left(x + \color{blue}{1}\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
                    12. add-flip-revN/A

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

                      \[\leadsto y \cdot \frac{x}{\left(x - -1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
                    14. lower--.f6475.0

                      \[\leadsto y \cdot \frac{x}{\left(x - \color{blue}{-1}\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
                  6. Applied rewrites75.0%

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

                  if 0.0235 < y < 1.3599999999999999e105

                  1. Initial program 68.3%

                    \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                  2. Taylor expanded in x around 0

                    \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(1 + y\right)}} \]
                  3. Step-by-step derivation
                    1. lower-+.f6458.5

                      \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + \color{blue}{y}\right)} \]
                  4. Applied rewrites58.5%

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

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

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

                      \[\leadsto \color{blue}{x \cdot \frac{y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + y\right)}} \]
                    4. *-commutativeN/A

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

                      \[\leadsto \color{blue}{\frac{y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + y\right)} \cdot x} \]
                    6. lower-/.f6475.2

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

                      \[\leadsto \frac{y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + y\right)}} \cdot x \]
                    8. *-commutativeN/A

                      \[\leadsto \frac{y}{\color{blue}{\left(1 + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \cdot x \]
                    9. lower-*.f6475.2

                      \[\leadsto \frac{y}{\color{blue}{\left(1 + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \cdot x \]
                    10. lift-+.f64N/A

                      \[\leadsto \frac{y}{\left(1 + \color{blue}{y}\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot x \]
                    11. +-commutativeN/A

                      \[\leadsto \frac{y}{\left(y + \color{blue}{1}\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot x \]
                    12. add-flip-revN/A

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

                      \[\leadsto \frac{y}{\left(y - -1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot x \]
                    14. lower--.f6475.2

                      \[\leadsto \frac{y}{\left(y - \color{blue}{-1}\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot x \]
                  6. Applied rewrites75.2%

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

                  if 1.3599999999999999e105 < y

                  1. Initial program 68.3%

                    \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                  2. Step-by-step derivation
                    1. lift-/.f64N/A

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

                      \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
                    3. associate-/r*N/A

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

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

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

                      \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}}}{\left(x + y\right) + 1} \]
                    7. sqr-neg-revN/A

                      \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(\mathsf{neg}\left(\left(x + y\right)\right)\right) \cdot \left(\mathsf{neg}\left(\left(x + y\right)\right)\right)}}}{\left(x + y\right) + 1} \]
                    8. times-fracN/A

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

                      \[\leadsto \color{blue}{\frac{y}{\mathsf{neg}\left(\left(x + y\right)\right)} \cdot \frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1}} \]
                    10. lower-*.f64N/A

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

                      \[\leadsto \color{blue}{\frac{y}{\mathsf{neg}\left(\left(x + y\right)\right)}} \cdot \frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1} \]
                    12. lift-+.f64N/A

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

                      \[\leadsto \frac{y}{\color{blue}{\left(\mathsf{neg}\left(x\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}} \cdot \frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1} \]
                    14. sub-flip-reverseN/A

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

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

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

                      \[\leadsto \frac{y}{\left(-x\right) - y} \cdot \color{blue}{\frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1}} \]
                  3. Applied rewrites99.8%

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

                    \[\leadsto \color{blue}{-1} \cdot \frac{\frac{x}{\left(-x\right) - y}}{y - \left(-1 - x\right)} \]
                  5. Step-by-step derivation
                    1. Applied rewrites51.8%

                      \[\leadsto \color{blue}{-1} \cdot \frac{\frac{x}{\left(-x\right) - y}}{y - \left(-1 - x\right)} \]
                  6. Recombined 5 regimes into one program.
                  7. Add Preprocessing

                  Alternative 10: 89.8% accurate, 0.4× speedup?

                  \[\begin{array}{l} t_0 := \mathsf{min}\left(x, y\right) + \mathsf{max}\left(x, y\right)\\ \mathbf{if}\;\mathsf{max}\left(x, y\right) \leq -9.5 \cdot 10^{-277}:\\ \;\;\;\;\frac{\frac{\mathsf{max}\left(x, y\right)}{1 + \mathsf{min}\left(x, y\right)}}{\mathsf{max}\left(x, y\right) + \mathsf{min}\left(x, y\right)}\\ \mathbf{elif}\;\mathsf{max}\left(x, y\right) \leq 1.6 \cdot 10^{-172}:\\ \;\;\;\;\frac{\frac{\mathsf{min}\left(x, y\right)}{t\_0} \cdot \mathsf{max}\left(x, y\right)}{1 \cdot t\_0}\\ \mathbf{elif}\;\mathsf{max}\left(x, y\right) \leq 1.36 \cdot 10^{+105}:\\ \;\;\;\;\frac{\mathsf{max}\left(x, y\right)}{\left(\mathsf{max}\left(x, y\right) - -1\right) \cdot \left(t\_0 \cdot t\_0\right)} \cdot \mathsf{min}\left(x, y\right)\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \frac{\frac{\mathsf{min}\left(x, y\right)}{\left(-\mathsf{min}\left(x, y\right)\right) - \mathsf{max}\left(x, y\right)}}{\mathsf{max}\left(x, y\right) - \left(-1 - \mathsf{min}\left(x, y\right)\right)}\\ \end{array} \]
                  (FPCore (x y)
                   :precision binary64
                   (let* ((t_0 (+ (fmin x y) (fmax x y))))
                     (if (<= (fmax x y) -9.5e-277)
                       (/ (/ (fmax x y) (+ 1.0 (fmin x y))) (+ (fmax x y) (fmin x y)))
                       (if (<= (fmax x y) 1.6e-172)
                         (/ (* (/ (fmin x y) t_0) (fmax x y)) (* 1.0 t_0))
                         (if (<= (fmax x y) 1.36e+105)
                           (* (/ (fmax x y) (* (- (fmax x y) -1.0) (* t_0 t_0))) (fmin x y))
                           (*
                            -1.0
                            (/
                             (/ (fmin x y) (- (- (fmin x y)) (fmax x y)))
                             (- (fmax x y) (- -1.0 (fmin x y))))))))))
                  double code(double x, double y) {
                  	double t_0 = fmin(x, y) + fmax(x, y);
                  	double tmp;
                  	if (fmax(x, y) <= -9.5e-277) {
                  		tmp = (fmax(x, y) / (1.0 + fmin(x, y))) / (fmax(x, y) + fmin(x, y));
                  	} else if (fmax(x, y) <= 1.6e-172) {
                  		tmp = ((fmin(x, y) / t_0) * fmax(x, y)) / (1.0 * t_0);
                  	} else if (fmax(x, y) <= 1.36e+105) {
                  		tmp = (fmax(x, y) / ((fmax(x, y) - -1.0) * (t_0 * t_0))) * fmin(x, y);
                  	} else {
                  		tmp = -1.0 * ((fmin(x, y) / (-fmin(x, y) - fmax(x, y))) / (fmax(x, y) - (-1.0 - fmin(x, y))));
                  	}
                  	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)
                  use fmin_fmax_functions
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      real(8) :: t_0
                      real(8) :: tmp
                      t_0 = fmin(x, y) + fmax(x, y)
                      if (fmax(x, y) <= (-9.5d-277)) then
                          tmp = (fmax(x, y) / (1.0d0 + fmin(x, y))) / (fmax(x, y) + fmin(x, y))
                      else if (fmax(x, y) <= 1.6d-172) then
                          tmp = ((fmin(x, y) / t_0) * fmax(x, y)) / (1.0d0 * t_0)
                      else if (fmax(x, y) <= 1.36d+105) then
                          tmp = (fmax(x, y) / ((fmax(x, y) - (-1.0d0)) * (t_0 * t_0))) * fmin(x, y)
                      else
                          tmp = (-1.0d0) * ((fmin(x, y) / (-fmin(x, y) - fmax(x, y))) / (fmax(x, y) - ((-1.0d0) - fmin(x, y))))
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double x, double y) {
                  	double t_0 = fmin(x, y) + fmax(x, y);
                  	double tmp;
                  	if (fmax(x, y) <= -9.5e-277) {
                  		tmp = (fmax(x, y) / (1.0 + fmin(x, y))) / (fmax(x, y) + fmin(x, y));
                  	} else if (fmax(x, y) <= 1.6e-172) {
                  		tmp = ((fmin(x, y) / t_0) * fmax(x, y)) / (1.0 * t_0);
                  	} else if (fmax(x, y) <= 1.36e+105) {
                  		tmp = (fmax(x, y) / ((fmax(x, y) - -1.0) * (t_0 * t_0))) * fmin(x, y);
                  	} else {
                  		tmp = -1.0 * ((fmin(x, y) / (-fmin(x, y) - fmax(x, y))) / (fmax(x, y) - (-1.0 - fmin(x, y))));
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y):
                  	t_0 = fmin(x, y) + fmax(x, y)
                  	tmp = 0
                  	if fmax(x, y) <= -9.5e-277:
                  		tmp = (fmax(x, y) / (1.0 + fmin(x, y))) / (fmax(x, y) + fmin(x, y))
                  	elif fmax(x, y) <= 1.6e-172:
                  		tmp = ((fmin(x, y) / t_0) * fmax(x, y)) / (1.0 * t_0)
                  	elif fmax(x, y) <= 1.36e+105:
                  		tmp = (fmax(x, y) / ((fmax(x, y) - -1.0) * (t_0 * t_0))) * fmin(x, y)
                  	else:
                  		tmp = -1.0 * ((fmin(x, y) / (-fmin(x, y) - fmax(x, y))) / (fmax(x, y) - (-1.0 - fmin(x, y))))
                  	return tmp
                  
                  function code(x, y)
                  	t_0 = Float64(fmin(x, y) + fmax(x, y))
                  	tmp = 0.0
                  	if (fmax(x, y) <= -9.5e-277)
                  		tmp = Float64(Float64(fmax(x, y) / Float64(1.0 + fmin(x, y))) / Float64(fmax(x, y) + fmin(x, y)));
                  	elseif (fmax(x, y) <= 1.6e-172)
                  		tmp = Float64(Float64(Float64(fmin(x, y) / t_0) * fmax(x, y)) / Float64(1.0 * t_0));
                  	elseif (fmax(x, y) <= 1.36e+105)
                  		tmp = Float64(Float64(fmax(x, y) / Float64(Float64(fmax(x, y) - -1.0) * Float64(t_0 * t_0))) * fmin(x, y));
                  	else
                  		tmp = Float64(-1.0 * Float64(Float64(fmin(x, y) / Float64(Float64(-fmin(x, y)) - fmax(x, y))) / Float64(fmax(x, y) - Float64(-1.0 - fmin(x, y)))));
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x, y)
                  	t_0 = min(x, y) + max(x, y);
                  	tmp = 0.0;
                  	if (max(x, y) <= -9.5e-277)
                  		tmp = (max(x, y) / (1.0 + min(x, y))) / (max(x, y) + min(x, y));
                  	elseif (max(x, y) <= 1.6e-172)
                  		tmp = ((min(x, y) / t_0) * max(x, y)) / (1.0 * t_0);
                  	elseif (max(x, y) <= 1.36e+105)
                  		tmp = (max(x, y) / ((max(x, y) - -1.0) * (t_0 * t_0))) * min(x, y);
                  	else
                  		tmp = -1.0 * ((min(x, y) / (-min(x, y) - max(x, y))) / (max(x, y) - (-1.0 - min(x, y))));
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_] := Block[{t$95$0 = N[(N[Min[x, y], $MachinePrecision] + N[Max[x, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Max[x, y], $MachinePrecision], -9.5e-277], N[(N[(N[Max[x, y], $MachinePrecision] / N[(1.0 + N[Min[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Max[x, y], $MachinePrecision] + N[Min[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Max[x, y], $MachinePrecision], 1.6e-172], N[(N[(N[(N[Min[x, y], $MachinePrecision] / t$95$0), $MachinePrecision] * N[Max[x, y], $MachinePrecision]), $MachinePrecision] / N[(1.0 * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Max[x, y], $MachinePrecision], 1.36e+105], N[(N[(N[Max[x, y], $MachinePrecision] / N[(N[(N[Max[x, y], $MachinePrecision] - -1.0), $MachinePrecision] * N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Min[x, y], $MachinePrecision]), $MachinePrecision], N[(-1.0 * N[(N[(N[Min[x, y], $MachinePrecision] / N[((-N[Min[x, y], $MachinePrecision]) - N[Max[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Max[x, y], $MachinePrecision] - N[(-1.0 - N[Min[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
                  
                  \begin{array}{l}
                  t_0 := \mathsf{min}\left(x, y\right) + \mathsf{max}\left(x, y\right)\\
                  \mathbf{if}\;\mathsf{max}\left(x, y\right) \leq -9.5 \cdot 10^{-277}:\\
                  \;\;\;\;\frac{\frac{\mathsf{max}\left(x, y\right)}{1 + \mathsf{min}\left(x, y\right)}}{\mathsf{max}\left(x, y\right) + \mathsf{min}\left(x, y\right)}\\
                  
                  \mathbf{elif}\;\mathsf{max}\left(x, y\right) \leq 1.6 \cdot 10^{-172}:\\
                  \;\;\;\;\frac{\frac{\mathsf{min}\left(x, y\right)}{t\_0} \cdot \mathsf{max}\left(x, y\right)}{1 \cdot t\_0}\\
                  
                  \mathbf{elif}\;\mathsf{max}\left(x, y\right) \leq 1.36 \cdot 10^{+105}:\\
                  \;\;\;\;\frac{\mathsf{max}\left(x, y\right)}{\left(\mathsf{max}\left(x, y\right) - -1\right) \cdot \left(t\_0 \cdot t\_0\right)} \cdot \mathsf{min}\left(x, y\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;-1 \cdot \frac{\frac{\mathsf{min}\left(x, y\right)}{\left(-\mathsf{min}\left(x, y\right)\right) - \mathsf{max}\left(x, y\right)}}{\mathsf{max}\left(x, y\right) - \left(-1 - \mathsf{min}\left(x, y\right)\right)}\\
                  
                  
                  \end{array}
                  
                  Derivation
                  1. Split input into 4 regimes
                  2. if y < -9.5e-277

                    1. Initial program 68.3%

                      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                    2. Step-by-step derivation
                      1. lift-/.f64N/A

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

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

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

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

                        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right) \cdot \left(x + y\right)}} \]
                      6. associate-/r*N/A

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

                        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}}{x + y}} \]
                    3. Applied rewrites73.6%

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

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

                        \[\leadsto \frac{\frac{y}{\color{blue}{1 + x}}}{y + x} \]
                      2. lower-+.f6450.7

                        \[\leadsto \frac{\frac{y}{1 + \color{blue}{x}}}{y + x} \]
                    6. Applied rewrites50.7%

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

                    if -9.5e-277 < y < 1.6000000000000001e-172

                    1. Initial program 68.3%

                      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                    2. Taylor expanded in y around 0

                      \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(1 + x\right)}} \]
                    3. Step-by-step derivation
                      1. lower-+.f6458.0

                        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + \color{blue}{x}\right)} \]
                    4. Applied rewrites58.0%

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

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

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

                        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + x\right)}} \]
                      4. times-fracN/A

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

                        \[\leadsto \frac{x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{1 + x} \]
                      6. associate-/r*N/A

                        \[\leadsto \color{blue}{\frac{\frac{x}{x + y}}{x + y}} \cdot \frac{y}{1 + x} \]
                      7. lift-+.f64N/A

                        \[\leadsto \frac{\frac{x}{\color{blue}{x + y}}}{x + y} \cdot \frac{y}{1 + x} \]
                      8. +-commutativeN/A

                        \[\leadsto \frac{\frac{x}{\color{blue}{y + x}}}{x + y} \cdot \frac{y}{1 + x} \]
                      9. add-flipN/A

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

                        \[\leadsto \frac{\frac{x}{y - \color{blue}{\left(-x\right)}}}{x + y} \cdot \frac{y}{1 + x} \]
                      11. sub-negate-revN/A

                        \[\leadsto \frac{\frac{x}{\color{blue}{\mathsf{neg}\left(\left(\left(-x\right) - y\right)\right)}}}{x + y} \cdot \frac{y}{1 + x} \]
                      12. lift--.f64N/A

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

                        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\frac{x}{\left(-x\right) - y}\right)}}{x + y} \cdot \frac{y}{1 + x} \]
                      14. lift-/.f64N/A

                        \[\leadsto \frac{\mathsf{neg}\left(\color{blue}{\frac{x}{\left(-x\right) - y}}\right)}{x + y} \cdot \frac{y}{1 + x} \]
                      15. frac-timesN/A

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

                        \[\leadsto \color{blue}{\frac{\left(\mathsf{neg}\left(\frac{x}{\left(-x\right) - y}\right)\right) \cdot y}{\left(x + y\right) \cdot \left(1 + x\right)}} \]
                    6. Applied rewrites75.8%

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

                      \[\leadsto \frac{\frac{x}{x + y} \cdot y}{1 \cdot \left(x + y\right)} \]
                    8. Step-by-step derivation
                      1. Applied rewrites50.8%

                        \[\leadsto \frac{\frac{x}{x + y} \cdot y}{1 \cdot \left(x + y\right)} \]

                      if 1.6000000000000001e-172 < y < 1.3599999999999999e105

                      1. Initial program 68.3%

                        \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                      2. Taylor expanded in x around 0

                        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(1 + y\right)}} \]
                      3. Step-by-step derivation
                        1. lower-+.f6458.5

                          \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + \color{blue}{y}\right)} \]
                      4. Applied rewrites58.5%

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

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

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

                          \[\leadsto \color{blue}{x \cdot \frac{y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + y\right)}} \]
                        4. *-commutativeN/A

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

                          \[\leadsto \color{blue}{\frac{y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + y\right)} \cdot x} \]
                        6. lower-/.f6475.2

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

                          \[\leadsto \frac{y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + y\right)}} \cdot x \]
                        8. *-commutativeN/A

                          \[\leadsto \frac{y}{\color{blue}{\left(1 + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \cdot x \]
                        9. lower-*.f6475.2

                          \[\leadsto \frac{y}{\color{blue}{\left(1 + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \cdot x \]
                        10. lift-+.f64N/A

                          \[\leadsto \frac{y}{\left(1 + \color{blue}{y}\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot x \]
                        11. +-commutativeN/A

                          \[\leadsto \frac{y}{\left(y + \color{blue}{1}\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot x \]
                        12. add-flip-revN/A

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

                          \[\leadsto \frac{y}{\left(y - -1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot x \]
                        14. lower--.f6475.2

                          \[\leadsto \frac{y}{\left(y - \color{blue}{-1}\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot x \]
                      6. Applied rewrites75.2%

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

                      if 1.3599999999999999e105 < y

                      1. Initial program 68.3%

                        \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                      2. Step-by-step derivation
                        1. lift-/.f64N/A

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

                          \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
                        3. associate-/r*N/A

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

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

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

                          \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}}}{\left(x + y\right) + 1} \]
                        7. sqr-neg-revN/A

                          \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(\mathsf{neg}\left(\left(x + y\right)\right)\right) \cdot \left(\mathsf{neg}\left(\left(x + y\right)\right)\right)}}}{\left(x + y\right) + 1} \]
                        8. times-fracN/A

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

                          \[\leadsto \color{blue}{\frac{y}{\mathsf{neg}\left(\left(x + y\right)\right)} \cdot \frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1}} \]
                        10. lower-*.f64N/A

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

                          \[\leadsto \color{blue}{\frac{y}{\mathsf{neg}\left(\left(x + y\right)\right)}} \cdot \frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1} \]
                        12. lift-+.f64N/A

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

                          \[\leadsto \frac{y}{\color{blue}{\left(\mathsf{neg}\left(x\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}} \cdot \frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1} \]
                        14. sub-flip-reverseN/A

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

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

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

                          \[\leadsto \frac{y}{\left(-x\right) - y} \cdot \color{blue}{\frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1}} \]
                      3. Applied rewrites99.8%

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

                        \[\leadsto \color{blue}{-1} \cdot \frac{\frac{x}{\left(-x\right) - y}}{y - \left(-1 - x\right)} \]
                      5. Step-by-step derivation
                        1. Applied rewrites51.8%

                          \[\leadsto \color{blue}{-1} \cdot \frac{\frac{x}{\left(-x\right) - y}}{y - \left(-1 - x\right)} \]
                      6. Recombined 4 regimes into one program.
                      7. Add Preprocessing

                      Alternative 11: 86.8% accurate, 0.5× speedup?

                      \[\begin{array}{l} t_0 := \mathsf{min}\left(x, y\right) + \mathsf{max}\left(x, y\right)\\ \mathbf{if}\;\mathsf{max}\left(x, y\right) \leq -9.5 \cdot 10^{-277}:\\ \;\;\;\;\frac{\frac{\mathsf{max}\left(x, y\right)}{1 + \mathsf{min}\left(x, y\right)}}{\mathsf{max}\left(x, y\right) + \mathsf{min}\left(x, y\right)}\\ \mathbf{elif}\;\mathsf{max}\left(x, y\right) \leq 1.16 \cdot 10^{-8}:\\ \;\;\;\;\frac{\frac{\mathsf{min}\left(x, y\right)}{t\_0} \cdot \mathsf{max}\left(x, y\right)}{1 \cdot t\_0}\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \frac{\frac{\mathsf{min}\left(x, y\right)}{\left(-\mathsf{min}\left(x, y\right)\right) - \mathsf{max}\left(x, y\right)}}{\mathsf{max}\left(x, y\right) - \left(-1 - \mathsf{min}\left(x, y\right)\right)}\\ \end{array} \]
                      (FPCore (x y)
                       :precision binary64
                       (let* ((t_0 (+ (fmin x y) (fmax x y))))
                         (if (<= (fmax x y) -9.5e-277)
                           (/ (/ (fmax x y) (+ 1.0 (fmin x y))) (+ (fmax x y) (fmin x y)))
                           (if (<= (fmax x y) 1.16e-8)
                             (/ (* (/ (fmin x y) t_0) (fmax x y)) (* 1.0 t_0))
                             (*
                              -1.0
                              (/
                               (/ (fmin x y) (- (- (fmin x y)) (fmax x y)))
                               (- (fmax x y) (- -1.0 (fmin x y)))))))))
                      double code(double x, double y) {
                      	double t_0 = fmin(x, y) + fmax(x, y);
                      	double tmp;
                      	if (fmax(x, y) <= -9.5e-277) {
                      		tmp = (fmax(x, y) / (1.0 + fmin(x, y))) / (fmax(x, y) + fmin(x, y));
                      	} else if (fmax(x, y) <= 1.16e-8) {
                      		tmp = ((fmin(x, y) / t_0) * fmax(x, y)) / (1.0 * t_0);
                      	} else {
                      		tmp = -1.0 * ((fmin(x, y) / (-fmin(x, y) - fmax(x, y))) / (fmax(x, y) - (-1.0 - fmin(x, y))));
                      	}
                      	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)
                      use fmin_fmax_functions
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          real(8) :: t_0
                          real(8) :: tmp
                          t_0 = fmin(x, y) + fmax(x, y)
                          if (fmax(x, y) <= (-9.5d-277)) then
                              tmp = (fmax(x, y) / (1.0d0 + fmin(x, y))) / (fmax(x, y) + fmin(x, y))
                          else if (fmax(x, y) <= 1.16d-8) then
                              tmp = ((fmin(x, y) / t_0) * fmax(x, y)) / (1.0d0 * t_0)
                          else
                              tmp = (-1.0d0) * ((fmin(x, y) / (-fmin(x, y) - fmax(x, y))) / (fmax(x, y) - ((-1.0d0) - fmin(x, y))))
                          end if
                          code = tmp
                      end function
                      
                      public static double code(double x, double y) {
                      	double t_0 = fmin(x, y) + fmax(x, y);
                      	double tmp;
                      	if (fmax(x, y) <= -9.5e-277) {
                      		tmp = (fmax(x, y) / (1.0 + fmin(x, y))) / (fmax(x, y) + fmin(x, y));
                      	} else if (fmax(x, y) <= 1.16e-8) {
                      		tmp = ((fmin(x, y) / t_0) * fmax(x, y)) / (1.0 * t_0);
                      	} else {
                      		tmp = -1.0 * ((fmin(x, y) / (-fmin(x, y) - fmax(x, y))) / (fmax(x, y) - (-1.0 - fmin(x, y))));
                      	}
                      	return tmp;
                      }
                      
                      def code(x, y):
                      	t_0 = fmin(x, y) + fmax(x, y)
                      	tmp = 0
                      	if fmax(x, y) <= -9.5e-277:
                      		tmp = (fmax(x, y) / (1.0 + fmin(x, y))) / (fmax(x, y) + fmin(x, y))
                      	elif fmax(x, y) <= 1.16e-8:
                      		tmp = ((fmin(x, y) / t_0) * fmax(x, y)) / (1.0 * t_0)
                      	else:
                      		tmp = -1.0 * ((fmin(x, y) / (-fmin(x, y) - fmax(x, y))) / (fmax(x, y) - (-1.0 - fmin(x, y))))
                      	return tmp
                      
                      function code(x, y)
                      	t_0 = Float64(fmin(x, y) + fmax(x, y))
                      	tmp = 0.0
                      	if (fmax(x, y) <= -9.5e-277)
                      		tmp = Float64(Float64(fmax(x, y) / Float64(1.0 + fmin(x, y))) / Float64(fmax(x, y) + fmin(x, y)));
                      	elseif (fmax(x, y) <= 1.16e-8)
                      		tmp = Float64(Float64(Float64(fmin(x, y) / t_0) * fmax(x, y)) / Float64(1.0 * t_0));
                      	else
                      		tmp = Float64(-1.0 * Float64(Float64(fmin(x, y) / Float64(Float64(-fmin(x, y)) - fmax(x, y))) / Float64(fmax(x, y) - Float64(-1.0 - fmin(x, y)))));
                      	end
                      	return tmp
                      end
                      
                      function tmp_2 = code(x, y)
                      	t_0 = min(x, y) + max(x, y);
                      	tmp = 0.0;
                      	if (max(x, y) <= -9.5e-277)
                      		tmp = (max(x, y) / (1.0 + min(x, y))) / (max(x, y) + min(x, y));
                      	elseif (max(x, y) <= 1.16e-8)
                      		tmp = ((min(x, y) / t_0) * max(x, y)) / (1.0 * t_0);
                      	else
                      		tmp = -1.0 * ((min(x, y) / (-min(x, y) - max(x, y))) / (max(x, y) - (-1.0 - min(x, y))));
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      code[x_, y_] := Block[{t$95$0 = N[(N[Min[x, y], $MachinePrecision] + N[Max[x, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Max[x, y], $MachinePrecision], -9.5e-277], N[(N[(N[Max[x, y], $MachinePrecision] / N[(1.0 + N[Min[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Max[x, y], $MachinePrecision] + N[Min[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Max[x, y], $MachinePrecision], 1.16e-8], N[(N[(N[(N[Min[x, y], $MachinePrecision] / t$95$0), $MachinePrecision] * N[Max[x, y], $MachinePrecision]), $MachinePrecision] / N[(1.0 * t$95$0), $MachinePrecision]), $MachinePrecision], N[(-1.0 * N[(N[(N[Min[x, y], $MachinePrecision] / N[((-N[Min[x, y], $MachinePrecision]) - N[Max[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Max[x, y], $MachinePrecision] - N[(-1.0 - N[Min[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
                      
                      \begin{array}{l}
                      t_0 := \mathsf{min}\left(x, y\right) + \mathsf{max}\left(x, y\right)\\
                      \mathbf{if}\;\mathsf{max}\left(x, y\right) \leq -9.5 \cdot 10^{-277}:\\
                      \;\;\;\;\frac{\frac{\mathsf{max}\left(x, y\right)}{1 + \mathsf{min}\left(x, y\right)}}{\mathsf{max}\left(x, y\right) + \mathsf{min}\left(x, y\right)}\\
                      
                      \mathbf{elif}\;\mathsf{max}\left(x, y\right) \leq 1.16 \cdot 10^{-8}:\\
                      \;\;\;\;\frac{\frac{\mathsf{min}\left(x, y\right)}{t\_0} \cdot \mathsf{max}\left(x, y\right)}{1 \cdot t\_0}\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;-1 \cdot \frac{\frac{\mathsf{min}\left(x, y\right)}{\left(-\mathsf{min}\left(x, y\right)\right) - \mathsf{max}\left(x, y\right)}}{\mathsf{max}\left(x, y\right) - \left(-1 - \mathsf{min}\left(x, y\right)\right)}\\
                      
                      
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if y < -9.5e-277

                        1. Initial program 68.3%

                          \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                        2. Step-by-step derivation
                          1. lift-/.f64N/A

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

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

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

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

                            \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right) \cdot \left(x + y\right)}} \]
                          6. associate-/r*N/A

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

                            \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}}{x + y}} \]
                        3. Applied rewrites73.6%

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

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

                            \[\leadsto \frac{\frac{y}{\color{blue}{1 + x}}}{y + x} \]
                          2. lower-+.f6450.7

                            \[\leadsto \frac{\frac{y}{1 + \color{blue}{x}}}{y + x} \]
                        6. Applied rewrites50.7%

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

                        if -9.5e-277 < y < 1.15999999999999996e-8

                        1. Initial program 68.3%

                          \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                        2. Taylor expanded in y around 0

                          \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(1 + x\right)}} \]
                        3. Step-by-step derivation
                          1. lower-+.f6458.0

                            \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + \color{blue}{x}\right)} \]
                        4. Applied rewrites58.0%

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

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

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

                            \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + x\right)}} \]
                          4. times-fracN/A

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

                            \[\leadsto \frac{x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{1 + x} \]
                          6. associate-/r*N/A

                            \[\leadsto \color{blue}{\frac{\frac{x}{x + y}}{x + y}} \cdot \frac{y}{1 + x} \]
                          7. lift-+.f64N/A

                            \[\leadsto \frac{\frac{x}{\color{blue}{x + y}}}{x + y} \cdot \frac{y}{1 + x} \]
                          8. +-commutativeN/A

                            \[\leadsto \frac{\frac{x}{\color{blue}{y + x}}}{x + y} \cdot \frac{y}{1 + x} \]
                          9. add-flipN/A

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

                            \[\leadsto \frac{\frac{x}{y - \color{blue}{\left(-x\right)}}}{x + y} \cdot \frac{y}{1 + x} \]
                          11. sub-negate-revN/A

                            \[\leadsto \frac{\frac{x}{\color{blue}{\mathsf{neg}\left(\left(\left(-x\right) - y\right)\right)}}}{x + y} \cdot \frac{y}{1 + x} \]
                          12. lift--.f64N/A

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

                            \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\frac{x}{\left(-x\right) - y}\right)}}{x + y} \cdot \frac{y}{1 + x} \]
                          14. lift-/.f64N/A

                            \[\leadsto \frac{\mathsf{neg}\left(\color{blue}{\frac{x}{\left(-x\right) - y}}\right)}{x + y} \cdot \frac{y}{1 + x} \]
                          15. frac-timesN/A

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

                            \[\leadsto \color{blue}{\frac{\left(\mathsf{neg}\left(\frac{x}{\left(-x\right) - y}\right)\right) \cdot y}{\left(x + y\right) \cdot \left(1 + x\right)}} \]
                        6. Applied rewrites75.8%

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

                          \[\leadsto \frac{\frac{x}{x + y} \cdot y}{1 \cdot \left(x + y\right)} \]
                        8. Step-by-step derivation
                          1. Applied rewrites50.8%

                            \[\leadsto \frac{\frac{x}{x + y} \cdot y}{1 \cdot \left(x + y\right)} \]

                          if 1.15999999999999996e-8 < y

                          1. Initial program 68.3%

                            \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                          2. Step-by-step derivation
                            1. lift-/.f64N/A

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

                              \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
                            3. associate-/r*N/A

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

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

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

                              \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}}}{\left(x + y\right) + 1} \]
                            7. sqr-neg-revN/A

                              \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(\mathsf{neg}\left(\left(x + y\right)\right)\right) \cdot \left(\mathsf{neg}\left(\left(x + y\right)\right)\right)}}}{\left(x + y\right) + 1} \]
                            8. times-fracN/A

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

                              \[\leadsto \color{blue}{\frac{y}{\mathsf{neg}\left(\left(x + y\right)\right)} \cdot \frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1}} \]
                            10. lower-*.f64N/A

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

                              \[\leadsto \color{blue}{\frac{y}{\mathsf{neg}\left(\left(x + y\right)\right)}} \cdot \frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1} \]
                            12. lift-+.f64N/A

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

                              \[\leadsto \frac{y}{\color{blue}{\left(\mathsf{neg}\left(x\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}} \cdot \frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1} \]
                            14. sub-flip-reverseN/A

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

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

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

                              \[\leadsto \frac{y}{\left(-x\right) - y} \cdot \color{blue}{\frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1}} \]
                          3. Applied rewrites99.8%

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

                            \[\leadsto \color{blue}{-1} \cdot \frac{\frac{x}{\left(-x\right) - y}}{y - \left(-1 - x\right)} \]
                          5. Step-by-step derivation
                            1. Applied rewrites51.8%

                              \[\leadsto \color{blue}{-1} \cdot \frac{\frac{x}{\left(-x\right) - y}}{y - \left(-1 - x\right)} \]
                          6. Recombined 3 regimes into one program.
                          7. Add Preprocessing

                          Alternative 12: 86.8% accurate, 0.5× speedup?

                          \[\begin{array}{l} t_0 := \mathsf{min}\left(x, y\right) + \mathsf{max}\left(x, y\right)\\ t_1 := \mathsf{max}\left(x, y\right) + \mathsf{min}\left(x, y\right)\\ \mathbf{if}\;\mathsf{max}\left(x, y\right) \leq -9.5 \cdot 10^{-277}:\\ \;\;\;\;\frac{\frac{\mathsf{max}\left(x, y\right)}{1 + \mathsf{min}\left(x, y\right)}}{t\_1}\\ \mathbf{elif}\;\mathsf{max}\left(x, y\right) \leq 1.16 \cdot 10^{-8}:\\ \;\;\;\;\frac{\frac{\mathsf{min}\left(x, y\right)}{t\_0} \cdot \mathsf{max}\left(x, y\right)}{1 \cdot t\_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\mathsf{min}\left(x, y\right)}{1 + \mathsf{max}\left(x, y\right)}}{t\_1}\\ \end{array} \]
                          (FPCore (x y)
                           :precision binary64
                           (let* ((t_0 (+ (fmin x y) (fmax x y))) (t_1 (+ (fmax x y) (fmin x y))))
                             (if (<= (fmax x y) -9.5e-277)
                               (/ (/ (fmax x y) (+ 1.0 (fmin x y))) t_1)
                               (if (<= (fmax x y) 1.16e-8)
                                 (/ (* (/ (fmin x y) t_0) (fmax x y)) (* 1.0 t_0))
                                 (/ (/ (fmin x y) (+ 1.0 (fmax x y))) t_1)))))
                          double code(double x, double y) {
                          	double t_0 = fmin(x, y) + fmax(x, y);
                          	double t_1 = fmax(x, y) + fmin(x, y);
                          	double tmp;
                          	if (fmax(x, y) <= -9.5e-277) {
                          		tmp = (fmax(x, y) / (1.0 + fmin(x, y))) / t_1;
                          	} else if (fmax(x, y) <= 1.16e-8) {
                          		tmp = ((fmin(x, y) / t_0) * fmax(x, y)) / (1.0 * t_0);
                          	} else {
                          		tmp = (fmin(x, y) / (1.0 + fmax(x, y))) / t_1;
                          	}
                          	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)
                          use fmin_fmax_functions
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              real(8) :: t_0
                              real(8) :: t_1
                              real(8) :: tmp
                              t_0 = fmin(x, y) + fmax(x, y)
                              t_1 = fmax(x, y) + fmin(x, y)
                              if (fmax(x, y) <= (-9.5d-277)) then
                                  tmp = (fmax(x, y) / (1.0d0 + fmin(x, y))) / t_1
                              else if (fmax(x, y) <= 1.16d-8) then
                                  tmp = ((fmin(x, y) / t_0) * fmax(x, y)) / (1.0d0 * t_0)
                              else
                                  tmp = (fmin(x, y) / (1.0d0 + fmax(x, y))) / t_1
                              end if
                              code = tmp
                          end function
                          
                          public static double code(double x, double y) {
                          	double t_0 = fmin(x, y) + fmax(x, y);
                          	double t_1 = fmax(x, y) + fmin(x, y);
                          	double tmp;
                          	if (fmax(x, y) <= -9.5e-277) {
                          		tmp = (fmax(x, y) / (1.0 + fmin(x, y))) / t_1;
                          	} else if (fmax(x, y) <= 1.16e-8) {
                          		tmp = ((fmin(x, y) / t_0) * fmax(x, y)) / (1.0 * t_0);
                          	} else {
                          		tmp = (fmin(x, y) / (1.0 + fmax(x, y))) / t_1;
                          	}
                          	return tmp;
                          }
                          
                          def code(x, y):
                          	t_0 = fmin(x, y) + fmax(x, y)
                          	t_1 = fmax(x, y) + fmin(x, y)
                          	tmp = 0
                          	if fmax(x, y) <= -9.5e-277:
                          		tmp = (fmax(x, y) / (1.0 + fmin(x, y))) / t_1
                          	elif fmax(x, y) <= 1.16e-8:
                          		tmp = ((fmin(x, y) / t_0) * fmax(x, y)) / (1.0 * t_0)
                          	else:
                          		tmp = (fmin(x, y) / (1.0 + fmax(x, y))) / t_1
                          	return tmp
                          
                          function code(x, y)
                          	t_0 = Float64(fmin(x, y) + fmax(x, y))
                          	t_1 = Float64(fmax(x, y) + fmin(x, y))
                          	tmp = 0.0
                          	if (fmax(x, y) <= -9.5e-277)
                          		tmp = Float64(Float64(fmax(x, y) / Float64(1.0 + fmin(x, y))) / t_1);
                          	elseif (fmax(x, y) <= 1.16e-8)
                          		tmp = Float64(Float64(Float64(fmin(x, y) / t_0) * fmax(x, y)) / Float64(1.0 * t_0));
                          	else
                          		tmp = Float64(Float64(fmin(x, y) / Float64(1.0 + fmax(x, y))) / t_1);
                          	end
                          	return tmp
                          end
                          
                          function tmp_2 = code(x, y)
                          	t_0 = min(x, y) + max(x, y);
                          	t_1 = max(x, y) + min(x, y);
                          	tmp = 0.0;
                          	if (max(x, y) <= -9.5e-277)
                          		tmp = (max(x, y) / (1.0 + min(x, y))) / t_1;
                          	elseif (max(x, y) <= 1.16e-8)
                          		tmp = ((min(x, y) / t_0) * max(x, y)) / (1.0 * t_0);
                          	else
                          		tmp = (min(x, y) / (1.0 + max(x, y))) / t_1;
                          	end
                          	tmp_2 = tmp;
                          end
                          
                          code[x_, y_] := Block[{t$95$0 = N[(N[Min[x, y], $MachinePrecision] + N[Max[x, y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Max[x, y], $MachinePrecision] + N[Min[x, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Max[x, y], $MachinePrecision], -9.5e-277], N[(N[(N[Max[x, y], $MachinePrecision] / N[(1.0 + N[Min[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[N[Max[x, y], $MachinePrecision], 1.16e-8], N[(N[(N[(N[Min[x, y], $MachinePrecision] / t$95$0), $MachinePrecision] * N[Max[x, y], $MachinePrecision]), $MachinePrecision] / N[(1.0 * t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(N[Min[x, y], $MachinePrecision] / N[(1.0 + N[Max[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]]]]]
                          
                          \begin{array}{l}
                          t_0 := \mathsf{min}\left(x, y\right) + \mathsf{max}\left(x, y\right)\\
                          t_1 := \mathsf{max}\left(x, y\right) + \mathsf{min}\left(x, y\right)\\
                          \mathbf{if}\;\mathsf{max}\left(x, y\right) \leq -9.5 \cdot 10^{-277}:\\
                          \;\;\;\;\frac{\frac{\mathsf{max}\left(x, y\right)}{1 + \mathsf{min}\left(x, y\right)}}{t\_1}\\
                          
                          \mathbf{elif}\;\mathsf{max}\left(x, y\right) \leq 1.16 \cdot 10^{-8}:\\
                          \;\;\;\;\frac{\frac{\mathsf{min}\left(x, y\right)}{t\_0} \cdot \mathsf{max}\left(x, y\right)}{1 \cdot t\_0}\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\frac{\frac{\mathsf{min}\left(x, y\right)}{1 + \mathsf{max}\left(x, y\right)}}{t\_1}\\
                          
                          
                          \end{array}
                          
                          Derivation
                          1. Split input into 3 regimes
                          2. if y < -9.5e-277

                            1. Initial program 68.3%

                              \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                            2. Step-by-step derivation
                              1. lift-/.f64N/A

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

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

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

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

                                \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right) \cdot \left(x + y\right)}} \]
                              6. associate-/r*N/A

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

                                \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}}{x + y}} \]
                            3. Applied rewrites73.6%

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

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

                                \[\leadsto \frac{\frac{y}{\color{blue}{1 + x}}}{y + x} \]
                              2. lower-+.f6450.7

                                \[\leadsto \frac{\frac{y}{1 + \color{blue}{x}}}{y + x} \]
                            6. Applied rewrites50.7%

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

                            if -9.5e-277 < y < 1.15999999999999996e-8

                            1. Initial program 68.3%

                              \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                            2. Taylor expanded in y around 0

                              \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(1 + x\right)}} \]
                            3. Step-by-step derivation
                              1. lower-+.f6458.0

                                \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + \color{blue}{x}\right)} \]
                            4. Applied rewrites58.0%

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

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

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

                                \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + x\right)}} \]
                              4. times-fracN/A

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

                                \[\leadsto \frac{x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{1 + x} \]
                              6. associate-/r*N/A

                                \[\leadsto \color{blue}{\frac{\frac{x}{x + y}}{x + y}} \cdot \frac{y}{1 + x} \]
                              7. lift-+.f64N/A

                                \[\leadsto \frac{\frac{x}{\color{blue}{x + y}}}{x + y} \cdot \frac{y}{1 + x} \]
                              8. +-commutativeN/A

                                \[\leadsto \frac{\frac{x}{\color{blue}{y + x}}}{x + y} \cdot \frac{y}{1 + x} \]
                              9. add-flipN/A

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

                                \[\leadsto \frac{\frac{x}{y - \color{blue}{\left(-x\right)}}}{x + y} \cdot \frac{y}{1 + x} \]
                              11. sub-negate-revN/A

                                \[\leadsto \frac{\frac{x}{\color{blue}{\mathsf{neg}\left(\left(\left(-x\right) - y\right)\right)}}}{x + y} \cdot \frac{y}{1 + x} \]
                              12. lift--.f64N/A

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

                                \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\frac{x}{\left(-x\right) - y}\right)}}{x + y} \cdot \frac{y}{1 + x} \]
                              14. lift-/.f64N/A

                                \[\leadsto \frac{\mathsf{neg}\left(\color{blue}{\frac{x}{\left(-x\right) - y}}\right)}{x + y} \cdot \frac{y}{1 + x} \]
                              15. frac-timesN/A

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

                                \[\leadsto \color{blue}{\frac{\left(\mathsf{neg}\left(\frac{x}{\left(-x\right) - y}\right)\right) \cdot y}{\left(x + y\right) \cdot \left(1 + x\right)}} \]
                            6. Applied rewrites75.8%

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

                              \[\leadsto \frac{\frac{x}{x + y} \cdot y}{1 \cdot \left(x + y\right)} \]
                            8. Step-by-step derivation
                              1. Applied rewrites50.8%

                                \[\leadsto \frac{\frac{x}{x + y} \cdot y}{1 \cdot \left(x + y\right)} \]

                              if 1.15999999999999996e-8 < y

                              1. Initial program 68.3%

                                \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                              2. Step-by-step derivation
                                1. lift-/.f64N/A

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

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

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

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

                                  \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right) \cdot \left(x + y\right)}} \]
                                6. associate-/r*N/A

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

                                  \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}}{x + y}} \]
                              3. Applied rewrites73.6%

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

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

                                  \[\leadsto \frac{\frac{x}{\color{blue}{1 + y}}}{y + x} \]
                                2. lower-+.f6451.0

                                  \[\leadsto \frac{\frac{x}{1 + \color{blue}{y}}}{y + x} \]
                              6. Applied rewrites51.0%

                                \[\leadsto \frac{\color{blue}{\frac{x}{1 + y}}}{y + x} \]
                            9. Recombined 3 regimes into one program.
                            10. Add Preprocessing

                            Alternative 13: 82.3% accurate, 0.6× speedup?

                            \[\begin{array}{l} t_0 := \mathsf{max}\left(x, y\right) + \mathsf{min}\left(x, y\right)\\ \mathbf{if}\;\mathsf{max}\left(x, y\right) \leq -4.6 \cdot 10^{+29}:\\ \;\;\;\;\frac{\frac{\mathsf{max}\left(x, y\right)}{\mathsf{min}\left(x, y\right)}}{t\_0}\\ \mathbf{elif}\;\mathsf{max}\left(x, y\right) \leq 1.2 \cdot 10^{-72}:\\ \;\;\;\;\frac{\mathsf{max}\left(x, y\right)}{\mathsf{min}\left(x, y\right) \cdot \left(1 + \mathsf{min}\left(x, y\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\mathsf{min}\left(x, y\right)}{1 + \mathsf{max}\left(x, y\right)}}{t\_0}\\ \end{array} \]
                            (FPCore (x y)
                             :precision binary64
                             (let* ((t_0 (+ (fmax x y) (fmin x y))))
                               (if (<= (fmax x y) -4.6e+29)
                                 (/ (/ (fmax x y) (fmin x y)) t_0)
                                 (if (<= (fmax x y) 1.2e-72)
                                   (/ (fmax x y) (* (fmin x y) (+ 1.0 (fmin x y))))
                                   (/ (/ (fmin x y) (+ 1.0 (fmax x y))) t_0)))))
                            double code(double x, double y) {
                            	double t_0 = fmax(x, y) + fmin(x, y);
                            	double tmp;
                            	if (fmax(x, y) <= -4.6e+29) {
                            		tmp = (fmax(x, y) / fmin(x, y)) / t_0;
                            	} else if (fmax(x, y) <= 1.2e-72) {
                            		tmp = fmax(x, y) / (fmin(x, y) * (1.0 + fmin(x, y)));
                            	} else {
                            		tmp = (fmin(x, y) / (1.0 + fmax(x, y))) / t_0;
                            	}
                            	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)
                            use fmin_fmax_functions
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                real(8) :: t_0
                                real(8) :: tmp
                                t_0 = fmax(x, y) + fmin(x, y)
                                if (fmax(x, y) <= (-4.6d+29)) then
                                    tmp = (fmax(x, y) / fmin(x, y)) / t_0
                                else if (fmax(x, y) <= 1.2d-72) then
                                    tmp = fmax(x, y) / (fmin(x, y) * (1.0d0 + fmin(x, y)))
                                else
                                    tmp = (fmin(x, y) / (1.0d0 + fmax(x, y))) / t_0
                                end if
                                code = tmp
                            end function
                            
                            public static double code(double x, double y) {
                            	double t_0 = fmax(x, y) + fmin(x, y);
                            	double tmp;
                            	if (fmax(x, y) <= -4.6e+29) {
                            		tmp = (fmax(x, y) / fmin(x, y)) / t_0;
                            	} else if (fmax(x, y) <= 1.2e-72) {
                            		tmp = fmax(x, y) / (fmin(x, y) * (1.0 + fmin(x, y)));
                            	} else {
                            		tmp = (fmin(x, y) / (1.0 + fmax(x, y))) / t_0;
                            	}
                            	return tmp;
                            }
                            
                            def code(x, y):
                            	t_0 = fmax(x, y) + fmin(x, y)
                            	tmp = 0
                            	if fmax(x, y) <= -4.6e+29:
                            		tmp = (fmax(x, y) / fmin(x, y)) / t_0
                            	elif fmax(x, y) <= 1.2e-72:
                            		tmp = fmax(x, y) / (fmin(x, y) * (1.0 + fmin(x, y)))
                            	else:
                            		tmp = (fmin(x, y) / (1.0 + fmax(x, y))) / t_0
                            	return tmp
                            
                            function code(x, y)
                            	t_0 = Float64(fmax(x, y) + fmin(x, y))
                            	tmp = 0.0
                            	if (fmax(x, y) <= -4.6e+29)
                            		tmp = Float64(Float64(fmax(x, y) / fmin(x, y)) / t_0);
                            	elseif (fmax(x, y) <= 1.2e-72)
                            		tmp = Float64(fmax(x, y) / Float64(fmin(x, y) * Float64(1.0 + fmin(x, y))));
                            	else
                            		tmp = Float64(Float64(fmin(x, y) / Float64(1.0 + fmax(x, y))) / t_0);
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(x, y)
                            	t_0 = max(x, y) + min(x, y);
                            	tmp = 0.0;
                            	if (max(x, y) <= -4.6e+29)
                            		tmp = (max(x, y) / min(x, y)) / t_0;
                            	elseif (max(x, y) <= 1.2e-72)
                            		tmp = max(x, y) / (min(x, y) * (1.0 + min(x, y)));
                            	else
                            		tmp = (min(x, y) / (1.0 + max(x, y))) / t_0;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[x_, y_] := Block[{t$95$0 = N[(N[Max[x, y], $MachinePrecision] + N[Min[x, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Max[x, y], $MachinePrecision], -4.6e+29], N[(N[(N[Max[x, y], $MachinePrecision] / N[Min[x, y], $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[N[Max[x, y], $MachinePrecision], 1.2e-72], N[(N[Max[x, y], $MachinePrecision] / N[(N[Min[x, y], $MachinePrecision] * N[(1.0 + N[Min[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Min[x, y], $MachinePrecision] / N[(1.0 + N[Max[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]]]]
                            
                            \begin{array}{l}
                            t_0 := \mathsf{max}\left(x, y\right) + \mathsf{min}\left(x, y\right)\\
                            \mathbf{if}\;\mathsf{max}\left(x, y\right) \leq -4.6 \cdot 10^{+29}:\\
                            \;\;\;\;\frac{\frac{\mathsf{max}\left(x, y\right)}{\mathsf{min}\left(x, y\right)}}{t\_0}\\
                            
                            \mathbf{elif}\;\mathsf{max}\left(x, y\right) \leq 1.2 \cdot 10^{-72}:\\
                            \;\;\;\;\frac{\mathsf{max}\left(x, y\right)}{\mathsf{min}\left(x, y\right) \cdot \left(1 + \mathsf{min}\left(x, y\right)\right)}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\frac{\frac{\mathsf{min}\left(x, y\right)}{1 + \mathsf{max}\left(x, y\right)}}{t\_0}\\
                            
                            
                            \end{array}
                            
                            Derivation
                            1. Split input into 3 regimes
                            2. if y < -4.6000000000000002e29

                              1. Initial program 68.3%

                                \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                              2. Step-by-step derivation
                                1. lift-/.f64N/A

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

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

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

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

                                  \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right) \cdot \left(x + y\right)}} \]
                                6. associate-/r*N/A

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

                                  \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}}{x + y}} \]
                              3. Applied rewrites73.6%

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

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

                                  \[\leadsto \frac{\frac{y}{\color{blue}{x}}}{y + x} \]
                              6. Applied rewrites38.2%

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

                              if -4.6000000000000002e29 < y < 1.2e-72

                              1. Initial program 68.3%

                                \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                              2. Taylor expanded in y around 0

                                \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]
                              3. Step-by-step derivation
                                1. lower-/.f64N/A

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

                                  \[\leadsto \frac{y}{x \cdot \color{blue}{\left(1 + x\right)}} \]
                                3. lower-+.f6448.8

                                  \[\leadsto \frac{y}{x \cdot \left(1 + \color{blue}{x}\right)} \]
                              4. Applied rewrites48.8%

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

                              if 1.2e-72 < y

                              1. Initial program 68.3%

                                \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                              2. Step-by-step derivation
                                1. lift-/.f64N/A

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

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

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

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

                                  \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right) \cdot \left(x + y\right)}} \]
                                6. associate-/r*N/A

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

                                  \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}}{x + y}} \]
                              3. Applied rewrites73.6%

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

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

                                  \[\leadsto \frac{\frac{x}{\color{blue}{1 + y}}}{y + x} \]
                                2. lower-+.f6451.0

                                  \[\leadsto \frac{\frac{x}{1 + \color{blue}{y}}}{y + x} \]
                              6. Applied rewrites51.0%

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

                            Alternative 14: 82.3% accurate, 0.7× speedup?

                            \[\begin{array}{l} \mathbf{if}\;\mathsf{max}\left(x, y\right) \leq 1.2 \cdot 10^{-72}:\\ \;\;\;\;\left(-1 \cdot \frac{\mathsf{max}\left(x, y\right)}{\mathsf{min}\left(x, y\right)}\right) \cdot \frac{-1}{1 + \mathsf{min}\left(x, y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\mathsf{min}\left(x, y\right)}{1 + \mathsf{max}\left(x, y\right)}}{\mathsf{max}\left(x, y\right) + \mathsf{min}\left(x, y\right)}\\ \end{array} \]
                            (FPCore (x y)
                             :precision binary64
                             (if (<= (fmax x y) 1.2e-72)
                               (* (* -1.0 (/ (fmax x y) (fmin x y))) (/ -1.0 (+ 1.0 (fmin x y))))
                               (/ (/ (fmin x y) (+ 1.0 (fmax x y))) (+ (fmax x y) (fmin x y)))))
                            double code(double x, double y) {
                            	double tmp;
                            	if (fmax(x, y) <= 1.2e-72) {
                            		tmp = (-1.0 * (fmax(x, y) / fmin(x, y))) * (-1.0 / (1.0 + fmin(x, y)));
                            	} else {
                            		tmp = (fmin(x, y) / (1.0 + fmax(x, y))) / (fmax(x, y) + fmin(x, y));
                            	}
                            	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)
                            use fmin_fmax_functions
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                real(8) :: tmp
                                if (fmax(x, y) <= 1.2d-72) then
                                    tmp = ((-1.0d0) * (fmax(x, y) / fmin(x, y))) * ((-1.0d0) / (1.0d0 + fmin(x, y)))
                                else
                                    tmp = (fmin(x, y) / (1.0d0 + fmax(x, y))) / (fmax(x, y) + fmin(x, y))
                                end if
                                code = tmp
                            end function
                            
                            public static double code(double x, double y) {
                            	double tmp;
                            	if (fmax(x, y) <= 1.2e-72) {
                            		tmp = (-1.0 * (fmax(x, y) / fmin(x, y))) * (-1.0 / (1.0 + fmin(x, y)));
                            	} else {
                            		tmp = (fmin(x, y) / (1.0 + fmax(x, y))) / (fmax(x, y) + fmin(x, y));
                            	}
                            	return tmp;
                            }
                            
                            def code(x, y):
                            	tmp = 0
                            	if fmax(x, y) <= 1.2e-72:
                            		tmp = (-1.0 * (fmax(x, y) / fmin(x, y))) * (-1.0 / (1.0 + fmin(x, y)))
                            	else:
                            		tmp = (fmin(x, y) / (1.0 + fmax(x, y))) / (fmax(x, y) + fmin(x, y))
                            	return tmp
                            
                            function code(x, y)
                            	tmp = 0.0
                            	if (fmax(x, y) <= 1.2e-72)
                            		tmp = Float64(Float64(-1.0 * Float64(fmax(x, y) / fmin(x, y))) * Float64(-1.0 / Float64(1.0 + fmin(x, y))));
                            	else
                            		tmp = Float64(Float64(fmin(x, y) / Float64(1.0 + fmax(x, y))) / Float64(fmax(x, y) + fmin(x, y)));
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(x, y)
                            	tmp = 0.0;
                            	if (max(x, y) <= 1.2e-72)
                            		tmp = (-1.0 * (max(x, y) / min(x, y))) * (-1.0 / (1.0 + min(x, y)));
                            	else
                            		tmp = (min(x, y) / (1.0 + max(x, y))) / (max(x, y) + min(x, y));
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[x_, y_] := If[LessEqual[N[Max[x, y], $MachinePrecision], 1.2e-72], N[(N[(-1.0 * N[(N[Max[x, y], $MachinePrecision] / N[Min[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / N[(1.0 + N[Min[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Min[x, y], $MachinePrecision] / N[(1.0 + N[Max[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Max[x, y], $MachinePrecision] + N[Min[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                            
                            \begin{array}{l}
                            \mathbf{if}\;\mathsf{max}\left(x, y\right) \leq 1.2 \cdot 10^{-72}:\\
                            \;\;\;\;\left(-1 \cdot \frac{\mathsf{max}\left(x, y\right)}{\mathsf{min}\left(x, y\right)}\right) \cdot \frac{-1}{1 + \mathsf{min}\left(x, y\right)}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\frac{\frac{\mathsf{min}\left(x, y\right)}{1 + \mathsf{max}\left(x, y\right)}}{\mathsf{max}\left(x, y\right) + \mathsf{min}\left(x, y\right)}\\
                            
                            
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if y < 1.2e-72

                              1. Initial program 68.3%

                                \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                              2. Step-by-step derivation
                                1. lift-/.f64N/A

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

                                  \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
                                3. associate-/r*N/A

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

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

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

                                  \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}}}{\left(x + y\right) + 1} \]
                                7. sqr-neg-revN/A

                                  \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(\mathsf{neg}\left(\left(x + y\right)\right)\right) \cdot \left(\mathsf{neg}\left(\left(x + y\right)\right)\right)}}}{\left(x + y\right) + 1} \]
                                8. times-fracN/A

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

                                  \[\leadsto \color{blue}{\frac{y}{\mathsf{neg}\left(\left(x + y\right)\right)} \cdot \frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1}} \]
                                10. lower-*.f64N/A

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

                                  \[\leadsto \color{blue}{\frac{y}{\mathsf{neg}\left(\left(x + y\right)\right)}} \cdot \frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1} \]
                                12. lift-+.f64N/A

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

                                  \[\leadsto \frac{y}{\color{blue}{\left(\mathsf{neg}\left(x\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}} \cdot \frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1} \]
                                14. sub-flip-reverseN/A

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

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

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

                                  \[\leadsto \frac{y}{\left(-x\right) - y} \cdot \color{blue}{\frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1}} \]
                              3. Applied rewrites99.8%

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

                                \[\leadsto \frac{y}{\left(-x\right) - y} \cdot \color{blue}{\frac{-1}{1 + x}} \]
                              5. Step-by-step derivation
                                1. lower-/.f64N/A

                                  \[\leadsto \frac{y}{\left(-x\right) - y} \cdot \frac{-1}{\color{blue}{1 + x}} \]
                                2. lower-+.f6450.7

                                  \[\leadsto \frac{y}{\left(-x\right) - y} \cdot \frac{-1}{1 + \color{blue}{x}} \]
                              6. Applied rewrites50.7%

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

                                \[\leadsto \color{blue}{\left(-1 \cdot \frac{y}{x}\right)} \cdot \frac{-1}{1 + x} \]
                              8. Step-by-step derivation
                                1. lower-*.f64N/A

                                  \[\leadsto \left(-1 \cdot \color{blue}{\frac{y}{x}}\right) \cdot \frac{-1}{1 + x} \]
                                2. lower-/.f6450.1

                                  \[\leadsto \left(-1 \cdot \frac{y}{\color{blue}{x}}\right) \cdot \frac{-1}{1 + x} \]
                              9. Applied rewrites50.1%

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

                              if 1.2e-72 < y

                              1. Initial program 68.3%

                                \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                              2. Step-by-step derivation
                                1. lift-/.f64N/A

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

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

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

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

                                  \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right) \cdot \left(x + y\right)}} \]
                                6. associate-/r*N/A

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

                                  \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}}{x + y}} \]
                              3. Applied rewrites73.6%

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

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

                                  \[\leadsto \frac{\frac{x}{\color{blue}{1 + y}}}{y + x} \]
                                2. lower-+.f6451.0

                                  \[\leadsto \frac{\frac{x}{1 + \color{blue}{y}}}{y + x} \]
                              6. Applied rewrites51.0%

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

                            Alternative 15: 82.3% accurate, 0.8× speedup?

                            \[\begin{array}{l} t_0 := \mathsf{max}\left(x, y\right) + \mathsf{min}\left(x, y\right)\\ \mathbf{if}\;\mathsf{max}\left(x, y\right) \leq 1.2 \cdot 10^{-72}:\\ \;\;\;\;\frac{\frac{\mathsf{max}\left(x, y\right)}{1 + \mathsf{min}\left(x, y\right)}}{t\_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\mathsf{min}\left(x, y\right)}{1 + \mathsf{max}\left(x, y\right)}}{t\_0}\\ \end{array} \]
                            (FPCore (x y)
                             :precision binary64
                             (let* ((t_0 (+ (fmax x y) (fmin x y))))
                               (if (<= (fmax x y) 1.2e-72)
                                 (/ (/ (fmax x y) (+ 1.0 (fmin x y))) t_0)
                                 (/ (/ (fmin x y) (+ 1.0 (fmax x y))) t_0))))
                            double code(double x, double y) {
                            	double t_0 = fmax(x, y) + fmin(x, y);
                            	double tmp;
                            	if (fmax(x, y) <= 1.2e-72) {
                            		tmp = (fmax(x, y) / (1.0 + fmin(x, y))) / t_0;
                            	} else {
                            		tmp = (fmin(x, y) / (1.0 + fmax(x, y))) / t_0;
                            	}
                            	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)
                            use fmin_fmax_functions
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                real(8) :: t_0
                                real(8) :: tmp
                                t_0 = fmax(x, y) + fmin(x, y)
                                if (fmax(x, y) <= 1.2d-72) then
                                    tmp = (fmax(x, y) / (1.0d0 + fmin(x, y))) / t_0
                                else
                                    tmp = (fmin(x, y) / (1.0d0 + fmax(x, y))) / t_0
                                end if
                                code = tmp
                            end function
                            
                            public static double code(double x, double y) {
                            	double t_0 = fmax(x, y) + fmin(x, y);
                            	double tmp;
                            	if (fmax(x, y) <= 1.2e-72) {
                            		tmp = (fmax(x, y) / (1.0 + fmin(x, y))) / t_0;
                            	} else {
                            		tmp = (fmin(x, y) / (1.0 + fmax(x, y))) / t_0;
                            	}
                            	return tmp;
                            }
                            
                            def code(x, y):
                            	t_0 = fmax(x, y) + fmin(x, y)
                            	tmp = 0
                            	if fmax(x, y) <= 1.2e-72:
                            		tmp = (fmax(x, y) / (1.0 + fmin(x, y))) / t_0
                            	else:
                            		tmp = (fmin(x, y) / (1.0 + fmax(x, y))) / t_0
                            	return tmp
                            
                            function code(x, y)
                            	t_0 = Float64(fmax(x, y) + fmin(x, y))
                            	tmp = 0.0
                            	if (fmax(x, y) <= 1.2e-72)
                            		tmp = Float64(Float64(fmax(x, y) / Float64(1.0 + fmin(x, y))) / t_0);
                            	else
                            		tmp = Float64(Float64(fmin(x, y) / Float64(1.0 + fmax(x, y))) / t_0);
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(x, y)
                            	t_0 = max(x, y) + min(x, y);
                            	tmp = 0.0;
                            	if (max(x, y) <= 1.2e-72)
                            		tmp = (max(x, y) / (1.0 + min(x, y))) / t_0;
                            	else
                            		tmp = (min(x, y) / (1.0 + max(x, y))) / t_0;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[x_, y_] := Block[{t$95$0 = N[(N[Max[x, y], $MachinePrecision] + N[Min[x, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Max[x, y], $MachinePrecision], 1.2e-72], N[(N[(N[Max[x, y], $MachinePrecision] / N[(1.0 + N[Min[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[(N[Min[x, y], $MachinePrecision] / N[(1.0 + N[Max[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]]]
                            
                            \begin{array}{l}
                            t_0 := \mathsf{max}\left(x, y\right) + \mathsf{min}\left(x, y\right)\\
                            \mathbf{if}\;\mathsf{max}\left(x, y\right) \leq 1.2 \cdot 10^{-72}:\\
                            \;\;\;\;\frac{\frac{\mathsf{max}\left(x, y\right)}{1 + \mathsf{min}\left(x, y\right)}}{t\_0}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\frac{\frac{\mathsf{min}\left(x, y\right)}{1 + \mathsf{max}\left(x, y\right)}}{t\_0}\\
                            
                            
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if y < 1.2e-72

                              1. Initial program 68.3%

                                \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                              2. Step-by-step derivation
                                1. lift-/.f64N/A

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

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

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

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

                                  \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right) \cdot \left(x + y\right)}} \]
                                6. associate-/r*N/A

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

                                  \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}}{x + y}} \]
                              3. Applied rewrites73.6%

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

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

                                  \[\leadsto \frac{\frac{y}{\color{blue}{1 + x}}}{y + x} \]
                                2. lower-+.f6450.7

                                  \[\leadsto \frac{\frac{y}{1 + \color{blue}{x}}}{y + x} \]
                              6. Applied rewrites50.7%

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

                              if 1.2e-72 < y

                              1. Initial program 68.3%

                                \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                              2. Step-by-step derivation
                                1. lift-/.f64N/A

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

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

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

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

                                  \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right) \cdot \left(x + y\right)}} \]
                                6. associate-/r*N/A

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

                                  \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}}{x + y}} \]
                              3. Applied rewrites73.6%

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

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

                                  \[\leadsto \frac{\frac{x}{\color{blue}{1 + y}}}{y + x} \]
                                2. lower-+.f6451.0

                                  \[\leadsto \frac{\frac{x}{1 + \color{blue}{y}}}{y + x} \]
                              6. Applied rewrites51.0%

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

                            Alternative 16: 82.1% accurate, 0.7× speedup?

                            \[\begin{array}{l} \mathbf{if}\;\mathsf{max}\left(x, y\right) \leq -4.6 \cdot 10^{+29}:\\ \;\;\;\;\frac{\frac{\mathsf{max}\left(x, y\right)}{\mathsf{min}\left(x, y\right)}}{\mathsf{max}\left(x, y\right) + \mathsf{min}\left(x, y\right)}\\ \mathbf{elif}\;\mathsf{max}\left(x, y\right) \leq 1.2 \cdot 10^{-72}:\\ \;\;\;\;\frac{\mathsf{max}\left(x, y\right)}{\mathsf{min}\left(x, y\right) \cdot \left(1 + \mathsf{min}\left(x, y\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\mathsf{min}\left(x, y\right)}{\mathsf{max}\left(x, y\right) - -1}}{\mathsf{max}\left(x, y\right)}\\ \end{array} \]
                            (FPCore (x y)
                             :precision binary64
                             (if (<= (fmax x y) -4.6e+29)
                               (/ (/ (fmax x y) (fmin x y)) (+ (fmax x y) (fmin x y)))
                               (if (<= (fmax x y) 1.2e-72)
                                 (/ (fmax x y) (* (fmin x y) (+ 1.0 (fmin x y))))
                                 (/ (/ (fmin x y) (- (fmax x y) -1.0)) (fmax x y)))))
                            double code(double x, double y) {
                            	double tmp;
                            	if (fmax(x, y) <= -4.6e+29) {
                            		tmp = (fmax(x, y) / fmin(x, y)) / (fmax(x, y) + fmin(x, y));
                            	} else if (fmax(x, y) <= 1.2e-72) {
                            		tmp = fmax(x, y) / (fmin(x, y) * (1.0 + fmin(x, y)));
                            	} else {
                            		tmp = (fmin(x, y) / (fmax(x, y) - -1.0)) / fmax(x, y);
                            	}
                            	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)
                            use fmin_fmax_functions
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                real(8) :: tmp
                                if (fmax(x, y) <= (-4.6d+29)) then
                                    tmp = (fmax(x, y) / fmin(x, y)) / (fmax(x, y) + fmin(x, y))
                                else if (fmax(x, y) <= 1.2d-72) then
                                    tmp = fmax(x, y) / (fmin(x, y) * (1.0d0 + fmin(x, y)))
                                else
                                    tmp = (fmin(x, y) / (fmax(x, y) - (-1.0d0))) / fmax(x, y)
                                end if
                                code = tmp
                            end function
                            
                            public static double code(double x, double y) {
                            	double tmp;
                            	if (fmax(x, y) <= -4.6e+29) {
                            		tmp = (fmax(x, y) / fmin(x, y)) / (fmax(x, y) + fmin(x, y));
                            	} else if (fmax(x, y) <= 1.2e-72) {
                            		tmp = fmax(x, y) / (fmin(x, y) * (1.0 + fmin(x, y)));
                            	} else {
                            		tmp = (fmin(x, y) / (fmax(x, y) - -1.0)) / fmax(x, y);
                            	}
                            	return tmp;
                            }
                            
                            def code(x, y):
                            	tmp = 0
                            	if fmax(x, y) <= -4.6e+29:
                            		tmp = (fmax(x, y) / fmin(x, y)) / (fmax(x, y) + fmin(x, y))
                            	elif fmax(x, y) <= 1.2e-72:
                            		tmp = fmax(x, y) / (fmin(x, y) * (1.0 + fmin(x, y)))
                            	else:
                            		tmp = (fmin(x, y) / (fmax(x, y) - -1.0)) / fmax(x, y)
                            	return tmp
                            
                            function code(x, y)
                            	tmp = 0.0
                            	if (fmax(x, y) <= -4.6e+29)
                            		tmp = Float64(Float64(fmax(x, y) / fmin(x, y)) / Float64(fmax(x, y) + fmin(x, y)));
                            	elseif (fmax(x, y) <= 1.2e-72)
                            		tmp = Float64(fmax(x, y) / Float64(fmin(x, y) * Float64(1.0 + fmin(x, y))));
                            	else
                            		tmp = Float64(Float64(fmin(x, y) / Float64(fmax(x, y) - -1.0)) / fmax(x, y));
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(x, y)
                            	tmp = 0.0;
                            	if (max(x, y) <= -4.6e+29)
                            		tmp = (max(x, y) / min(x, y)) / (max(x, y) + min(x, y));
                            	elseif (max(x, y) <= 1.2e-72)
                            		tmp = max(x, y) / (min(x, y) * (1.0 + min(x, y)));
                            	else
                            		tmp = (min(x, y) / (max(x, y) - -1.0)) / max(x, y);
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[x_, y_] := If[LessEqual[N[Max[x, y], $MachinePrecision], -4.6e+29], N[(N[(N[Max[x, y], $MachinePrecision] / N[Min[x, y], $MachinePrecision]), $MachinePrecision] / N[(N[Max[x, y], $MachinePrecision] + N[Min[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Max[x, y], $MachinePrecision], 1.2e-72], N[(N[Max[x, y], $MachinePrecision] / N[(N[Min[x, y], $MachinePrecision] * N[(1.0 + N[Min[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Min[x, y], $MachinePrecision] / N[(N[Max[x, y], $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision] / N[Max[x, y], $MachinePrecision]), $MachinePrecision]]]
                            
                            \begin{array}{l}
                            \mathbf{if}\;\mathsf{max}\left(x, y\right) \leq -4.6 \cdot 10^{+29}:\\
                            \;\;\;\;\frac{\frac{\mathsf{max}\left(x, y\right)}{\mathsf{min}\left(x, y\right)}}{\mathsf{max}\left(x, y\right) + \mathsf{min}\left(x, y\right)}\\
                            
                            \mathbf{elif}\;\mathsf{max}\left(x, y\right) \leq 1.2 \cdot 10^{-72}:\\
                            \;\;\;\;\frac{\mathsf{max}\left(x, y\right)}{\mathsf{min}\left(x, y\right) \cdot \left(1 + \mathsf{min}\left(x, y\right)\right)}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\frac{\frac{\mathsf{min}\left(x, y\right)}{\mathsf{max}\left(x, y\right) - -1}}{\mathsf{max}\left(x, y\right)}\\
                            
                            
                            \end{array}
                            
                            Derivation
                            1. Split input into 3 regimes
                            2. if y < -4.6000000000000002e29

                              1. Initial program 68.3%

                                \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                              2. Step-by-step derivation
                                1. lift-/.f64N/A

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

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

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

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

                                  \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right) \cdot \left(x + y\right)}} \]
                                6. associate-/r*N/A

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

                                  \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}}{x + y}} \]
                              3. Applied rewrites73.6%

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

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

                                  \[\leadsto \frac{\frac{y}{\color{blue}{x}}}{y + x} \]
                              6. Applied rewrites38.2%

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

                              if -4.6000000000000002e29 < y < 1.2e-72

                              1. Initial program 68.3%

                                \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                              2. Taylor expanded in y around 0

                                \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]
                              3. Step-by-step derivation
                                1. lower-/.f64N/A

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

                                  \[\leadsto \frac{y}{x \cdot \color{blue}{\left(1 + x\right)}} \]
                                3. lower-+.f6448.8

                                  \[\leadsto \frac{y}{x \cdot \left(1 + \color{blue}{x}\right)} \]
                              4. Applied rewrites48.8%

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

                              if 1.2e-72 < y

                              1. Initial program 68.3%

                                \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                              2. Taylor expanded in x around 0

                                \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
                              3. Step-by-step derivation
                                1. lower-/.f64N/A

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

                                  \[\leadsto \frac{x}{y \cdot \color{blue}{\left(1 + y\right)}} \]
                                3. lower-+.f6449.2

                                  \[\leadsto \frac{x}{y \cdot \left(1 + \color{blue}{y}\right)} \]
                              4. Applied rewrites49.2%

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

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

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

                                  \[\leadsto \frac{x}{\left(1 + y\right) \cdot \color{blue}{y}} \]
                                4. associate-/r*N/A

                                  \[\leadsto \frac{\frac{x}{1 + y}}{\color{blue}{y}} \]
                                5. lower-/.f64N/A

                                  \[\leadsto \frac{\frac{x}{1 + y}}{\color{blue}{y}} \]
                                6. lower-/.f6450.5

                                  \[\leadsto \frac{\frac{x}{1 + y}}{y} \]
                                7. lift-+.f64N/A

                                  \[\leadsto \frac{\frac{x}{1 + y}}{y} \]
                                8. +-commutativeN/A

                                  \[\leadsto \frac{\frac{x}{y + 1}}{y} \]
                                9. add-flip-revN/A

                                  \[\leadsto \frac{\frac{x}{y - \left(\mathsf{neg}\left(1\right)\right)}}{y} \]
                                10. metadata-evalN/A

                                  \[\leadsto \frac{\frac{x}{y - -1}}{y} \]
                                11. lower--.f6450.5

                                  \[\leadsto \frac{\frac{x}{y - -1}}{y} \]
                              6. Applied rewrites50.5%

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

                            Alternative 17: 80.7% accurate, 0.9× speedup?

                            \[\begin{array}{l} \mathbf{if}\;\mathsf{max}\left(x, y\right) \leq 1.2 \cdot 10^{-72}:\\ \;\;\;\;\frac{\mathsf{max}\left(x, y\right)}{\mathsf{min}\left(x, y\right) \cdot \left(1 + \mathsf{min}\left(x, y\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\mathsf{min}\left(x, y\right)}{\mathsf{max}\left(x, y\right) - -1}}{\mathsf{max}\left(x, y\right)}\\ \end{array} \]
                            (FPCore (x y)
                             :precision binary64
                             (if (<= (fmax x y) 1.2e-72)
                               (/ (fmax x y) (* (fmin x y) (+ 1.0 (fmin x y))))
                               (/ (/ (fmin x y) (- (fmax x y) -1.0)) (fmax x y))))
                            double code(double x, double y) {
                            	double tmp;
                            	if (fmax(x, y) <= 1.2e-72) {
                            		tmp = fmax(x, y) / (fmin(x, y) * (1.0 + fmin(x, y)));
                            	} else {
                            		tmp = (fmin(x, y) / (fmax(x, y) - -1.0)) / fmax(x, y);
                            	}
                            	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)
                            use fmin_fmax_functions
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                real(8) :: tmp
                                if (fmax(x, y) <= 1.2d-72) then
                                    tmp = fmax(x, y) / (fmin(x, y) * (1.0d0 + fmin(x, y)))
                                else
                                    tmp = (fmin(x, y) / (fmax(x, y) - (-1.0d0))) / fmax(x, y)
                                end if
                                code = tmp
                            end function
                            
                            public static double code(double x, double y) {
                            	double tmp;
                            	if (fmax(x, y) <= 1.2e-72) {
                            		tmp = fmax(x, y) / (fmin(x, y) * (1.0 + fmin(x, y)));
                            	} else {
                            		tmp = (fmin(x, y) / (fmax(x, y) - -1.0)) / fmax(x, y);
                            	}
                            	return tmp;
                            }
                            
                            def code(x, y):
                            	tmp = 0
                            	if fmax(x, y) <= 1.2e-72:
                            		tmp = fmax(x, y) / (fmin(x, y) * (1.0 + fmin(x, y)))
                            	else:
                            		tmp = (fmin(x, y) / (fmax(x, y) - -1.0)) / fmax(x, y)
                            	return tmp
                            
                            function code(x, y)
                            	tmp = 0.0
                            	if (fmax(x, y) <= 1.2e-72)
                            		tmp = Float64(fmax(x, y) / Float64(fmin(x, y) * Float64(1.0 + fmin(x, y))));
                            	else
                            		tmp = Float64(Float64(fmin(x, y) / Float64(fmax(x, y) - -1.0)) / fmax(x, y));
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(x, y)
                            	tmp = 0.0;
                            	if (max(x, y) <= 1.2e-72)
                            		tmp = max(x, y) / (min(x, y) * (1.0 + min(x, y)));
                            	else
                            		tmp = (min(x, y) / (max(x, y) - -1.0)) / max(x, y);
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[x_, y_] := If[LessEqual[N[Max[x, y], $MachinePrecision], 1.2e-72], N[(N[Max[x, y], $MachinePrecision] / N[(N[Min[x, y], $MachinePrecision] * N[(1.0 + N[Min[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Min[x, y], $MachinePrecision] / N[(N[Max[x, y], $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision] / N[Max[x, y], $MachinePrecision]), $MachinePrecision]]
                            
                            \begin{array}{l}
                            \mathbf{if}\;\mathsf{max}\left(x, y\right) \leq 1.2 \cdot 10^{-72}:\\
                            \;\;\;\;\frac{\mathsf{max}\left(x, y\right)}{\mathsf{min}\left(x, y\right) \cdot \left(1 + \mathsf{min}\left(x, y\right)\right)}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\frac{\frac{\mathsf{min}\left(x, y\right)}{\mathsf{max}\left(x, y\right) - -1}}{\mathsf{max}\left(x, y\right)}\\
                            
                            
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if y < 1.2e-72

                              1. Initial program 68.3%

                                \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                              2. Taylor expanded in y around 0

                                \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]
                              3. Step-by-step derivation
                                1. lower-/.f64N/A

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

                                  \[\leadsto \frac{y}{x \cdot \color{blue}{\left(1 + x\right)}} \]
                                3. lower-+.f6448.8

                                  \[\leadsto \frac{y}{x \cdot \left(1 + \color{blue}{x}\right)} \]
                              4. Applied rewrites48.8%

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

                              if 1.2e-72 < y

                              1. Initial program 68.3%

                                \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                              2. Taylor expanded in x around 0

                                \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
                              3. Step-by-step derivation
                                1. lower-/.f64N/A

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

                                  \[\leadsto \frac{x}{y \cdot \color{blue}{\left(1 + y\right)}} \]
                                3. lower-+.f6449.2

                                  \[\leadsto \frac{x}{y \cdot \left(1 + \color{blue}{y}\right)} \]
                              4. Applied rewrites49.2%

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

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

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

                                  \[\leadsto \frac{x}{\left(1 + y\right) \cdot \color{blue}{y}} \]
                                4. associate-/r*N/A

                                  \[\leadsto \frac{\frac{x}{1 + y}}{\color{blue}{y}} \]
                                5. lower-/.f64N/A

                                  \[\leadsto \frac{\frac{x}{1 + y}}{\color{blue}{y}} \]
                                6. lower-/.f6450.5

                                  \[\leadsto \frac{\frac{x}{1 + y}}{y} \]
                                7. lift-+.f64N/A

                                  \[\leadsto \frac{\frac{x}{1 + y}}{y} \]
                                8. +-commutativeN/A

                                  \[\leadsto \frac{\frac{x}{y + 1}}{y} \]
                                9. add-flip-revN/A

                                  \[\leadsto \frac{\frac{x}{y - \left(\mathsf{neg}\left(1\right)\right)}}{y} \]
                                10. metadata-evalN/A

                                  \[\leadsto \frac{\frac{x}{y - -1}}{y} \]
                                11. lower--.f6450.5

                                  \[\leadsto \frac{\frac{x}{y - -1}}{y} \]
                              6. Applied rewrites50.5%

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

                            Alternative 18: 78.7% accurate, 0.9× speedup?

                            \[\begin{array}{l} \mathbf{if}\;\mathsf{max}\left(x, y\right) \leq 1.2 \cdot 10^{-72}:\\ \;\;\;\;\frac{\mathsf{max}\left(x, y\right)}{\mathsf{min}\left(x, y\right) \cdot \left(1 + \mathsf{min}\left(x, y\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{min}\left(x, y\right)}{\mathsf{fma}\left(\mathsf{max}\left(x, y\right), \mathsf{max}\left(x, y\right), \mathsf{max}\left(x, y\right)\right)}\\ \end{array} \]
                            (FPCore (x y)
                             :precision binary64
                             (if (<= (fmax x y) 1.2e-72)
                               (/ (fmax x y) (* (fmin x y) (+ 1.0 (fmin x y))))
                               (/ (fmin x y) (fma (fmax x y) (fmax x y) (fmax x y)))))
                            double code(double x, double y) {
                            	double tmp;
                            	if (fmax(x, y) <= 1.2e-72) {
                            		tmp = fmax(x, y) / (fmin(x, y) * (1.0 + fmin(x, y)));
                            	} else {
                            		tmp = fmin(x, y) / fma(fmax(x, y), fmax(x, y), fmax(x, y));
                            	}
                            	return tmp;
                            }
                            
                            function code(x, y)
                            	tmp = 0.0
                            	if (fmax(x, y) <= 1.2e-72)
                            		tmp = Float64(fmax(x, y) / Float64(fmin(x, y) * Float64(1.0 + fmin(x, y))));
                            	else
                            		tmp = Float64(fmin(x, y) / fma(fmax(x, y), fmax(x, y), fmax(x, y)));
                            	end
                            	return tmp
                            end
                            
                            code[x_, y_] := If[LessEqual[N[Max[x, y], $MachinePrecision], 1.2e-72], N[(N[Max[x, y], $MachinePrecision] / N[(N[Min[x, y], $MachinePrecision] * N[(1.0 + N[Min[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Min[x, y], $MachinePrecision] / N[(N[Max[x, y], $MachinePrecision] * N[Max[x, y], $MachinePrecision] + N[Max[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                            
                            \begin{array}{l}
                            \mathbf{if}\;\mathsf{max}\left(x, y\right) \leq 1.2 \cdot 10^{-72}:\\
                            \;\;\;\;\frac{\mathsf{max}\left(x, y\right)}{\mathsf{min}\left(x, y\right) \cdot \left(1 + \mathsf{min}\left(x, y\right)\right)}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\frac{\mathsf{min}\left(x, y\right)}{\mathsf{fma}\left(\mathsf{max}\left(x, y\right), \mathsf{max}\left(x, y\right), \mathsf{max}\left(x, y\right)\right)}\\
                            
                            
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if y < 1.2e-72

                              1. Initial program 68.3%

                                \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                              2. Taylor expanded in y around 0

                                \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]
                              3. Step-by-step derivation
                                1. lower-/.f64N/A

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

                                  \[\leadsto \frac{y}{x \cdot \color{blue}{\left(1 + x\right)}} \]
                                3. lower-+.f6448.8

                                  \[\leadsto \frac{y}{x \cdot \left(1 + \color{blue}{x}\right)} \]
                              4. Applied rewrites48.8%

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

                              if 1.2e-72 < y

                              1. Initial program 68.3%

                                \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                              2. Taylor expanded in x around 0

                                \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
                              3. Step-by-step derivation
                                1. lower-/.f64N/A

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

                                  \[\leadsto \frac{x}{y \cdot \color{blue}{\left(1 + y\right)}} \]
                                3. lower-+.f6449.2

                                  \[\leadsto \frac{x}{y \cdot \left(1 + \color{blue}{y}\right)} \]
                              4. Applied rewrites49.2%

                                \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
                              5. Step-by-step derivation
                                1. lift-*.f64N/A

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

                                  \[\leadsto \frac{x}{y \cdot \left(1 + \color{blue}{y}\right)} \]
                                3. +-commutativeN/A

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

                                  \[\leadsto \frac{x}{y \cdot y + \color{blue}{1 \cdot y}} \]
                                5. *-lft-identityN/A

                                  \[\leadsto \frac{x}{y \cdot y + y} \]
                                6. lower-fma.f6449.2

                                  \[\leadsto \frac{x}{\mathsf{fma}\left(y, \color{blue}{y}, y\right)} \]
                              6. Applied rewrites49.2%

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

                            Alternative 19: 55.5% accurate, 0.9× speedup?

                            \[\begin{array}{l} \mathbf{if}\;\mathsf{max}\left(x, y\right) \leq 9 \cdot 10^{-261}:\\ \;\;\;\;\frac{\frac{\mathsf{max}\left(x, y\right)}{\mathsf{min}\left(x, y\right)}}{\mathsf{max}\left(x, y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{min}\left(x, y\right)}{\mathsf{fma}\left(\mathsf{max}\left(x, y\right), \mathsf{max}\left(x, y\right), \mathsf{max}\left(x, y\right)\right)}\\ \end{array} \]
                            (FPCore (x y)
                             :precision binary64
                             (if (<= (fmax x y) 9e-261)
                               (/ (/ (fmax x y) (fmin x y)) (fmax x y))
                               (/ (fmin x y) (fma (fmax x y) (fmax x y) (fmax x y)))))
                            double code(double x, double y) {
                            	double tmp;
                            	if (fmax(x, y) <= 9e-261) {
                            		tmp = (fmax(x, y) / fmin(x, y)) / fmax(x, y);
                            	} else {
                            		tmp = fmin(x, y) / fma(fmax(x, y), fmax(x, y), fmax(x, y));
                            	}
                            	return tmp;
                            }
                            
                            function code(x, y)
                            	tmp = 0.0
                            	if (fmax(x, y) <= 9e-261)
                            		tmp = Float64(Float64(fmax(x, y) / fmin(x, y)) / fmax(x, y));
                            	else
                            		tmp = Float64(fmin(x, y) / fma(fmax(x, y), fmax(x, y), fmax(x, y)));
                            	end
                            	return tmp
                            end
                            
                            code[x_, y_] := If[LessEqual[N[Max[x, y], $MachinePrecision], 9e-261], N[(N[(N[Max[x, y], $MachinePrecision] / N[Min[x, y], $MachinePrecision]), $MachinePrecision] / N[Max[x, y], $MachinePrecision]), $MachinePrecision], N[(N[Min[x, y], $MachinePrecision] / N[(N[Max[x, y], $MachinePrecision] * N[Max[x, y], $MachinePrecision] + N[Max[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                            
                            \begin{array}{l}
                            \mathbf{if}\;\mathsf{max}\left(x, y\right) \leq 9 \cdot 10^{-261}:\\
                            \;\;\;\;\frac{\frac{\mathsf{max}\left(x, y\right)}{\mathsf{min}\left(x, y\right)}}{\mathsf{max}\left(x, y\right)}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\frac{\mathsf{min}\left(x, y\right)}{\mathsf{fma}\left(\mathsf{max}\left(x, y\right), \mathsf{max}\left(x, y\right), \mathsf{max}\left(x, y\right)\right)}\\
                            
                            
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if y < 9.0000000000000002e-261

                              1. Initial program 68.3%

                                \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                              2. Step-by-step derivation
                                1. lift-/.f64N/A

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

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

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

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

                                  \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right) \cdot \left(x + y\right)}} \]
                                6. associate-/r*N/A

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

                                  \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}}{x + y}} \]
                              3. Applied rewrites73.6%

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

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

                                  \[\leadsto \frac{\frac{y}{\color{blue}{x}}}{y + x} \]
                              6. Applied rewrites38.2%

                                \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{y + x} \]
                              7. Taylor expanded in x around 0

                                \[\leadsto \frac{\frac{y}{x}}{\color{blue}{y}} \]
                              8. Step-by-step derivation
                                1. Applied rewrites14.4%

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

                                if 9.0000000000000002e-261 < y

                                1. Initial program 68.3%

                                  \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                                2. Taylor expanded in x around 0

                                  \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
                                3. Step-by-step derivation
                                  1. lower-/.f64N/A

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

                                    \[\leadsto \frac{x}{y \cdot \color{blue}{\left(1 + y\right)}} \]
                                  3. lower-+.f6449.2

                                    \[\leadsto \frac{x}{y \cdot \left(1 + \color{blue}{y}\right)} \]
                                4. Applied rewrites49.2%

                                  \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
                                5. Step-by-step derivation
                                  1. lift-*.f64N/A

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

                                    \[\leadsto \frac{x}{y \cdot \left(1 + \color{blue}{y}\right)} \]
                                  3. +-commutativeN/A

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

                                    \[\leadsto \frac{x}{y \cdot y + \color{blue}{1 \cdot y}} \]
                                  5. *-lft-identityN/A

                                    \[\leadsto \frac{x}{y \cdot y + y} \]
                                  6. lower-fma.f6449.2

                                    \[\leadsto \frac{x}{\mathsf{fma}\left(y, \color{blue}{y}, y\right)} \]
                                6. Applied rewrites49.2%

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

                              Alternative 20: 38.7% accurate, 1.0× speedup?

                              \[\begin{array}{l} t_0 := \frac{\mathsf{max}\left(x, y\right)}{\mathsf{min}\left(x, y\right)}\\ \mathbf{if}\;\mathsf{min}\left(x, y\right) \leq -7.6 \cdot 10^{+17}:\\ \;\;\;\;\frac{t\_0}{\mathsf{max}\left(x, y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{t\_0}\\ \end{array} \]
                              (FPCore (x y)
                               :precision binary64
                               (let* ((t_0 (/ (fmax x y) (fmin x y))))
                                 (if (<= (fmin x y) -7.6e+17) (/ t_0 (fmax x y)) (/ 1.0 t_0))))
                              double code(double x, double y) {
                              	double t_0 = fmax(x, y) / fmin(x, y);
                              	double tmp;
                              	if (fmin(x, y) <= -7.6e+17) {
                              		tmp = t_0 / fmax(x, y);
                              	} else {
                              		tmp = 1.0 / t_0;
                              	}
                              	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)
                              use fmin_fmax_functions
                                  real(8), intent (in) :: x
                                  real(8), intent (in) :: y
                                  real(8) :: t_0
                                  real(8) :: tmp
                                  t_0 = fmax(x, y) / fmin(x, y)
                                  if (fmin(x, y) <= (-7.6d+17)) then
                                      tmp = t_0 / fmax(x, y)
                                  else
                                      tmp = 1.0d0 / t_0
                                  end if
                                  code = tmp
                              end function
                              
                              public static double code(double x, double y) {
                              	double t_0 = fmax(x, y) / fmin(x, y);
                              	double tmp;
                              	if (fmin(x, y) <= -7.6e+17) {
                              		tmp = t_0 / fmax(x, y);
                              	} else {
                              		tmp = 1.0 / t_0;
                              	}
                              	return tmp;
                              }
                              
                              def code(x, y):
                              	t_0 = fmax(x, y) / fmin(x, y)
                              	tmp = 0
                              	if fmin(x, y) <= -7.6e+17:
                              		tmp = t_0 / fmax(x, y)
                              	else:
                              		tmp = 1.0 / t_0
                              	return tmp
                              
                              function code(x, y)
                              	t_0 = Float64(fmax(x, y) / fmin(x, y))
                              	tmp = 0.0
                              	if (fmin(x, y) <= -7.6e+17)
                              		tmp = Float64(t_0 / fmax(x, y));
                              	else
                              		tmp = Float64(1.0 / t_0);
                              	end
                              	return tmp
                              end
                              
                              function tmp_2 = code(x, y)
                              	t_0 = max(x, y) / min(x, y);
                              	tmp = 0.0;
                              	if (min(x, y) <= -7.6e+17)
                              		tmp = t_0 / max(x, y);
                              	else
                              		tmp = 1.0 / t_0;
                              	end
                              	tmp_2 = tmp;
                              end
                              
                              code[x_, y_] := Block[{t$95$0 = N[(N[Max[x, y], $MachinePrecision] / N[Min[x, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Min[x, y], $MachinePrecision], -7.6e+17], N[(t$95$0 / N[Max[x, y], $MachinePrecision]), $MachinePrecision], N[(1.0 / t$95$0), $MachinePrecision]]]
                              
                              \begin{array}{l}
                              t_0 := \frac{\mathsf{max}\left(x, y\right)}{\mathsf{min}\left(x, y\right)}\\
                              \mathbf{if}\;\mathsf{min}\left(x, y\right) \leq -7.6 \cdot 10^{+17}:\\
                              \;\;\;\;\frac{t\_0}{\mathsf{max}\left(x, y\right)}\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\frac{1}{t\_0}\\
                              
                              
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if x < -7.6e17

                                1. Initial program 68.3%

                                  \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                                2. Step-by-step derivation
                                  1. lift-/.f64N/A

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

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

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

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

                                    \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right) \cdot \left(x + y\right)}} \]
                                  6. associate-/r*N/A

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

                                    \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}}{x + y}} \]
                                3. Applied rewrites73.6%

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

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

                                    \[\leadsto \frac{\frac{y}{\color{blue}{x}}}{y + x} \]
                                6. Applied rewrites38.2%

                                  \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{y + x} \]
                                7. Taylor expanded in x around 0

                                  \[\leadsto \frac{\frac{y}{x}}{\color{blue}{y}} \]
                                8. Step-by-step derivation
                                  1. Applied rewrites14.4%

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

                                  if -7.6e17 < x

                                  1. Initial program 68.3%

                                    \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                                  2. Taylor expanded in x around 0

                                    \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
                                  3. Step-by-step derivation
                                    1. lower-/.f64N/A

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

                                      \[\leadsto \frac{x}{y \cdot \color{blue}{\left(1 + y\right)}} \]
                                    3. lower-+.f6449.2

                                      \[\leadsto \frac{x}{y \cdot \left(1 + \color{blue}{y}\right)} \]
                                  4. Applied rewrites49.2%

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

                                    \[\leadsto \frac{x}{\color{blue}{y}} \]
                                  6. Step-by-step derivation
                                    1. lower-/.f6426.3

                                      \[\leadsto \frac{x}{y} \]
                                  7. Applied rewrites26.3%

                                    \[\leadsto \frac{x}{\color{blue}{y}} \]
                                  8. Step-by-step derivation
                                    1. lift-/.f64N/A

                                      \[\leadsto \frac{x}{y} \]
                                    2. frac-2negN/A

                                      \[\leadsto \frac{\mathsf{neg}\left(x\right)}{\mathsf{neg}\left(y\right)} \]
                                    3. lift-neg.f64N/A

                                      \[\leadsto \frac{-x}{\mathsf{neg}\left(y\right)} \]
                                    4. div-flipN/A

                                      \[\leadsto \frac{1}{\frac{\mathsf{neg}\left(y\right)}{\color{blue}{-x}}} \]
                                    5. lower-unsound-/.f64N/A

                                      \[\leadsto \frac{1}{\frac{\mathsf{neg}\left(y\right)}{\color{blue}{-x}}} \]
                                    6. lower-unsound-/.f32N/A

                                      \[\leadsto \frac{1}{\frac{\mathsf{neg}\left(y\right)}{-x}} \]
                                    7. lower-/.f32N/A

                                      \[\leadsto \frac{1}{\frac{\mathsf{neg}\left(y\right)}{-x}} \]
                                    8. lift-neg.f64N/A

                                      \[\leadsto \frac{1}{\frac{\mathsf{neg}\left(y\right)}{\mathsf{neg}\left(x\right)}} \]
                                    9. frac-2negN/A

                                      \[\leadsto \frac{1}{\frac{y}{x}} \]
                                    10. lift-/.f6426.7

                                      \[\leadsto \frac{1}{\frac{y}{x}} \]
                                  9. Applied rewrites26.7%

                                    \[\leadsto \frac{1}{\frac{y}{\color{blue}{x}}} \]
                                9. Recombined 2 regimes into one program.
                                10. Add Preprocessing

                                Alternative 21: 28.0% accurate, 2.1× speedup?

                                \[\begin{array}{l} \mathbf{if}\;x \leq -7.6 \cdot 10^{+17}:\\ \;\;\;\;-1 \cdot \frac{-1}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{y}{x}}\\ \end{array} \]
                                (FPCore (x y)
                                 :precision binary64
                                 (if (<= x -7.6e+17) (* -1.0 (/ -1.0 x)) (/ 1.0 (/ y x))))
                                double code(double x, double y) {
                                	double tmp;
                                	if (x <= -7.6e+17) {
                                		tmp = -1.0 * (-1.0 / x);
                                	} else {
                                		tmp = 1.0 / (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)
                                use fmin_fmax_functions
                                    real(8), intent (in) :: x
                                    real(8), intent (in) :: y
                                    real(8) :: tmp
                                    if (x <= (-7.6d+17)) then
                                        tmp = (-1.0d0) * ((-1.0d0) / x)
                                    else
                                        tmp = 1.0d0 / (y / x)
                                    end if
                                    code = tmp
                                end function
                                
                                public static double code(double x, double y) {
                                	double tmp;
                                	if (x <= -7.6e+17) {
                                		tmp = -1.0 * (-1.0 / x);
                                	} else {
                                		tmp = 1.0 / (y / x);
                                	}
                                	return tmp;
                                }
                                
                                def code(x, y):
                                	tmp = 0
                                	if x <= -7.6e+17:
                                		tmp = -1.0 * (-1.0 / x)
                                	else:
                                		tmp = 1.0 / (y / x)
                                	return tmp
                                
                                function code(x, y)
                                	tmp = 0.0
                                	if (x <= -7.6e+17)
                                		tmp = Float64(-1.0 * Float64(-1.0 / x));
                                	else
                                		tmp = Float64(1.0 / Float64(y / x));
                                	end
                                	return tmp
                                end
                                
                                function tmp_2 = code(x, y)
                                	tmp = 0.0;
                                	if (x <= -7.6e+17)
                                		tmp = -1.0 * (-1.0 / x);
                                	else
                                		tmp = 1.0 / (y / x);
                                	end
                                	tmp_2 = tmp;
                                end
                                
                                code[x_, y_] := If[LessEqual[x, -7.6e+17], N[(-1.0 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(y / x), $MachinePrecision]), $MachinePrecision]]
                                
                                \begin{array}{l}
                                \mathbf{if}\;x \leq -7.6 \cdot 10^{+17}:\\
                                \;\;\;\;-1 \cdot \frac{-1}{x}\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;\frac{1}{\frac{y}{x}}\\
                                
                                
                                \end{array}
                                
                                Derivation
                                1. Split input into 2 regimes
                                2. if x < -7.6e17

                                  1. Initial program 68.3%

                                    \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                                  2. Step-by-step derivation
                                    1. lift-/.f64N/A

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

                                      \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
                                    3. associate-/r*N/A

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

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

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

                                      \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}}}{\left(x + y\right) + 1} \]
                                    7. sqr-neg-revN/A

                                      \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(\mathsf{neg}\left(\left(x + y\right)\right)\right) \cdot \left(\mathsf{neg}\left(\left(x + y\right)\right)\right)}}}{\left(x + y\right) + 1} \]
                                    8. times-fracN/A

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

                                      \[\leadsto \color{blue}{\frac{y}{\mathsf{neg}\left(\left(x + y\right)\right)} \cdot \frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1}} \]
                                    10. lower-*.f64N/A

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

                                      \[\leadsto \color{blue}{\frac{y}{\mathsf{neg}\left(\left(x + y\right)\right)}} \cdot \frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1} \]
                                    12. lift-+.f64N/A

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

                                      \[\leadsto \frac{y}{\color{blue}{\left(\mathsf{neg}\left(x\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}} \cdot \frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1} \]
                                    14. sub-flip-reverseN/A

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

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

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

                                      \[\leadsto \frac{y}{\left(-x\right) - y} \cdot \color{blue}{\frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1}} \]
                                  3. Applied rewrites99.8%

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

                                    \[\leadsto \frac{y}{\left(-x\right) - y} \cdot \color{blue}{\frac{-1}{x}} \]
                                  5. Step-by-step derivation
                                    1. lower-/.f6438.2

                                      \[\leadsto \frac{y}{\left(-x\right) - y} \cdot \frac{-1}{\color{blue}{x}} \]
                                  6. Applied rewrites38.2%

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

                                    \[\leadsto \color{blue}{-1} \cdot \frac{-1}{x} \]
                                  8. Step-by-step derivation
                                    1. Applied rewrites4.2%

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

                                    if -7.6e17 < x

                                    1. Initial program 68.3%

                                      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                                    2. Taylor expanded in x around 0

                                      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
                                    3. Step-by-step derivation
                                      1. lower-/.f64N/A

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

                                        \[\leadsto \frac{x}{y \cdot \color{blue}{\left(1 + y\right)}} \]
                                      3. lower-+.f6449.2

                                        \[\leadsto \frac{x}{y \cdot \left(1 + \color{blue}{y}\right)} \]
                                    4. Applied rewrites49.2%

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

                                      \[\leadsto \frac{x}{\color{blue}{y}} \]
                                    6. Step-by-step derivation
                                      1. lower-/.f6426.3

                                        \[\leadsto \frac{x}{y} \]
                                    7. Applied rewrites26.3%

                                      \[\leadsto \frac{x}{\color{blue}{y}} \]
                                    8. Step-by-step derivation
                                      1. lift-/.f64N/A

                                        \[\leadsto \frac{x}{y} \]
                                      2. frac-2negN/A

                                        \[\leadsto \frac{\mathsf{neg}\left(x\right)}{\mathsf{neg}\left(y\right)} \]
                                      3. lift-neg.f64N/A

                                        \[\leadsto \frac{-x}{\mathsf{neg}\left(y\right)} \]
                                      4. div-flipN/A

                                        \[\leadsto \frac{1}{\frac{\mathsf{neg}\left(y\right)}{\color{blue}{-x}}} \]
                                      5. lower-unsound-/.f64N/A

                                        \[\leadsto \frac{1}{\frac{\mathsf{neg}\left(y\right)}{\color{blue}{-x}}} \]
                                      6. lower-unsound-/.f32N/A

                                        \[\leadsto \frac{1}{\frac{\mathsf{neg}\left(y\right)}{-x}} \]
                                      7. lower-/.f32N/A

                                        \[\leadsto \frac{1}{\frac{\mathsf{neg}\left(y\right)}{-x}} \]
                                      8. lift-neg.f64N/A

                                        \[\leadsto \frac{1}{\frac{\mathsf{neg}\left(y\right)}{\mathsf{neg}\left(x\right)}} \]
                                      9. frac-2negN/A

                                        \[\leadsto \frac{1}{\frac{y}{x}} \]
                                      10. lift-/.f6426.7

                                        \[\leadsto \frac{1}{\frac{y}{x}} \]
                                    9. Applied rewrites26.7%

                                      \[\leadsto \frac{1}{\frac{y}{\color{blue}{x}}} \]
                                  9. Recombined 2 regimes into one program.
                                  10. Add Preprocessing

                                  Alternative 22: 27.5% accurate, 1.4× speedup?

                                  \[\begin{array}{l} \mathbf{if}\;\mathsf{min}\left(x, y\right) \leq -7.6 \cdot 10^{+17}:\\ \;\;\;\;-1 \cdot \frac{-1}{\mathsf{min}\left(x, y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{min}\left(x, y\right)}{\mathsf{max}\left(x, y\right)}\\ \end{array} \]
                                  (FPCore (x y)
                                   :precision binary64
                                   (if (<= (fmin x y) -7.6e+17)
                                     (* -1.0 (/ -1.0 (fmin x y)))
                                     (/ (fmin x y) (fmax x y))))
                                  double code(double x, double y) {
                                  	double tmp;
                                  	if (fmin(x, y) <= -7.6e+17) {
                                  		tmp = -1.0 * (-1.0 / fmin(x, y));
                                  	} else {
                                  		tmp = fmin(x, y) / fmax(x, y);
                                  	}
                                  	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)
                                  use fmin_fmax_functions
                                      real(8), intent (in) :: x
                                      real(8), intent (in) :: y
                                      real(8) :: tmp
                                      if (fmin(x, y) <= (-7.6d+17)) then
                                          tmp = (-1.0d0) * ((-1.0d0) / fmin(x, y))
                                      else
                                          tmp = fmin(x, y) / fmax(x, y)
                                      end if
                                      code = tmp
                                  end function
                                  
                                  public static double code(double x, double y) {
                                  	double tmp;
                                  	if (fmin(x, y) <= -7.6e+17) {
                                  		tmp = -1.0 * (-1.0 / fmin(x, y));
                                  	} else {
                                  		tmp = fmin(x, y) / fmax(x, y);
                                  	}
                                  	return tmp;
                                  }
                                  
                                  def code(x, y):
                                  	tmp = 0
                                  	if fmin(x, y) <= -7.6e+17:
                                  		tmp = -1.0 * (-1.0 / fmin(x, y))
                                  	else:
                                  		tmp = fmin(x, y) / fmax(x, y)
                                  	return tmp
                                  
                                  function code(x, y)
                                  	tmp = 0.0
                                  	if (fmin(x, y) <= -7.6e+17)
                                  		tmp = Float64(-1.0 * Float64(-1.0 / fmin(x, y)));
                                  	else
                                  		tmp = Float64(fmin(x, y) / fmax(x, y));
                                  	end
                                  	return tmp
                                  end
                                  
                                  function tmp_2 = code(x, y)
                                  	tmp = 0.0;
                                  	if (min(x, y) <= -7.6e+17)
                                  		tmp = -1.0 * (-1.0 / min(x, y));
                                  	else
                                  		tmp = min(x, y) / max(x, y);
                                  	end
                                  	tmp_2 = tmp;
                                  end
                                  
                                  code[x_, y_] := If[LessEqual[N[Min[x, y], $MachinePrecision], -7.6e+17], N[(-1.0 * N[(-1.0 / N[Min[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Min[x, y], $MachinePrecision] / N[Max[x, y], $MachinePrecision]), $MachinePrecision]]
                                  
                                  \begin{array}{l}
                                  \mathbf{if}\;\mathsf{min}\left(x, y\right) \leq -7.6 \cdot 10^{+17}:\\
                                  \;\;\;\;-1 \cdot \frac{-1}{\mathsf{min}\left(x, y\right)}\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;\frac{\mathsf{min}\left(x, y\right)}{\mathsf{max}\left(x, y\right)}\\
                                  
                                  
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 2 regimes
                                  2. if x < -7.6e17

                                    1. Initial program 68.3%

                                      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                                    2. Step-by-step derivation
                                      1. lift-/.f64N/A

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

                                        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
                                      3. associate-/r*N/A

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

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

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

                                        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}}}{\left(x + y\right) + 1} \]
                                      7. sqr-neg-revN/A

                                        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(\mathsf{neg}\left(\left(x + y\right)\right)\right) \cdot \left(\mathsf{neg}\left(\left(x + y\right)\right)\right)}}}{\left(x + y\right) + 1} \]
                                      8. times-fracN/A

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

                                        \[\leadsto \color{blue}{\frac{y}{\mathsf{neg}\left(\left(x + y\right)\right)} \cdot \frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1}} \]
                                      10. lower-*.f64N/A

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

                                        \[\leadsto \color{blue}{\frac{y}{\mathsf{neg}\left(\left(x + y\right)\right)}} \cdot \frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1} \]
                                      12. lift-+.f64N/A

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

                                        \[\leadsto \frac{y}{\color{blue}{\left(\mathsf{neg}\left(x\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}} \cdot \frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1} \]
                                      14. sub-flip-reverseN/A

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

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

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

                                        \[\leadsto \frac{y}{\left(-x\right) - y} \cdot \color{blue}{\frac{\frac{x}{\mathsf{neg}\left(\left(x + y\right)\right)}}{\left(x + y\right) + 1}} \]
                                    3. Applied rewrites99.8%

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

                                      \[\leadsto \frac{y}{\left(-x\right) - y} \cdot \color{blue}{\frac{-1}{x}} \]
                                    5. Step-by-step derivation
                                      1. lower-/.f6438.2

                                        \[\leadsto \frac{y}{\left(-x\right) - y} \cdot \frac{-1}{\color{blue}{x}} \]
                                    6. Applied rewrites38.2%

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

                                      \[\leadsto \color{blue}{-1} \cdot \frac{-1}{x} \]
                                    8. Step-by-step derivation
                                      1. Applied rewrites4.2%

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

                                      if -7.6e17 < x

                                      1. Initial program 68.3%

                                        \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                                      2. Taylor expanded in x around 0

                                        \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
                                      3. Step-by-step derivation
                                        1. lower-/.f64N/A

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

                                          \[\leadsto \frac{x}{y \cdot \color{blue}{\left(1 + y\right)}} \]
                                        3. lower-+.f6449.2

                                          \[\leadsto \frac{x}{y \cdot \left(1 + \color{blue}{y}\right)} \]
                                      4. Applied rewrites49.2%

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

                                        \[\leadsto \frac{x}{\color{blue}{y}} \]
                                      6. Step-by-step derivation
                                        1. lower-/.f6426.3

                                          \[\leadsto \frac{x}{y} \]
                                      7. Applied rewrites26.3%

                                        \[\leadsto \frac{x}{\color{blue}{y}} \]
                                    9. Recombined 2 regimes into one program.
                                    10. Add Preprocessing

                                    Alternative 23: 26.3% accurate, 5.5× speedup?

                                    \[\frac{x}{y} \]
                                    (FPCore (x y) :precision binary64 (/ x y))
                                    double code(double x, double y) {
                                    	return 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)
                                    use fmin_fmax_functions
                                        real(8), intent (in) :: x
                                        real(8), intent (in) :: y
                                        code = x / y
                                    end function
                                    
                                    public static double code(double x, double y) {
                                    	return x / y;
                                    }
                                    
                                    def code(x, y):
                                    	return x / y
                                    
                                    function code(x, y)
                                    	return Float64(x / y)
                                    end
                                    
                                    function tmp = code(x, y)
                                    	tmp = x / y;
                                    end
                                    
                                    code[x_, y_] := N[(x / y), $MachinePrecision]
                                    
                                    \frac{x}{y}
                                    
                                    Derivation
                                    1. Initial program 68.3%

                                      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                                    2. Taylor expanded in x around 0

                                      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
                                    3. Step-by-step derivation
                                      1. lower-/.f64N/A

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

                                        \[\leadsto \frac{x}{y \cdot \color{blue}{\left(1 + y\right)}} \]
                                      3. lower-+.f6449.2

                                        \[\leadsto \frac{x}{y \cdot \left(1 + \color{blue}{y}\right)} \]
                                    4. Applied rewrites49.2%

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

                                      \[\leadsto \frac{x}{\color{blue}{y}} \]
                                    6. Step-by-step derivation
                                      1. lower-/.f6426.3

                                        \[\leadsto \frac{x}{y} \]
                                    7. Applied rewrites26.3%

                                      \[\leadsto \frac{x}{\color{blue}{y}} \]
                                    8. Add Preprocessing

                                    Reproduce

                                    ?
                                    herbie shell --seed 2025172 
                                    (FPCore (x y)
                                      :name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, A"
                                      :precision binary64
                                      (/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))