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

Percentage Accurate: 68.4% → 99.8%
Time: 4.7s
Alternatives: 18
Speedup: 1.5×

Specification

?
\[\begin{array}{l} \\ \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \end{array} \]
(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]
\begin{array}{l}

\\
\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 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.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \end{array} \]
(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]
\begin{array}{l}

\\
\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}
\end{array}

Alternative 1: 99.8% accurate, 0.8× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) + 1}}{y + x} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
 :precision binary64
 (/ (* (/ x (+ y x)) (/ y (+ (+ y x) 1.0))) (+ y x)))
assert(x < y);
double code(double x, double y) {
	return ((x / (y + x)) * (y / ((y + x) + 1.0))) / (y + x);
}
NOTE: x and y should be sorted in increasing order before calling this function.
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 / ((y + x) + 1.0d0))) / (y + x)
end function
assert x < y;
public static double code(double x, double y) {
	return ((x / (y + x)) * (y / ((y + x) + 1.0))) / (y + x);
}
[x, y] = sort([x, y])
def code(x, y):
	return ((x / (y + x)) * (y / ((y + x) + 1.0))) / (y + x)
x, y = sort([x, y])
function code(x, y)
	return Float64(Float64(Float64(x / Float64(y + x)) * Float64(y / Float64(Float64(y + x) + 1.0))) / Float64(y + x))
end
x, y = num2cell(sort([x, y])){:}
function tmp = code(x, y)
	tmp = ((x / (y + x)) * (y / ((y + x) + 1.0))) / (y + x);
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_] := N[(N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(y / N[(N[(y + x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) + 1}}{y + x}
\end{array}
Derivation
  1. Initial program 69.0%

    \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. 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)} \]
    2. 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)}} \]
    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. lift-+.f64N/A

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

      \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    6. 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)} \]
    7. lift-+.f64N/A

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

      \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
    9. 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}} \]
    10. lower-*.f64N/A

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

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

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

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

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

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

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

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

      \[\leadsto \frac{x}{{\left(y + x\right)}^{2}} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
    19. lower-+.f6488.3

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

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

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

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

      \[\leadsto \frac{x}{\color{blue}{{\left(x + y\right)}^{2}}} \cdot \frac{y}{\left(y + x\right) + 1} \]
    4. pow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 83.9% accurate, 0.7× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_0 := \left(y + x\right) + 1\\ \mathbf{if}\;y \leq 2.8 \cdot 10^{-259}:\\ \;\;\;\;\frac{1}{y + x} \cdot \frac{y}{t\_0}\\ \mathbf{elif}\;y \leq 1.1 \cdot 10^{-161}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{+102}:\\ \;\;\;\;\frac{x \cdot y}{\left(y + x\right) \cdot \left(\left(y + x\right) \cdot t\_0\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + x}}{y + x} \cdot 1\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (+ (+ y x) 1.0)))
   (if (<= y 2.8e-259)
     (* (/ 1.0 (+ y x)) (/ y t_0))
     (if (<= y 1.1e-161)
       (/ x y)
       (if (<= y 2.3e+102)
         (/ (* x y) (* (+ y x) (* (+ y x) t_0)))
         (* (/ (/ x (+ y x)) (+ y x)) 1.0))))))
assert(x < y);
double code(double x, double y) {
	double t_0 = (y + x) + 1.0;
	double tmp;
	if (y <= 2.8e-259) {
		tmp = (1.0 / (y + x)) * (y / t_0);
	} else if (y <= 1.1e-161) {
		tmp = x / y;
	} else if (y <= 2.3e+102) {
		tmp = (x * y) / ((y + x) * ((y + x) * t_0));
	} else {
		tmp = ((x / (y + x)) / (y + x)) * 1.0;
	}
	return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
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 = (y + x) + 1.0d0
    if (y <= 2.8d-259) then
        tmp = (1.0d0 / (y + x)) * (y / t_0)
    else if (y <= 1.1d-161) then
        tmp = x / y
    else if (y <= 2.3d+102) then
        tmp = (x * y) / ((y + x) * ((y + x) * t_0))
    else
        tmp = ((x / (y + x)) / (y + x)) * 1.0d0
    end if
    code = tmp
end function
assert x < y;
public static double code(double x, double y) {
	double t_0 = (y + x) + 1.0;
	double tmp;
	if (y <= 2.8e-259) {
		tmp = (1.0 / (y + x)) * (y / t_0);
	} else if (y <= 1.1e-161) {
		tmp = x / y;
	} else if (y <= 2.3e+102) {
		tmp = (x * y) / ((y + x) * ((y + x) * t_0));
	} else {
		tmp = ((x / (y + x)) / (y + x)) * 1.0;
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y):
	t_0 = (y + x) + 1.0
	tmp = 0
	if y <= 2.8e-259:
		tmp = (1.0 / (y + x)) * (y / t_0)
	elif y <= 1.1e-161:
		tmp = x / y
	elif y <= 2.3e+102:
		tmp = (x * y) / ((y + x) * ((y + x) * t_0))
	else:
		tmp = ((x / (y + x)) / (y + x)) * 1.0
	return tmp
x, y = sort([x, y])
function code(x, y)
	t_0 = Float64(Float64(y + x) + 1.0)
	tmp = 0.0
	if (y <= 2.8e-259)
		tmp = Float64(Float64(1.0 / Float64(y + x)) * Float64(y / t_0));
	elseif (y <= 1.1e-161)
		tmp = Float64(x / y);
	elseif (y <= 2.3e+102)
		tmp = Float64(Float64(x * y) / Float64(Float64(y + x) * Float64(Float64(y + x) * t_0)));
	else
		tmp = Float64(Float64(Float64(x / Float64(y + x)) / Float64(y + x)) * 1.0);
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
	t_0 = (y + x) + 1.0;
	tmp = 0.0;
	if (y <= 2.8e-259)
		tmp = (1.0 / (y + x)) * (y / t_0);
	elseif (y <= 1.1e-161)
		tmp = x / y;
	elseif (y <= 2.3e+102)
		tmp = (x * y) / ((y + x) * ((y + x) * t_0));
	else
		tmp = ((x / (y + x)) / (y + x)) * 1.0;
	end
	tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_] := Block[{t$95$0 = N[(N[(y + x), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[y, 2.8e-259], N[(N[(1.0 / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(y / t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.1e-161], N[(x / y), $MachinePrecision], If[LessEqual[y, 2.3e+102], N[(N[(x * y), $MachinePrecision] / N[(N[(y + x), $MachinePrecision] * N[(N[(y + x), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_0 := \left(y + x\right) + 1\\
\mathbf{if}\;y \leq 2.8 \cdot 10^{-259}:\\
\;\;\;\;\frac{1}{y + x} \cdot \frac{y}{t\_0}\\

\mathbf{elif}\;y \leq 1.1 \cdot 10^{-161}:\\
\;\;\;\;\frac{x}{y}\\

\mathbf{elif}\;y \leq 2.3 \cdot 10^{+102}:\\
\;\;\;\;\frac{x \cdot y}{\left(y + x\right) \cdot \left(\left(y + x\right) \cdot t\_0\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + x}}{y + x} \cdot 1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < 2.8e-259

    1. Initial program 69.8%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. 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)} \]
      2. 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)}} \]
      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. lift-+.f64N/A

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

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      6. 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)} \]
      7. lift-+.f64N/A

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

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
      9. 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}} \]
      10. lower-*.f64N/A

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{{\left(y + x\right)}^{2}} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
      19. lower-+.f6489.4

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

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

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

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

        \[\leadsto \frac{x}{\color{blue}{{\left(x + y\right)}^{2}}} \cdot \frac{y}{\left(y + x\right) + 1} \]
      4. pow2N/A

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

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

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

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

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) + 1} \]
      9. lift-+.f6489.4

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 2.8e-259 < y < 1.10000000000000001e-161

      1. Initial program 62.4%

        \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. 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)} \]
        2. 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)}} \]
        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. lift-+.f64N/A

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

          \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        6. 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)} \]
        7. lift-+.f64N/A

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

          \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
        9. 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}} \]
        10. lower-*.f64N/A

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

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

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

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

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

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

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

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

          \[\leadsto \frac{x}{{\left(y + x\right)}^{2}} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
        19. lower-+.f6466.4

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

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

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

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

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

          \[\leadsto \frac{x}{y \cdot \left(1 + y\right)} \]
        4. distribute-lft-outN/A

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

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

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

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

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

          \[\leadsto \frac{x}{\left(1 + y\right) \cdot y} \]
      7. Applied rewrites24.1%

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

        \[\leadsto \frac{x}{y} \]
      9. Step-by-step derivation
        1. Applied rewrites24.1%

          \[\leadsto \frac{x}{y} \]

        if 1.10000000000000001e-161 < y < 2.2999999999999999e102

        1. Initial program 87.9%

          \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. 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)}} \]
          2. lift-+.f64N/A

            \[\leadsto \frac{x \cdot y}{\left(\color{blue}{\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}{\left(\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          4. 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)} \]
          5. lift-+.f64N/A

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

            \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
          7. 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)}} \]
          8. lower-*.f64N/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)}} \]
          9. +-commutativeN/A

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

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

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

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

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

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

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

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

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

        if 2.2999999999999999e102 < y

        1. Initial program 54.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. Add Preprocessing
        3. Step-by-step derivation
          1. 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)} \]
          2. 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)}} \]
          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. lift-+.f64N/A

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

            \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          6. 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)} \]
          7. lift-+.f64N/A

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

            \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
          9. 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}} \]
          10. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{x}{\color{blue}{{\left(x + y\right)}^{2}}} \cdot \frac{y}{\left(y + x\right) + 1} \]
          4. pow2N/A

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

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

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

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

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) + 1} \]
          9. lift-+.f6488.6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \color{blue}{1} \]
        10. Step-by-step derivation
          1. Applied rewrites84.6%

            \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \color{blue}{1} \]
        11. Recombined 4 regimes into one program.
        12. Final simplification62.9%

          \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 2.8 \cdot 10^{-259}:\\ \;\;\;\;\frac{1}{y + x} \cdot \frac{y}{\left(y + x\right) + 1}\\ \mathbf{elif}\;y \leq 1.1 \cdot 10^{-161}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{+102}:\\ \;\;\;\;\frac{x \cdot y}{\left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(\left(y + x\right) + 1\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + x}}{y + x} \cdot 1\\ \end{array} \]
        13. Add Preprocessing

        Alternative 3: 83.9% accurate, 0.7× speedup?

        \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq 2.8 \cdot 10^{-259}:\\ \;\;\;\;\frac{1}{y + x} \cdot \frac{y}{\left(y + x\right) + 1}\\ \mathbf{elif}\;y \leq 1.1 \cdot 10^{-161}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{+102}:\\ \;\;\;\;\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + x}}{y + x} \cdot 1\\ \end{array} \end{array} \]
        NOTE: x and y should be sorted in increasing order before calling this function.
        (FPCore (x y)
         :precision binary64
         (if (<= y 2.8e-259)
           (* (/ 1.0 (+ y x)) (/ y (+ (+ y x) 1.0)))
           (if (<= y 1.1e-161)
             (/ x y)
             (if (<= y 2.3e+102)
               (/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0)))
               (* (/ (/ x (+ y x)) (+ y x)) 1.0)))))
        assert(x < y);
        double code(double x, double y) {
        	double tmp;
        	if (y <= 2.8e-259) {
        		tmp = (1.0 / (y + x)) * (y / ((y + x) + 1.0));
        	} else if (y <= 1.1e-161) {
        		tmp = x / y;
        	} else if (y <= 2.3e+102) {
        		tmp = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
        	} else {
        		tmp = ((x / (y + x)) / (y + x)) * 1.0;
        	}
        	return tmp;
        }
        
        NOTE: x and y should be sorted in increasing order before calling this function.
        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 (y <= 2.8d-259) then
                tmp = (1.0d0 / (y + x)) * (y / ((y + x) + 1.0d0))
            else if (y <= 1.1d-161) then
                tmp = x / y
            else if (y <= 2.3d+102) then
                tmp = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0d0))
            else
                tmp = ((x / (y + x)) / (y + x)) * 1.0d0
            end if
            code = tmp
        end function
        
        assert x < y;
        public static double code(double x, double y) {
        	double tmp;
        	if (y <= 2.8e-259) {
        		tmp = (1.0 / (y + x)) * (y / ((y + x) + 1.0));
        	} else if (y <= 1.1e-161) {
        		tmp = x / y;
        	} else if (y <= 2.3e+102) {
        		tmp = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
        	} else {
        		tmp = ((x / (y + x)) / (y + x)) * 1.0;
        	}
        	return tmp;
        }
        
        [x, y] = sort([x, y])
        def code(x, y):
        	tmp = 0
        	if y <= 2.8e-259:
        		tmp = (1.0 / (y + x)) * (y / ((y + x) + 1.0))
        	elif y <= 1.1e-161:
        		tmp = x / y
        	elif y <= 2.3e+102:
        		tmp = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0))
        	else:
        		tmp = ((x / (y + x)) / (y + x)) * 1.0
        	return tmp
        
        x, y = sort([x, y])
        function code(x, y)
        	tmp = 0.0
        	if (y <= 2.8e-259)
        		tmp = Float64(Float64(1.0 / Float64(y + x)) * Float64(y / Float64(Float64(y + x) + 1.0)));
        	elseif (y <= 1.1e-161)
        		tmp = Float64(x / y);
        	elseif (y <= 2.3e+102)
        		tmp = Float64(Float64(x * y) / Float64(Float64(Float64(x + y) * Float64(x + y)) * Float64(Float64(x + y) + 1.0)));
        	else
        		tmp = Float64(Float64(Float64(x / Float64(y + x)) / Float64(y + x)) * 1.0);
        	end
        	return tmp
        end
        
        x, y = num2cell(sort([x, y])){:}
        function tmp_2 = code(x, y)
        	tmp = 0.0;
        	if (y <= 2.8e-259)
        		tmp = (1.0 / (y + x)) * (y / ((y + x) + 1.0));
        	elseif (y <= 1.1e-161)
        		tmp = x / y;
        	elseif (y <= 2.3e+102)
        		tmp = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
        	else
        		tmp = ((x / (y + x)) / (y + x)) * 1.0;
        	end
        	tmp_2 = tmp;
        end
        
        NOTE: x and y should be sorted in increasing order before calling this function.
        code[x_, y_] := If[LessEqual[y, 2.8e-259], N[(N[(1.0 / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(y / N[(N[(y + x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.1e-161], N[(x / y), $MachinePrecision], If[LessEqual[y, 2.3e+102], 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], N[(N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision]]]]
        
        \begin{array}{l}
        [x, y] = \mathsf{sort}([x, y])\\
        \\
        \begin{array}{l}
        \mathbf{if}\;y \leq 2.8 \cdot 10^{-259}:\\
        \;\;\;\;\frac{1}{y + x} \cdot \frac{y}{\left(y + x\right) + 1}\\
        
        \mathbf{elif}\;y \leq 1.1 \cdot 10^{-161}:\\
        \;\;\;\;\frac{x}{y}\\
        
        \mathbf{elif}\;y \leq 2.3 \cdot 10^{+102}:\\
        \;\;\;\;\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{\frac{x}{y + x}}{y + x} \cdot 1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 4 regimes
        2. if y < 2.8e-259

          1. Initial program 69.8%

            \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          2. Add Preprocessing
          3. Step-by-step derivation
            1. 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)} \]
            2. 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)}} \]
            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. lift-+.f64N/A

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

              \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}\right) \cdot \left(\left(x + y\right) + 1\right)} \]
            6. 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)} \]
            7. lift-+.f64N/A

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

              \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
            9. 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}} \]
            10. lower-*.f64N/A

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

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

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

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

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

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

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

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

              \[\leadsto \frac{x}{{\left(y + x\right)}^{2}} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
            19. lower-+.f6489.4

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

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

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

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

              \[\leadsto \frac{x}{\color{blue}{{\left(x + y\right)}^{2}}} \cdot \frac{y}{\left(y + x\right) + 1} \]
            4. pow2N/A

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

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

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

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

              \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) + 1} \]
            9. lift-+.f6489.4

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 2.8e-259 < y < 1.10000000000000001e-161

            1. Initial program 62.4%

              \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
            2. Add Preprocessing
            3. Step-by-step derivation
              1. 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)} \]
              2. 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)}} \]
              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. lift-+.f64N/A

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

                \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}\right) \cdot \left(\left(x + y\right) + 1\right)} \]
              6. 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)} \]
              7. lift-+.f64N/A

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

                \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
              9. 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}} \]
              10. lower-*.f64N/A

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

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

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

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

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

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

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

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

                \[\leadsto \frac{x}{{\left(y + x\right)}^{2}} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
              19. lower-+.f6466.4

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

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

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

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

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

                \[\leadsto \frac{x}{y \cdot \left(1 + y\right)} \]
              4. distribute-lft-outN/A

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

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

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

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

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

                \[\leadsto \frac{x}{\left(1 + y\right) \cdot y} \]
            7. Applied rewrites24.1%

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

              \[\leadsto \frac{x}{y} \]
            9. Step-by-step derivation
              1. Applied rewrites24.1%

                \[\leadsto \frac{x}{y} \]

              if 1.10000000000000001e-161 < y < 2.2999999999999999e102

              1. Initial program 87.9%

                \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
              2. Add Preprocessing

              if 2.2999999999999999e102 < y

              1. Initial program 54.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. Add Preprocessing
              3. Step-by-step derivation
                1. 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)} \]
                2. 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)}} \]
                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. lift-+.f64N/A

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

                  \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                6. 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)} \]
                7. lift-+.f64N/A

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

                  \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
                9. 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}} \]
                10. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{x}{\color{blue}{{\left(x + y\right)}^{2}}} \cdot \frac{y}{\left(y + x\right) + 1} \]
                4. pow2N/A

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

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

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

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

                  \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) + 1} \]
                9. lift-+.f6488.6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \color{blue}{1} \]
              10. Step-by-step derivation
                1. Applied rewrites84.6%

                  \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \color{blue}{1} \]
              11. Recombined 4 regimes into one program.
              12. Final simplification62.9%

                \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 2.8 \cdot 10^{-259}:\\ \;\;\;\;\frac{1}{y + x} \cdot \frac{y}{\left(y + x\right) + 1}\\ \mathbf{elif}\;y \leq 1.1 \cdot 10^{-161}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{+102}:\\ \;\;\;\;\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + x}}{y + x} \cdot 1\\ \end{array} \]
              13. Add Preprocessing

              Alternative 4: 92.6% accurate, 0.7× speedup?

              \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_0 := \frac{y}{\left(y + x\right) + 1}\\ \mathbf{if}\;x \leq -5.7 \cdot 10^{+155}:\\ \;\;\;\;\frac{1}{y + x} \cdot t\_0\\ \mathbf{elif}\;x \leq -2.15 \cdot 10^{-159}:\\ \;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(1 + y\right) \cdot y}\\ \end{array} \end{array} \]
              NOTE: x and y should be sorted in increasing order before calling this function.
              (FPCore (x y)
               :precision binary64
               (let* ((t_0 (/ y (+ (+ y x) 1.0))))
                 (if (<= x -5.7e+155)
                   (* (/ 1.0 (+ y x)) t_0)
                   (if (<= x -2.15e-159)
                     (* (/ x (* (+ y x) (+ y x))) t_0)
                     (/ x (* (+ 1.0 y) y))))))
              assert(x < y);
              double code(double x, double y) {
              	double t_0 = y / ((y + x) + 1.0);
              	double tmp;
              	if (x <= -5.7e+155) {
              		tmp = (1.0 / (y + x)) * t_0;
              	} else if (x <= -2.15e-159) {
              		tmp = (x / ((y + x) * (y + x))) * t_0;
              	} else {
              		tmp = x / ((1.0 + y) * y);
              	}
              	return tmp;
              }
              
              NOTE: x and y should be sorted in increasing order before calling this function.
              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 = y / ((y + x) + 1.0d0)
                  if (x <= (-5.7d+155)) then
                      tmp = (1.0d0 / (y + x)) * t_0
                  else if (x <= (-2.15d-159)) then
                      tmp = (x / ((y + x) * (y + x))) * t_0
                  else
                      tmp = x / ((1.0d0 + y) * y)
                  end if
                  code = tmp
              end function
              
              assert x < y;
              public static double code(double x, double y) {
              	double t_0 = y / ((y + x) + 1.0);
              	double tmp;
              	if (x <= -5.7e+155) {
              		tmp = (1.0 / (y + x)) * t_0;
              	} else if (x <= -2.15e-159) {
              		tmp = (x / ((y + x) * (y + x))) * t_0;
              	} else {
              		tmp = x / ((1.0 + y) * y);
              	}
              	return tmp;
              }
              
              [x, y] = sort([x, y])
              def code(x, y):
              	t_0 = y / ((y + x) + 1.0)
              	tmp = 0
              	if x <= -5.7e+155:
              		tmp = (1.0 / (y + x)) * t_0
              	elif x <= -2.15e-159:
              		tmp = (x / ((y + x) * (y + x))) * t_0
              	else:
              		tmp = x / ((1.0 + y) * y)
              	return tmp
              
              x, y = sort([x, y])
              function code(x, y)
              	t_0 = Float64(y / Float64(Float64(y + x) + 1.0))
              	tmp = 0.0
              	if (x <= -5.7e+155)
              		tmp = Float64(Float64(1.0 / Float64(y + x)) * t_0);
              	elseif (x <= -2.15e-159)
              		tmp = Float64(Float64(x / Float64(Float64(y + x) * Float64(y + x))) * t_0);
              	else
              		tmp = Float64(x / Float64(Float64(1.0 + y) * y));
              	end
              	return tmp
              end
              
              x, y = num2cell(sort([x, y])){:}
              function tmp_2 = code(x, y)
              	t_0 = y / ((y + x) + 1.0);
              	tmp = 0.0;
              	if (x <= -5.7e+155)
              		tmp = (1.0 / (y + x)) * t_0;
              	elseif (x <= -2.15e-159)
              		tmp = (x / ((y + x) * (y + x))) * t_0;
              	else
              		tmp = x / ((1.0 + y) * y);
              	end
              	tmp_2 = tmp;
              end
              
              NOTE: x and y should be sorted in increasing order before calling this function.
              code[x_, y_] := Block[{t$95$0 = N[(y / N[(N[(y + x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.7e+155], N[(N[(1.0 / N[(y + x), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[x, -2.15e-159], N[(N[(x / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], N[(x / N[(N[(1.0 + y), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]]]]
              
              \begin{array}{l}
              [x, y] = \mathsf{sort}([x, y])\\
              \\
              \begin{array}{l}
              t_0 := \frac{y}{\left(y + x\right) + 1}\\
              \mathbf{if}\;x \leq -5.7 \cdot 10^{+155}:\\
              \;\;\;\;\frac{1}{y + x} \cdot t\_0\\
              
              \mathbf{elif}\;x \leq -2.15 \cdot 10^{-159}:\\
              \;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot t\_0\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{x}{\left(1 + y\right) \cdot y}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if x < -5.6999999999999996e155

                1. Initial program 56.7%

                  \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                2. Add Preprocessing
                3. Step-by-step derivation
                  1. 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)} \]
                  2. 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)}} \]
                  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. lift-+.f64N/A

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

                    \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                  6. 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)} \]
                  7. lift-+.f64N/A

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

                    \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
                  9. 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}} \]
                  10. lower-*.f64N/A

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{x}{{\left(y + x\right)}^{2}} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
                  19. lower-+.f6484.0

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

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

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

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

                    \[\leadsto \frac{x}{\color{blue}{{\left(x + y\right)}^{2}}} \cdot \frac{y}{\left(y + x\right) + 1} \]
                  4. pow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{\color{blue}{1}}{y + x} \cdot \frac{y}{\left(y + x\right) + 1} \]
                10. Step-by-step derivation
                  1. Applied rewrites81.6%

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

                  if -5.6999999999999996e155 < x < -2.15e-159

                  1. Initial program 73.1%

                    \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                  2. Add Preprocessing
                  3. Step-by-step derivation
                    1. 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)} \]
                    2. 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)}} \]
                    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. lift-+.f64N/A

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

                      \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                    6. 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)} \]
                    7. lift-+.f64N/A

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

                      \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
                    9. 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}} \]
                    10. lower-*.f64N/A

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{x}{{\left(y + x\right)}^{2}} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
                    19. lower-+.f6497.1

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

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

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

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

                      \[\leadsto \frac{x}{\color{blue}{{\left(x + y\right)}^{2}}} \cdot \frac{y}{\left(y + x\right) + 1} \]
                    4. pow2N/A

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

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

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

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

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

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

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

                  if -2.15e-159 < x

                  1. Initial program 69.5%

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

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

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

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

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

                      \[\leadsto \frac{x}{\left(1 + y\right) \cdot y} \]
                  5. Applied rewrites56.2%

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

                Alternative 5: 88.2% accurate, 0.7× speedup?

                \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq -0.095:\\ \;\;\;\;\frac{1}{y + x} \cdot \frac{y}{\left(y + x\right) + 1}\\ \mathbf{elif}\;x \leq -2.15 \cdot 10^{-159}:\\ \;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{y + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(1 + y\right) \cdot y}\\ \end{array} \end{array} \]
                NOTE: x and y should be sorted in increasing order before calling this function.
                (FPCore (x y)
                 :precision binary64
                 (if (<= x -0.095)
                   (* (/ 1.0 (+ y x)) (/ y (+ (+ y x) 1.0)))
                   (if (<= x -2.15e-159)
                     (* (/ x (* (+ y x) (+ y x))) (/ y (+ y 1.0)))
                     (/ x (* (+ 1.0 y) y)))))
                assert(x < y);
                double code(double x, double y) {
                	double tmp;
                	if (x <= -0.095) {
                		tmp = (1.0 / (y + x)) * (y / ((y + x) + 1.0));
                	} else if (x <= -2.15e-159) {
                		tmp = (x / ((y + x) * (y + x))) * (y / (y + 1.0));
                	} else {
                		tmp = x / ((1.0 + y) * y);
                	}
                	return tmp;
                }
                
                NOTE: x and y should be sorted in increasing order before calling this function.
                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 <= (-0.095d0)) then
                        tmp = (1.0d0 / (y + x)) * (y / ((y + x) + 1.0d0))
                    else if (x <= (-2.15d-159)) then
                        tmp = (x / ((y + x) * (y + x))) * (y / (y + 1.0d0))
                    else
                        tmp = x / ((1.0d0 + y) * y)
                    end if
                    code = tmp
                end function
                
                assert x < y;
                public static double code(double x, double y) {
                	double tmp;
                	if (x <= -0.095) {
                		tmp = (1.0 / (y + x)) * (y / ((y + x) + 1.0));
                	} else if (x <= -2.15e-159) {
                		tmp = (x / ((y + x) * (y + x))) * (y / (y + 1.0));
                	} else {
                		tmp = x / ((1.0 + y) * y);
                	}
                	return tmp;
                }
                
                [x, y] = sort([x, y])
                def code(x, y):
                	tmp = 0
                	if x <= -0.095:
                		tmp = (1.0 / (y + x)) * (y / ((y + x) + 1.0))
                	elif x <= -2.15e-159:
                		tmp = (x / ((y + x) * (y + x))) * (y / (y + 1.0))
                	else:
                		tmp = x / ((1.0 + y) * y)
                	return tmp
                
                x, y = sort([x, y])
                function code(x, y)
                	tmp = 0.0
                	if (x <= -0.095)
                		tmp = Float64(Float64(1.0 / Float64(y + x)) * Float64(y / Float64(Float64(y + x) + 1.0)));
                	elseif (x <= -2.15e-159)
                		tmp = Float64(Float64(x / Float64(Float64(y + x) * Float64(y + x))) * Float64(y / Float64(y + 1.0)));
                	else
                		tmp = Float64(x / Float64(Float64(1.0 + y) * y));
                	end
                	return tmp
                end
                
                x, y = num2cell(sort([x, y])){:}
                function tmp_2 = code(x, y)
                	tmp = 0.0;
                	if (x <= -0.095)
                		tmp = (1.0 / (y + x)) * (y / ((y + x) + 1.0));
                	elseif (x <= -2.15e-159)
                		tmp = (x / ((y + x) * (y + x))) * (y / (y + 1.0));
                	else
                		tmp = x / ((1.0 + y) * y);
                	end
                	tmp_2 = tmp;
                end
                
                NOTE: x and y should be sorted in increasing order before calling this function.
                code[x_, y_] := If[LessEqual[x, -0.095], N[(N[(1.0 / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(y / N[(N[(y + x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.15e-159], N[(N[(x / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(1.0 + y), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]]]
                
                \begin{array}{l}
                [x, y] = \mathsf{sort}([x, y])\\
                \\
                \begin{array}{l}
                \mathbf{if}\;x \leq -0.095:\\
                \;\;\;\;\frac{1}{y + x} \cdot \frac{y}{\left(y + x\right) + 1}\\
                
                \mathbf{elif}\;x \leq -2.15 \cdot 10^{-159}:\\
                \;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{y + 1}\\
                
                \mathbf{else}:\\
                \;\;\;\;\frac{x}{\left(1 + y\right) \cdot y}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if x < -0.095000000000000001

                  1. Initial program 59.2%

                    \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                  2. Add Preprocessing
                  3. Step-by-step derivation
                    1. 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)} \]
                    2. 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)}} \]
                    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. lift-+.f64N/A

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

                      \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                    6. 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)} \]
                    7. lift-+.f64N/A

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

                      \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
                    9. 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}} \]
                    10. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{x}{\color{blue}{{\left(x + y\right)}^{2}}} \cdot \frac{y}{\left(y + x\right) + 1} \]
                    4. pow2N/A

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

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

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

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

                      \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) + 1} \]
                    9. lift-+.f6488.6

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{\frac{x}{y + x}}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) + 1} \]
                    13. lift-+.f6499.7

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

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

                    \[\leadsto \frac{\color{blue}{1}}{y + x} \cdot \frac{y}{\left(y + x\right) + 1} \]
                  10. Step-by-step derivation
                    1. Applied rewrites71.7%

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

                    if -0.095000000000000001 < x < -2.15e-159

                    1. Initial program 81.4%

                      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                    2. Add Preprocessing
                    3. Step-by-step derivation
                      1. 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)} \]
                      2. 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)}} \]
                      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. lift-+.f64N/A

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

                        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                      6. 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)} \]
                      7. lift-+.f64N/A

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

                        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
                      9. 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}} \]
                      10. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \frac{x}{\color{blue}{{\left(x + y\right)}^{2}}} \cdot \frac{y}{\left(y + x\right) + 1} \]
                      4. pow2N/A

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

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

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

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

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

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

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

                      \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{y} + 1} \]
                    8. Step-by-step derivation
                      1. +-commutative99.2

                        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{y + 1} \]
                    9. Applied rewrites99.2%

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

                    if -2.15e-159 < x

                    1. Initial program 69.5%

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

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

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

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

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

                        \[\leadsto \frac{x}{\left(1 + y\right) \cdot y} \]
                    5. Applied rewrites56.2%

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

                  Alternative 6: 96.5% accurate, 0.8× speedup?

                  \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_0 := \frac{x}{y + x}\\ \mathbf{if}\;x \leq -5.4 \cdot 10^{+155}:\\ \;\;\;\;\frac{t\_0}{y + x} \cdot \frac{y}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_0 \cdot y}{\left(\left(y + x\right) + 1\right) \cdot \left(y + x\right)}\\ \end{array} \end{array} \]
                  NOTE: x and y should be sorted in increasing order before calling this function.
                  (FPCore (x y)
                   :precision binary64
                   (let* ((t_0 (/ x (+ y x))))
                     (if (<= x -5.4e+155)
                       (* (/ t_0 (+ y x)) (/ y x))
                       (/ (* t_0 y) (* (+ (+ y x) 1.0) (+ y x))))))
                  assert(x < y);
                  double code(double x, double y) {
                  	double t_0 = x / (y + x);
                  	double tmp;
                  	if (x <= -5.4e+155) {
                  		tmp = (t_0 / (y + x)) * (y / x);
                  	} else {
                  		tmp = (t_0 * y) / (((y + x) + 1.0) * (y + x));
                  	}
                  	return tmp;
                  }
                  
                  NOTE: x and y should be sorted in increasing order before calling this function.
                  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 = x / (y + x)
                      if (x <= (-5.4d+155)) then
                          tmp = (t_0 / (y + x)) * (y / x)
                      else
                          tmp = (t_0 * y) / (((y + x) + 1.0d0) * (y + x))
                      end if
                      code = tmp
                  end function
                  
                  assert x < y;
                  public static double code(double x, double y) {
                  	double t_0 = x / (y + x);
                  	double tmp;
                  	if (x <= -5.4e+155) {
                  		tmp = (t_0 / (y + x)) * (y / x);
                  	} else {
                  		tmp = (t_0 * y) / (((y + x) + 1.0) * (y + x));
                  	}
                  	return tmp;
                  }
                  
                  [x, y] = sort([x, y])
                  def code(x, y):
                  	t_0 = x / (y + x)
                  	tmp = 0
                  	if x <= -5.4e+155:
                  		tmp = (t_0 / (y + x)) * (y / x)
                  	else:
                  		tmp = (t_0 * y) / (((y + x) + 1.0) * (y + x))
                  	return tmp
                  
                  x, y = sort([x, y])
                  function code(x, y)
                  	t_0 = Float64(x / Float64(y + x))
                  	tmp = 0.0
                  	if (x <= -5.4e+155)
                  		tmp = Float64(Float64(t_0 / Float64(y + x)) * Float64(y / x));
                  	else
                  		tmp = Float64(Float64(t_0 * y) / Float64(Float64(Float64(y + x) + 1.0) * Float64(y + x)));
                  	end
                  	return tmp
                  end
                  
                  x, y = num2cell(sort([x, y])){:}
                  function tmp_2 = code(x, y)
                  	t_0 = x / (y + x);
                  	tmp = 0.0;
                  	if (x <= -5.4e+155)
                  		tmp = (t_0 / (y + x)) * (y / x);
                  	else
                  		tmp = (t_0 * y) / (((y + x) + 1.0) * (y + x));
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  NOTE: x and y should be sorted in increasing order before calling this function.
                  code[x_, y_] := Block[{t$95$0 = N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.4e+155], N[(N[(t$95$0 / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$0 * y), $MachinePrecision] / N[(N[(N[(y + x), $MachinePrecision] + 1.0), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                  
                  \begin{array}{l}
                  [x, y] = \mathsf{sort}([x, y])\\
                  \\
                  \begin{array}{l}
                  t_0 := \frac{x}{y + x}\\
                  \mathbf{if}\;x \leq -5.4 \cdot 10^{+155}:\\
                  \;\;\;\;\frac{t\_0}{y + x} \cdot \frac{y}{x}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\frac{t\_0 \cdot y}{\left(\left(y + x\right) + 1\right) \cdot \left(y + x\right)}\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if x < -5.39999999999999987e155

                    1. Initial program 56.7%

                      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                    2. Add Preprocessing
                    3. Step-by-step derivation
                      1. 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)} \]
                      2. 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)}} \]
                      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. lift-+.f64N/A

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

                        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                      6. 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)} \]
                      7. lift-+.f64N/A

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

                        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
                      9. 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}} \]
                      10. lower-*.f64N/A

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

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

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

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

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

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

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

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

                        \[\leadsto \frac{x}{{\left(y + x\right)}^{2}} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
                      19. lower-+.f6484.0

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

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

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

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

                        \[\leadsto \frac{x}{\color{blue}{{\left(x + y\right)}^{2}}} \cdot \frac{y}{\left(y + x\right) + 1} \]
                      4. pow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\color{blue}{x}} \]
                    10. Step-by-step derivation
                      1. Applied rewrites87.7%

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

                      if -5.39999999999999987e155 < x

                      1. Initial program 70.6%

                        \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                      2. Add Preprocessing
                      3. Step-by-step derivation
                        1. 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)} \]
                        2. 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)}} \]
                        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. lift-+.f64N/A

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

                          \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                        6. 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)} \]
                        7. lift-+.f64N/A

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

                          \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
                        9. 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}} \]
                        10. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \frac{x}{\color{blue}{{\left(x + y\right)}^{2}}} \cdot \frac{y}{\left(y + x\right) + 1} \]
                        4. pow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 7: 96.5% accurate, 0.8× speedup?

                    \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_0 := \frac{x}{y + x}\\ \mathbf{if}\;x \leq -5.4 \cdot 10^{+155}:\\ \;\;\;\;\frac{t\_0}{y + x} \cdot \frac{y}{x}\\ \mathbf{else}:\\ \;\;\;\;t\_0 \cdot \frac{y}{\left(\left(y + x\right) + 1\right) \cdot \left(y + x\right)}\\ \end{array} \end{array} \]
                    NOTE: x and y should be sorted in increasing order before calling this function.
                    (FPCore (x y)
                     :precision binary64
                     (let* ((t_0 (/ x (+ y x))))
                       (if (<= x -5.4e+155)
                         (* (/ t_0 (+ y x)) (/ y x))
                         (* t_0 (/ y (* (+ (+ y x) 1.0) (+ y x)))))))
                    assert(x < y);
                    double code(double x, double y) {
                    	double t_0 = x / (y + x);
                    	double tmp;
                    	if (x <= -5.4e+155) {
                    		tmp = (t_0 / (y + x)) * (y / x);
                    	} else {
                    		tmp = t_0 * (y / (((y + x) + 1.0) * (y + x)));
                    	}
                    	return tmp;
                    }
                    
                    NOTE: x and y should be sorted in increasing order before calling this function.
                    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 = x / (y + x)
                        if (x <= (-5.4d+155)) then
                            tmp = (t_0 / (y + x)) * (y / x)
                        else
                            tmp = t_0 * (y / (((y + x) + 1.0d0) * (y + x)))
                        end if
                        code = tmp
                    end function
                    
                    assert x < y;
                    public static double code(double x, double y) {
                    	double t_0 = x / (y + x);
                    	double tmp;
                    	if (x <= -5.4e+155) {
                    		tmp = (t_0 / (y + x)) * (y / x);
                    	} else {
                    		tmp = t_0 * (y / (((y + x) + 1.0) * (y + x)));
                    	}
                    	return tmp;
                    }
                    
                    [x, y] = sort([x, y])
                    def code(x, y):
                    	t_0 = x / (y + x)
                    	tmp = 0
                    	if x <= -5.4e+155:
                    		tmp = (t_0 / (y + x)) * (y / x)
                    	else:
                    		tmp = t_0 * (y / (((y + x) + 1.0) * (y + x)))
                    	return tmp
                    
                    x, y = sort([x, y])
                    function code(x, y)
                    	t_0 = Float64(x / Float64(y + x))
                    	tmp = 0.0
                    	if (x <= -5.4e+155)
                    		tmp = Float64(Float64(t_0 / Float64(y + x)) * Float64(y / x));
                    	else
                    		tmp = Float64(t_0 * Float64(y / Float64(Float64(Float64(y + x) + 1.0) * Float64(y + x))));
                    	end
                    	return tmp
                    end
                    
                    x, y = num2cell(sort([x, y])){:}
                    function tmp_2 = code(x, y)
                    	t_0 = x / (y + x);
                    	tmp = 0.0;
                    	if (x <= -5.4e+155)
                    		tmp = (t_0 / (y + x)) * (y / x);
                    	else
                    		tmp = t_0 * (y / (((y + x) + 1.0) * (y + x)));
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    NOTE: x and y should be sorted in increasing order before calling this function.
                    code[x_, y_] := Block[{t$95$0 = N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.4e+155], N[(N[(t$95$0 / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(y / N[(N[(N[(y + x), $MachinePrecision] + 1.0), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                    
                    \begin{array}{l}
                    [x, y] = \mathsf{sort}([x, y])\\
                    \\
                    \begin{array}{l}
                    t_0 := \frac{x}{y + x}\\
                    \mathbf{if}\;x \leq -5.4 \cdot 10^{+155}:\\
                    \;\;\;\;\frac{t\_0}{y + x} \cdot \frac{y}{x}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;t\_0 \cdot \frac{y}{\left(\left(y + x\right) + 1\right) \cdot \left(y + x\right)}\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if x < -5.39999999999999987e155

                      1. Initial program 56.7%

                        \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                      2. Add Preprocessing
                      3. Step-by-step derivation
                        1. 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)} \]
                        2. 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)}} \]
                        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. lift-+.f64N/A

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

                          \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                        6. 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)} \]
                        7. lift-+.f64N/A

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

                          \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
                        9. 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}} \]
                        10. lower-*.f64N/A

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

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

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

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

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

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

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

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

                          \[\leadsto \frac{x}{{\left(y + x\right)}^{2}} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
                        19. lower-+.f6484.0

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

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

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

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

                          \[\leadsto \frac{x}{\color{blue}{{\left(x + y\right)}^{2}}} \cdot \frac{y}{\left(y + x\right) + 1} \]
                        4. pow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\color{blue}{x}} \]
                      10. Step-by-step derivation
                        1. Applied rewrites87.7%

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

                        if -5.39999999999999987e155 < x

                        1. Initial program 70.6%

                          \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                        2. Add Preprocessing
                        3. Step-by-step derivation
                          1. 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)} \]
                          2. 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)}} \]
                          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. lift-+.f64N/A

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

                            \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                          6. 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)} \]
                          7. lift-+.f64N/A

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

                            \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
                          9. 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}} \]
                          10. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \frac{x}{\color{blue}{{\left(x + y\right)}^{2}}} \cdot \frac{y}{\left(y + x\right) + 1} \]
                          4. pow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      Alternative 8: 95.2% accurate, 0.8× speedup?

                      \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_0 := \frac{x}{y + x}\\ \mathbf{if}\;y \leq 1.25 \cdot 10^{+130}:\\ \;\;\;\;t\_0 \cdot \frac{y}{\left(\left(y + x\right) + 1\right) \cdot \left(y + x\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_0}{y + x} \cdot 1\\ \end{array} \end{array} \]
                      NOTE: x and y should be sorted in increasing order before calling this function.
                      (FPCore (x y)
                       :precision binary64
                       (let* ((t_0 (/ x (+ y x))))
                         (if (<= y 1.25e+130)
                           (* t_0 (/ y (* (+ (+ y x) 1.0) (+ y x))))
                           (* (/ t_0 (+ y x)) 1.0))))
                      assert(x < y);
                      double code(double x, double y) {
                      	double t_0 = x / (y + x);
                      	double tmp;
                      	if (y <= 1.25e+130) {
                      		tmp = t_0 * (y / (((y + x) + 1.0) * (y + x)));
                      	} else {
                      		tmp = (t_0 / (y + x)) * 1.0;
                      	}
                      	return tmp;
                      }
                      
                      NOTE: x and y should be sorted in increasing order before calling this function.
                      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 = x / (y + x)
                          if (y <= 1.25d+130) then
                              tmp = t_0 * (y / (((y + x) + 1.0d0) * (y + x)))
                          else
                              tmp = (t_0 / (y + x)) * 1.0d0
                          end if
                          code = tmp
                      end function
                      
                      assert x < y;
                      public static double code(double x, double y) {
                      	double t_0 = x / (y + x);
                      	double tmp;
                      	if (y <= 1.25e+130) {
                      		tmp = t_0 * (y / (((y + x) + 1.0) * (y + x)));
                      	} else {
                      		tmp = (t_0 / (y + x)) * 1.0;
                      	}
                      	return tmp;
                      }
                      
                      [x, y] = sort([x, y])
                      def code(x, y):
                      	t_0 = x / (y + x)
                      	tmp = 0
                      	if y <= 1.25e+130:
                      		tmp = t_0 * (y / (((y + x) + 1.0) * (y + x)))
                      	else:
                      		tmp = (t_0 / (y + x)) * 1.0
                      	return tmp
                      
                      x, y = sort([x, y])
                      function code(x, y)
                      	t_0 = Float64(x / Float64(y + x))
                      	tmp = 0.0
                      	if (y <= 1.25e+130)
                      		tmp = Float64(t_0 * Float64(y / Float64(Float64(Float64(y + x) + 1.0) * Float64(y + x))));
                      	else
                      		tmp = Float64(Float64(t_0 / Float64(y + x)) * 1.0);
                      	end
                      	return tmp
                      end
                      
                      x, y = num2cell(sort([x, y])){:}
                      function tmp_2 = code(x, y)
                      	t_0 = x / (y + x);
                      	tmp = 0.0;
                      	if (y <= 1.25e+130)
                      		tmp = t_0 * (y / (((y + x) + 1.0) * (y + x)));
                      	else
                      		tmp = (t_0 / (y + x)) * 1.0;
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      NOTE: x and y should be sorted in increasing order before calling this function.
                      code[x_, y_] := Block[{t$95$0 = N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 1.25e+130], N[(t$95$0 * N[(y / N[(N[(N[(y + x), $MachinePrecision] + 1.0), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$0 / N[(y + x), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision]]]
                      
                      \begin{array}{l}
                      [x, y] = \mathsf{sort}([x, y])\\
                      \\
                      \begin{array}{l}
                      t_0 := \frac{x}{y + x}\\
                      \mathbf{if}\;y \leq 1.25 \cdot 10^{+130}:\\
                      \;\;\;\;t\_0 \cdot \frac{y}{\left(\left(y + x\right) + 1\right) \cdot \left(y + x\right)}\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\frac{t\_0}{y + x} \cdot 1\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if y < 1.2499999999999999e130

                        1. Initial program 70.9%

                          \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                        2. Add Preprocessing
                        3. Step-by-step derivation
                          1. 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)} \]
                          2. 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)}} \]
                          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. lift-+.f64N/A

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

                            \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                          6. 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)} \]
                          7. lift-+.f64N/A

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

                            \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
                          9. 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}} \]
                          10. lower-*.f64N/A

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

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

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

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

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

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

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

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

                            \[\leadsto \frac{x}{{\left(y + x\right)}^{2}} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
                          19. lower-+.f6488.7

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

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

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

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

                            \[\leadsto \frac{x}{\color{blue}{{\left(x + y\right)}^{2}}} \cdot \frac{y}{\left(y + x\right) + 1} \]
                          4. pow2N/A

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

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

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

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

                            \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) + 1} \]
                          9. lift-+.f6488.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if 1.2499999999999999e130 < y

                        1. Initial program 60.7%

                          \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                        2. Add Preprocessing
                        3. Step-by-step derivation
                          1. 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)} \]
                          2. 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)}} \]
                          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. lift-+.f64N/A

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

                            \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                          6. 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)} \]
                          7. lift-+.f64N/A

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

                            \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
                          9. 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}} \]
                          10. lower-*.f64N/A

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

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

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

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

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

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

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

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

                            \[\leadsto \frac{x}{{\left(y + x\right)}^{2}} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
                          19. lower-+.f6486.7

                            \[\leadsto \frac{x}{{\left(y + x\right)}^{2}} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
                        4. Applied rewrites86.7%

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

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

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

                            \[\leadsto \frac{x}{\color{blue}{{\left(x + y\right)}^{2}}} \cdot \frac{y}{\left(y + x\right) + 1} \]
                          4. pow2N/A

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

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

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

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

                            \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) + 1} \]
                          9. lift-+.f6486.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \color{blue}{1} \]
                        10. Step-by-step derivation
                          1. Applied rewrites85.7%

                            \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \color{blue}{1} \]
                        11. Recombined 2 regimes into one program.
                        12. Add Preprocessing

                        Alternative 9: 99.8% accurate, 0.8× speedup?

                        \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\left(y + x\right) + 1} \end{array} \]
                        NOTE: x and y should be sorted in increasing order before calling this function.
                        (FPCore (x y)
                         :precision binary64
                         (* (/ (/ x (+ y x)) (+ y x)) (/ y (+ (+ y x) 1.0))))
                        assert(x < y);
                        double code(double x, double y) {
                        	return ((x / (y + x)) / (y + x)) * (y / ((y + x) + 1.0));
                        }
                        
                        NOTE: x and y should be sorted in increasing order before calling this function.
                        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 / ((y + x) + 1.0d0))
                        end function
                        
                        assert x < y;
                        public static double code(double x, double y) {
                        	return ((x / (y + x)) / (y + x)) * (y / ((y + x) + 1.0));
                        }
                        
                        [x, y] = sort([x, y])
                        def code(x, y):
                        	return ((x / (y + x)) / (y + x)) * (y / ((y + x) + 1.0))
                        
                        x, y = sort([x, y])
                        function code(x, y)
                        	return Float64(Float64(Float64(x / Float64(y + x)) / Float64(y + x)) * Float64(y / Float64(Float64(y + x) + 1.0)))
                        end
                        
                        x, y = num2cell(sort([x, y])){:}
                        function tmp = code(x, y)
                        	tmp = ((x / (y + x)) / (y + x)) * (y / ((y + x) + 1.0));
                        end
                        
                        NOTE: x and y should be sorted in increasing order before calling this function.
                        code[x_, y_] := N[(N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(y / N[(N[(y + x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                        
                        \begin{array}{l}
                        [x, y] = \mathsf{sort}([x, y])\\
                        \\
                        \frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\left(y + x\right) + 1}
                        \end{array}
                        
                        Derivation
                        1. Initial program 69.0%

                          \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                        2. Add Preprocessing
                        3. Step-by-step derivation
                          1. 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)} \]
                          2. 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)}} \]
                          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. lift-+.f64N/A

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

                            \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                          6. 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)} \]
                          7. lift-+.f64N/A

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

                            \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
                          9. 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}} \]
                          10. lower-*.f64N/A

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

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

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

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

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

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

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

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

                            \[\leadsto \frac{x}{{\left(y + x\right)}^{2}} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
                          19. lower-+.f6488.3

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

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

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

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

                            \[\leadsto \frac{x}{\color{blue}{{\left(x + y\right)}^{2}}} \cdot \frac{y}{\left(y + x\right) + 1} \]
                          4. pow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 10: 85.0% accurate, 0.8× speedup?

                        \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq -0.085:\\ \;\;\;\;\frac{1}{y + x} \cdot \frac{y}{\left(y + x\right) + 1}\\ \mathbf{elif}\;x \leq -3.3 \cdot 10^{-159}:\\ \;\;\;\;\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(y + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(1 + y\right) \cdot y}\\ \end{array} \end{array} \]
                        NOTE: x and y should be sorted in increasing order before calling this function.
                        (FPCore (x y)
                         :precision binary64
                         (if (<= x -0.085)
                           (* (/ 1.0 (+ y x)) (/ y (+ (+ y x) 1.0)))
                           (if (<= x -3.3e-159)
                             (/ (* x y) (* (* (+ x y) (+ x y)) (+ y 1.0)))
                             (/ x (* (+ 1.0 y) y)))))
                        assert(x < y);
                        double code(double x, double y) {
                        	double tmp;
                        	if (x <= -0.085) {
                        		tmp = (1.0 / (y + x)) * (y / ((y + x) + 1.0));
                        	} else if (x <= -3.3e-159) {
                        		tmp = (x * y) / (((x + y) * (x + y)) * (y + 1.0));
                        	} else {
                        		tmp = x / ((1.0 + y) * y);
                        	}
                        	return tmp;
                        }
                        
                        NOTE: x and y should be sorted in increasing order before calling this function.
                        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 <= (-0.085d0)) then
                                tmp = (1.0d0 / (y + x)) * (y / ((y + x) + 1.0d0))
                            else if (x <= (-3.3d-159)) then
                                tmp = (x * y) / (((x + y) * (x + y)) * (y + 1.0d0))
                            else
                                tmp = x / ((1.0d0 + y) * y)
                            end if
                            code = tmp
                        end function
                        
                        assert x < y;
                        public static double code(double x, double y) {
                        	double tmp;
                        	if (x <= -0.085) {
                        		tmp = (1.0 / (y + x)) * (y / ((y + x) + 1.0));
                        	} else if (x <= -3.3e-159) {
                        		tmp = (x * y) / (((x + y) * (x + y)) * (y + 1.0));
                        	} else {
                        		tmp = x / ((1.0 + y) * y);
                        	}
                        	return tmp;
                        }
                        
                        [x, y] = sort([x, y])
                        def code(x, y):
                        	tmp = 0
                        	if x <= -0.085:
                        		tmp = (1.0 / (y + x)) * (y / ((y + x) + 1.0))
                        	elif x <= -3.3e-159:
                        		tmp = (x * y) / (((x + y) * (x + y)) * (y + 1.0))
                        	else:
                        		tmp = x / ((1.0 + y) * y)
                        	return tmp
                        
                        x, y = sort([x, y])
                        function code(x, y)
                        	tmp = 0.0
                        	if (x <= -0.085)
                        		tmp = Float64(Float64(1.0 / Float64(y + x)) * Float64(y / Float64(Float64(y + x) + 1.0)));
                        	elseif (x <= -3.3e-159)
                        		tmp = Float64(Float64(x * y) / Float64(Float64(Float64(x + y) * Float64(x + y)) * Float64(y + 1.0)));
                        	else
                        		tmp = Float64(x / Float64(Float64(1.0 + y) * y));
                        	end
                        	return tmp
                        end
                        
                        x, y = num2cell(sort([x, y])){:}
                        function tmp_2 = code(x, y)
                        	tmp = 0.0;
                        	if (x <= -0.085)
                        		tmp = (1.0 / (y + x)) * (y / ((y + x) + 1.0));
                        	elseif (x <= -3.3e-159)
                        		tmp = (x * y) / (((x + y) * (x + y)) * (y + 1.0));
                        	else
                        		tmp = x / ((1.0 + y) * y);
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        NOTE: x and y should be sorted in increasing order before calling this function.
                        code[x_, y_] := If[LessEqual[x, -0.085], N[(N[(1.0 / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(y / N[(N[(y + x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.3e-159], N[(N[(x * y), $MachinePrecision] / N[(N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(1.0 + y), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]]]
                        
                        \begin{array}{l}
                        [x, y] = \mathsf{sort}([x, y])\\
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;x \leq -0.085:\\
                        \;\;\;\;\frac{1}{y + x} \cdot \frac{y}{\left(y + x\right) + 1}\\
                        
                        \mathbf{elif}\;x \leq -3.3 \cdot 10^{-159}:\\
                        \;\;\;\;\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(y + 1\right)}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\frac{x}{\left(1 + y\right) \cdot y}\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 3 regimes
                        2. if x < -0.0850000000000000061

                          1. Initial program 59.2%

                            \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                          2. Add Preprocessing
                          3. Step-by-step derivation
                            1. 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)} \]
                            2. 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)}} \]
                            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. lift-+.f64N/A

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

                              \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                            6. 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)} \]
                            7. lift-+.f64N/A

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

                              \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
                            9. 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}} \]
                            10. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \frac{x}{\color{blue}{{\left(x + y\right)}^{2}}} \cdot \frac{y}{\left(y + x\right) + 1} \]
                            4. pow2N/A

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

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

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

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

                              \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) + 1} \]
                            9. lift-+.f6488.6

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \frac{\frac{x}{y + x}}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) + 1} \]
                            13. lift-+.f6499.7

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

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

                            \[\leadsto \frac{\color{blue}{1}}{y + x} \cdot \frac{y}{\left(y + x\right) + 1} \]
                          10. Step-by-step derivation
                            1. Applied rewrites71.7%

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

                            if -0.0850000000000000061 < x < -3.3000000000000002e-159

                            1. Initial program 81.4%

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

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

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

                              if -3.3000000000000002e-159 < x

                              1. Initial program 69.5%

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

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

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

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

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

                                  \[\leadsto \frac{x}{\left(1 + y\right) \cdot y} \]
                              5. Applied rewrites56.2%

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

                            Alternative 11: 83.8% accurate, 0.8× speedup?

                            \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq -5.6 \cdot 10^{+24}:\\ \;\;\;\;\frac{\frac{y}{x}}{x}\\ \mathbf{elif}\;x \leq -3.3 \cdot 10^{-159}:\\ \;\;\;\;\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(y + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(1 + y\right) \cdot y}\\ \end{array} \end{array} \]
                            NOTE: x and y should be sorted in increasing order before calling this function.
                            (FPCore (x y)
                             :precision binary64
                             (if (<= x -5.6e+24)
                               (/ (/ y x) x)
                               (if (<= x -3.3e-159)
                                 (/ (* x y) (* (* (+ x y) (+ x y)) (+ y 1.0)))
                                 (/ x (* (+ 1.0 y) y)))))
                            assert(x < y);
                            double code(double x, double y) {
                            	double tmp;
                            	if (x <= -5.6e+24) {
                            		tmp = (y / x) / x;
                            	} else if (x <= -3.3e-159) {
                            		tmp = (x * y) / (((x + y) * (x + y)) * (y + 1.0));
                            	} else {
                            		tmp = x / ((1.0 + y) * y);
                            	}
                            	return tmp;
                            }
                            
                            NOTE: x and y should be sorted in increasing order before calling this function.
                            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 <= (-5.6d+24)) then
                                    tmp = (y / x) / x
                                else if (x <= (-3.3d-159)) then
                                    tmp = (x * y) / (((x + y) * (x + y)) * (y + 1.0d0))
                                else
                                    tmp = x / ((1.0d0 + y) * y)
                                end if
                                code = tmp
                            end function
                            
                            assert x < y;
                            public static double code(double x, double y) {
                            	double tmp;
                            	if (x <= -5.6e+24) {
                            		tmp = (y / x) / x;
                            	} else if (x <= -3.3e-159) {
                            		tmp = (x * y) / (((x + y) * (x + y)) * (y + 1.0));
                            	} else {
                            		tmp = x / ((1.0 + y) * y);
                            	}
                            	return tmp;
                            }
                            
                            [x, y] = sort([x, y])
                            def code(x, y):
                            	tmp = 0
                            	if x <= -5.6e+24:
                            		tmp = (y / x) / x
                            	elif x <= -3.3e-159:
                            		tmp = (x * y) / (((x + y) * (x + y)) * (y + 1.0))
                            	else:
                            		tmp = x / ((1.0 + y) * y)
                            	return tmp
                            
                            x, y = sort([x, y])
                            function code(x, y)
                            	tmp = 0.0
                            	if (x <= -5.6e+24)
                            		tmp = Float64(Float64(y / x) / x);
                            	elseif (x <= -3.3e-159)
                            		tmp = Float64(Float64(x * y) / Float64(Float64(Float64(x + y) * Float64(x + y)) * Float64(y + 1.0)));
                            	else
                            		tmp = Float64(x / Float64(Float64(1.0 + y) * y));
                            	end
                            	return tmp
                            end
                            
                            x, y = num2cell(sort([x, y])){:}
                            function tmp_2 = code(x, y)
                            	tmp = 0.0;
                            	if (x <= -5.6e+24)
                            		tmp = (y / x) / x;
                            	elseif (x <= -3.3e-159)
                            		tmp = (x * y) / (((x + y) * (x + y)) * (y + 1.0));
                            	else
                            		tmp = x / ((1.0 + y) * y);
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            NOTE: x and y should be sorted in increasing order before calling this function.
                            code[x_, y_] := If[LessEqual[x, -5.6e+24], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, -3.3e-159], N[(N[(x * y), $MachinePrecision] / N[(N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(1.0 + y), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]]]
                            
                            \begin{array}{l}
                            [x, y] = \mathsf{sort}([x, y])\\
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;x \leq -5.6 \cdot 10^{+24}:\\
                            \;\;\;\;\frac{\frac{y}{x}}{x}\\
                            
                            \mathbf{elif}\;x \leq -3.3 \cdot 10^{-159}:\\
                            \;\;\;\;\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(y + 1\right)}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\frac{x}{\left(1 + y\right) \cdot y}\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 3 regimes
                            2. if x < -5.6000000000000003e24

                              1. Initial program 55.6%

                                \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                              2. Add Preprocessing
                              3. Step-by-step derivation
                                1. 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)} \]
                                2. 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)}} \]
                                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. lift-+.f64N/A

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

                                  \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                                6. 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)} \]
                                7. lift-+.f64N/A

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

                                  \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
                                9. 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}} \]
                                10. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \frac{x}{{\left(y + x\right)}^{2}} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
                              4. Applied rewrites87.7%

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

                                \[\leadsto \color{blue}{\frac{y}{{x}^{2}}} \]
                              6. Step-by-step derivation
                                1. frac-timesN/A

                                  \[\leadsto \frac{\color{blue}{y}}{{x}^{2}} \]
                                2. unpow2N/A

                                  \[\leadsto \frac{y}{{x}^{2}} \]
                                3. +-commutativeN/A

                                  \[\leadsto \frac{y}{{x}^{2}} \]
                                4. distribute-lft-outN/A

                                  \[\leadsto \frac{y}{{x}^{2}} \]
                                5. +-commutativeN/A

                                  \[\leadsto \frac{y}{{x}^{2}} \]
                                6. lower-/.f64N/A

                                  \[\leadsto \frac{y}{\color{blue}{{x}^{2}}} \]
                                7. unpow2N/A

                                  \[\leadsto \frac{y}{x \cdot \color{blue}{x}} \]
                                8. lower-*.f6475.3

                                  \[\leadsto \frac{y}{x \cdot \color{blue}{x}} \]
                              7. Applied rewrites75.3%

                                \[\leadsto \color{blue}{\frac{y}{x \cdot x}} \]
                              8. Step-by-step derivation
                                1. lift-*.f64N/A

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

                                  \[\leadsto \frac{y}{\color{blue}{x \cdot x}} \]
                                3. associate-/r*N/A

                                  \[\leadsto \frac{\frac{y}{x}}{\color{blue}{x}} \]
                                4. lower-/.f64N/A

                                  \[\leadsto \frac{\frac{y}{x}}{\color{blue}{x}} \]
                                5. lower-/.f6473.7

                                  \[\leadsto \frac{\frac{y}{x}}{x} \]
                              9. Applied rewrites73.7%

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

                              if -5.6000000000000003e24 < x < -3.3000000000000002e-159

                              1. Initial program 83.4%

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

                                \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\color{blue}{y} + 1\right)} \]
                              4. Step-by-step derivation
                                1. Applied rewrites79.2%

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

                                if -3.3000000000000002e-159 < x

                                1. Initial program 69.5%

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

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

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

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

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

                                    \[\leadsto \frac{x}{\left(1 + y\right) \cdot y} \]
                                5. Applied rewrites56.2%

                                  \[\leadsto \color{blue}{\frac{x}{\left(1 + y\right) \cdot y}} \]
                              5. Recombined 3 regimes into one program.
                              6. Final simplification64.1%

                                \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.6 \cdot 10^{+24}:\\ \;\;\;\;\frac{\frac{y}{x}}{x}\\ \mathbf{elif}\;x \leq -3.3 \cdot 10^{-159}:\\ \;\;\;\;\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(y + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(1 + y\right) \cdot y}\\ \end{array} \]
                              7. Add Preprocessing

                              Alternative 12: 80.8% accurate, 0.8× speedup?

                              \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq 1.35 \cdot 10^{-64}:\\ \;\;\;\;\frac{y}{\left(1 + x\right) \cdot x}\\ \mathbf{elif}\;y \leq 1.5 \cdot 10^{+15}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(y, 1, y \cdot y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + x}}{y + x} \cdot 1\\ \end{array} \end{array} \]
                              NOTE: x and y should be sorted in increasing order before calling this function.
                              (FPCore (x y)
                               :precision binary64
                               (if (<= y 1.35e-64)
                                 (/ y (* (+ 1.0 x) x))
                                 (if (<= y 1.5e+15)
                                   (/ x (fma y 1.0 (* y y)))
                                   (* (/ (/ x (+ y x)) (+ y x)) 1.0))))
                              assert(x < y);
                              double code(double x, double y) {
                              	double tmp;
                              	if (y <= 1.35e-64) {
                              		tmp = y / ((1.0 + x) * x);
                              	} else if (y <= 1.5e+15) {
                              		tmp = x / fma(y, 1.0, (y * y));
                              	} else {
                              		tmp = ((x / (y + x)) / (y + x)) * 1.0;
                              	}
                              	return tmp;
                              }
                              
                              x, y = sort([x, y])
                              function code(x, y)
                              	tmp = 0.0
                              	if (y <= 1.35e-64)
                              		tmp = Float64(y / Float64(Float64(1.0 + x) * x));
                              	elseif (y <= 1.5e+15)
                              		tmp = Float64(x / fma(y, 1.0, Float64(y * y)));
                              	else
                              		tmp = Float64(Float64(Float64(x / Float64(y + x)) / Float64(y + x)) * 1.0);
                              	end
                              	return tmp
                              end
                              
                              NOTE: x and y should be sorted in increasing order before calling this function.
                              code[x_, y_] := If[LessEqual[y, 1.35e-64], N[(y / N[(N[(1.0 + x), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.5e+15], N[(x / N[(y * 1.0 + N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision]]]
                              
                              \begin{array}{l}
                              [x, y] = \mathsf{sort}([x, y])\\
                              \\
                              \begin{array}{l}
                              \mathbf{if}\;y \leq 1.35 \cdot 10^{-64}:\\
                              \;\;\;\;\frac{y}{\left(1 + x\right) \cdot x}\\
                              
                              \mathbf{elif}\;y \leq 1.5 \cdot 10^{+15}:\\
                              \;\;\;\;\frac{x}{\mathsf{fma}\left(y, 1, y \cdot y\right)}\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\frac{\frac{x}{y + x}}{y + x} \cdot 1\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 3 regimes
                              2. if y < 1.34999999999999993e-64

                                1. Initial program 69.9%

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

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

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

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

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

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

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

                                if 1.34999999999999993e-64 < y < 1.5e15

                                1. Initial program 85.1%

                                  \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                                2. Add Preprocessing
                                3. Step-by-step derivation
                                  1. 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)} \]
                                  2. 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)}} \]
                                  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. lift-+.f64N/A

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

                                    \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                                  6. 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)} \]
                                  7. lift-+.f64N/A

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

                                    \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
                                  9. 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}} \]
                                  10. lower-*.f64N/A

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

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

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

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

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

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

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

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

                                    \[\leadsto \frac{x}{{\left(y + x\right)}^{2}} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
                                  19. lower-+.f6499.5

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

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

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

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

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

                                    \[\leadsto \frac{x}{y \cdot \left(1 + y\right)} \]
                                  4. distribute-lft-outN/A

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

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

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

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

                                    \[\leadsto \frac{x}{\left(1 + y\right) \cdot \color{blue}{y}} \]
                                  9. lift-+.f6432.7

                                    \[\leadsto \frac{x}{\left(1 + y\right) \cdot y} \]
                                7. Applied rewrites32.7%

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

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

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

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

                                    \[\leadsto \frac{x}{y \cdot 1 + \color{blue}{y \cdot y}} \]
                                  5. pow2N/A

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

                                    \[\leadsto \frac{x}{\mathsf{fma}\left(y, \color{blue}{1}, {y}^{2}\right)} \]
                                  7. pow2N/A

                                    \[\leadsto \frac{x}{\mathsf{fma}\left(y, 1, y \cdot y\right)} \]
                                  8. lift-*.f6432.7

                                    \[\leadsto \frac{x}{\mathsf{fma}\left(y, 1, y \cdot y\right)} \]
                                9. Applied rewrites32.7%

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

                                if 1.5e15 < y

                                1. Initial program 64.2%

                                  \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                                2. Add Preprocessing
                                3. Step-by-step derivation
                                  1. 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)} \]
                                  2. 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)}} \]
                                  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. lift-+.f64N/A

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

                                    \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                                  6. 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)} \]
                                  7. lift-+.f64N/A

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

                                    \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
                                  9. 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}} \]
                                  10. lower-*.f64N/A

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

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

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

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

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

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

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

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

                                    \[\leadsto \frac{x}{{\left(y + x\right)}^{2}} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
                                  19. lower-+.f6491.5

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

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

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

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

                                    \[\leadsto \frac{x}{\color{blue}{{\left(x + y\right)}^{2}}} \cdot \frac{y}{\left(y + x\right) + 1} \]
                                  4. pow2N/A

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

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

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

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

                                    \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) + 1} \]
                                  9. lift-+.f6491.5

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \color{blue}{1} \]
                                10. Step-by-step derivation
                                  1. Applied rewrites79.3%

                                    \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \color{blue}{1} \]
                                11. Recombined 3 regimes into one program.
                                12. Final simplification63.3%

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 1.35 \cdot 10^{-64}:\\ \;\;\;\;\frac{y}{\left(1 + x\right) \cdot x}\\ \mathbf{elif}\;y \leq 1.5 \cdot 10^{+15}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(y, 1, y \cdot y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + x}}{y + x} \cdot 1\\ \end{array} \]
                                13. Add Preprocessing

                                Alternative 13: 69.9% accurate, 1.1× speedup?

                                \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq -7.5 \cdot 10^{+24}:\\ \;\;\;\;\frac{y}{x \cdot x}\\ \mathbf{elif}\;x \leq -4.2 \cdot 10^{-204} \lor \neg \left(x \leq 5.6 \cdot 10^{-187}\right):\\ \;\;\;\;\frac{x}{y \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y}\\ \end{array} \end{array} \]
                                NOTE: x and y should be sorted in increasing order before calling this function.
                                (FPCore (x y)
                                 :precision binary64
                                 (if (<= x -7.5e+24)
                                   (/ y (* x x))
                                   (if (or (<= x -4.2e-204) (not (<= x 5.6e-187))) (/ x (* y y)) (/ x y))))
                                assert(x < y);
                                double code(double x, double y) {
                                	double tmp;
                                	if (x <= -7.5e+24) {
                                		tmp = y / (x * x);
                                	} else if ((x <= -4.2e-204) || !(x <= 5.6e-187)) {
                                		tmp = x / (y * y);
                                	} else {
                                		tmp = x / y;
                                	}
                                	return tmp;
                                }
                                
                                NOTE: x and y should be sorted in increasing order before calling this function.
                                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.5d+24)) then
                                        tmp = y / (x * x)
                                    else if ((x <= (-4.2d-204)) .or. (.not. (x <= 5.6d-187))) then
                                        tmp = x / (y * y)
                                    else
                                        tmp = x / y
                                    end if
                                    code = tmp
                                end function
                                
                                assert x < y;
                                public static double code(double x, double y) {
                                	double tmp;
                                	if (x <= -7.5e+24) {
                                		tmp = y / (x * x);
                                	} else if ((x <= -4.2e-204) || !(x <= 5.6e-187)) {
                                		tmp = x / (y * y);
                                	} else {
                                		tmp = x / y;
                                	}
                                	return tmp;
                                }
                                
                                [x, y] = sort([x, y])
                                def code(x, y):
                                	tmp = 0
                                	if x <= -7.5e+24:
                                		tmp = y / (x * x)
                                	elif (x <= -4.2e-204) or not (x <= 5.6e-187):
                                		tmp = x / (y * y)
                                	else:
                                		tmp = x / y
                                	return tmp
                                
                                x, y = sort([x, y])
                                function code(x, y)
                                	tmp = 0.0
                                	if (x <= -7.5e+24)
                                		tmp = Float64(y / Float64(x * x));
                                	elseif ((x <= -4.2e-204) || !(x <= 5.6e-187))
                                		tmp = Float64(x / Float64(y * y));
                                	else
                                		tmp = Float64(x / y);
                                	end
                                	return tmp
                                end
                                
                                x, y = num2cell(sort([x, y])){:}
                                function tmp_2 = code(x, y)
                                	tmp = 0.0;
                                	if (x <= -7.5e+24)
                                		tmp = y / (x * x);
                                	elseif ((x <= -4.2e-204) || ~((x <= 5.6e-187)))
                                		tmp = x / (y * y);
                                	else
                                		tmp = x / y;
                                	end
                                	tmp_2 = tmp;
                                end
                                
                                NOTE: x and y should be sorted in increasing order before calling this function.
                                code[x_, y_] := If[LessEqual[x, -7.5e+24], N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -4.2e-204], N[Not[LessEqual[x, 5.6e-187]], $MachinePrecision]], N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision], N[(x / y), $MachinePrecision]]]
                                
                                \begin{array}{l}
                                [x, y] = \mathsf{sort}([x, y])\\
                                \\
                                \begin{array}{l}
                                \mathbf{if}\;x \leq -7.5 \cdot 10^{+24}:\\
                                \;\;\;\;\frac{y}{x \cdot x}\\
                                
                                \mathbf{elif}\;x \leq -4.2 \cdot 10^{-204} \lor \neg \left(x \leq 5.6 \cdot 10^{-187}\right):\\
                                \;\;\;\;\frac{x}{y \cdot y}\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;\frac{x}{y}\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 3 regimes
                                2. if x < -7.50000000000000014e24

                                  1. Initial program 55.6%

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

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

                                      \[\leadsto \frac{y}{\color{blue}{{x}^{2}}} \]
                                    2. unpow2N/A

                                      \[\leadsto \frac{y}{x \cdot \color{blue}{x}} \]
                                    3. lower-*.f6475.3

                                      \[\leadsto \frac{y}{x \cdot \color{blue}{x}} \]
                                  5. Applied rewrites75.3%

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

                                  if -7.50000000000000014e24 < x < -4.20000000000000018e-204 or 5.6e-187 < x

                                  1. Initial program 78.0%

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

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

                                      \[\leadsto \frac{x}{\color{blue}{{y}^{2}}} \]
                                    2. unpow2N/A

                                      \[\leadsto \frac{x}{y \cdot \color{blue}{y}} \]
                                    3. lower-*.f6444.2

                                      \[\leadsto \frac{x}{y \cdot \color{blue}{y}} \]
                                  5. Applied rewrites44.2%

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

                                  if -4.20000000000000018e-204 < x < 5.6e-187

                                  1. Initial program 51.0%

                                    \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                                  2. Add Preprocessing
                                  3. Step-by-step derivation
                                    1. 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)} \]
                                    2. 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)}} \]
                                    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. lift-+.f64N/A

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

                                      \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                                    6. 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)} \]
                                    7. lift-+.f64N/A

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

                                      \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
                                    9. 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}} \]
                                    10. lower-*.f64N/A

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

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

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

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

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

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

                                      \[\leadsto \frac{x}{{\left(y + x\right)}^{2}} \cdot \color{blue}{\frac{y}{\left(x + y\right) + 1}} \]
                                    17. lift-+.f64N/A

                                      \[\leadsto \frac{x}{{\left(y + x\right)}^{2}} \cdot \frac{y}{\color{blue}{\left(x + y\right) + 1}} \]
                                    18. +-commutativeN/A

                                      \[\leadsto \frac{x}{{\left(y + x\right)}^{2}} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
                                    19. lower-+.f6465.9

                                      \[\leadsto \frac{x}{{\left(y + x\right)}^{2}} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
                                  4. Applied rewrites65.9%

                                    \[\leadsto \color{blue}{\frac{x}{{\left(y + x\right)}^{2}} \cdot \frac{y}{\left(y + x\right) + 1}} \]
                                  5. Taylor expanded in x around 0

                                    \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
                                  6. Step-by-step derivation
                                    1. frac-timesN/A

                                      \[\leadsto \frac{\color{blue}{x}}{y \cdot \left(1 + y\right)} \]
                                    2. unpow2N/A

                                      \[\leadsto \frac{x}{y \cdot \left(1 + y\right)} \]
                                    3. +-commutativeN/A

                                      \[\leadsto \frac{x}{y \cdot \left(1 + y\right)} \]
                                    4. distribute-lft-outN/A

                                      \[\leadsto \frac{x}{y \cdot \left(1 + y\right)} \]
                                    5. +-commutativeN/A

                                      \[\leadsto \frac{x}{y \cdot \left(1 + y\right)} \]
                                    6. lower-/.f64N/A

                                      \[\leadsto \frac{x}{\color{blue}{y \cdot \left(1 + y\right)}} \]
                                    7. *-commutativeN/A

                                      \[\leadsto \frac{x}{\left(1 + y\right) \cdot \color{blue}{y}} \]
                                    8. lower-*.f64N/A

                                      \[\leadsto \frac{x}{\left(1 + y\right) \cdot \color{blue}{y}} \]
                                    9. lift-+.f6483.6

                                      \[\leadsto \frac{x}{\left(1 + y\right) \cdot y} \]
                                  7. Applied rewrites83.6%

                                    \[\leadsto \color{blue}{\frac{x}{\left(1 + y\right) \cdot y}} \]
                                  8. Taylor expanded in y around 0

                                    \[\leadsto \frac{x}{y} \]
                                  9. Step-by-step derivation
                                    1. Applied rewrites76.6%

                                      \[\leadsto \frac{x}{y} \]
                                  10. Recombined 3 regimes into one program.
                                  11. Final simplification55.9%

                                    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -7.5 \cdot 10^{+24}:\\ \;\;\;\;\frac{y}{x \cdot x}\\ \mathbf{elif}\;x \leq -4.2 \cdot 10^{-204} \lor \neg \left(x \leq 5.6 \cdot 10^{-187}\right):\\ \;\;\;\;\frac{x}{y \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y}\\ \end{array} \]
                                  12. Add Preprocessing

                                  Alternative 14: 80.6% accurate, 1.1× speedup?

                                  \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq 1.35 \cdot 10^{-64}:\\ \;\;\;\;\frac{y}{\left(1 + x\right) \cdot x}\\ \mathbf{elif}\;y \leq 10^{+47}:\\ \;\;\;\;\frac{x}{\left(1 + y\right) \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{y}\\ \end{array} \end{array} \]
                                  NOTE: x and y should be sorted in increasing order before calling this function.
                                  (FPCore (x y)
                                   :precision binary64
                                   (if (<= y 1.35e-64)
                                     (/ y (* (+ 1.0 x) x))
                                     (if (<= y 1e+47) (/ x (* (+ 1.0 y) y)) (/ (/ x y) y))))
                                  assert(x < y);
                                  double code(double x, double y) {
                                  	double tmp;
                                  	if (y <= 1.35e-64) {
                                  		tmp = y / ((1.0 + x) * x);
                                  	} else if (y <= 1e+47) {
                                  		tmp = x / ((1.0 + y) * y);
                                  	} else {
                                  		tmp = (x / y) / y;
                                  	}
                                  	return tmp;
                                  }
                                  
                                  NOTE: x and y should be sorted in increasing order before calling this function.
                                  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 (y <= 1.35d-64) then
                                          tmp = y / ((1.0d0 + x) * x)
                                      else if (y <= 1d+47) then
                                          tmp = x / ((1.0d0 + y) * y)
                                      else
                                          tmp = (x / y) / y
                                      end if
                                      code = tmp
                                  end function
                                  
                                  assert x < y;
                                  public static double code(double x, double y) {
                                  	double tmp;
                                  	if (y <= 1.35e-64) {
                                  		tmp = y / ((1.0 + x) * x);
                                  	} else if (y <= 1e+47) {
                                  		tmp = x / ((1.0 + y) * y);
                                  	} else {
                                  		tmp = (x / y) / y;
                                  	}
                                  	return tmp;
                                  }
                                  
                                  [x, y] = sort([x, y])
                                  def code(x, y):
                                  	tmp = 0
                                  	if y <= 1.35e-64:
                                  		tmp = y / ((1.0 + x) * x)
                                  	elif y <= 1e+47:
                                  		tmp = x / ((1.0 + y) * y)
                                  	else:
                                  		tmp = (x / y) / y
                                  	return tmp
                                  
                                  x, y = sort([x, y])
                                  function code(x, y)
                                  	tmp = 0.0
                                  	if (y <= 1.35e-64)
                                  		tmp = Float64(y / Float64(Float64(1.0 + x) * x));
                                  	elseif (y <= 1e+47)
                                  		tmp = Float64(x / Float64(Float64(1.0 + y) * y));
                                  	else
                                  		tmp = Float64(Float64(x / y) / y);
                                  	end
                                  	return tmp
                                  end
                                  
                                  x, y = num2cell(sort([x, y])){:}
                                  function tmp_2 = code(x, y)
                                  	tmp = 0.0;
                                  	if (y <= 1.35e-64)
                                  		tmp = y / ((1.0 + x) * x);
                                  	elseif (y <= 1e+47)
                                  		tmp = x / ((1.0 + y) * y);
                                  	else
                                  		tmp = (x / y) / y;
                                  	end
                                  	tmp_2 = tmp;
                                  end
                                  
                                  NOTE: x and y should be sorted in increasing order before calling this function.
                                  code[x_, y_] := If[LessEqual[y, 1.35e-64], N[(y / N[(N[(1.0 + x), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1e+47], N[(x / N[(N[(1.0 + y), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / y), $MachinePrecision]]]
                                  
                                  \begin{array}{l}
                                  [x, y] = \mathsf{sort}([x, y])\\
                                  \\
                                  \begin{array}{l}
                                  \mathbf{if}\;y \leq 1.35 \cdot 10^{-64}:\\
                                  \;\;\;\;\frac{y}{\left(1 + x\right) \cdot x}\\
                                  
                                  \mathbf{elif}\;y \leq 10^{+47}:\\
                                  \;\;\;\;\frac{x}{\left(1 + y\right) \cdot y}\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;\frac{\frac{x}{y}}{y}\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 3 regimes
                                  2. if y < 1.34999999999999993e-64

                                    1. Initial program 69.9%

                                      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                                    2. Add Preprocessing
                                    3. Taylor expanded in y around 0

                                      \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]
                                    4. Step-by-step derivation
                                      1. lower-/.f64N/A

                                        \[\leadsto \frac{y}{\color{blue}{x \cdot \left(1 + x\right)}} \]
                                      2. *-commutativeN/A

                                        \[\leadsto \frac{y}{\left(1 + x\right) \cdot \color{blue}{x}} \]
                                      3. lower-*.f64N/A

                                        \[\leadsto \frac{y}{\left(1 + x\right) \cdot \color{blue}{x}} \]
                                      4. lower-+.f6458.4

                                        \[\leadsto \frac{y}{\left(1 + x\right) \cdot x} \]
                                    5. Applied rewrites58.4%

                                      \[\leadsto \color{blue}{\frac{y}{\left(1 + x\right) \cdot x}} \]

                                    if 1.34999999999999993e-64 < y < 1e47

                                    1. Initial program 86.2%

                                      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                                    2. Add Preprocessing
                                    3. Taylor expanded in x around 0

                                      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
                                    4. Step-by-step derivation
                                      1. lower-/.f64N/A

                                        \[\leadsto \frac{x}{\color{blue}{y \cdot \left(1 + y\right)}} \]
                                      2. *-commutativeN/A

                                        \[\leadsto \frac{x}{\left(1 + y\right) \cdot \color{blue}{y}} \]
                                      3. lower-*.f64N/A

                                        \[\leadsto \frac{x}{\left(1 + y\right) \cdot \color{blue}{y}} \]
                                      4. lower-+.f6439.9

                                        \[\leadsto \frac{x}{\left(1 + y\right) \cdot y} \]
                                    5. Applied rewrites39.9%

                                      \[\leadsto \color{blue}{\frac{x}{\left(1 + y\right) \cdot y}} \]

                                    if 1e47 < y

                                    1. Initial program 61.4%

                                      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                                    2. Add Preprocessing
                                    3. Taylor expanded in y around inf

                                      \[\leadsto \color{blue}{\frac{x}{{y}^{2}}} \]
                                    4. Step-by-step derivation
                                      1. lower-/.f64N/A

                                        \[\leadsto \frac{x}{\color{blue}{{y}^{2}}} \]
                                      2. unpow2N/A

                                        \[\leadsto \frac{x}{y \cdot \color{blue}{y}} \]
                                      3. lower-*.f6482.5

                                        \[\leadsto \frac{x}{y \cdot \color{blue}{y}} \]
                                    5. Applied rewrites82.5%

                                      \[\leadsto \color{blue}{\frac{x}{y \cdot y}} \]
                                    6. Step-by-step derivation
                                      1. lift-/.f64N/A

                                        \[\leadsto \frac{x}{\color{blue}{y \cdot y}} \]
                                      2. lift-*.f64N/A

                                        \[\leadsto \frac{x}{y \cdot \color{blue}{y}} \]
                                      3. associate-/r*N/A

                                        \[\leadsto \frac{\frac{x}{y}}{\color{blue}{y}} \]
                                      4. lower-/.f64N/A

                                        \[\leadsto \frac{\frac{x}{y}}{\color{blue}{y}} \]
                                      5. lower-/.f6481.6

                                        \[\leadsto \frac{\frac{x}{y}}{y} \]
                                    7. Applied rewrites81.6%

                                      \[\leadsto \frac{\frac{x}{y}}{\color{blue}{y}} \]
                                  3. Recombined 3 regimes into one program.
                                  4. Add Preprocessing

                                  Alternative 15: 78.9% accurate, 1.5× speedup?

                                  \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq 1.35 \cdot 10^{-64}:\\ \;\;\;\;\frac{y}{\left(1 + x\right) \cdot x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(1 + y\right) \cdot y}\\ \end{array} \end{array} \]
                                  NOTE: x and y should be sorted in increasing order before calling this function.
                                  (FPCore (x y)
                                   :precision binary64
                                   (if (<= y 1.35e-64) (/ y (* (+ 1.0 x) x)) (/ x (* (+ 1.0 y) y))))
                                  assert(x < y);
                                  double code(double x, double y) {
                                  	double tmp;
                                  	if (y <= 1.35e-64) {
                                  		tmp = y / ((1.0 + x) * x);
                                  	} else {
                                  		tmp = x / ((1.0 + y) * y);
                                  	}
                                  	return tmp;
                                  }
                                  
                                  NOTE: x and y should be sorted in increasing order before calling this function.
                                  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 (y <= 1.35d-64) then
                                          tmp = y / ((1.0d0 + x) * x)
                                      else
                                          tmp = x / ((1.0d0 + y) * y)
                                      end if
                                      code = tmp
                                  end function
                                  
                                  assert x < y;
                                  public static double code(double x, double y) {
                                  	double tmp;
                                  	if (y <= 1.35e-64) {
                                  		tmp = y / ((1.0 + x) * x);
                                  	} else {
                                  		tmp = x / ((1.0 + y) * y);
                                  	}
                                  	return tmp;
                                  }
                                  
                                  [x, y] = sort([x, y])
                                  def code(x, y):
                                  	tmp = 0
                                  	if y <= 1.35e-64:
                                  		tmp = y / ((1.0 + x) * x)
                                  	else:
                                  		tmp = x / ((1.0 + y) * y)
                                  	return tmp
                                  
                                  x, y = sort([x, y])
                                  function code(x, y)
                                  	tmp = 0.0
                                  	if (y <= 1.35e-64)
                                  		tmp = Float64(y / Float64(Float64(1.0 + x) * x));
                                  	else
                                  		tmp = Float64(x / Float64(Float64(1.0 + y) * y));
                                  	end
                                  	return tmp
                                  end
                                  
                                  x, y = num2cell(sort([x, y])){:}
                                  function tmp_2 = code(x, y)
                                  	tmp = 0.0;
                                  	if (y <= 1.35e-64)
                                  		tmp = y / ((1.0 + x) * x);
                                  	else
                                  		tmp = x / ((1.0 + y) * y);
                                  	end
                                  	tmp_2 = tmp;
                                  end
                                  
                                  NOTE: x and y should be sorted in increasing order before calling this function.
                                  code[x_, y_] := If[LessEqual[y, 1.35e-64], N[(y / N[(N[(1.0 + x), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(1.0 + y), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]]
                                  
                                  \begin{array}{l}
                                  [x, y] = \mathsf{sort}([x, y])\\
                                  \\
                                  \begin{array}{l}
                                  \mathbf{if}\;y \leq 1.35 \cdot 10^{-64}:\\
                                  \;\;\;\;\frac{y}{\left(1 + x\right) \cdot x}\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;\frac{x}{\left(1 + y\right) \cdot y}\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 2 regimes
                                  2. if y < 1.34999999999999993e-64

                                    1. Initial program 69.9%

                                      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                                    2. Add Preprocessing
                                    3. Taylor expanded in y around 0

                                      \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]
                                    4. Step-by-step derivation
                                      1. lower-/.f64N/A

                                        \[\leadsto \frac{y}{\color{blue}{x \cdot \left(1 + x\right)}} \]
                                      2. *-commutativeN/A

                                        \[\leadsto \frac{y}{\left(1 + x\right) \cdot \color{blue}{x}} \]
                                      3. lower-*.f64N/A

                                        \[\leadsto \frac{y}{\left(1 + x\right) \cdot \color{blue}{x}} \]
                                      4. lower-+.f6458.4

                                        \[\leadsto \frac{y}{\left(1 + x\right) \cdot x} \]
                                    5. Applied rewrites58.4%

                                      \[\leadsto \color{blue}{\frac{y}{\left(1 + x\right) \cdot x}} \]

                                    if 1.34999999999999993e-64 < y

                                    1. Initial program 67.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. Add Preprocessing
                                    3. Taylor expanded in x around 0

                                      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
                                    4. Step-by-step derivation
                                      1. lower-/.f64N/A

                                        \[\leadsto \frac{x}{\color{blue}{y \cdot \left(1 + y\right)}} \]
                                      2. *-commutativeN/A

                                        \[\leadsto \frac{x}{\left(1 + y\right) \cdot \color{blue}{y}} \]
                                      3. lower-*.f64N/A

                                        \[\leadsto \frac{x}{\left(1 + y\right) \cdot \color{blue}{y}} \]
                                      4. lower-+.f6472.4

                                        \[\leadsto \frac{x}{\left(1 + y\right) \cdot y} \]
                                    5. Applied rewrites72.4%

                                      \[\leadsto \color{blue}{\frac{x}{\left(1 + y\right) \cdot y}} \]
                                  3. Recombined 2 regimes into one program.
                                  4. Add Preprocessing

                                  Alternative 16: 76.4% accurate, 1.5× speedup?

                                  \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq -7.5 \cdot 10^{+24}:\\ \;\;\;\;\frac{y}{x \cdot x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(1 + y\right) \cdot y}\\ \end{array} \end{array} \]
                                  NOTE: x and y should be sorted in increasing order before calling this function.
                                  (FPCore (x y)
                                   :precision binary64
                                   (if (<= x -7.5e+24) (/ y (* x x)) (/ x (* (+ 1.0 y) y))))
                                  assert(x < y);
                                  double code(double x, double y) {
                                  	double tmp;
                                  	if (x <= -7.5e+24) {
                                  		tmp = y / (x * x);
                                  	} else {
                                  		tmp = x / ((1.0 + y) * y);
                                  	}
                                  	return tmp;
                                  }
                                  
                                  NOTE: x and y should be sorted in increasing order before calling this function.
                                  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.5d+24)) then
                                          tmp = y / (x * x)
                                      else
                                          tmp = x / ((1.0d0 + y) * y)
                                      end if
                                      code = tmp
                                  end function
                                  
                                  assert x < y;
                                  public static double code(double x, double y) {
                                  	double tmp;
                                  	if (x <= -7.5e+24) {
                                  		tmp = y / (x * x);
                                  	} else {
                                  		tmp = x / ((1.0 + y) * y);
                                  	}
                                  	return tmp;
                                  }
                                  
                                  [x, y] = sort([x, y])
                                  def code(x, y):
                                  	tmp = 0
                                  	if x <= -7.5e+24:
                                  		tmp = y / (x * x)
                                  	else:
                                  		tmp = x / ((1.0 + y) * y)
                                  	return tmp
                                  
                                  x, y = sort([x, y])
                                  function code(x, y)
                                  	tmp = 0.0
                                  	if (x <= -7.5e+24)
                                  		tmp = Float64(y / Float64(x * x));
                                  	else
                                  		tmp = Float64(x / Float64(Float64(1.0 + y) * y));
                                  	end
                                  	return tmp
                                  end
                                  
                                  x, y = num2cell(sort([x, y])){:}
                                  function tmp_2 = code(x, y)
                                  	tmp = 0.0;
                                  	if (x <= -7.5e+24)
                                  		tmp = y / (x * x);
                                  	else
                                  		tmp = x / ((1.0 + y) * y);
                                  	end
                                  	tmp_2 = tmp;
                                  end
                                  
                                  NOTE: x and y should be sorted in increasing order before calling this function.
                                  code[x_, y_] := If[LessEqual[x, -7.5e+24], N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(1.0 + y), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]]
                                  
                                  \begin{array}{l}
                                  [x, y] = \mathsf{sort}([x, y])\\
                                  \\
                                  \begin{array}{l}
                                  \mathbf{if}\;x \leq -7.5 \cdot 10^{+24}:\\
                                  \;\;\;\;\frac{y}{x \cdot x}\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;\frac{x}{\left(1 + y\right) \cdot y}\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 2 regimes
                                  2. if x < -7.50000000000000014e24

                                    1. Initial program 55.6%

                                      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                                    2. Add Preprocessing
                                    3. Taylor expanded in x around inf

                                      \[\leadsto \color{blue}{\frac{y}{{x}^{2}}} \]
                                    4. Step-by-step derivation
                                      1. lower-/.f64N/A

                                        \[\leadsto \frac{y}{\color{blue}{{x}^{2}}} \]
                                      2. unpow2N/A

                                        \[\leadsto \frac{y}{x \cdot \color{blue}{x}} \]
                                      3. lower-*.f6475.3

                                        \[\leadsto \frac{y}{x \cdot \color{blue}{x}} \]
                                    5. Applied rewrites75.3%

                                      \[\leadsto \color{blue}{\frac{y}{x \cdot x}} \]

                                    if -7.50000000000000014e24 < x

                                    1. Initial program 72.7%

                                      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                                    2. Add Preprocessing
                                    3. Taylor expanded in x around 0

                                      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
                                    4. Step-by-step derivation
                                      1. lower-/.f64N/A

                                        \[\leadsto \frac{x}{\color{blue}{y \cdot \left(1 + y\right)}} \]
                                      2. *-commutativeN/A

                                        \[\leadsto \frac{x}{\left(1 + y\right) \cdot \color{blue}{y}} \]
                                      3. lower-*.f64N/A

                                        \[\leadsto \frac{x}{\left(1 + y\right) \cdot \color{blue}{y}} \]
                                      4. lower-+.f6459.3

                                        \[\leadsto \frac{x}{\left(1 + y\right) \cdot y} \]
                                    5. Applied rewrites59.3%

                                      \[\leadsto \color{blue}{\frac{x}{\left(1 + y\right) \cdot y}} \]
                                  3. Recombined 2 regimes into one program.
                                  4. Add Preprocessing

                                  Alternative 17: 47.7% accurate, 1.7× speedup?

                                  \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq 1:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot y}\\ \end{array} \end{array} \]
                                  NOTE: x and y should be sorted in increasing order before calling this function.
                                  (FPCore (x y) :precision binary64 (if (<= y 1.0) (/ x y) (/ x (* y y))))
                                  assert(x < y);
                                  double code(double x, double y) {
                                  	double tmp;
                                  	if (y <= 1.0) {
                                  		tmp = x / y;
                                  	} else {
                                  		tmp = x / (y * y);
                                  	}
                                  	return tmp;
                                  }
                                  
                                  NOTE: x and y should be sorted in increasing order before calling this function.
                                  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 (y <= 1.0d0) then
                                          tmp = x / y
                                      else
                                          tmp = x / (y * y)
                                      end if
                                      code = tmp
                                  end function
                                  
                                  assert x < y;
                                  public static double code(double x, double y) {
                                  	double tmp;
                                  	if (y <= 1.0) {
                                  		tmp = x / y;
                                  	} else {
                                  		tmp = x / (y * y);
                                  	}
                                  	return tmp;
                                  }
                                  
                                  [x, y] = sort([x, y])
                                  def code(x, y):
                                  	tmp = 0
                                  	if y <= 1.0:
                                  		tmp = x / y
                                  	else:
                                  		tmp = x / (y * y)
                                  	return tmp
                                  
                                  x, y = sort([x, y])
                                  function code(x, y)
                                  	tmp = 0.0
                                  	if (y <= 1.0)
                                  		tmp = Float64(x / y);
                                  	else
                                  		tmp = Float64(x / Float64(y * y));
                                  	end
                                  	return tmp
                                  end
                                  
                                  x, y = num2cell(sort([x, y])){:}
                                  function tmp_2 = code(x, y)
                                  	tmp = 0.0;
                                  	if (y <= 1.0)
                                  		tmp = x / y;
                                  	else
                                  		tmp = x / (y * y);
                                  	end
                                  	tmp_2 = tmp;
                                  end
                                  
                                  NOTE: x and y should be sorted in increasing order before calling this function.
                                  code[x_, y_] := If[LessEqual[y, 1.0], N[(x / y), $MachinePrecision], N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision]]
                                  
                                  \begin{array}{l}
                                  [x, y] = \mathsf{sort}([x, y])\\
                                  \\
                                  \begin{array}{l}
                                  \mathbf{if}\;y \leq 1:\\
                                  \;\;\;\;\frac{x}{y}\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;\frac{x}{y \cdot y}\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 2 regimes
                                  2. if y < 1

                                    1. Initial program 70.8%

                                      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                                    2. Add Preprocessing
                                    3. Step-by-step derivation
                                      1. 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)} \]
                                      2. 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)}} \]
                                      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. lift-+.f64N/A

                                        \[\leadsto \frac{x \cdot y}{\left(\color{blue}{\left(x + y\right)} \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                                      5. lift-+.f64N/A

                                        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                                      6. 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)} \]
                                      7. lift-+.f64N/A

                                        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\color{blue}{\left(x + y\right)} + 1\right)} \]
                                      8. lift-+.f64N/A

                                        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
                                      9. 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}} \]
                                      10. lower-*.f64N/A

                                        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
                                      11. lower-/.f64N/A

                                        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
                                      12. pow2N/A

                                        \[\leadsto \frac{x}{\color{blue}{{\left(x + y\right)}^{2}}} \cdot \frac{y}{\left(x + y\right) + 1} \]
                                      13. lower-pow.f64N/A

                                        \[\leadsto \frac{x}{\color{blue}{{\left(x + y\right)}^{2}}} \cdot \frac{y}{\left(x + y\right) + 1} \]
                                      14. +-commutativeN/A

                                        \[\leadsto \frac{x}{{\color{blue}{\left(y + x\right)}}^{2}} \cdot \frac{y}{\left(x + y\right) + 1} \]
                                      15. lower-+.f64N/A

                                        \[\leadsto \frac{x}{{\color{blue}{\left(y + x\right)}}^{2}} \cdot \frac{y}{\left(x + y\right) + 1} \]
                                      16. lower-/.f64N/A

                                        \[\leadsto \frac{x}{{\left(y + x\right)}^{2}} \cdot \color{blue}{\frac{y}{\left(x + y\right) + 1}} \]
                                      17. lift-+.f64N/A

                                        \[\leadsto \frac{x}{{\left(y + x\right)}^{2}} \cdot \frac{y}{\color{blue}{\left(x + y\right) + 1}} \]
                                      18. +-commutativeN/A

                                        \[\leadsto \frac{x}{{\left(y + x\right)}^{2}} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
                                      19. lower-+.f6486.8

                                        \[\leadsto \frac{x}{{\left(y + x\right)}^{2}} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
                                    4. Applied rewrites86.8%

                                      \[\leadsto \color{blue}{\frac{x}{{\left(y + x\right)}^{2}} \cdot \frac{y}{\left(y + x\right) + 1}} \]
                                    5. Taylor expanded in x around 0

                                      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
                                    6. Step-by-step derivation
                                      1. frac-timesN/A

                                        \[\leadsto \frac{\color{blue}{x}}{y \cdot \left(1 + y\right)} \]
                                      2. unpow2N/A

                                        \[\leadsto \frac{x}{y \cdot \left(1 + y\right)} \]
                                      3. +-commutativeN/A

                                        \[\leadsto \frac{x}{y \cdot \left(1 + y\right)} \]
                                      4. distribute-lft-outN/A

                                        \[\leadsto \frac{x}{y \cdot \left(1 + y\right)} \]
                                      5. +-commutativeN/A

                                        \[\leadsto \frac{x}{y \cdot \left(1 + y\right)} \]
                                      6. lower-/.f64N/A

                                        \[\leadsto \frac{x}{\color{blue}{y \cdot \left(1 + y\right)}} \]
                                      7. *-commutativeN/A

                                        \[\leadsto \frac{x}{\left(1 + y\right) \cdot \color{blue}{y}} \]
                                      8. lower-*.f64N/A

                                        \[\leadsto \frac{x}{\left(1 + y\right) \cdot \color{blue}{y}} \]
                                      9. lift-+.f6439.6

                                        \[\leadsto \frac{x}{\left(1 + y\right) \cdot y} \]
                                    7. Applied rewrites39.6%

                                      \[\leadsto \color{blue}{\frac{x}{\left(1 + y\right) \cdot y}} \]
                                    8. Taylor expanded in y around 0

                                      \[\leadsto \frac{x}{y} \]
                                    9. Step-by-step derivation
                                      1. Applied rewrites25.4%

                                        \[\leadsto \frac{x}{y} \]

                                      if 1 < y

                                      1. Initial program 64.7%

                                        \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                                      2. Add Preprocessing
                                      3. Taylor expanded in y around inf

                                        \[\leadsto \color{blue}{\frac{x}{{y}^{2}}} \]
                                      4. Step-by-step derivation
                                        1. lower-/.f64N/A

                                          \[\leadsto \frac{x}{\color{blue}{{y}^{2}}} \]
                                        2. unpow2N/A

                                          \[\leadsto \frac{x}{y \cdot \color{blue}{y}} \]
                                        3. lower-*.f6478.2

                                          \[\leadsto \frac{x}{y \cdot \color{blue}{y}} \]
                                      5. Applied rewrites78.2%

                                        \[\leadsto \color{blue}{\frac{x}{y \cdot y}} \]
                                    10. Recombined 2 regimes into one program.
                                    11. Final simplification41.3%

                                      \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 1:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot y}\\ \end{array} \]
                                    12. Add Preprocessing

                                    Alternative 18: 26.2% accurate, 3.3× speedup?

                                    \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \frac{x}{y} \end{array} \]
                                    NOTE: x and y should be sorted in increasing order before calling this function.
                                    (FPCore (x y) :precision binary64 (/ x y))
                                    assert(x < y);
                                    double code(double x, double y) {
                                    	return x / y;
                                    }
                                    
                                    NOTE: x and y should be sorted in increasing order before calling this function.
                                    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
                                    
                                    assert x < y;
                                    public static double code(double x, double y) {
                                    	return x / y;
                                    }
                                    
                                    [x, y] = sort([x, y])
                                    def code(x, y):
                                    	return x / y
                                    
                                    x, y = sort([x, y])
                                    function code(x, y)
                                    	return Float64(x / y)
                                    end
                                    
                                    x, y = num2cell(sort([x, y])){:}
                                    function tmp = code(x, y)
                                    	tmp = x / y;
                                    end
                                    
                                    NOTE: x and y should be sorted in increasing order before calling this function.
                                    code[x_, y_] := N[(x / y), $MachinePrecision]
                                    
                                    \begin{array}{l}
                                    [x, y] = \mathsf{sort}([x, y])\\
                                    \\
                                    \frac{x}{y}
                                    \end{array}
                                    
                                    Derivation
                                    1. Initial program 69.0%

                                      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                                    2. Add Preprocessing
                                    3. Step-by-step derivation
                                      1. 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)} \]
                                      2. 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)}} \]
                                      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. lift-+.f64N/A

                                        \[\leadsto \frac{x \cdot y}{\left(\color{blue}{\left(x + y\right)} \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                                      5. lift-+.f64N/A

                                        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                                      6. 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)} \]
                                      7. lift-+.f64N/A

                                        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\color{blue}{\left(x + y\right)} + 1\right)} \]
                                      8. lift-+.f64N/A

                                        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
                                      9. 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}} \]
                                      10. lower-*.f64N/A

                                        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
                                      11. lower-/.f64N/A

                                        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
                                      12. pow2N/A

                                        \[\leadsto \frac{x}{\color{blue}{{\left(x + y\right)}^{2}}} \cdot \frac{y}{\left(x + y\right) + 1} \]
                                      13. lower-pow.f64N/A

                                        \[\leadsto \frac{x}{\color{blue}{{\left(x + y\right)}^{2}}} \cdot \frac{y}{\left(x + y\right) + 1} \]
                                      14. +-commutativeN/A

                                        \[\leadsto \frac{x}{{\color{blue}{\left(y + x\right)}}^{2}} \cdot \frac{y}{\left(x + y\right) + 1} \]
                                      15. lower-+.f64N/A

                                        \[\leadsto \frac{x}{{\color{blue}{\left(y + x\right)}}^{2}} \cdot \frac{y}{\left(x + y\right) + 1} \]
                                      16. lower-/.f64N/A

                                        \[\leadsto \frac{x}{{\left(y + x\right)}^{2}} \cdot \color{blue}{\frac{y}{\left(x + y\right) + 1}} \]
                                      17. lift-+.f64N/A

                                        \[\leadsto \frac{x}{{\left(y + x\right)}^{2}} \cdot \frac{y}{\color{blue}{\left(x + y\right) + 1}} \]
                                      18. +-commutativeN/A

                                        \[\leadsto \frac{x}{{\left(y + x\right)}^{2}} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
                                      19. lower-+.f6488.3

                                        \[\leadsto \frac{x}{{\left(y + x\right)}^{2}} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
                                    4. Applied rewrites88.3%

                                      \[\leadsto \color{blue}{\frac{x}{{\left(y + x\right)}^{2}} \cdot \frac{y}{\left(y + x\right) + 1}} \]
                                    5. Taylor expanded in x around 0

                                      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
                                    6. Step-by-step derivation
                                      1. frac-timesN/A

                                        \[\leadsto \frac{\color{blue}{x}}{y \cdot \left(1 + y\right)} \]
                                      2. unpow2N/A

                                        \[\leadsto \frac{x}{y \cdot \left(1 + y\right)} \]
                                      3. +-commutativeN/A

                                        \[\leadsto \frac{x}{y \cdot \left(1 + y\right)} \]
                                      4. distribute-lft-outN/A

                                        \[\leadsto \frac{x}{y \cdot \left(1 + y\right)} \]
                                      5. +-commutativeN/A

                                        \[\leadsto \frac{x}{y \cdot \left(1 + y\right)} \]
                                      6. lower-/.f64N/A

                                        \[\leadsto \frac{x}{\color{blue}{y \cdot \left(1 + y\right)}} \]
                                      7. *-commutativeN/A

                                        \[\leadsto \frac{x}{\left(1 + y\right) \cdot \color{blue}{y}} \]
                                      8. lower-*.f64N/A

                                        \[\leadsto \frac{x}{\left(1 + y\right) \cdot \color{blue}{y}} \]
                                      9. lift-+.f6451.2

                                        \[\leadsto \frac{x}{\left(1 + y\right) \cdot y} \]
                                    7. Applied rewrites51.2%

                                      \[\leadsto \color{blue}{\frac{x}{\left(1 + y\right) \cdot y}} \]
                                    8. Taylor expanded in y around 0

                                      \[\leadsto \frac{x}{y} \]
                                    9. Step-by-step derivation
                                      1. Applied rewrites26.4%

                                        \[\leadsto \frac{x}{y} \]
                                      2. Final simplification26.4%

                                        \[\leadsto \frac{x}{y} \]
                                      3. Add Preprocessing

                                      Reproduce

                                      ?
                                      herbie shell --seed 2025085 
                                      (FPCore (x y)
                                        :name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, A"
                                        :precision binary64
                                      
                                        :alt
                                        (! :herbie-platform default (/ (/ (/ x (+ (+ y 1) x)) (+ y x)) (/ 1 (/ y (+ y x)))))
                                      
                                        (/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))