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

Percentage Accurate: 69.5% → 99.8%
Time: 5.7s
Alternatives: 18
Speedup: 1.0×

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}

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: 69.5% 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, 1.0× speedup?

\[\begin{array}{l} \\ \frac{\frac{y}{x + y}}{\left(x + y\right) - -1} \cdot \frac{x}{x + y} \end{array} \]
(FPCore (x y)
 :precision binary64
 (* (/ (/ y (+ x y)) (- (+ x y) -1.0)) (/ x (+ x y))))
double code(double x, double y) {
	return ((y / (x + y)) / ((x + y) - -1.0)) * (x / (x + y));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

\\
\frac{\frac{y}{x + y}}{\left(x + y\right) - -1} \cdot \frac{x}{x + y}
\end{array}
Derivation
  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. Step-by-step derivation
    1. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{\frac{y}{x - \left(-1 - y\right)}}{x + y} \cdot \frac{x}{x + y} \end{array} \]
(FPCore (x y)
 :precision binary64
 (* (/ (/ y (- x (- -1.0 y))) (+ x y)) (/ x (+ x y))))
double code(double x, double y) {
	return ((y / (x - (-1.0 - y))) / (x + y)) * (x / (x + y));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

\\
\frac{\frac{y}{x - \left(-1 - y\right)}}{x + y} \cdot \frac{x}{x + y}
\end{array}
Derivation
  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. Step-by-step derivation
    1. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 80.7% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{x + y}\\ \mathbf{if}\;x \leq -4.6 \cdot 10^{+172}:\\ \;\;\;\;\frac{\frac{y}{x}}{x + y} \cdot t\_0\\ \mathbf{elif}\;x \leq 1.7 \cdot 10^{+25}:\\ \;\;\;\;\frac{\frac{y}{x + y} \cdot x}{\left(x - \left(-1 - y\right)\right) \cdot \left(x + y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\left(x + y\right) - -1} \cdot t\_0\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (/ x (+ x y))))
   (if (<= x -4.6e+172)
     (* (/ (/ y x) (+ x y)) t_0)
     (if (<= x 1.7e+25)
       (/ (* (/ y (+ x y)) x) (* (- x (- -1.0 y)) (+ x y)))
       (* (/ 1.0 (- (+ x y) -1.0)) t_0)))))
double code(double x, double y) {
	double t_0 = x / (x + y);
	double tmp;
	if (x <= -4.6e+172) {
		tmp = ((y / x) / (x + y)) * t_0;
	} else if (x <= 1.7e+25) {
		tmp = ((y / (x + y)) * x) / ((x - (-1.0 - y)) * (x + y));
	} else {
		tmp = (1.0 / ((x + y) - -1.0)) * t_0;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: t_0
    real(8) :: tmp
    t_0 = x / (x + y)
    if (x <= (-4.6d+172)) then
        tmp = ((y / x) / (x + y)) * t_0
    else if (x <= 1.7d+25) then
        tmp = ((y / (x + y)) * x) / ((x - ((-1.0d0) - y)) * (x + y))
    else
        tmp = (1.0d0 / ((x + y) - (-1.0d0))) * t_0
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double t_0 = x / (x + y);
	double tmp;
	if (x <= -4.6e+172) {
		tmp = ((y / x) / (x + y)) * t_0;
	} else if (x <= 1.7e+25) {
		tmp = ((y / (x + y)) * x) / ((x - (-1.0 - y)) * (x + y));
	} else {
		tmp = (1.0 / ((x + y) - -1.0)) * t_0;
	}
	return tmp;
}
def code(x, y):
	t_0 = x / (x + y)
	tmp = 0
	if x <= -4.6e+172:
		tmp = ((y / x) / (x + y)) * t_0
	elif x <= 1.7e+25:
		tmp = ((y / (x + y)) * x) / ((x - (-1.0 - y)) * (x + y))
	else:
		tmp = (1.0 / ((x + y) - -1.0)) * t_0
	return tmp
function code(x, y)
	t_0 = Float64(x / Float64(x + y))
	tmp = 0.0
	if (x <= -4.6e+172)
		tmp = Float64(Float64(Float64(y / x) / Float64(x + y)) * t_0);
	elseif (x <= 1.7e+25)
		tmp = Float64(Float64(Float64(y / Float64(x + y)) * x) / Float64(Float64(x - Float64(-1.0 - y)) * Float64(x + y)));
	else
		tmp = Float64(Float64(1.0 / Float64(Float64(x + y) - -1.0)) * t_0);
	end
	return tmp
end
function tmp_2 = code(x, y)
	t_0 = x / (x + y);
	tmp = 0.0;
	if (x <= -4.6e+172)
		tmp = ((y / x) / (x + y)) * t_0;
	elseif (x <= 1.7e+25)
		tmp = ((y / (x + y)) * x) / ((x - (-1.0 - y)) * (x + y));
	else
		tmp = (1.0 / ((x + y) - -1.0)) * t_0;
	end
	tmp_2 = tmp;
end
code[x_, y_] := Block[{t$95$0 = N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.6e+172], N[(N[(N[(y / x), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[x, 1.7e+25], N[(N[(N[(y / N[(x + y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] / N[(N[(x - N[(-1.0 - y), $MachinePrecision]), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[(N[(x + y), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{x}{x + y}\\
\mathbf{if}\;x \leq -4.6 \cdot 10^{+172}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + y} \cdot t\_0\\

\mathbf{elif}\;x \leq 1.7 \cdot 10^{+25}:\\
\;\;\;\;\frac{\frac{y}{x + y} \cdot x}{\left(x - \left(-1 - y\right)\right) \cdot \left(x + y\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -4.6000000000000002e172

    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. Step-by-step derivation
      1. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{x + y} \cdot \frac{x}{x + y} \]
    9. Step-by-step derivation
      1. lower-/.f6437.9

        \[\leadsto \frac{\frac{y}{\color{blue}{x}}}{x + y} \cdot \frac{x}{x + y} \]
    10. Applied rewrites37.9%

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

    if -4.6000000000000002e172 < x < 1.69999999999999992e25

    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. Step-by-step derivation
      1. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.69999999999999992e25 < 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. Step-by-step derivation
      1. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 4: 76.2% accurate, 0.7× speedup?

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

      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. Step-by-step derivation
        1. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -3.65000000000000011e-57 < y < 2.99999999999999995e-24

      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. Taylor expanded in y around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 2.99999999999999995e-24 < y < 1.3500000000000001e127

      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. Step-by-step derivation
        1. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.3500000000000001e127 < y

      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. Step-by-step derivation
        1. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{y}} \cdot \frac{x}{x + y} \]
      7. Step-by-step derivation
        1. lower-/.f6439.7

          \[\leadsto \frac{1}{\color{blue}{y}} \cdot \frac{x}{x + y} \]
      8. Applied rewrites39.7%

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

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

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

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

          \[\leadsto \color{blue}{\frac{\frac{1}{y} \cdot x}{x + y}} \]
        5. lower-*.f6439.6

          \[\leadsto \frac{\color{blue}{\frac{1}{y} \cdot x}}{x + y} \]
      10. Applied rewrites39.6%

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

    Alternative 5: 74.5% accurate, 0.7× speedup?

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

      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. Step-by-step derivation
        1. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -3.65000000000000011e-57 < y < 3400

      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. Taylor expanded in y around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 3400 < y < 8.1999999999999999e82

      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. Step-by-step derivation
        1. lift-/.f64N/A

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

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

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

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

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

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

      if 8.1999999999999999e82 < y

      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. Step-by-step derivation
        1. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{y}} \cdot \frac{x}{x + y} \]
      7. Step-by-step derivation
        1. lower-/.f6439.7

          \[\leadsto \frac{1}{\color{blue}{y}} \cdot \frac{x}{x + y} \]
      8. Applied rewrites39.7%

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

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

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

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

          \[\leadsto \color{blue}{\frac{\frac{1}{y} \cdot x}{x + y}} \]
        5. lower-*.f6439.6

          \[\leadsto \frac{\color{blue}{\frac{1}{y} \cdot x}}{x + y} \]
      10. Applied rewrites39.6%

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

    Alternative 6: 74.5% accurate, 0.7× speedup?

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

      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. Step-by-step derivation
        1. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -3.65000000000000011e-57 < y < 3400

      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. Taylor expanded in y around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 3400 < y < 8.1999999999999999e82

      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. Step-by-step derivation
        1. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) - \color{blue}{\left(\mathsf{neg}\left(1\right)\right)}\right)} \]
        12. add-flipN/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)}} \]
        13. 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)} \]
        14. 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)} \]
        15. 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)} \]
        16. 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)} \]
        17. associate-/l*N/A

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

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

      if 8.1999999999999999e82 < y

      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. Step-by-step derivation
        1. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{y}} \cdot \frac{x}{x + y} \]
      7. Step-by-step derivation
        1. lower-/.f6439.7

          \[\leadsto \frac{1}{\color{blue}{y}} \cdot \frac{x}{x + y} \]
      8. Applied rewrites39.7%

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

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

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

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

          \[\leadsto \color{blue}{\frac{\frac{1}{y} \cdot x}{x + y}} \]
        5. lower-*.f6439.6

          \[\leadsto \frac{\color{blue}{\frac{1}{y} \cdot x}}{x + y} \]
      10. Applied rewrites39.6%

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

    Alternative 7: 74.5% accurate, 0.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{x + y}\\ \mathbf{if}\;y \leq -3.65 \cdot 10^{-57}:\\ \;\;\;\;\frac{\frac{y}{x}}{\left(x + y\right) - -1} \cdot t\_0\\ \mathbf{elif}\;y \leq 5200:\\ \;\;\;\;\frac{y}{x + y} \cdot \frac{x}{\left(x - -1\right) \cdot \left(x + y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{1 + y} \cdot t\_0\\ \end{array} \end{array} \]
    (FPCore (x y)
     :precision binary64
     (let* ((t_0 (/ x (+ x y))))
       (if (<= y -3.65e-57)
         (* (/ (/ y x) (- (+ x y) -1.0)) t_0)
         (if (<= y 5200.0)
           (* (/ y (+ x y)) (/ x (* (- x -1.0) (+ x y))))
           (* (/ 1.0 (+ 1.0 y)) t_0)))))
    double code(double x, double y) {
    	double t_0 = x / (x + y);
    	double tmp;
    	if (y <= -3.65e-57) {
    		tmp = ((y / x) / ((x + y) - -1.0)) * t_0;
    	} else if (y <= 5200.0) {
    		tmp = (y / (x + y)) * (x / ((x - -1.0) * (x + y)));
    	} else {
    		tmp = (1.0 / (1.0 + y)) * t_0;
    	}
    	return tmp;
    }
    
    module fmin_fmax_functions
        implicit none
        private
        public fmax
        public fmin
    
        interface fmax
            module procedure fmax88
            module procedure fmax44
            module procedure fmax84
            module procedure fmax48
        end interface
        interface fmin
            module procedure fmin88
            module procedure fmin44
            module procedure fmin84
            module procedure fmin48
        end interface
    contains
        real(8) function fmax88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(4) function fmax44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(8) function fmax84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmax48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
        end function
        real(8) function fmin88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(4) function fmin44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(8) function fmin84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmin48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
        end function
    end module
    
    real(8) function code(x, y)
    use fmin_fmax_functions
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8) :: t_0
        real(8) :: tmp
        t_0 = x / (x + y)
        if (y <= (-3.65d-57)) then
            tmp = ((y / x) / ((x + y) - (-1.0d0))) * t_0
        else if (y <= 5200.0d0) then
            tmp = (y / (x + y)) * (x / ((x - (-1.0d0)) * (x + y)))
        else
            tmp = (1.0d0 / (1.0d0 + y)) * t_0
        end if
        code = tmp
    end function
    
    public static double code(double x, double y) {
    	double t_0 = x / (x + y);
    	double tmp;
    	if (y <= -3.65e-57) {
    		tmp = ((y / x) / ((x + y) - -1.0)) * t_0;
    	} else if (y <= 5200.0) {
    		tmp = (y / (x + y)) * (x / ((x - -1.0) * (x + y)));
    	} else {
    		tmp = (1.0 / (1.0 + y)) * t_0;
    	}
    	return tmp;
    }
    
    def code(x, y):
    	t_0 = x / (x + y)
    	tmp = 0
    	if y <= -3.65e-57:
    		tmp = ((y / x) / ((x + y) - -1.0)) * t_0
    	elif y <= 5200.0:
    		tmp = (y / (x + y)) * (x / ((x - -1.0) * (x + y)))
    	else:
    		tmp = (1.0 / (1.0 + y)) * t_0
    	return tmp
    
    function code(x, y)
    	t_0 = Float64(x / Float64(x + y))
    	tmp = 0.0
    	if (y <= -3.65e-57)
    		tmp = Float64(Float64(Float64(y / x) / Float64(Float64(x + y) - -1.0)) * t_0);
    	elseif (y <= 5200.0)
    		tmp = Float64(Float64(y / Float64(x + y)) * Float64(x / Float64(Float64(x - -1.0) * Float64(x + y))));
    	else
    		tmp = Float64(Float64(1.0 / Float64(1.0 + y)) * t_0);
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y)
    	t_0 = x / (x + y);
    	tmp = 0.0;
    	if (y <= -3.65e-57)
    		tmp = ((y / x) / ((x + y) - -1.0)) * t_0;
    	elseif (y <= 5200.0)
    		tmp = (y / (x + y)) * (x / ((x - -1.0) * (x + y)));
    	else
    		tmp = (1.0 / (1.0 + y)) * t_0;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_] := Block[{t$95$0 = N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.65e-57], N[(N[(N[(y / x), $MachinePrecision] / N[(N[(x + y), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y, 5200.0], N[(N[(y / N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(x / N[(N[(x - -1.0), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[(1.0 + y), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \frac{x}{x + y}\\
    \mathbf{if}\;y \leq -3.65 \cdot 10^{-57}:\\
    \;\;\;\;\frac{\frac{y}{x}}{\left(x + y\right) - -1} \cdot t\_0\\
    
    \mathbf{elif}\;y \leq 5200:\\
    \;\;\;\;\frac{y}{x + y} \cdot \frac{x}{\left(x - -1\right) \cdot \left(x + y\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{1}{1 + y} \cdot t\_0\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if y < -3.65000000000000011e-57

      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. Step-by-step derivation
        1. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -3.65000000000000011e-57 < y < 5200

      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. Taylor expanded in y around 0

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

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

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

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

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

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

          \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + x\right)}} \]
        5. lift-*.f64N/A

          \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(1 + x\right)} \]
        6. associate-*l*N/A

          \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(1 + x\right)\right)}} \]
        7. lift-+.f64N/A

          \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) \cdot \left(1 + x\right)\right)} \]
        8. +-commutativeN/A

          \[\leadsto \frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(\left(x + y\right) \cdot \left(1 + x\right)\right)} \]
        9. lift-+.f64N/A

          \[\leadsto \frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(\left(x + y\right) \cdot \left(1 + x\right)\right)} \]
        10. times-fracN/A

          \[\leadsto \color{blue}{\frac{y}{y + x} \cdot \frac{x}{\left(x + y\right) \cdot \left(1 + x\right)}} \]
        11. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{y}{y + x}} \cdot \frac{x}{\left(x + y\right) \cdot \left(1 + x\right)} \]
        12. lower-*.f64N/A

          \[\leadsto \color{blue}{\frac{y}{y + x} \cdot \frac{x}{\left(x + y\right) \cdot \left(1 + x\right)}} \]
        13. lift-+.f64N/A

          \[\leadsto \frac{y}{\color{blue}{y + x}} \cdot \frac{x}{\left(x + y\right) \cdot \left(1 + x\right)} \]
        14. +-commutativeN/A

          \[\leadsto \frac{y}{\color{blue}{x + y}} \cdot \frac{x}{\left(x + y\right) \cdot \left(1 + x\right)} \]
        15. lift-+.f64N/A

          \[\leadsto \frac{y}{\color{blue}{x + y}} \cdot \frac{x}{\left(x + y\right) \cdot \left(1 + x\right)} \]
        16. lower-/.f64N/A

          \[\leadsto \frac{y}{x + y} \cdot \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(1 + x\right)}} \]
        17. lift-+.f64N/A

          \[\leadsto \frac{y}{x + y} \cdot \frac{x}{\color{blue}{\left(x + y\right)} \cdot \left(1 + x\right)} \]
        18. +-commutativeN/A

          \[\leadsto \frac{y}{x + y} \cdot \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(1 + x\right)} \]
        19. lift-+.f64N/A

          \[\leadsto \frac{y}{x + y} \cdot \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(1 + x\right)} \]
      6. Applied rewrites75.5%

        \[\leadsto \color{blue}{\frac{y}{x + y} \cdot \frac{x}{\left(x - -1\right) \cdot \left(x + y\right)}} \]

      if 5200 < y

      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. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{\color{blue}{x \cdot y}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        3. *-commutativeN/A

          \[\leadsto \frac{\color{blue}{y \cdot x}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        4. lift-*.f64N/A

          \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        5. lift-*.f64N/A

          \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)} \]
        6. associate-*l*N/A

          \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}} \]
        7. times-fracN/A

          \[\leadsto \color{blue}{\frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        8. lower-*.f64N/A

          \[\leadsto \color{blue}{\frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        9. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{y}{x + y}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        10. lift-+.f64N/A

          \[\leadsto \frac{y}{\color{blue}{x + y}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        11. +-commutativeN/A

          \[\leadsto \frac{y}{\color{blue}{y + x}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        12. lower-+.f64N/A

          \[\leadsto \frac{y}{\color{blue}{y + x}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        13. lower-/.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        14. *-commutativeN/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}} \]
        15. lower-*.f6493.8

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}} \]
        16. lift-+.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) + 1\right)} \cdot \left(x + y\right)} \]
        17. add-flipN/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)\right)} \cdot \left(x + y\right)} \]
        18. lower--.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)\right)} \cdot \left(x + y\right)} \]
        19. lift-+.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\color{blue}{\left(x + y\right)} - \left(\mathsf{neg}\left(1\right)\right)\right) \cdot \left(x + y\right)} \]
        20. +-commutativeN/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\color{blue}{\left(y + x\right)} - \left(\mathsf{neg}\left(1\right)\right)\right) \cdot \left(x + y\right)} \]
        21. lower-+.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\color{blue}{\left(y + x\right)} - \left(\mathsf{neg}\left(1\right)\right)\right) \cdot \left(x + y\right)} \]
        22. metadata-eval93.8

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - \color{blue}{-1}\right) \cdot \left(x + y\right)} \]
        23. lift-+.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \color{blue}{\left(x + y\right)}} \]
        24. +-commutativeN/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \color{blue}{\left(y + x\right)}} \]
        25. lower-+.f6493.8

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \color{blue}{\left(y + x\right)}} \]
      3. Applied rewrites93.8%

        \[\leadsto \color{blue}{\frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}} \]
      4. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \color{blue}{\frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}} \]
        2. lift-/.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \color{blue}{\frac{x}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}} \]
        3. associate-*r/N/A

          \[\leadsto \color{blue}{\frac{\frac{y}{y + x} \cdot x}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}} \]
        4. lift-*.f64N/A

          \[\leadsto \frac{\frac{y}{y + x} \cdot x}{\color{blue}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}} \]
        5. times-fracN/A

          \[\leadsto \color{blue}{\frac{\frac{y}{y + x}}{\left(y + x\right) - -1} \cdot \frac{x}{y + x}} \]
        6. lower-*.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{y}{y + x}}{\left(y + x\right) - -1} \cdot \frac{x}{y + x}} \]
        7. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{y}{y + x}}{\left(y + x\right) - -1}} \cdot \frac{x}{y + x} \]
        8. lift-+.f64N/A

          \[\leadsto \frac{\frac{y}{\color{blue}{y + x}}}{\left(y + x\right) - -1} \cdot \frac{x}{y + x} \]
        9. +-commutativeN/A

          \[\leadsto \frac{\frac{y}{\color{blue}{x + y}}}{\left(y + x\right) - -1} \cdot \frac{x}{y + x} \]
        10. lift-+.f64N/A

          \[\leadsto \frac{\frac{y}{\color{blue}{x + y}}}{\left(y + x\right) - -1} \cdot \frac{x}{y + x} \]
        11. lift-+.f64N/A

          \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{\left(y + x\right)} - -1} \cdot \frac{x}{y + x} \]
        12. +-commutativeN/A

          \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{\left(x + y\right)} - -1} \cdot \frac{x}{y + x} \]
        13. lift-+.f64N/A

          \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{\left(x + y\right)} - -1} \cdot \frac{x}{y + x} \]
        14. lower-/.f6499.8

          \[\leadsto \frac{\frac{y}{x + y}}{\left(x + y\right) - -1} \cdot \color{blue}{\frac{x}{y + x}} \]
        15. lift-+.f64N/A

          \[\leadsto \frac{\frac{y}{x + y}}{\left(x + y\right) - -1} \cdot \frac{x}{\color{blue}{y + x}} \]
        16. +-commutativeN/A

          \[\leadsto \frac{\frac{y}{x + y}}{\left(x + y\right) - -1} \cdot \frac{x}{\color{blue}{x + y}} \]
        17. lift-+.f6499.8

          \[\leadsto \frac{\frac{y}{x + y}}{\left(x + y\right) - -1} \cdot \frac{x}{\color{blue}{x + y}} \]
      5. Applied rewrites99.8%

        \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{\left(x + y\right) - -1} \cdot \frac{x}{x + y}} \]
      6. Taylor expanded in x around 0

        \[\leadsto \color{blue}{\frac{1}{1 + y}} \cdot \frac{x}{x + y} \]
      7. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{1}{\color{blue}{1 + y}} \cdot \frac{x}{x + y} \]
        2. lower-+.f6452.2

          \[\leadsto \frac{1}{1 + \color{blue}{y}} \cdot \frac{x}{x + y} \]
      8. Applied rewrites52.2%

        \[\leadsto \color{blue}{\frac{1}{1 + y}} \cdot \frac{x}{x + y} \]
    3. Recombined 3 regimes into one program.
    4. Add Preprocessing

    Alternative 8: 72.6% accurate, 0.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{x + y}\\ \mathbf{if}\;y \leq -2100000000:\\ \;\;\;\;\frac{\frac{y}{x}}{x + y} \cdot t\_0\\ \mathbf{elif}\;y \leq 5200:\\ \;\;\;\;\frac{y}{x + y} \cdot \frac{x}{\left(x - -1\right) \cdot \left(x + y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{1 + y} \cdot t\_0\\ \end{array} \end{array} \]
    (FPCore (x y)
     :precision binary64
     (let* ((t_0 (/ x (+ x y))))
       (if (<= y -2100000000.0)
         (* (/ (/ y x) (+ x y)) t_0)
         (if (<= y 5200.0)
           (* (/ y (+ x y)) (/ x (* (- x -1.0) (+ x y))))
           (* (/ 1.0 (+ 1.0 y)) t_0)))))
    double code(double x, double y) {
    	double t_0 = x / (x + y);
    	double tmp;
    	if (y <= -2100000000.0) {
    		tmp = ((y / x) / (x + y)) * t_0;
    	} else if (y <= 5200.0) {
    		tmp = (y / (x + y)) * (x / ((x - -1.0) * (x + y)));
    	} else {
    		tmp = (1.0 / (1.0 + y)) * t_0;
    	}
    	return tmp;
    }
    
    module fmin_fmax_functions
        implicit none
        private
        public fmax
        public fmin
    
        interface fmax
            module procedure fmax88
            module procedure fmax44
            module procedure fmax84
            module procedure fmax48
        end interface
        interface fmin
            module procedure fmin88
            module procedure fmin44
            module procedure fmin84
            module procedure fmin48
        end interface
    contains
        real(8) function fmax88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(4) function fmax44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(8) function fmax84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmax48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
        end function
        real(8) function fmin88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(4) function fmin44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(8) function fmin84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmin48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
        end function
    end module
    
    real(8) function code(x, y)
    use fmin_fmax_functions
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8) :: t_0
        real(8) :: tmp
        t_0 = x / (x + y)
        if (y <= (-2100000000.0d0)) then
            tmp = ((y / x) / (x + y)) * t_0
        else if (y <= 5200.0d0) then
            tmp = (y / (x + y)) * (x / ((x - (-1.0d0)) * (x + y)))
        else
            tmp = (1.0d0 / (1.0d0 + y)) * t_0
        end if
        code = tmp
    end function
    
    public static double code(double x, double y) {
    	double t_0 = x / (x + y);
    	double tmp;
    	if (y <= -2100000000.0) {
    		tmp = ((y / x) / (x + y)) * t_0;
    	} else if (y <= 5200.0) {
    		tmp = (y / (x + y)) * (x / ((x - -1.0) * (x + y)));
    	} else {
    		tmp = (1.0 / (1.0 + y)) * t_0;
    	}
    	return tmp;
    }
    
    def code(x, y):
    	t_0 = x / (x + y)
    	tmp = 0
    	if y <= -2100000000.0:
    		tmp = ((y / x) / (x + y)) * t_0
    	elif y <= 5200.0:
    		tmp = (y / (x + y)) * (x / ((x - -1.0) * (x + y)))
    	else:
    		tmp = (1.0 / (1.0 + y)) * t_0
    	return tmp
    
    function code(x, y)
    	t_0 = Float64(x / Float64(x + y))
    	tmp = 0.0
    	if (y <= -2100000000.0)
    		tmp = Float64(Float64(Float64(y / x) / Float64(x + y)) * t_0);
    	elseif (y <= 5200.0)
    		tmp = Float64(Float64(y / Float64(x + y)) * Float64(x / Float64(Float64(x - -1.0) * Float64(x + y))));
    	else
    		tmp = Float64(Float64(1.0 / Float64(1.0 + y)) * t_0);
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y)
    	t_0 = x / (x + y);
    	tmp = 0.0;
    	if (y <= -2100000000.0)
    		tmp = ((y / x) / (x + y)) * t_0;
    	elseif (y <= 5200.0)
    		tmp = (y / (x + y)) * (x / ((x - -1.0) * (x + y)));
    	else
    		tmp = (1.0 / (1.0 + y)) * t_0;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_] := Block[{t$95$0 = N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2100000000.0], N[(N[(N[(y / x), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y, 5200.0], N[(N[(y / N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(x / N[(N[(x - -1.0), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[(1.0 + y), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \frac{x}{x + y}\\
    \mathbf{if}\;y \leq -2100000000:\\
    \;\;\;\;\frac{\frac{y}{x}}{x + y} \cdot t\_0\\
    
    \mathbf{elif}\;y \leq 5200:\\
    \;\;\;\;\frac{y}{x + y} \cdot \frac{x}{\left(x - -1\right) \cdot \left(x + y\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{1}{1 + y} \cdot t\_0\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if y < -2.1e9

      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. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{\color{blue}{x \cdot y}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        3. *-commutativeN/A

          \[\leadsto \frac{\color{blue}{y \cdot x}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        4. lift-*.f64N/A

          \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        5. lift-*.f64N/A

          \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)} \]
        6. associate-*l*N/A

          \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}} \]
        7. times-fracN/A

          \[\leadsto \color{blue}{\frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        8. lower-*.f64N/A

          \[\leadsto \color{blue}{\frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        9. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{y}{x + y}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        10. lift-+.f64N/A

          \[\leadsto \frac{y}{\color{blue}{x + y}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        11. +-commutativeN/A

          \[\leadsto \frac{y}{\color{blue}{y + x}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        12. lower-+.f64N/A

          \[\leadsto \frac{y}{\color{blue}{y + x}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        13. lower-/.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        14. *-commutativeN/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}} \]
        15. lower-*.f6493.8

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}} \]
        16. lift-+.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) + 1\right)} \cdot \left(x + y\right)} \]
        17. add-flipN/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)\right)} \cdot \left(x + y\right)} \]
        18. lower--.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)\right)} \cdot \left(x + y\right)} \]
        19. lift-+.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\color{blue}{\left(x + y\right)} - \left(\mathsf{neg}\left(1\right)\right)\right) \cdot \left(x + y\right)} \]
        20. +-commutativeN/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\color{blue}{\left(y + x\right)} - \left(\mathsf{neg}\left(1\right)\right)\right) \cdot \left(x + y\right)} \]
        21. lower-+.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\color{blue}{\left(y + x\right)} - \left(\mathsf{neg}\left(1\right)\right)\right) \cdot \left(x + y\right)} \]
        22. metadata-eval93.8

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - \color{blue}{-1}\right) \cdot \left(x + y\right)} \]
        23. lift-+.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \color{blue}{\left(x + y\right)}} \]
        24. +-commutativeN/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \color{blue}{\left(y + x\right)}} \]
        25. lower-+.f6493.8

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \color{blue}{\left(y + x\right)}} \]
      3. Applied rewrites93.8%

        \[\leadsto \color{blue}{\frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}} \]
      4. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \color{blue}{\frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}} \]
        2. lift-/.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \color{blue}{\frac{x}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}} \]
        3. associate-*r/N/A

          \[\leadsto \color{blue}{\frac{\frac{y}{y + x} \cdot x}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}} \]
        4. lift-*.f64N/A

          \[\leadsto \frac{\frac{y}{y + x} \cdot x}{\color{blue}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}} \]
        5. times-fracN/A

          \[\leadsto \color{blue}{\frac{\frac{y}{y + x}}{\left(y + x\right) - -1} \cdot \frac{x}{y + x}} \]
        6. lower-*.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{y}{y + x}}{\left(y + x\right) - -1} \cdot \frac{x}{y + x}} \]
        7. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{y}{y + x}}{\left(y + x\right) - -1}} \cdot \frac{x}{y + x} \]
        8. lift-+.f64N/A

          \[\leadsto \frac{\frac{y}{\color{blue}{y + x}}}{\left(y + x\right) - -1} \cdot \frac{x}{y + x} \]
        9. +-commutativeN/A

          \[\leadsto \frac{\frac{y}{\color{blue}{x + y}}}{\left(y + x\right) - -1} \cdot \frac{x}{y + x} \]
        10. lift-+.f64N/A

          \[\leadsto \frac{\frac{y}{\color{blue}{x + y}}}{\left(y + x\right) - -1} \cdot \frac{x}{y + x} \]
        11. lift-+.f64N/A

          \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{\left(y + x\right)} - -1} \cdot \frac{x}{y + x} \]
        12. +-commutativeN/A

          \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{\left(x + y\right)} - -1} \cdot \frac{x}{y + x} \]
        13. lift-+.f64N/A

          \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{\left(x + y\right)} - -1} \cdot \frac{x}{y + x} \]
        14. lower-/.f6499.8

          \[\leadsto \frac{\frac{y}{x + y}}{\left(x + y\right) - -1} \cdot \color{blue}{\frac{x}{y + x}} \]
        15. lift-+.f64N/A

          \[\leadsto \frac{\frac{y}{x + y}}{\left(x + y\right) - -1} \cdot \frac{x}{\color{blue}{y + x}} \]
        16. +-commutativeN/A

          \[\leadsto \frac{\frac{y}{x + y}}{\left(x + y\right) - -1} \cdot \frac{x}{\color{blue}{x + y}} \]
        17. lift-+.f6499.8

          \[\leadsto \frac{\frac{y}{x + y}}{\left(x + y\right) - -1} \cdot \frac{x}{\color{blue}{x + y}} \]
      5. Applied rewrites99.8%

        \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{\left(x + y\right) - -1} \cdot \frac{x}{x + y}} \]
      6. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{\left(x + y\right) - -1}} \cdot \frac{x}{x + y} \]
        2. mult-flipN/A

          \[\leadsto \color{blue}{\left(\frac{y}{x + y} \cdot \frac{1}{\left(x + y\right) - -1}\right)} \cdot \frac{x}{x + y} \]
        3. lift-/.f64N/A

          \[\leadsto \left(\color{blue}{\frac{y}{x + y}} \cdot \frac{1}{\left(x + y\right) - -1}\right) \cdot \frac{x}{x + y} \]
        4. associate-*l/N/A

          \[\leadsto \color{blue}{\frac{y \cdot \frac{1}{\left(x + y\right) - -1}}{x + y}} \cdot \frac{x}{x + y} \]
        5. mult-flipN/A

          \[\leadsto \frac{\color{blue}{\frac{y}{\left(x + y\right) - -1}}}{x + y} \cdot \frac{x}{x + y} \]
        6. lift--.f64N/A

          \[\leadsto \frac{\frac{y}{\color{blue}{\left(x + y\right) - -1}}}{x + y} \cdot \frac{x}{x + y} \]
        7. metadata-evalN/A

          \[\leadsto \frac{\frac{y}{\left(x + y\right) - \color{blue}{\left(\mathsf{neg}\left(1\right)\right)}}}{x + y} \cdot \frac{x}{x + y} \]
        8. add-flipN/A

          \[\leadsto \frac{\frac{y}{\color{blue}{\left(x + y\right) + 1}}}{x + y} \cdot \frac{x}{x + y} \]
        9. lift-+.f64N/A

          \[\leadsto \frac{\frac{y}{\color{blue}{\left(x + y\right)} + 1}}{x + y} \cdot \frac{x}{x + y} \]
        10. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{y}{\left(x + y\right) + 1}}{x + y}} \cdot \frac{x}{x + y} \]
      7. Applied rewrites99.8%

        \[\leadsto \color{blue}{\frac{\frac{y}{x - \left(-1 - y\right)}}{x + y}} \cdot \frac{x}{x + y} \]
      8. Taylor expanded in x around inf

        \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{x + y} \cdot \frac{x}{x + y} \]
      9. Step-by-step derivation
        1. lower-/.f6437.9

          \[\leadsto \frac{\frac{y}{\color{blue}{x}}}{x + y} \cdot \frac{x}{x + y} \]
      10. Applied rewrites37.9%

        \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{x + y} \cdot \frac{x}{x + y} \]

      if -2.1e9 < y < 5200

      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. Taylor expanded in y around 0

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(1 + x\right)}} \]
      3. Step-by-step derivation
        1. lower-+.f6459.1

          \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + \color{blue}{x}\right)} \]
      4. Applied rewrites59.1%

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(1 + x\right)}} \]
      5. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + x\right)}} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{\color{blue}{x \cdot y}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + x\right)} \]
        3. *-commutativeN/A

          \[\leadsto \frac{\color{blue}{y \cdot x}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + x\right)} \]
        4. lift-*.f64N/A

          \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + x\right)}} \]
        5. lift-*.f64N/A

          \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(1 + x\right)} \]
        6. associate-*l*N/A

          \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(1 + x\right)\right)}} \]
        7. lift-+.f64N/A

          \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) \cdot \left(1 + x\right)\right)} \]
        8. +-commutativeN/A

          \[\leadsto \frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(\left(x + y\right) \cdot \left(1 + x\right)\right)} \]
        9. lift-+.f64N/A

          \[\leadsto \frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(\left(x + y\right) \cdot \left(1 + x\right)\right)} \]
        10. times-fracN/A

          \[\leadsto \color{blue}{\frac{y}{y + x} \cdot \frac{x}{\left(x + y\right) \cdot \left(1 + x\right)}} \]
        11. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{y}{y + x}} \cdot \frac{x}{\left(x + y\right) \cdot \left(1 + x\right)} \]
        12. lower-*.f64N/A

          \[\leadsto \color{blue}{\frac{y}{y + x} \cdot \frac{x}{\left(x + y\right) \cdot \left(1 + x\right)}} \]
        13. lift-+.f64N/A

          \[\leadsto \frac{y}{\color{blue}{y + x}} \cdot \frac{x}{\left(x + y\right) \cdot \left(1 + x\right)} \]
        14. +-commutativeN/A

          \[\leadsto \frac{y}{\color{blue}{x + y}} \cdot \frac{x}{\left(x + y\right) \cdot \left(1 + x\right)} \]
        15. lift-+.f64N/A

          \[\leadsto \frac{y}{\color{blue}{x + y}} \cdot \frac{x}{\left(x + y\right) \cdot \left(1 + x\right)} \]
        16. lower-/.f64N/A

          \[\leadsto \frac{y}{x + y} \cdot \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(1 + x\right)}} \]
        17. lift-+.f64N/A

          \[\leadsto \frac{y}{x + y} \cdot \frac{x}{\color{blue}{\left(x + y\right)} \cdot \left(1 + x\right)} \]
        18. +-commutativeN/A

          \[\leadsto \frac{y}{x + y} \cdot \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(1 + x\right)} \]
        19. lift-+.f64N/A

          \[\leadsto \frac{y}{x + y} \cdot \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(1 + x\right)} \]
      6. Applied rewrites75.5%

        \[\leadsto \color{blue}{\frac{y}{x + y} \cdot \frac{x}{\left(x - -1\right) \cdot \left(x + y\right)}} \]

      if 5200 < y

      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. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{\color{blue}{x \cdot y}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        3. *-commutativeN/A

          \[\leadsto \frac{\color{blue}{y \cdot x}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        4. lift-*.f64N/A

          \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        5. lift-*.f64N/A

          \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)} \]
        6. associate-*l*N/A

          \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}} \]
        7. times-fracN/A

          \[\leadsto \color{blue}{\frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        8. lower-*.f64N/A

          \[\leadsto \color{blue}{\frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        9. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{y}{x + y}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        10. lift-+.f64N/A

          \[\leadsto \frac{y}{\color{blue}{x + y}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        11. +-commutativeN/A

          \[\leadsto \frac{y}{\color{blue}{y + x}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        12. lower-+.f64N/A

          \[\leadsto \frac{y}{\color{blue}{y + x}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        13. lower-/.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        14. *-commutativeN/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}} \]
        15. lower-*.f6493.8

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}} \]
        16. lift-+.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) + 1\right)} \cdot \left(x + y\right)} \]
        17. add-flipN/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)\right)} \cdot \left(x + y\right)} \]
        18. lower--.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)\right)} \cdot \left(x + y\right)} \]
        19. lift-+.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\color{blue}{\left(x + y\right)} - \left(\mathsf{neg}\left(1\right)\right)\right) \cdot \left(x + y\right)} \]
        20. +-commutativeN/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\color{blue}{\left(y + x\right)} - \left(\mathsf{neg}\left(1\right)\right)\right) \cdot \left(x + y\right)} \]
        21. lower-+.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\color{blue}{\left(y + x\right)} - \left(\mathsf{neg}\left(1\right)\right)\right) \cdot \left(x + y\right)} \]
        22. metadata-eval93.8

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - \color{blue}{-1}\right) \cdot \left(x + y\right)} \]
        23. lift-+.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \color{blue}{\left(x + y\right)}} \]
        24. +-commutativeN/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \color{blue}{\left(y + x\right)}} \]
        25. lower-+.f6493.8

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \color{blue}{\left(y + x\right)}} \]
      3. Applied rewrites93.8%

        \[\leadsto \color{blue}{\frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}} \]
      4. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \color{blue}{\frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}} \]
        2. lift-/.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \color{blue}{\frac{x}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}} \]
        3. associate-*r/N/A

          \[\leadsto \color{blue}{\frac{\frac{y}{y + x} \cdot x}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}} \]
        4. lift-*.f64N/A

          \[\leadsto \frac{\frac{y}{y + x} \cdot x}{\color{blue}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}} \]
        5. times-fracN/A

          \[\leadsto \color{blue}{\frac{\frac{y}{y + x}}{\left(y + x\right) - -1} \cdot \frac{x}{y + x}} \]
        6. lower-*.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{y}{y + x}}{\left(y + x\right) - -1} \cdot \frac{x}{y + x}} \]
        7. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{y}{y + x}}{\left(y + x\right) - -1}} \cdot \frac{x}{y + x} \]
        8. lift-+.f64N/A

          \[\leadsto \frac{\frac{y}{\color{blue}{y + x}}}{\left(y + x\right) - -1} \cdot \frac{x}{y + x} \]
        9. +-commutativeN/A

          \[\leadsto \frac{\frac{y}{\color{blue}{x + y}}}{\left(y + x\right) - -1} \cdot \frac{x}{y + x} \]
        10. lift-+.f64N/A

          \[\leadsto \frac{\frac{y}{\color{blue}{x + y}}}{\left(y + x\right) - -1} \cdot \frac{x}{y + x} \]
        11. lift-+.f64N/A

          \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{\left(y + x\right)} - -1} \cdot \frac{x}{y + x} \]
        12. +-commutativeN/A

          \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{\left(x + y\right)} - -1} \cdot \frac{x}{y + x} \]
        13. lift-+.f64N/A

          \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{\left(x + y\right)} - -1} \cdot \frac{x}{y + x} \]
        14. lower-/.f6499.8

          \[\leadsto \frac{\frac{y}{x + y}}{\left(x + y\right) - -1} \cdot \color{blue}{\frac{x}{y + x}} \]
        15. lift-+.f64N/A

          \[\leadsto \frac{\frac{y}{x + y}}{\left(x + y\right) - -1} \cdot \frac{x}{\color{blue}{y + x}} \]
        16. +-commutativeN/A

          \[\leadsto \frac{\frac{y}{x + y}}{\left(x + y\right) - -1} \cdot \frac{x}{\color{blue}{x + y}} \]
        17. lift-+.f6499.8

          \[\leadsto \frac{\frac{y}{x + y}}{\left(x + y\right) - -1} \cdot \frac{x}{\color{blue}{x + y}} \]
      5. Applied rewrites99.8%

        \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{\left(x + y\right) - -1} \cdot \frac{x}{x + y}} \]
      6. Taylor expanded in x around 0

        \[\leadsto \color{blue}{\frac{1}{1 + y}} \cdot \frac{x}{x + y} \]
      7. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{1}{\color{blue}{1 + y}} \cdot \frac{x}{x + y} \]
        2. lower-+.f6452.2

          \[\leadsto \frac{1}{1 + \color{blue}{y}} \cdot \frac{x}{x + y} \]
      8. Applied rewrites52.2%

        \[\leadsto \color{blue}{\frac{1}{1 + y}} \cdot \frac{x}{x + y} \]
    3. Recombined 3 regimes into one program.
    4. Add Preprocessing

    Alternative 9: 66.0% accurate, 0.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 8.5 \cdot 10^{-217}:\\ \;\;\;\;\frac{y}{y + x} \cdot \frac{1}{1 + x}\\ \mathbf{elif}\;y \leq 2.1 \cdot 10^{-19}:\\ \;\;\;\;\frac{x}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x - -1\right)} \cdot y\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{1 + y} \cdot \frac{x}{x + y}\\ \end{array} \end{array} \]
    (FPCore (x y)
     :precision binary64
     (if (<= y 8.5e-217)
       (* (/ y (+ y x)) (/ 1.0 (+ 1.0 x)))
       (if (<= y 2.1e-19)
         (* (/ x (* (* (+ x y) (+ x y)) (- x -1.0))) y)
         (* (/ 1.0 (+ 1.0 y)) (/ x (+ x y))))))
    double code(double x, double y) {
    	double tmp;
    	if (y <= 8.5e-217) {
    		tmp = (y / (y + x)) * (1.0 / (1.0 + x));
    	} else if (y <= 2.1e-19) {
    		tmp = (x / (((x + y) * (x + y)) * (x - -1.0))) * y;
    	} else {
    		tmp = (1.0 / (1.0 + y)) * (x / (x + y));
    	}
    	return tmp;
    }
    
    module fmin_fmax_functions
        implicit none
        private
        public fmax
        public fmin
    
        interface fmax
            module procedure fmax88
            module procedure fmax44
            module procedure fmax84
            module procedure fmax48
        end interface
        interface fmin
            module procedure fmin88
            module procedure fmin44
            module procedure fmin84
            module procedure fmin48
        end interface
    contains
        real(8) function fmax88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(4) function fmax44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(8) function fmax84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmax48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
        end function
        real(8) function fmin88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(4) function fmin44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(8) function fmin84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmin48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
        end function
    end module
    
    real(8) function code(x, y)
    use fmin_fmax_functions
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8) :: tmp
        if (y <= 8.5d-217) then
            tmp = (y / (y + x)) * (1.0d0 / (1.0d0 + x))
        else if (y <= 2.1d-19) then
            tmp = (x / (((x + y) * (x + y)) * (x - (-1.0d0)))) * y
        else
            tmp = (1.0d0 / (1.0d0 + y)) * (x / (x + y))
        end if
        code = tmp
    end function
    
    public static double code(double x, double y) {
    	double tmp;
    	if (y <= 8.5e-217) {
    		tmp = (y / (y + x)) * (1.0 / (1.0 + x));
    	} else if (y <= 2.1e-19) {
    		tmp = (x / (((x + y) * (x + y)) * (x - -1.0))) * y;
    	} else {
    		tmp = (1.0 / (1.0 + y)) * (x / (x + y));
    	}
    	return tmp;
    }
    
    def code(x, y):
    	tmp = 0
    	if y <= 8.5e-217:
    		tmp = (y / (y + x)) * (1.0 / (1.0 + x))
    	elif y <= 2.1e-19:
    		tmp = (x / (((x + y) * (x + y)) * (x - -1.0))) * y
    	else:
    		tmp = (1.0 / (1.0 + y)) * (x / (x + y))
    	return tmp
    
    function code(x, y)
    	tmp = 0.0
    	if (y <= 8.5e-217)
    		tmp = Float64(Float64(y / Float64(y + x)) * Float64(1.0 / Float64(1.0 + x)));
    	elseif (y <= 2.1e-19)
    		tmp = Float64(Float64(x / Float64(Float64(Float64(x + y) * Float64(x + y)) * Float64(x - -1.0))) * y);
    	else
    		tmp = Float64(Float64(1.0 / Float64(1.0 + y)) * Float64(x / Float64(x + y)));
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y)
    	tmp = 0.0;
    	if (y <= 8.5e-217)
    		tmp = (y / (y + x)) * (1.0 / (1.0 + x));
    	elseif (y <= 2.1e-19)
    		tmp = (x / (((x + y) * (x + y)) * (x - -1.0))) * y;
    	else
    		tmp = (1.0 / (1.0 + y)) * (x / (x + y));
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_] := If[LessEqual[y, 8.5e-217], N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.1e-19], N[(N[(x / N[(N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(x - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], N[(N[(1.0 / N[(1.0 + y), $MachinePrecision]), $MachinePrecision] * N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;y \leq 8.5 \cdot 10^{-217}:\\
    \;\;\;\;\frac{y}{y + x} \cdot \frac{1}{1 + x}\\
    
    \mathbf{elif}\;y \leq 2.1 \cdot 10^{-19}:\\
    \;\;\;\;\frac{x}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x - -1\right)} \cdot y\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{1}{1 + y} \cdot \frac{x}{x + y}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if y < 8.4999999999999994e-217

      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. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{\color{blue}{x \cdot y}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        3. *-commutativeN/A

          \[\leadsto \frac{\color{blue}{y \cdot x}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        4. lift-*.f64N/A

          \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        5. lift-*.f64N/A

          \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)} \]
        6. associate-*l*N/A

          \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}} \]
        7. times-fracN/A

          \[\leadsto \color{blue}{\frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        8. lower-*.f64N/A

          \[\leadsto \color{blue}{\frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        9. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{y}{x + y}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        10. lift-+.f64N/A

          \[\leadsto \frac{y}{\color{blue}{x + y}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        11. +-commutativeN/A

          \[\leadsto \frac{y}{\color{blue}{y + x}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        12. lower-+.f64N/A

          \[\leadsto \frac{y}{\color{blue}{y + x}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        13. lower-/.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        14. *-commutativeN/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}} \]
        15. lower-*.f6493.8

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}} \]
        16. lift-+.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) + 1\right)} \cdot \left(x + y\right)} \]
        17. add-flipN/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)\right)} \cdot \left(x + y\right)} \]
        18. lower--.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)\right)} \cdot \left(x + y\right)} \]
        19. lift-+.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\color{blue}{\left(x + y\right)} - \left(\mathsf{neg}\left(1\right)\right)\right) \cdot \left(x + y\right)} \]
        20. +-commutativeN/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\color{blue}{\left(y + x\right)} - \left(\mathsf{neg}\left(1\right)\right)\right) \cdot \left(x + y\right)} \]
        21. lower-+.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\color{blue}{\left(y + x\right)} - \left(\mathsf{neg}\left(1\right)\right)\right) \cdot \left(x + y\right)} \]
        22. metadata-eval93.8

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - \color{blue}{-1}\right) \cdot \left(x + y\right)} \]
        23. lift-+.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \color{blue}{\left(x + y\right)}} \]
        24. +-commutativeN/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \color{blue}{\left(y + x\right)}} \]
        25. lower-+.f6493.8

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \color{blue}{\left(y + x\right)}} \]
      3. Applied rewrites93.8%

        \[\leadsto \color{blue}{\frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}} \]
      4. Taylor expanded in y around 0

        \[\leadsto \frac{y}{y + x} \cdot \color{blue}{\frac{1}{1 + x}} \]
      5. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{1}{\color{blue}{1 + x}} \]
        2. lower-+.f6449.6

          \[\leadsto \frac{y}{y + x} \cdot \frac{1}{1 + \color{blue}{x}} \]
      6. Applied rewrites49.6%

        \[\leadsto \frac{y}{y + x} \cdot \color{blue}{\frac{1}{1 + x}} \]

      if 8.4999999999999994e-217 < y < 2.0999999999999999e-19

      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. Taylor expanded in y around 0

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(1 + x\right)}} \]
      3. Step-by-step derivation
        1. lower-+.f6459.1

          \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + \color{blue}{x}\right)} \]
      4. Applied rewrites59.1%

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(1 + x\right)}} \]
      5. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + x\right)}} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{\color{blue}{x \cdot y}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + x\right)} \]
        3. *-commutativeN/A

          \[\leadsto \frac{\color{blue}{y \cdot x}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + x\right)} \]
        4. associate-/l*N/A

          \[\leadsto \color{blue}{y \cdot \frac{x}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + x\right)}} \]
        5. lower-*.f64N/A

          \[\leadsto \color{blue}{y \cdot \frac{x}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + x\right)}} \]
        6. lower-/.f6475.9

          \[\leadsto y \cdot \color{blue}{\frac{x}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + x\right)}} \]
        7. lift-*.f64N/A

          \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + x\right)}} \]
        8. *-commutativeN/A

          \[\leadsto y \cdot \frac{x}{\color{blue}{\left(1 + x\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
        9. lower-*.f6475.9

          \[\leadsto y \cdot \frac{x}{\color{blue}{\left(1 + x\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
        10. lift-+.f64N/A

          \[\leadsto y \cdot \frac{x}{\left(1 + \color{blue}{x}\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
        11. +-commutativeN/A

          \[\leadsto y \cdot \frac{x}{\left(x + \color{blue}{1}\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
        12. add-flip-revN/A

          \[\leadsto y \cdot \frac{x}{\left(x - \color{blue}{\left(\mathsf{neg}\left(1\right)\right)}\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
        13. metadata-evalN/A

          \[\leadsto y \cdot \frac{x}{\left(x - -1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
        14. lower--.f6475.9

          \[\leadsto y \cdot \frac{x}{\left(x - \color{blue}{-1}\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
      6. Applied rewrites75.9%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\left(x - -1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      7. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \color{blue}{y \cdot \frac{x}{\left(x - -1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
        2. *-commutativeN/A

          \[\leadsto \color{blue}{\frac{x}{\left(x - -1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot y} \]
        3. lower-*.f6475.9

          \[\leadsto \color{blue}{\frac{x}{\left(x - -1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot y} \]
        4. lift-*.f64N/A

          \[\leadsto \frac{x}{\color{blue}{\left(x - -1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \cdot y \]
        5. *-commutativeN/A

          \[\leadsto \frac{x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x - -1\right)}} \cdot y \]
        6. lower-*.f6475.9

          \[\leadsto \frac{x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x - -1\right)}} \cdot y \]
      8. Applied rewrites75.9%

        \[\leadsto \color{blue}{\frac{x}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x - -1\right)} \cdot y} \]

      if 2.0999999999999999e-19 < y

      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. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{\color{blue}{x \cdot y}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        3. *-commutativeN/A

          \[\leadsto \frac{\color{blue}{y \cdot x}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        4. lift-*.f64N/A

          \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        5. lift-*.f64N/A

          \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)} \]
        6. associate-*l*N/A

          \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}} \]
        7. times-fracN/A

          \[\leadsto \color{blue}{\frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        8. lower-*.f64N/A

          \[\leadsto \color{blue}{\frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        9. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{y}{x + y}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        10. lift-+.f64N/A

          \[\leadsto \frac{y}{\color{blue}{x + y}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        11. +-commutativeN/A

          \[\leadsto \frac{y}{\color{blue}{y + x}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        12. lower-+.f64N/A

          \[\leadsto \frac{y}{\color{blue}{y + x}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        13. lower-/.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        14. *-commutativeN/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}} \]
        15. lower-*.f6493.8

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}} \]
        16. lift-+.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) + 1\right)} \cdot \left(x + y\right)} \]
        17. add-flipN/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)\right)} \cdot \left(x + y\right)} \]
        18. lower--.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)\right)} \cdot \left(x + y\right)} \]
        19. lift-+.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\color{blue}{\left(x + y\right)} - \left(\mathsf{neg}\left(1\right)\right)\right) \cdot \left(x + y\right)} \]
        20. +-commutativeN/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\color{blue}{\left(y + x\right)} - \left(\mathsf{neg}\left(1\right)\right)\right) \cdot \left(x + y\right)} \]
        21. lower-+.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\color{blue}{\left(y + x\right)} - \left(\mathsf{neg}\left(1\right)\right)\right) \cdot \left(x + y\right)} \]
        22. metadata-eval93.8

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - \color{blue}{-1}\right) \cdot \left(x + y\right)} \]
        23. lift-+.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \color{blue}{\left(x + y\right)}} \]
        24. +-commutativeN/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \color{blue}{\left(y + x\right)}} \]
        25. lower-+.f6493.8

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \color{blue}{\left(y + x\right)}} \]
      3. Applied rewrites93.8%

        \[\leadsto \color{blue}{\frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}} \]
      4. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \color{blue}{\frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}} \]
        2. lift-/.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \color{blue}{\frac{x}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}} \]
        3. associate-*r/N/A

          \[\leadsto \color{blue}{\frac{\frac{y}{y + x} \cdot x}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}} \]
        4. lift-*.f64N/A

          \[\leadsto \frac{\frac{y}{y + x} \cdot x}{\color{blue}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}} \]
        5. times-fracN/A

          \[\leadsto \color{blue}{\frac{\frac{y}{y + x}}{\left(y + x\right) - -1} \cdot \frac{x}{y + x}} \]
        6. lower-*.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{y}{y + x}}{\left(y + x\right) - -1} \cdot \frac{x}{y + x}} \]
        7. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{y}{y + x}}{\left(y + x\right) - -1}} \cdot \frac{x}{y + x} \]
        8. lift-+.f64N/A

          \[\leadsto \frac{\frac{y}{\color{blue}{y + x}}}{\left(y + x\right) - -1} \cdot \frac{x}{y + x} \]
        9. +-commutativeN/A

          \[\leadsto \frac{\frac{y}{\color{blue}{x + y}}}{\left(y + x\right) - -1} \cdot \frac{x}{y + x} \]
        10. lift-+.f64N/A

          \[\leadsto \frac{\frac{y}{\color{blue}{x + y}}}{\left(y + x\right) - -1} \cdot \frac{x}{y + x} \]
        11. lift-+.f64N/A

          \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{\left(y + x\right)} - -1} \cdot \frac{x}{y + x} \]
        12. +-commutativeN/A

          \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{\left(x + y\right)} - -1} \cdot \frac{x}{y + x} \]
        13. lift-+.f64N/A

          \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{\left(x + y\right)} - -1} \cdot \frac{x}{y + x} \]
        14. lower-/.f6499.8

          \[\leadsto \frac{\frac{y}{x + y}}{\left(x + y\right) - -1} \cdot \color{blue}{\frac{x}{y + x}} \]
        15. lift-+.f64N/A

          \[\leadsto \frac{\frac{y}{x + y}}{\left(x + y\right) - -1} \cdot \frac{x}{\color{blue}{y + x}} \]
        16. +-commutativeN/A

          \[\leadsto \frac{\frac{y}{x + y}}{\left(x + y\right) - -1} \cdot \frac{x}{\color{blue}{x + y}} \]
        17. lift-+.f6499.8

          \[\leadsto \frac{\frac{y}{x + y}}{\left(x + y\right) - -1} \cdot \frac{x}{\color{blue}{x + y}} \]
      5. Applied rewrites99.8%

        \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{\left(x + y\right) - -1} \cdot \frac{x}{x + y}} \]
      6. Taylor expanded in x around 0

        \[\leadsto \color{blue}{\frac{1}{1 + y}} \cdot \frac{x}{x + y} \]
      7. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{1}{\color{blue}{1 + y}} \cdot \frac{x}{x + y} \]
        2. lower-+.f6452.2

          \[\leadsto \frac{1}{1 + \color{blue}{y}} \cdot \frac{x}{x + y} \]
      8. Applied rewrites52.2%

        \[\leadsto \color{blue}{\frac{1}{1 + y}} \cdot \frac{x}{x + y} \]
    3. Recombined 3 regimes into one program.
    4. Add Preprocessing

    Alternative 10: 64.4% accurate, 0.9× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 2.3 \cdot 10^{-128}:\\ \;\;\;\;\frac{y}{y + x} \cdot \frac{1}{1 + x}\\ \mathbf{elif}\;y \leq 4.9 \cdot 10^{+81}:\\ \;\;\;\;1 \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{y} \cdot x}{x + y}\\ \end{array} \end{array} \]
    (FPCore (x y)
     :precision binary64
     (if (<= y 2.3e-128)
       (* (/ y (+ y x)) (/ 1.0 (+ 1.0 x)))
       (if (<= y 4.9e+81)
         (* 1.0 (/ x (* (- (+ y x) -1.0) (+ y x))))
         (/ (* (/ 1.0 y) x) (+ x y)))))
    double code(double x, double y) {
    	double tmp;
    	if (y <= 2.3e-128) {
    		tmp = (y / (y + x)) * (1.0 / (1.0 + x));
    	} else if (y <= 4.9e+81) {
    		tmp = 1.0 * (x / (((y + x) - -1.0) * (y + x)));
    	} else {
    		tmp = ((1.0 / y) * x) / (x + y);
    	}
    	return tmp;
    }
    
    module fmin_fmax_functions
        implicit none
        private
        public fmax
        public fmin
    
        interface fmax
            module procedure fmax88
            module procedure fmax44
            module procedure fmax84
            module procedure fmax48
        end interface
        interface fmin
            module procedure fmin88
            module procedure fmin44
            module procedure fmin84
            module procedure fmin48
        end interface
    contains
        real(8) function fmax88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(4) function fmax44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(8) function fmax84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmax48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
        end function
        real(8) function fmin88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(4) function fmin44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(8) function fmin84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmin48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
        end function
    end module
    
    real(8) function code(x, y)
    use fmin_fmax_functions
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8) :: tmp
        if (y <= 2.3d-128) then
            tmp = (y / (y + x)) * (1.0d0 / (1.0d0 + x))
        else if (y <= 4.9d+81) then
            tmp = 1.0d0 * (x / (((y + x) - (-1.0d0)) * (y + x)))
        else
            tmp = ((1.0d0 / y) * x) / (x + y)
        end if
        code = tmp
    end function
    
    public static double code(double x, double y) {
    	double tmp;
    	if (y <= 2.3e-128) {
    		tmp = (y / (y + x)) * (1.0 / (1.0 + x));
    	} else if (y <= 4.9e+81) {
    		tmp = 1.0 * (x / (((y + x) - -1.0) * (y + x)));
    	} else {
    		tmp = ((1.0 / y) * x) / (x + y);
    	}
    	return tmp;
    }
    
    def code(x, y):
    	tmp = 0
    	if y <= 2.3e-128:
    		tmp = (y / (y + x)) * (1.0 / (1.0 + x))
    	elif y <= 4.9e+81:
    		tmp = 1.0 * (x / (((y + x) - -1.0) * (y + x)))
    	else:
    		tmp = ((1.0 / y) * x) / (x + y)
    	return tmp
    
    function code(x, y)
    	tmp = 0.0
    	if (y <= 2.3e-128)
    		tmp = Float64(Float64(y / Float64(y + x)) * Float64(1.0 / Float64(1.0 + x)));
    	elseif (y <= 4.9e+81)
    		tmp = Float64(1.0 * Float64(x / Float64(Float64(Float64(y + x) - -1.0) * Float64(y + x))));
    	else
    		tmp = Float64(Float64(Float64(1.0 / y) * x) / Float64(x + y));
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y)
    	tmp = 0.0;
    	if (y <= 2.3e-128)
    		tmp = (y / (y + x)) * (1.0 / (1.0 + x));
    	elseif (y <= 4.9e+81)
    		tmp = 1.0 * (x / (((y + x) - -1.0) * (y + x)));
    	else
    		tmp = ((1.0 / y) * x) / (x + y);
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_] := If[LessEqual[y, 2.3e-128], N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.9e+81], N[(1.0 * N[(x / N[(N[(N[(y + x), $MachinePrecision] - -1.0), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 / y), $MachinePrecision] * x), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;y \leq 2.3 \cdot 10^{-128}:\\
    \;\;\;\;\frac{y}{y + x} \cdot \frac{1}{1 + x}\\
    
    \mathbf{elif}\;y \leq 4.9 \cdot 10^{+81}:\\
    \;\;\;\;1 \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{\frac{1}{y} \cdot x}{x + y}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if y < 2.3000000000000001e-128

      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. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{\color{blue}{x \cdot y}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        3. *-commutativeN/A

          \[\leadsto \frac{\color{blue}{y \cdot x}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        4. lift-*.f64N/A

          \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        5. lift-*.f64N/A

          \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)} \]
        6. associate-*l*N/A

          \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}} \]
        7. times-fracN/A

          \[\leadsto \color{blue}{\frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        8. lower-*.f64N/A

          \[\leadsto \color{blue}{\frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        9. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{y}{x + y}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        10. lift-+.f64N/A

          \[\leadsto \frac{y}{\color{blue}{x + y}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        11. +-commutativeN/A

          \[\leadsto \frac{y}{\color{blue}{y + x}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        12. lower-+.f64N/A

          \[\leadsto \frac{y}{\color{blue}{y + x}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        13. lower-/.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        14. *-commutativeN/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}} \]
        15. lower-*.f6493.8

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}} \]
        16. lift-+.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) + 1\right)} \cdot \left(x + y\right)} \]
        17. add-flipN/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)\right)} \cdot \left(x + y\right)} \]
        18. lower--.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)\right)} \cdot \left(x + y\right)} \]
        19. lift-+.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\color{blue}{\left(x + y\right)} - \left(\mathsf{neg}\left(1\right)\right)\right) \cdot \left(x + y\right)} \]
        20. +-commutativeN/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\color{blue}{\left(y + x\right)} - \left(\mathsf{neg}\left(1\right)\right)\right) \cdot \left(x + y\right)} \]
        21. lower-+.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\color{blue}{\left(y + x\right)} - \left(\mathsf{neg}\left(1\right)\right)\right) \cdot \left(x + y\right)} \]
        22. metadata-eval93.8

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - \color{blue}{-1}\right) \cdot \left(x + y\right)} \]
        23. lift-+.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \color{blue}{\left(x + y\right)}} \]
        24. +-commutativeN/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \color{blue}{\left(y + x\right)}} \]
        25. lower-+.f6493.8

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \color{blue}{\left(y + x\right)}} \]
      3. Applied rewrites93.8%

        \[\leadsto \color{blue}{\frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}} \]
      4. Taylor expanded in y around 0

        \[\leadsto \frac{y}{y + x} \cdot \color{blue}{\frac{1}{1 + x}} \]
      5. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{1}{\color{blue}{1 + x}} \]
        2. lower-+.f6449.6

          \[\leadsto \frac{y}{y + x} \cdot \frac{1}{1 + \color{blue}{x}} \]
      6. Applied rewrites49.6%

        \[\leadsto \frac{y}{y + x} \cdot \color{blue}{\frac{1}{1 + x}} \]

      if 2.3000000000000001e-128 < y < 4.90000000000000023e81

      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. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{\color{blue}{x \cdot y}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        3. *-commutativeN/A

          \[\leadsto \frac{\color{blue}{y \cdot x}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        4. lift-*.f64N/A

          \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        5. lift-*.f64N/A

          \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)} \]
        6. associate-*l*N/A

          \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}} \]
        7. times-fracN/A

          \[\leadsto \color{blue}{\frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        8. lower-*.f64N/A

          \[\leadsto \color{blue}{\frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        9. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{y}{x + y}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        10. lift-+.f64N/A

          \[\leadsto \frac{y}{\color{blue}{x + y}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        11. +-commutativeN/A

          \[\leadsto \frac{y}{\color{blue}{y + x}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        12. lower-+.f64N/A

          \[\leadsto \frac{y}{\color{blue}{y + x}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        13. lower-/.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        14. *-commutativeN/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}} \]
        15. lower-*.f6493.8

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}} \]
        16. lift-+.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) + 1\right)} \cdot \left(x + y\right)} \]
        17. add-flipN/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)\right)} \cdot \left(x + y\right)} \]
        18. lower--.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)\right)} \cdot \left(x + y\right)} \]
        19. lift-+.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\color{blue}{\left(x + y\right)} - \left(\mathsf{neg}\left(1\right)\right)\right) \cdot \left(x + y\right)} \]
        20. +-commutativeN/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\color{blue}{\left(y + x\right)} - \left(\mathsf{neg}\left(1\right)\right)\right) \cdot \left(x + y\right)} \]
        21. lower-+.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\color{blue}{\left(y + x\right)} - \left(\mathsf{neg}\left(1\right)\right)\right) \cdot \left(x + y\right)} \]
        22. metadata-eval93.8

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - \color{blue}{-1}\right) \cdot \left(x + y\right)} \]
        23. lift-+.f64N/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \color{blue}{\left(x + y\right)}} \]
        24. +-commutativeN/A

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \color{blue}{\left(y + x\right)}} \]
        25. lower-+.f6493.8

          \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \color{blue}{\left(y + x\right)}} \]
      3. Applied rewrites93.8%

        \[\leadsto \color{blue}{\frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}} \]
      4. Taylor expanded in x around 0

        \[\leadsto \color{blue}{1} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)} \]
      5. Step-by-step derivation
        1. Applied rewrites66.8%

          \[\leadsto \color{blue}{1} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)} \]

        if 4.90000000000000023e81 < y

        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. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{\color{blue}{x \cdot y}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          3. *-commutativeN/A

            \[\leadsto \frac{\color{blue}{y \cdot x}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          4. lift-*.f64N/A

            \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
          5. lift-*.f64N/A

            \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)} \]
          6. associate-*l*N/A

            \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}} \]
          7. times-fracN/A

            \[\leadsto \color{blue}{\frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
          8. lower-*.f64N/A

            \[\leadsto \color{blue}{\frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
          9. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{y}{x + y}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          10. lift-+.f64N/A

            \[\leadsto \frac{y}{\color{blue}{x + y}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          11. +-commutativeN/A

            \[\leadsto \frac{y}{\color{blue}{y + x}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          12. lower-+.f64N/A

            \[\leadsto \frac{y}{\color{blue}{y + x}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          13. lower-/.f64N/A

            \[\leadsto \frac{y}{y + x} \cdot \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
          14. *-commutativeN/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}} \]
          15. lower-*.f6493.8

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}} \]
          16. lift-+.f64N/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) + 1\right)} \cdot \left(x + y\right)} \]
          17. add-flipN/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)\right)} \cdot \left(x + y\right)} \]
          18. lower--.f64N/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)\right)} \cdot \left(x + y\right)} \]
          19. lift-+.f64N/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\color{blue}{\left(x + y\right)} - \left(\mathsf{neg}\left(1\right)\right)\right) \cdot \left(x + y\right)} \]
          20. +-commutativeN/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\color{blue}{\left(y + x\right)} - \left(\mathsf{neg}\left(1\right)\right)\right) \cdot \left(x + y\right)} \]
          21. lower-+.f64N/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\color{blue}{\left(y + x\right)} - \left(\mathsf{neg}\left(1\right)\right)\right) \cdot \left(x + y\right)} \]
          22. metadata-eval93.8

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - \color{blue}{-1}\right) \cdot \left(x + y\right)} \]
          23. lift-+.f64N/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \color{blue}{\left(x + y\right)}} \]
          24. +-commutativeN/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \color{blue}{\left(y + x\right)}} \]
          25. lower-+.f6493.8

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \color{blue}{\left(y + x\right)}} \]
        3. Applied rewrites93.8%

          \[\leadsto \color{blue}{\frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}} \]
        4. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \color{blue}{\frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}} \]
          2. lift-/.f64N/A

            \[\leadsto \frac{y}{y + x} \cdot \color{blue}{\frac{x}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}} \]
          3. associate-*r/N/A

            \[\leadsto \color{blue}{\frac{\frac{y}{y + x} \cdot x}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}} \]
          4. lift-*.f64N/A

            \[\leadsto \frac{\frac{y}{y + x} \cdot x}{\color{blue}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}} \]
          5. times-fracN/A

            \[\leadsto \color{blue}{\frac{\frac{y}{y + x}}{\left(y + x\right) - -1} \cdot \frac{x}{y + x}} \]
          6. lower-*.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{y}{y + x}}{\left(y + x\right) - -1} \cdot \frac{x}{y + x}} \]
          7. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{y}{y + x}}{\left(y + x\right) - -1}} \cdot \frac{x}{y + x} \]
          8. lift-+.f64N/A

            \[\leadsto \frac{\frac{y}{\color{blue}{y + x}}}{\left(y + x\right) - -1} \cdot \frac{x}{y + x} \]
          9. +-commutativeN/A

            \[\leadsto \frac{\frac{y}{\color{blue}{x + y}}}{\left(y + x\right) - -1} \cdot \frac{x}{y + x} \]
          10. lift-+.f64N/A

            \[\leadsto \frac{\frac{y}{\color{blue}{x + y}}}{\left(y + x\right) - -1} \cdot \frac{x}{y + x} \]
          11. lift-+.f64N/A

            \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{\left(y + x\right)} - -1} \cdot \frac{x}{y + x} \]
          12. +-commutativeN/A

            \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{\left(x + y\right)} - -1} \cdot \frac{x}{y + x} \]
          13. lift-+.f64N/A

            \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{\left(x + y\right)} - -1} \cdot \frac{x}{y + x} \]
          14. lower-/.f6499.8

            \[\leadsto \frac{\frac{y}{x + y}}{\left(x + y\right) - -1} \cdot \color{blue}{\frac{x}{y + x}} \]
          15. lift-+.f64N/A

            \[\leadsto \frac{\frac{y}{x + y}}{\left(x + y\right) - -1} \cdot \frac{x}{\color{blue}{y + x}} \]
          16. +-commutativeN/A

            \[\leadsto \frac{\frac{y}{x + y}}{\left(x + y\right) - -1} \cdot \frac{x}{\color{blue}{x + y}} \]
          17. lift-+.f6499.8

            \[\leadsto \frac{\frac{y}{x + y}}{\left(x + y\right) - -1} \cdot \frac{x}{\color{blue}{x + y}} \]
        5. Applied rewrites99.8%

          \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{\left(x + y\right) - -1} \cdot \frac{x}{x + y}} \]
        6. Taylor expanded in y around inf

          \[\leadsto \color{blue}{\frac{1}{y}} \cdot \frac{x}{x + y} \]
        7. Step-by-step derivation
          1. lower-/.f6439.7

            \[\leadsto \frac{1}{\color{blue}{y}} \cdot \frac{x}{x + y} \]
        8. Applied rewrites39.7%

          \[\leadsto \color{blue}{\frac{1}{y}} \cdot \frac{x}{x + y} \]
        9. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \color{blue}{\frac{1}{y} \cdot \frac{x}{x + y}} \]
          2. lift-/.f64N/A

            \[\leadsto \frac{1}{y} \cdot \color{blue}{\frac{x}{x + y}} \]
          3. associate-*r/N/A

            \[\leadsto \color{blue}{\frac{\frac{1}{y} \cdot x}{x + y}} \]
          4. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{1}{y} \cdot x}{x + y}} \]
          5. lower-*.f6439.6

            \[\leadsto \frac{\color{blue}{\frac{1}{y} \cdot x}}{x + y} \]
        10. Applied rewrites39.6%

          \[\leadsto \color{blue}{\frac{\frac{1}{y} \cdot x}{x + y}} \]
      6. Recombined 3 regimes into one program.
      7. Add Preprocessing

      Alternative 11: 61.2% accurate, 1.0× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1850000000:\\ \;\;\;\;\frac{y}{y + x} \cdot \frac{1}{x}\\ \mathbf{elif}\;y \leq 1.08 \cdot 10^{-94}:\\ \;\;\;\;\frac{y}{x \cdot \left(1 + x\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{1 + y} \cdot \frac{x}{x + y}\\ \end{array} \end{array} \]
      (FPCore (x y)
       :precision binary64
       (if (<= y -1850000000.0)
         (* (/ y (+ y x)) (/ 1.0 x))
         (if (<= y 1.08e-94)
           (/ y (* x (+ 1.0 x)))
           (* (/ 1.0 (+ 1.0 y)) (/ x (+ x y))))))
      double code(double x, double y) {
      	double tmp;
      	if (y <= -1850000000.0) {
      		tmp = (y / (y + x)) * (1.0 / x);
      	} else if (y <= 1.08e-94) {
      		tmp = y / (x * (1.0 + x));
      	} else {
      		tmp = (1.0 / (1.0 + y)) * (x / (x + y));
      	}
      	return tmp;
      }
      
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(x, y)
      use fmin_fmax_functions
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8) :: tmp
          if (y <= (-1850000000.0d0)) then
              tmp = (y / (y + x)) * (1.0d0 / x)
          else if (y <= 1.08d-94) then
              tmp = y / (x * (1.0d0 + x))
          else
              tmp = (1.0d0 / (1.0d0 + y)) * (x / (x + y))
          end if
          code = tmp
      end function
      
      public static double code(double x, double y) {
      	double tmp;
      	if (y <= -1850000000.0) {
      		tmp = (y / (y + x)) * (1.0 / x);
      	} else if (y <= 1.08e-94) {
      		tmp = y / (x * (1.0 + x));
      	} else {
      		tmp = (1.0 / (1.0 + y)) * (x / (x + y));
      	}
      	return tmp;
      }
      
      def code(x, y):
      	tmp = 0
      	if y <= -1850000000.0:
      		tmp = (y / (y + x)) * (1.0 / x)
      	elif y <= 1.08e-94:
      		tmp = y / (x * (1.0 + x))
      	else:
      		tmp = (1.0 / (1.0 + y)) * (x / (x + y))
      	return tmp
      
      function code(x, y)
      	tmp = 0.0
      	if (y <= -1850000000.0)
      		tmp = Float64(Float64(y / Float64(y + x)) * Float64(1.0 / x));
      	elseif (y <= 1.08e-94)
      		tmp = Float64(y / Float64(x * Float64(1.0 + x)));
      	else
      		tmp = Float64(Float64(1.0 / Float64(1.0 + y)) * Float64(x / Float64(x + y)));
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y)
      	tmp = 0.0;
      	if (y <= -1850000000.0)
      		tmp = (y / (y + x)) * (1.0 / x);
      	elseif (y <= 1.08e-94)
      		tmp = y / (x * (1.0 + x));
      	else
      		tmp = (1.0 / (1.0 + y)) * (x / (x + y));
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_] := If[LessEqual[y, -1850000000.0], N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.08e-94], N[(y / N[(x * N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[(1.0 + y), $MachinePrecision]), $MachinePrecision] * N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;y \leq -1850000000:\\
      \;\;\;\;\frac{y}{y + x} \cdot \frac{1}{x}\\
      
      \mathbf{elif}\;y \leq 1.08 \cdot 10^{-94}:\\
      \;\;\;\;\frac{y}{x \cdot \left(1 + x\right)}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{1}{1 + y} \cdot \frac{x}{x + y}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if y < -1.85e9

        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. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{\color{blue}{x \cdot y}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          3. *-commutativeN/A

            \[\leadsto \frac{\color{blue}{y \cdot x}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          4. lift-*.f64N/A

            \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
          5. lift-*.f64N/A

            \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)} \]
          6. associate-*l*N/A

            \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}} \]
          7. times-fracN/A

            \[\leadsto \color{blue}{\frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
          8. lower-*.f64N/A

            \[\leadsto \color{blue}{\frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
          9. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{y}{x + y}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          10. lift-+.f64N/A

            \[\leadsto \frac{y}{\color{blue}{x + y}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          11. +-commutativeN/A

            \[\leadsto \frac{y}{\color{blue}{y + x}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          12. lower-+.f64N/A

            \[\leadsto \frac{y}{\color{blue}{y + x}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          13. lower-/.f64N/A

            \[\leadsto \frac{y}{y + x} \cdot \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
          14. *-commutativeN/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}} \]
          15. lower-*.f6493.8

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}} \]
          16. lift-+.f64N/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) + 1\right)} \cdot \left(x + y\right)} \]
          17. add-flipN/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)\right)} \cdot \left(x + y\right)} \]
          18. lower--.f64N/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)\right)} \cdot \left(x + y\right)} \]
          19. lift-+.f64N/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\color{blue}{\left(x + y\right)} - \left(\mathsf{neg}\left(1\right)\right)\right) \cdot \left(x + y\right)} \]
          20. +-commutativeN/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\color{blue}{\left(y + x\right)} - \left(\mathsf{neg}\left(1\right)\right)\right) \cdot \left(x + y\right)} \]
          21. lower-+.f64N/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\color{blue}{\left(y + x\right)} - \left(\mathsf{neg}\left(1\right)\right)\right) \cdot \left(x + y\right)} \]
          22. metadata-eval93.8

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - \color{blue}{-1}\right) \cdot \left(x + y\right)} \]
          23. lift-+.f64N/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \color{blue}{\left(x + y\right)}} \]
          24. +-commutativeN/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \color{blue}{\left(y + x\right)}} \]
          25. lower-+.f6493.8

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \color{blue}{\left(y + x\right)}} \]
        3. Applied rewrites93.8%

          \[\leadsto \color{blue}{\frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}} \]
        4. Taylor expanded in x around inf

          \[\leadsto \frac{y}{y + x} \cdot \color{blue}{\frac{1}{x}} \]
        5. Step-by-step derivation
          1. lower-/.f6437.6

            \[\leadsto \frac{y}{y + x} \cdot \frac{1}{\color{blue}{x}} \]
        6. Applied rewrites37.6%

          \[\leadsto \frac{y}{y + x} \cdot \color{blue}{\frac{1}{x}} \]

        if -1.85e9 < y < 1.08e-94

        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. Taylor expanded in y around 0

          \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]
        3. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{y}{\color{blue}{x \cdot \left(1 + x\right)}} \]
          2. lower-*.f64N/A

            \[\leadsto \frac{y}{x \cdot \color{blue}{\left(1 + x\right)}} \]
          3. lower-+.f6447.9

            \[\leadsto \frac{y}{x \cdot \left(1 + \color{blue}{x}\right)} \]
        4. Applied rewrites47.9%

          \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]

        if 1.08e-94 < y

        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. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{\color{blue}{x \cdot y}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          3. *-commutativeN/A

            \[\leadsto \frac{\color{blue}{y \cdot x}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          4. lift-*.f64N/A

            \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
          5. lift-*.f64N/A

            \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)} \]
          6. associate-*l*N/A

            \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}} \]
          7. times-fracN/A

            \[\leadsto \color{blue}{\frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
          8. lower-*.f64N/A

            \[\leadsto \color{blue}{\frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
          9. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{y}{x + y}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          10. lift-+.f64N/A

            \[\leadsto \frac{y}{\color{blue}{x + y}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          11. +-commutativeN/A

            \[\leadsto \frac{y}{\color{blue}{y + x}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          12. lower-+.f64N/A

            \[\leadsto \frac{y}{\color{blue}{y + x}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          13. lower-/.f64N/A

            \[\leadsto \frac{y}{y + x} \cdot \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
          14. *-commutativeN/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}} \]
          15. lower-*.f6493.8

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}} \]
          16. lift-+.f64N/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) + 1\right)} \cdot \left(x + y\right)} \]
          17. add-flipN/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)\right)} \cdot \left(x + y\right)} \]
          18. lower--.f64N/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)\right)} \cdot \left(x + y\right)} \]
          19. lift-+.f64N/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\color{blue}{\left(x + y\right)} - \left(\mathsf{neg}\left(1\right)\right)\right) \cdot \left(x + y\right)} \]
          20. +-commutativeN/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\color{blue}{\left(y + x\right)} - \left(\mathsf{neg}\left(1\right)\right)\right) \cdot \left(x + y\right)} \]
          21. lower-+.f64N/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\color{blue}{\left(y + x\right)} - \left(\mathsf{neg}\left(1\right)\right)\right) \cdot \left(x + y\right)} \]
          22. metadata-eval93.8

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - \color{blue}{-1}\right) \cdot \left(x + y\right)} \]
          23. lift-+.f64N/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \color{blue}{\left(x + y\right)}} \]
          24. +-commutativeN/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \color{blue}{\left(y + x\right)}} \]
          25. lower-+.f6493.8

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \color{blue}{\left(y + x\right)}} \]
        3. Applied rewrites93.8%

          \[\leadsto \color{blue}{\frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}} \]
        4. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \color{blue}{\frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}} \]
          2. lift-/.f64N/A

            \[\leadsto \frac{y}{y + x} \cdot \color{blue}{\frac{x}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}} \]
          3. associate-*r/N/A

            \[\leadsto \color{blue}{\frac{\frac{y}{y + x} \cdot x}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}} \]
          4. lift-*.f64N/A

            \[\leadsto \frac{\frac{y}{y + x} \cdot x}{\color{blue}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}} \]
          5. times-fracN/A

            \[\leadsto \color{blue}{\frac{\frac{y}{y + x}}{\left(y + x\right) - -1} \cdot \frac{x}{y + x}} \]
          6. lower-*.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{y}{y + x}}{\left(y + x\right) - -1} \cdot \frac{x}{y + x}} \]
          7. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{y}{y + x}}{\left(y + x\right) - -1}} \cdot \frac{x}{y + x} \]
          8. lift-+.f64N/A

            \[\leadsto \frac{\frac{y}{\color{blue}{y + x}}}{\left(y + x\right) - -1} \cdot \frac{x}{y + x} \]
          9. +-commutativeN/A

            \[\leadsto \frac{\frac{y}{\color{blue}{x + y}}}{\left(y + x\right) - -1} \cdot \frac{x}{y + x} \]
          10. lift-+.f64N/A

            \[\leadsto \frac{\frac{y}{\color{blue}{x + y}}}{\left(y + x\right) - -1} \cdot \frac{x}{y + x} \]
          11. lift-+.f64N/A

            \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{\left(y + x\right)} - -1} \cdot \frac{x}{y + x} \]
          12. +-commutativeN/A

            \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{\left(x + y\right)} - -1} \cdot \frac{x}{y + x} \]
          13. lift-+.f64N/A

            \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{\left(x + y\right)} - -1} \cdot \frac{x}{y + x} \]
          14. lower-/.f6499.8

            \[\leadsto \frac{\frac{y}{x + y}}{\left(x + y\right) - -1} \cdot \color{blue}{\frac{x}{y + x}} \]
          15. lift-+.f64N/A

            \[\leadsto \frac{\frac{y}{x + y}}{\left(x + y\right) - -1} \cdot \frac{x}{\color{blue}{y + x}} \]
          16. +-commutativeN/A

            \[\leadsto \frac{\frac{y}{x + y}}{\left(x + y\right) - -1} \cdot \frac{x}{\color{blue}{x + y}} \]
          17. lift-+.f6499.8

            \[\leadsto \frac{\frac{y}{x + y}}{\left(x + y\right) - -1} \cdot \frac{x}{\color{blue}{x + y}} \]
        5. Applied rewrites99.8%

          \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{\left(x + y\right) - -1} \cdot \frac{x}{x + y}} \]
        6. Taylor expanded in x around 0

          \[\leadsto \color{blue}{\frac{1}{1 + y}} \cdot \frac{x}{x + y} \]
        7. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{1}{\color{blue}{1 + y}} \cdot \frac{x}{x + y} \]
          2. lower-+.f6452.2

            \[\leadsto \frac{1}{1 + \color{blue}{y}} \cdot \frac{x}{x + y} \]
        8. Applied rewrites52.2%

          \[\leadsto \color{blue}{\frac{1}{1 + y}} \cdot \frac{x}{x + y} \]
      3. Recombined 3 regimes into one program.
      4. Add Preprocessing

      Alternative 12: 61.1% accurate, 1.2× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 1.08 \cdot 10^{-94}:\\ \;\;\;\;\frac{y}{y + x} \cdot \frac{1}{1 + x}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{1 + y} \cdot \frac{x}{x + y}\\ \end{array} \end{array} \]
      (FPCore (x y)
       :precision binary64
       (if (<= y 1.08e-94)
         (* (/ y (+ y x)) (/ 1.0 (+ 1.0 x)))
         (* (/ 1.0 (+ 1.0 y)) (/ x (+ x y)))))
      double code(double x, double y) {
      	double tmp;
      	if (y <= 1.08e-94) {
      		tmp = (y / (y + x)) * (1.0 / (1.0 + x));
      	} else {
      		tmp = (1.0 / (1.0 + y)) * (x / (x + y));
      	}
      	return tmp;
      }
      
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(x, y)
      use fmin_fmax_functions
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8) :: tmp
          if (y <= 1.08d-94) then
              tmp = (y / (y + x)) * (1.0d0 / (1.0d0 + x))
          else
              tmp = (1.0d0 / (1.0d0 + y)) * (x / (x + y))
          end if
          code = tmp
      end function
      
      public static double code(double x, double y) {
      	double tmp;
      	if (y <= 1.08e-94) {
      		tmp = (y / (y + x)) * (1.0 / (1.0 + x));
      	} else {
      		tmp = (1.0 / (1.0 + y)) * (x / (x + y));
      	}
      	return tmp;
      }
      
      def code(x, y):
      	tmp = 0
      	if y <= 1.08e-94:
      		tmp = (y / (y + x)) * (1.0 / (1.0 + x))
      	else:
      		tmp = (1.0 / (1.0 + y)) * (x / (x + y))
      	return tmp
      
      function code(x, y)
      	tmp = 0.0
      	if (y <= 1.08e-94)
      		tmp = Float64(Float64(y / Float64(y + x)) * Float64(1.0 / Float64(1.0 + x)));
      	else
      		tmp = Float64(Float64(1.0 / Float64(1.0 + y)) * Float64(x / Float64(x + y)));
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y)
      	tmp = 0.0;
      	if (y <= 1.08e-94)
      		tmp = (y / (y + x)) * (1.0 / (1.0 + x));
      	else
      		tmp = (1.0 / (1.0 + y)) * (x / (x + y));
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_] := If[LessEqual[y, 1.08e-94], N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[(1.0 + y), $MachinePrecision]), $MachinePrecision] * N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;y \leq 1.08 \cdot 10^{-94}:\\
      \;\;\;\;\frac{y}{y + x} \cdot \frac{1}{1 + x}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{1}{1 + y} \cdot \frac{x}{x + y}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if y < 1.08e-94

        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. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{\color{blue}{x \cdot y}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          3. *-commutativeN/A

            \[\leadsto \frac{\color{blue}{y \cdot x}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          4. lift-*.f64N/A

            \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
          5. lift-*.f64N/A

            \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)} \]
          6. associate-*l*N/A

            \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}} \]
          7. times-fracN/A

            \[\leadsto \color{blue}{\frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
          8. lower-*.f64N/A

            \[\leadsto \color{blue}{\frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
          9. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{y}{x + y}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          10. lift-+.f64N/A

            \[\leadsto \frac{y}{\color{blue}{x + y}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          11. +-commutativeN/A

            \[\leadsto \frac{y}{\color{blue}{y + x}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          12. lower-+.f64N/A

            \[\leadsto \frac{y}{\color{blue}{y + x}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          13. lower-/.f64N/A

            \[\leadsto \frac{y}{y + x} \cdot \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
          14. *-commutativeN/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}} \]
          15. lower-*.f6493.8

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}} \]
          16. lift-+.f64N/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) + 1\right)} \cdot \left(x + y\right)} \]
          17. add-flipN/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)\right)} \cdot \left(x + y\right)} \]
          18. lower--.f64N/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)\right)} \cdot \left(x + y\right)} \]
          19. lift-+.f64N/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\color{blue}{\left(x + y\right)} - \left(\mathsf{neg}\left(1\right)\right)\right) \cdot \left(x + y\right)} \]
          20. +-commutativeN/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\color{blue}{\left(y + x\right)} - \left(\mathsf{neg}\left(1\right)\right)\right) \cdot \left(x + y\right)} \]
          21. lower-+.f64N/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\color{blue}{\left(y + x\right)} - \left(\mathsf{neg}\left(1\right)\right)\right) \cdot \left(x + y\right)} \]
          22. metadata-eval93.8

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - \color{blue}{-1}\right) \cdot \left(x + y\right)} \]
          23. lift-+.f64N/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \color{blue}{\left(x + y\right)}} \]
          24. +-commutativeN/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \color{blue}{\left(y + x\right)}} \]
          25. lower-+.f6493.8

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \color{blue}{\left(y + x\right)}} \]
        3. Applied rewrites93.8%

          \[\leadsto \color{blue}{\frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}} \]
        4. Taylor expanded in y around 0

          \[\leadsto \frac{y}{y + x} \cdot \color{blue}{\frac{1}{1 + x}} \]
        5. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{1}{\color{blue}{1 + x}} \]
          2. lower-+.f6449.6

            \[\leadsto \frac{y}{y + x} \cdot \frac{1}{1 + \color{blue}{x}} \]
        6. Applied rewrites49.6%

          \[\leadsto \frac{y}{y + x} \cdot \color{blue}{\frac{1}{1 + x}} \]

        if 1.08e-94 < y

        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. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{\color{blue}{x \cdot y}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          3. *-commutativeN/A

            \[\leadsto \frac{\color{blue}{y \cdot x}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          4. lift-*.f64N/A

            \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
          5. lift-*.f64N/A

            \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)} \]
          6. associate-*l*N/A

            \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}} \]
          7. times-fracN/A

            \[\leadsto \color{blue}{\frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
          8. lower-*.f64N/A

            \[\leadsto \color{blue}{\frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
          9. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{y}{x + y}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          10. lift-+.f64N/A

            \[\leadsto \frac{y}{\color{blue}{x + y}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          11. +-commutativeN/A

            \[\leadsto \frac{y}{\color{blue}{y + x}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          12. lower-+.f64N/A

            \[\leadsto \frac{y}{\color{blue}{y + x}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          13. lower-/.f64N/A

            \[\leadsto \frac{y}{y + x} \cdot \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
          14. *-commutativeN/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}} \]
          15. lower-*.f6493.8

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}} \]
          16. lift-+.f64N/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) + 1\right)} \cdot \left(x + y\right)} \]
          17. add-flipN/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)\right)} \cdot \left(x + y\right)} \]
          18. lower--.f64N/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)\right)} \cdot \left(x + y\right)} \]
          19. lift-+.f64N/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\color{blue}{\left(x + y\right)} - \left(\mathsf{neg}\left(1\right)\right)\right) \cdot \left(x + y\right)} \]
          20. +-commutativeN/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\color{blue}{\left(y + x\right)} - \left(\mathsf{neg}\left(1\right)\right)\right) \cdot \left(x + y\right)} \]
          21. lower-+.f64N/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\color{blue}{\left(y + x\right)} - \left(\mathsf{neg}\left(1\right)\right)\right) \cdot \left(x + y\right)} \]
          22. metadata-eval93.8

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - \color{blue}{-1}\right) \cdot \left(x + y\right)} \]
          23. lift-+.f64N/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \color{blue}{\left(x + y\right)}} \]
          24. +-commutativeN/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \color{blue}{\left(y + x\right)}} \]
          25. lower-+.f6493.8

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \color{blue}{\left(y + x\right)}} \]
        3. Applied rewrites93.8%

          \[\leadsto \color{blue}{\frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}} \]
        4. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \color{blue}{\frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}} \]
          2. lift-/.f64N/A

            \[\leadsto \frac{y}{y + x} \cdot \color{blue}{\frac{x}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}} \]
          3. associate-*r/N/A

            \[\leadsto \color{blue}{\frac{\frac{y}{y + x} \cdot x}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}} \]
          4. lift-*.f64N/A

            \[\leadsto \frac{\frac{y}{y + x} \cdot x}{\color{blue}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}} \]
          5. times-fracN/A

            \[\leadsto \color{blue}{\frac{\frac{y}{y + x}}{\left(y + x\right) - -1} \cdot \frac{x}{y + x}} \]
          6. lower-*.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{y}{y + x}}{\left(y + x\right) - -1} \cdot \frac{x}{y + x}} \]
          7. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{y}{y + x}}{\left(y + x\right) - -1}} \cdot \frac{x}{y + x} \]
          8. lift-+.f64N/A

            \[\leadsto \frac{\frac{y}{\color{blue}{y + x}}}{\left(y + x\right) - -1} \cdot \frac{x}{y + x} \]
          9. +-commutativeN/A

            \[\leadsto \frac{\frac{y}{\color{blue}{x + y}}}{\left(y + x\right) - -1} \cdot \frac{x}{y + x} \]
          10. lift-+.f64N/A

            \[\leadsto \frac{\frac{y}{\color{blue}{x + y}}}{\left(y + x\right) - -1} \cdot \frac{x}{y + x} \]
          11. lift-+.f64N/A

            \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{\left(y + x\right)} - -1} \cdot \frac{x}{y + x} \]
          12. +-commutativeN/A

            \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{\left(x + y\right)} - -1} \cdot \frac{x}{y + x} \]
          13. lift-+.f64N/A

            \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{\left(x + y\right)} - -1} \cdot \frac{x}{y + x} \]
          14. lower-/.f6499.8

            \[\leadsto \frac{\frac{y}{x + y}}{\left(x + y\right) - -1} \cdot \color{blue}{\frac{x}{y + x}} \]
          15. lift-+.f64N/A

            \[\leadsto \frac{\frac{y}{x + y}}{\left(x + y\right) - -1} \cdot \frac{x}{\color{blue}{y + x}} \]
          16. +-commutativeN/A

            \[\leadsto \frac{\frac{y}{x + y}}{\left(x + y\right) - -1} \cdot \frac{x}{\color{blue}{x + y}} \]
          17. lift-+.f6499.8

            \[\leadsto \frac{\frac{y}{x + y}}{\left(x + y\right) - -1} \cdot \frac{x}{\color{blue}{x + y}} \]
        5. Applied rewrites99.8%

          \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{\left(x + y\right) - -1} \cdot \frac{x}{x + y}} \]
        6. Taylor expanded in x around 0

          \[\leadsto \color{blue}{\frac{1}{1 + y}} \cdot \frac{x}{x + y} \]
        7. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{1}{\color{blue}{1 + y}} \cdot \frac{x}{x + y} \]
          2. lower-+.f6452.2

            \[\leadsto \frac{1}{1 + \color{blue}{y}} \cdot \frac{x}{x + y} \]
        8. Applied rewrites52.2%

          \[\leadsto \color{blue}{\frac{1}{1 + y}} \cdot \frac{x}{x + y} \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 13: 61.0% accurate, 1.3× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1850000000:\\ \;\;\;\;\frac{y}{y + x} \cdot \frac{1}{x}\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{-99}:\\ \;\;\;\;\frac{y}{x \cdot \left(1 + x\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y - -1}}{y}\\ \end{array} \end{array} \]
      (FPCore (x y)
       :precision binary64
       (if (<= y -1850000000.0)
         (* (/ y (+ y x)) (/ 1.0 x))
         (if (<= y 1.2e-99) (/ y (* x (+ 1.0 x))) (/ (/ x (- y -1.0)) y))))
      double code(double x, double y) {
      	double tmp;
      	if (y <= -1850000000.0) {
      		tmp = (y / (y + x)) * (1.0 / x);
      	} else if (y <= 1.2e-99) {
      		tmp = y / (x * (1.0 + x));
      	} else {
      		tmp = (x / (y - -1.0)) / y;
      	}
      	return tmp;
      }
      
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(x, y)
      use fmin_fmax_functions
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8) :: tmp
          if (y <= (-1850000000.0d0)) then
              tmp = (y / (y + x)) * (1.0d0 / x)
          else if (y <= 1.2d-99) then
              tmp = y / (x * (1.0d0 + x))
          else
              tmp = (x / (y - (-1.0d0))) / y
          end if
          code = tmp
      end function
      
      public static double code(double x, double y) {
      	double tmp;
      	if (y <= -1850000000.0) {
      		tmp = (y / (y + x)) * (1.0 / x);
      	} else if (y <= 1.2e-99) {
      		tmp = y / (x * (1.0 + x));
      	} else {
      		tmp = (x / (y - -1.0)) / y;
      	}
      	return tmp;
      }
      
      def code(x, y):
      	tmp = 0
      	if y <= -1850000000.0:
      		tmp = (y / (y + x)) * (1.0 / x)
      	elif y <= 1.2e-99:
      		tmp = y / (x * (1.0 + x))
      	else:
      		tmp = (x / (y - -1.0)) / y
      	return tmp
      
      function code(x, y)
      	tmp = 0.0
      	if (y <= -1850000000.0)
      		tmp = Float64(Float64(y / Float64(y + x)) * Float64(1.0 / x));
      	elseif (y <= 1.2e-99)
      		tmp = Float64(y / Float64(x * Float64(1.0 + x)));
      	else
      		tmp = Float64(Float64(x / Float64(y - -1.0)) / y);
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y)
      	tmp = 0.0;
      	if (y <= -1850000000.0)
      		tmp = (y / (y + x)) * (1.0 / x);
      	elseif (y <= 1.2e-99)
      		tmp = y / (x * (1.0 + x));
      	else
      		tmp = (x / (y - -1.0)) / y;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_] := If[LessEqual[y, -1850000000.0], N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.2e-99], N[(y / N[(x * N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y - -1.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;y \leq -1850000000:\\
      \;\;\;\;\frac{y}{y + x} \cdot \frac{1}{x}\\
      
      \mathbf{elif}\;y \leq 1.2 \cdot 10^{-99}:\\
      \;\;\;\;\frac{y}{x \cdot \left(1 + x\right)}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{\frac{x}{y - -1}}{y}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if y < -1.85e9

        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. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{\color{blue}{x \cdot y}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          3. *-commutativeN/A

            \[\leadsto \frac{\color{blue}{y \cdot x}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          4. lift-*.f64N/A

            \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
          5. lift-*.f64N/A

            \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)} \]
          6. associate-*l*N/A

            \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}} \]
          7. times-fracN/A

            \[\leadsto \color{blue}{\frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
          8. lower-*.f64N/A

            \[\leadsto \color{blue}{\frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
          9. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{y}{x + y}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          10. lift-+.f64N/A

            \[\leadsto \frac{y}{\color{blue}{x + y}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          11. +-commutativeN/A

            \[\leadsto \frac{y}{\color{blue}{y + x}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          12. lower-+.f64N/A

            \[\leadsto \frac{y}{\color{blue}{y + x}} \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          13. lower-/.f64N/A

            \[\leadsto \frac{y}{y + x} \cdot \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
          14. *-commutativeN/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}} \]
          15. lower-*.f6493.8

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}} \]
          16. lift-+.f64N/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) + 1\right)} \cdot \left(x + y\right)} \]
          17. add-flipN/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)\right)} \cdot \left(x + y\right)} \]
          18. lower--.f64N/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)\right)} \cdot \left(x + y\right)} \]
          19. lift-+.f64N/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\color{blue}{\left(x + y\right)} - \left(\mathsf{neg}\left(1\right)\right)\right) \cdot \left(x + y\right)} \]
          20. +-commutativeN/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\color{blue}{\left(y + x\right)} - \left(\mathsf{neg}\left(1\right)\right)\right) \cdot \left(x + y\right)} \]
          21. lower-+.f64N/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\color{blue}{\left(y + x\right)} - \left(\mathsf{neg}\left(1\right)\right)\right) \cdot \left(x + y\right)} \]
          22. metadata-eval93.8

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - \color{blue}{-1}\right) \cdot \left(x + y\right)} \]
          23. lift-+.f64N/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \color{blue}{\left(x + y\right)}} \]
          24. +-commutativeN/A

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \color{blue}{\left(y + x\right)}} \]
          25. lower-+.f6493.8

            \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \color{blue}{\left(y + x\right)}} \]
        3. Applied rewrites93.8%

          \[\leadsto \color{blue}{\frac{y}{y + x} \cdot \frac{x}{\left(\left(y + x\right) - -1\right) \cdot \left(y + x\right)}} \]
        4. Taylor expanded in x around inf

          \[\leadsto \frac{y}{y + x} \cdot \color{blue}{\frac{1}{x}} \]
        5. Step-by-step derivation
          1. lower-/.f6437.6

            \[\leadsto \frac{y}{y + x} \cdot \frac{1}{\color{blue}{x}} \]
        6. Applied rewrites37.6%

          \[\leadsto \frac{y}{y + x} \cdot \color{blue}{\frac{1}{x}} \]

        if -1.85e9 < y < 1.2e-99

        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. Taylor expanded in y around 0

          \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]
        3. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{y}{\color{blue}{x \cdot \left(1 + x\right)}} \]
          2. lower-*.f64N/A

            \[\leadsto \frac{y}{x \cdot \color{blue}{\left(1 + x\right)}} \]
          3. lower-+.f6447.9

            \[\leadsto \frac{y}{x \cdot \left(1 + \color{blue}{x}\right)} \]
        4. Applied rewrites47.9%

          \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]

        if 1.2e-99 < y

        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. Taylor expanded in x around 0

          \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
        3. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{x}{\color{blue}{y \cdot \left(1 + y\right)}} \]
          2. lower-*.f64N/A

            \[\leadsto \frac{x}{y \cdot \color{blue}{\left(1 + y\right)}} \]
          3. lower-+.f6450.0

            \[\leadsto \frac{x}{y \cdot \left(1 + \color{blue}{y}\right)} \]
        4. Applied rewrites50.0%

          \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
        5. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \frac{x}{\color{blue}{y \cdot \left(1 + y\right)}} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{x}{y \cdot \color{blue}{\left(1 + y\right)}} \]
          3. *-commutativeN/A

            \[\leadsto \frac{x}{\left(1 + y\right) \cdot \color{blue}{y}} \]
          4. associate-/r*N/A

            \[\leadsto \frac{\frac{x}{1 + y}}{\color{blue}{y}} \]
          5. lower-/.f64N/A

            \[\leadsto \frac{\frac{x}{1 + y}}{\color{blue}{y}} \]
          6. lower-/.f6451.7

            \[\leadsto \frac{\frac{x}{1 + y}}{y} \]
          7. lift-+.f64N/A

            \[\leadsto \frac{\frac{x}{1 + y}}{y} \]
          8. +-commutativeN/A

            \[\leadsto \frac{\frac{x}{y + 1}}{y} \]
          9. add-flipN/A

            \[\leadsto \frac{\frac{x}{y - \left(\mathsf{neg}\left(1\right)\right)}}{y} \]
          10. metadata-evalN/A

            \[\leadsto \frac{\frac{x}{y - -1}}{y} \]
          11. lower--.f6451.7

            \[\leadsto \frac{\frac{x}{y - -1}}{y} \]
        6. Applied rewrites51.7%

          \[\leadsto \frac{\frac{x}{y - -1}}{\color{blue}{y}} \]
      3. Recombined 3 regimes into one program.
      4. Add Preprocessing

      Alternative 14: 60.3% accurate, 1.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 1.2 \cdot 10^{-99}:\\ \;\;\;\;\frac{y}{x \cdot \left(1 + x\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y - -1}}{y}\\ \end{array} \end{array} \]
      (FPCore (x y)
       :precision binary64
       (if (<= y 1.2e-99) (/ y (* x (+ 1.0 x))) (/ (/ x (- y -1.0)) y)))
      double code(double x, double y) {
      	double tmp;
      	if (y <= 1.2e-99) {
      		tmp = y / (x * (1.0 + x));
      	} else {
      		tmp = (x / (y - -1.0)) / y;
      	}
      	return tmp;
      }
      
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(x, y)
      use fmin_fmax_functions
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8) :: tmp
          if (y <= 1.2d-99) then
              tmp = y / (x * (1.0d0 + x))
          else
              tmp = (x / (y - (-1.0d0))) / y
          end if
          code = tmp
      end function
      
      public static double code(double x, double y) {
      	double tmp;
      	if (y <= 1.2e-99) {
      		tmp = y / (x * (1.0 + x));
      	} else {
      		tmp = (x / (y - -1.0)) / y;
      	}
      	return tmp;
      }
      
      def code(x, y):
      	tmp = 0
      	if y <= 1.2e-99:
      		tmp = y / (x * (1.0 + x))
      	else:
      		tmp = (x / (y - -1.0)) / y
      	return tmp
      
      function code(x, y)
      	tmp = 0.0
      	if (y <= 1.2e-99)
      		tmp = Float64(y / Float64(x * Float64(1.0 + x)));
      	else
      		tmp = Float64(Float64(x / Float64(y - -1.0)) / y);
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y)
      	tmp = 0.0;
      	if (y <= 1.2e-99)
      		tmp = y / (x * (1.0 + x));
      	else
      		tmp = (x / (y - -1.0)) / y;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_] := If[LessEqual[y, 1.2e-99], N[(y / N[(x * N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y - -1.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;y \leq 1.2 \cdot 10^{-99}:\\
      \;\;\;\;\frac{y}{x \cdot \left(1 + x\right)}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{\frac{x}{y - -1}}{y}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if y < 1.2e-99

        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. Taylor expanded in y around 0

          \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]
        3. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{y}{\color{blue}{x \cdot \left(1 + x\right)}} \]
          2. lower-*.f64N/A

            \[\leadsto \frac{y}{x \cdot \color{blue}{\left(1 + x\right)}} \]
          3. lower-+.f6447.9

            \[\leadsto \frac{y}{x \cdot \left(1 + \color{blue}{x}\right)} \]
        4. Applied rewrites47.9%

          \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]

        if 1.2e-99 < y

        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. Taylor expanded in x around 0

          \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
        3. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{x}{\color{blue}{y \cdot \left(1 + y\right)}} \]
          2. lower-*.f64N/A

            \[\leadsto \frac{x}{y \cdot \color{blue}{\left(1 + y\right)}} \]
          3. lower-+.f6450.0

            \[\leadsto \frac{x}{y \cdot \left(1 + \color{blue}{y}\right)} \]
        4. Applied rewrites50.0%

          \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
        5. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \frac{x}{\color{blue}{y \cdot \left(1 + y\right)}} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{x}{y \cdot \color{blue}{\left(1 + y\right)}} \]
          3. *-commutativeN/A

            \[\leadsto \frac{x}{\left(1 + y\right) \cdot \color{blue}{y}} \]
          4. associate-/r*N/A

            \[\leadsto \frac{\frac{x}{1 + y}}{\color{blue}{y}} \]
          5. lower-/.f64N/A

            \[\leadsto \frac{\frac{x}{1 + y}}{\color{blue}{y}} \]
          6. lower-/.f6451.7

            \[\leadsto \frac{\frac{x}{1 + y}}{y} \]
          7. lift-+.f64N/A

            \[\leadsto \frac{\frac{x}{1 + y}}{y} \]
          8. +-commutativeN/A

            \[\leadsto \frac{\frac{x}{y + 1}}{y} \]
          9. add-flipN/A

            \[\leadsto \frac{\frac{x}{y - \left(\mathsf{neg}\left(1\right)\right)}}{y} \]
          10. metadata-evalN/A

            \[\leadsto \frac{\frac{x}{y - -1}}{y} \]
          11. lower--.f6451.7

            \[\leadsto \frac{\frac{x}{y - -1}}{y} \]
        6. Applied rewrites51.7%

          \[\leadsto \frac{\frac{x}{y - -1}}{\color{blue}{y}} \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 15: 59.4% accurate, 1.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 1.2 \cdot 10^{-99}:\\ \;\;\;\;\frac{y}{x \cdot \left(1 + x\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(y, y, y\right)}\\ \end{array} \end{array} \]
      (FPCore (x y)
       :precision binary64
       (if (<= y 1.2e-99) (/ y (* x (+ 1.0 x))) (/ x (fma y y y))))
      double code(double x, double y) {
      	double tmp;
      	if (y <= 1.2e-99) {
      		tmp = y / (x * (1.0 + x));
      	} else {
      		tmp = x / fma(y, y, y);
      	}
      	return tmp;
      }
      
      function code(x, y)
      	tmp = 0.0
      	if (y <= 1.2e-99)
      		tmp = Float64(y / Float64(x * Float64(1.0 + x)));
      	else
      		tmp = Float64(x / fma(y, y, y));
      	end
      	return tmp
      end
      
      code[x_, y_] := If[LessEqual[y, 1.2e-99], N[(y / N[(x * N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * y + y), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;y \leq 1.2 \cdot 10^{-99}:\\
      \;\;\;\;\frac{y}{x \cdot \left(1 + x\right)}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{x}{\mathsf{fma}\left(y, y, y\right)}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if y < 1.2e-99

        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. Taylor expanded in y around 0

          \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]
        3. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{y}{\color{blue}{x \cdot \left(1 + x\right)}} \]
          2. lower-*.f64N/A

            \[\leadsto \frac{y}{x \cdot \color{blue}{\left(1 + x\right)}} \]
          3. lower-+.f6447.9

            \[\leadsto \frac{y}{x \cdot \left(1 + \color{blue}{x}\right)} \]
        4. Applied rewrites47.9%

          \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]

        if 1.2e-99 < y

        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. Taylor expanded in x around 0

          \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
        3. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{x}{\color{blue}{y \cdot \left(1 + y\right)}} \]
          2. lower-*.f64N/A

            \[\leadsto \frac{x}{y \cdot \color{blue}{\left(1 + y\right)}} \]
          3. lower-+.f6450.0

            \[\leadsto \frac{x}{y \cdot \left(1 + \color{blue}{y}\right)} \]
        4. Applied rewrites50.0%

          \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
        5. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \frac{x}{y \cdot \color{blue}{\left(1 + y\right)}} \]
          2. lift-+.f64N/A

            \[\leadsto \frac{x}{y \cdot \left(1 + \color{blue}{y}\right)} \]
          3. +-commutativeN/A

            \[\leadsto \frac{x}{y \cdot \left(y + \color{blue}{1}\right)} \]
          4. distribute-rgt-inN/A

            \[\leadsto \frac{x}{y \cdot y + \color{blue}{1 \cdot y}} \]
          5. *-lft-identityN/A

            \[\leadsto \frac{x}{y \cdot y + y} \]
          6. lower-fma.f6450.0

            \[\leadsto \frac{x}{\mathsf{fma}\left(y, \color{blue}{y}, y\right)} \]
        6. Applied rewrites50.0%

          \[\leadsto \color{blue}{\frac{x}{\mathsf{fma}\left(y, y, y\right)}} \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 16: 50.0% accurate, 2.6× speedup?

      \[\begin{array}{l} \\ \frac{x}{\mathsf{fma}\left(y, y, y\right)} \end{array} \]
      (FPCore (x y) :precision binary64 (/ x (fma y y y)))
      double code(double x, double y) {
      	return x / fma(y, y, y);
      }
      
      function code(x, y)
      	return Float64(x / fma(y, y, y))
      end
      
      code[x_, y_] := N[(x / N[(y * y + y), $MachinePrecision]), $MachinePrecision]
      
      \begin{array}{l}
      
      \\
      \frac{x}{\mathsf{fma}\left(y, y, y\right)}
      \end{array}
      
      Derivation
      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. Taylor expanded in x around 0

        \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
      3. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{x}{\color{blue}{y \cdot \left(1 + y\right)}} \]
        2. lower-*.f64N/A

          \[\leadsto \frac{x}{y \cdot \color{blue}{\left(1 + y\right)}} \]
        3. lower-+.f6450.0

          \[\leadsto \frac{x}{y \cdot \left(1 + \color{blue}{y}\right)} \]
      4. Applied rewrites50.0%

        \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
      5. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \frac{x}{y \cdot \color{blue}{\left(1 + y\right)}} \]
        2. lift-+.f64N/A

          \[\leadsto \frac{x}{y \cdot \left(1 + \color{blue}{y}\right)} \]
        3. +-commutativeN/A

          \[\leadsto \frac{x}{y \cdot \left(y + \color{blue}{1}\right)} \]
        4. distribute-rgt-inN/A

          \[\leadsto \frac{x}{y \cdot y + \color{blue}{1 \cdot y}} \]
        5. *-lft-identityN/A

          \[\leadsto \frac{x}{y \cdot y + y} \]
        6. lower-fma.f6450.0

          \[\leadsto \frac{x}{\mathsf{fma}\left(y, \color{blue}{y}, y\right)} \]
      6. Applied rewrites50.0%

        \[\leadsto \color{blue}{\frac{x}{\mathsf{fma}\left(y, y, y\right)}} \]
      7. Add Preprocessing

      Alternative 17: 27.4% accurate, 3.1× speedup?

      \[\begin{array}{l} \\ \frac{1}{\frac{y}{x}} \end{array} \]
      (FPCore (x y) :precision binary64 (/ 1.0 (/ y x)))
      double code(double x, double y) {
      	return 1.0 / (y / x);
      }
      
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(x, y)
      use fmin_fmax_functions
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          code = 1.0d0 / (y / x)
      end function
      
      public static double code(double x, double y) {
      	return 1.0 / (y / x);
      }
      
      def code(x, y):
      	return 1.0 / (y / x)
      
      function code(x, y)
      	return Float64(1.0 / Float64(y / x))
      end
      
      function tmp = code(x, y)
      	tmp = 1.0 / (y / x);
      end
      
      code[x_, y_] := N[(1.0 / N[(y / x), $MachinePrecision]), $MachinePrecision]
      
      \begin{array}{l}
      
      \\
      \frac{1}{\frac{y}{x}}
      \end{array}
      
      Derivation
      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. Taylor expanded in x around 0

        \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
      3. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{x}{\color{blue}{y \cdot \left(1 + y\right)}} \]
        2. lower-*.f64N/A

          \[\leadsto \frac{x}{y \cdot \color{blue}{\left(1 + y\right)}} \]
        3. lower-+.f6450.0

          \[\leadsto \frac{x}{y \cdot \left(1 + \color{blue}{y}\right)} \]
      4. Applied rewrites50.0%

        \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
      5. Taylor expanded in y around 0

        \[\leadsto \frac{x}{\color{blue}{y}} \]
      6. Step-by-step derivation
        1. lower-/.f6426.9

          \[\leadsto \frac{x}{y} \]
      7. Applied rewrites26.9%

        \[\leadsto \frac{x}{\color{blue}{y}} \]
      8. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \frac{x}{y} \]
        2. div-flipN/A

          \[\leadsto \frac{1}{\frac{y}{\color{blue}{x}}} \]
        3. lower-/.f64N/A

          \[\leadsto \frac{1}{\frac{y}{\color{blue}{x}}} \]
        4. lower-/.f6427.4

          \[\leadsto \frac{1}{\frac{y}{x}} \]
      9. Applied rewrites27.4%

        \[\leadsto \frac{1}{\frac{y}{\color{blue}{x}}} \]
      10. Add Preprocessing

      Alternative 18: 26.9% accurate, 5.5× speedup?

      \[\begin{array}{l} \\ \frac{x}{y} \end{array} \]
      (FPCore (x y) :precision binary64 (/ x y))
      double code(double x, double y) {
      	return x / y;
      }
      
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(x, y)
      use fmin_fmax_functions
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          code = x / y
      end function
      
      public static double code(double x, double y) {
      	return x / y;
      }
      
      def code(x, y):
      	return x / y
      
      function code(x, y)
      	return Float64(x / y)
      end
      
      function tmp = code(x, y)
      	tmp = x / y;
      end
      
      code[x_, y_] := N[(x / y), $MachinePrecision]
      
      \begin{array}{l}
      
      \\
      \frac{x}{y}
      \end{array}
      
      Derivation
      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. Taylor expanded in x around 0

        \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
      3. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{x}{\color{blue}{y \cdot \left(1 + y\right)}} \]
        2. lower-*.f64N/A

          \[\leadsto \frac{x}{y \cdot \color{blue}{\left(1 + y\right)}} \]
        3. lower-+.f6450.0

          \[\leadsto \frac{x}{y \cdot \left(1 + \color{blue}{y}\right)} \]
      4. Applied rewrites50.0%

        \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
      5. Taylor expanded in y around 0

        \[\leadsto \frac{x}{\color{blue}{y}} \]
      6. Step-by-step derivation
        1. lower-/.f6426.9

          \[\leadsto \frac{x}{y} \]
      7. Applied rewrites26.9%

        \[\leadsto \frac{x}{\color{blue}{y}} \]
      8. Add Preprocessing

      Reproduce

      ?
      herbie shell --seed 2025142 
      (FPCore (x y)
        :name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, A"
        :precision binary64
        (/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))