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

Percentage Accurate: 69.0% → 99.8%
Time: 4.7s
Alternatives: 24
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 24 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.0% 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{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x} \end{array} \]
(FPCore (x y)
 :precision binary64
 (/ (* (/ x (+ y x)) (/ y (- (+ y x) -1.0))) (+ y x)))
double code(double x, double y) {
	return ((x / (y + x)) * (y / ((y + x) - -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 = ((x / (y + x)) * (y / ((y + x) - (-1.0d0)))) / (y + x)
end function
public static double code(double x, double y) {
	return ((x / (y + x)) * (y / ((y + x) - -1.0))) / (y + x);
}
def code(x, y):
	return ((x / (y + x)) * (y / ((y + x) - -1.0))) / (y + x)
function code(x, y)
	return Float64(Float64(Float64(x / Float64(y + x)) * Float64(y / Float64(Float64(y + x) - -1.0))) / Float64(y + x))
end
function tmp = code(x, y)
	tmp = ((x / (y + x)) * (y / ((y + x) - -1.0))) / (y + x);
end
code[x_, y_] := N[(N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(y / N[(N[(y + x), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}
\end{array}
Derivation
  1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 99.8% accurate, 1.0× speedup?

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

\\
\frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}
\end{array}
Derivation
  1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 85.2% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(y + x\right) - -1\\ t_1 := \frac{y}{t\_0}\\ \mathbf{if}\;x \leq -4.8 \cdot 10^{+153}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{y}{x}, -2, 1\right)}{x} \cdot t\_1\\ \mathbf{elif}\;x \leq 1.48 \cdot 10^{+50}:\\ \;\;\;\;\frac{\frac{x}{y + x} \cdot y}{\left(y + x\right) \cdot t\_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{y + x} \cdot t\_1\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (- (+ y x) -1.0)) (t_1 (/ y t_0)))
   (if (<= x -4.8e+153)
     (* (/ (fma (/ y x) -2.0 1.0) x) t_1)
     (if (<= x 1.48e+50)
       (/ (* (/ x (+ y x)) y) (* (+ y x) t_0))
       (* (/ (/ x y) (+ y x)) t_1)))))
double code(double x, double y) {
	double t_0 = (y + x) - -1.0;
	double t_1 = y / t_0;
	double tmp;
	if (x <= -4.8e+153) {
		tmp = (fma((y / x), -2.0, 1.0) / x) * t_1;
	} else if (x <= 1.48e+50) {
		tmp = ((x / (y + x)) * y) / ((y + x) * t_0);
	} else {
		tmp = ((x / y) / (y + x)) * t_1;
	}
	return tmp;
}
function code(x, y)
	t_0 = Float64(Float64(y + x) - -1.0)
	t_1 = Float64(y / t_0)
	tmp = 0.0
	if (x <= -4.8e+153)
		tmp = Float64(Float64(fma(Float64(y / x), -2.0, 1.0) / x) * t_1);
	elseif (x <= 1.48e+50)
		tmp = Float64(Float64(Float64(x / Float64(y + x)) * y) / Float64(Float64(y + x) * t_0));
	else
		tmp = Float64(Float64(Float64(x / y) / Float64(y + x)) * t_1);
	end
	return tmp
end
code[x_, y_] := Block[{t$95$0 = N[(N[(y + x), $MachinePrecision] - -1.0), $MachinePrecision]}, Block[{t$95$1 = N[(y / t$95$0), $MachinePrecision]}, If[LessEqual[x, -4.8e+153], N[(N[(N[(N[(y / x), $MachinePrecision] * -2.0 + 1.0), $MachinePrecision] / x), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[x, 1.48e+50], N[(N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision] / N[(N[(y + x), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x / y), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(y + x\right) - -1\\
t_1 := \frac{y}{t\_0}\\
\mathbf{if}\;x \leq -4.8 \cdot 10^{+153}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\frac{y}{x}, -2, 1\right)}{x} \cdot t\_1\\

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

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


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

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(\frac{y}{x}, -2, 1\right)}{x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      5. lower-/.f6450.5

        \[\leadsto \frac{\mathsf{fma}\left(\frac{y}{x}, -2, 1\right)}{x} \cdot \frac{y}{\left(y + x\right) - -1} \]
    6. Applied rewrites50.5%

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

    if -4.79999999999999985e153 < x < 1.48000000000000007e50

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.48000000000000007e50 < x

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 83.9% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{y}{\left(y + x\right) - -1}\\ \mathbf{if}\;x \leq -8.5 \cdot 10^{+145}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{y}{x}, -2, 1\right)}{x} \cdot t\_0\\ \mathbf{elif}\;x \leq -8 \cdot 10^{-16}:\\ \;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + x} \cdot \frac{y}{1 + y}}{y + x}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (/ y (- (+ y x) -1.0))))
   (if (<= x -8.5e+145)
     (* (/ (fma (/ y x) -2.0 1.0) x) t_0)
     (if (<= x -8e-16)
       (* (/ x (* (+ y x) (+ y x))) t_0)
       (/ (* (/ x (+ y x)) (/ y (+ 1.0 y))) (+ y x))))))
double code(double x, double y) {
	double t_0 = y / ((y + x) - -1.0);
	double tmp;
	if (x <= -8.5e+145) {
		tmp = (fma((y / x), -2.0, 1.0) / x) * t_0;
	} else if (x <= -8e-16) {
		tmp = (x / ((y + x) * (y + x))) * t_0;
	} else {
		tmp = ((x / (y + x)) * (y / (1.0 + y))) / (y + x);
	}
	return tmp;
}
function code(x, y)
	t_0 = Float64(y / Float64(Float64(y + x) - -1.0))
	tmp = 0.0
	if (x <= -8.5e+145)
		tmp = Float64(Float64(fma(Float64(y / x), -2.0, 1.0) / x) * t_0);
	elseif (x <= -8e-16)
		tmp = Float64(Float64(x / Float64(Float64(y + x) * Float64(y + x))) * t_0);
	else
		tmp = Float64(Float64(Float64(x / Float64(y + x)) * Float64(y / Float64(1.0 + y))) / Float64(y + x));
	end
	return tmp
end
code[x_, y_] := Block[{t$95$0 = N[(y / N[(N[(y + x), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -8.5e+145], N[(N[(N[(N[(y / x), $MachinePrecision] * -2.0 + 1.0), $MachinePrecision] / x), $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[x, -8e-16], N[(N[(x / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(y / N[(1.0 + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{y}{\left(y + x\right) - -1}\\
\mathbf{if}\;x \leq -8.5 \cdot 10^{+145}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\frac{y}{x}, -2, 1\right)}{x} \cdot t\_0\\

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

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


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

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(\frac{y}{x}, -2, 1\right)}{x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      5. lower-/.f6450.5

        \[\leadsto \frac{\mathsf{fma}\left(\frac{y}{x}, -2, 1\right)}{x} \cdot \frac{y}{\left(y + x\right) - -1} \]
    6. Applied rewrites50.5%

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

    if -8.49999999999999977e145 < x < -7.9999999999999998e-16

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.9999999999999998e-16 < x

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 83.9% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(y + x\right) \cdot \left(y + x\right)\\ t_1 := \left(y + x\right) - -1\\ \mathbf{if}\;x \leq -8.5 \cdot 10^{+145}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{y}{x}, -2, 1\right)}{x} \cdot \frac{y}{t\_1}\\ \mathbf{elif}\;x \leq -1.25 \cdot 10^{+50}:\\ \;\;\;\;\frac{x}{t\_0} \cdot \frac{y}{x}\\ \mathbf{elif}\;x \leq -1.45 \cdot 10^{-15}:\\ \;\;\;\;\frac{y \cdot x}{t\_1 \cdot t\_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + x} \cdot \frac{y}{1 + y}}{y + x}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (* (+ y x) (+ y x))) (t_1 (- (+ y x) -1.0)))
   (if (<= x -8.5e+145)
     (* (/ (fma (/ y x) -2.0 1.0) x) (/ y t_1))
     (if (<= x -1.25e+50)
       (* (/ x t_0) (/ y x))
       (if (<= x -1.45e-15)
         (/ (* y x) (* t_1 t_0))
         (/ (* (/ x (+ y x)) (/ y (+ 1.0 y))) (+ y x)))))))
double code(double x, double y) {
	double t_0 = (y + x) * (y + x);
	double t_1 = (y + x) - -1.0;
	double tmp;
	if (x <= -8.5e+145) {
		tmp = (fma((y / x), -2.0, 1.0) / x) * (y / t_1);
	} else if (x <= -1.25e+50) {
		tmp = (x / t_0) * (y / x);
	} else if (x <= -1.45e-15) {
		tmp = (y * x) / (t_1 * t_0);
	} else {
		tmp = ((x / (y + x)) * (y / (1.0 + y))) / (y + x);
	}
	return tmp;
}
function code(x, y)
	t_0 = Float64(Float64(y + x) * Float64(y + x))
	t_1 = Float64(Float64(y + x) - -1.0)
	tmp = 0.0
	if (x <= -8.5e+145)
		tmp = Float64(Float64(fma(Float64(y / x), -2.0, 1.0) / x) * Float64(y / t_1));
	elseif (x <= -1.25e+50)
		tmp = Float64(Float64(x / t_0) * Float64(y / x));
	elseif (x <= -1.45e-15)
		tmp = Float64(Float64(y * x) / Float64(t_1 * t_0));
	else
		tmp = Float64(Float64(Float64(x / Float64(y + x)) * Float64(y / Float64(1.0 + y))) / Float64(y + x));
	end
	return tmp
end
code[x_, y_] := Block[{t$95$0 = N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(y + x), $MachinePrecision] - -1.0), $MachinePrecision]}, If[LessEqual[x, -8.5e+145], N[(N[(N[(N[(y / x), $MachinePrecision] * -2.0 + 1.0), $MachinePrecision] / x), $MachinePrecision] * N[(y / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.25e+50], N[(N[(x / t$95$0), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.45e-15], N[(N[(y * x), $MachinePrecision] / N[(t$95$1 * t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(y / N[(1.0 + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(y + x\right) \cdot \left(y + x\right)\\
t_1 := \left(y + x\right) - -1\\
\mathbf{if}\;x \leq -8.5 \cdot 10^{+145}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\frac{y}{x}, -2, 1\right)}{x} \cdot \frac{y}{t\_1}\\

\mathbf{elif}\;x \leq -1.25 \cdot 10^{+50}:\\
\;\;\;\;\frac{x}{t\_0} \cdot \frac{y}{x}\\

\mathbf{elif}\;x \leq -1.45 \cdot 10^{-15}:\\
\;\;\;\;\frac{y \cdot x}{t\_1 \cdot t\_0}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -8.49999999999999977e145

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(\frac{y}{x}, -2, 1\right)}{x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      5. lower-/.f6450.5

        \[\leadsto \frac{\mathsf{fma}\left(\frac{y}{x}, -2, 1\right)}{x} \cdot \frac{y}{\left(y + x\right) - -1} \]
    6. Applied rewrites50.5%

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

    if -8.49999999999999977e145 < x < -1.25e50

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.25e50 < x < -1.45000000000000009e-15

    1. Initial program 69.0%

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

        \[\leadsto \frac{\color{blue}{x \cdot y}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      2. *-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)} \]
      3. lower-*.f6469.0

        \[\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. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.45000000000000009e-15 < x

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 83.1% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(y + x\right) \cdot \left(y + x\right)\\ \mathbf{if}\;x \leq -8.5 \cdot 10^{+145}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(3, y, 1\right), \frac{y}{-x}, y\right)}{x}}{x}\\ \mathbf{elif}\;x \leq -1.25 \cdot 10^{+50}:\\ \;\;\;\;\frac{x}{t\_0} \cdot \frac{y}{x}\\ \mathbf{elif}\;x \leq -1.45 \cdot 10^{-15}:\\ \;\;\;\;\frac{y \cdot x}{\left(\left(y + x\right) - -1\right) \cdot t\_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + x} \cdot \frac{y}{1 + y}}{y + x}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (* (+ y x) (+ y x))))
   (if (<= x -8.5e+145)
     (/ (/ (fma (fma 3.0 y 1.0) (/ y (- x)) y) x) x)
     (if (<= x -1.25e+50)
       (* (/ x t_0) (/ y x))
       (if (<= x -1.45e-15)
         (/ (* y x) (* (- (+ y x) -1.0) t_0))
         (/ (* (/ x (+ y x)) (/ y (+ 1.0 y))) (+ y x)))))))
double code(double x, double y) {
	double t_0 = (y + x) * (y + x);
	double tmp;
	if (x <= -8.5e+145) {
		tmp = (fma(fma(3.0, y, 1.0), (y / -x), y) / x) / x;
	} else if (x <= -1.25e+50) {
		tmp = (x / t_0) * (y / x);
	} else if (x <= -1.45e-15) {
		tmp = (y * x) / (((y + x) - -1.0) * t_0);
	} else {
		tmp = ((x / (y + x)) * (y / (1.0 + y))) / (y + x);
	}
	return tmp;
}
function code(x, y)
	t_0 = Float64(Float64(y + x) * Float64(y + x))
	tmp = 0.0
	if (x <= -8.5e+145)
		tmp = Float64(Float64(fma(fma(3.0, y, 1.0), Float64(y / Float64(-x)), y) / x) / x);
	elseif (x <= -1.25e+50)
		tmp = Float64(Float64(x / t_0) * Float64(y / x));
	elseif (x <= -1.45e-15)
		tmp = Float64(Float64(y * x) / Float64(Float64(Float64(y + x) - -1.0) * t_0));
	else
		tmp = Float64(Float64(Float64(x / Float64(y + x)) * Float64(y / Float64(1.0 + y))) / Float64(y + x));
	end
	return tmp
end
code[x_, y_] := Block[{t$95$0 = N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -8.5e+145], N[(N[(N[(N[(3.0 * y + 1.0), $MachinePrecision] * N[(y / (-x)), $MachinePrecision] + y), $MachinePrecision] / x), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, -1.25e+50], N[(N[(x / t$95$0), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.45e-15], N[(N[(y * x), $MachinePrecision] / N[(N[(N[(y + x), $MachinePrecision] - -1.0), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(y / N[(1.0 + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(y + x\right) \cdot \left(y + x\right)\\
\mathbf{if}\;x \leq -8.5 \cdot 10^{+145}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(3, y, 1\right), \frac{y}{-x}, y\right)}{x}}{x}\\

\mathbf{elif}\;x \leq -1.25 \cdot 10^{+50}:\\
\;\;\;\;\frac{x}{t\_0} \cdot \frac{y}{x}\\

\mathbf{elif}\;x \leq -1.45 \cdot 10^{-15}:\\
\;\;\;\;\frac{y \cdot x}{\left(\left(y + x\right) - -1\right) \cdot t\_0}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -8.49999999999999977e145

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(-\frac{\left(\left(y + 2 \cdot y\right) + 1\right) \cdot y}{x}\right) + y}{{x}^{2}} \]
      10. distribute-rgt1-inN/A

        \[\leadsto \frac{\left(-\frac{\left(\left(2 + 1\right) \cdot y + 1\right) \cdot y}{x}\right) + y}{{x}^{2}} \]
      11. metadata-evalN/A

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

        \[\leadsto \frac{\left(-\frac{\mathsf{fma}\left(3, y, 1\right) \cdot y}{x}\right) + y}{{x}^{2}} \]
      13. unpow2N/A

        \[\leadsto \frac{\left(-\frac{\mathsf{fma}\left(3, y, 1\right) \cdot y}{x}\right) + y}{x \cdot \color{blue}{x}} \]
      14. lower-*.f6433.5

        \[\leadsto \frac{\left(-\frac{\mathsf{fma}\left(3, y, 1\right) \cdot y}{x}\right) + y}{x \cdot \color{blue}{x}} \]
    4. Applied rewrites33.5%

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

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

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

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

        \[\leadsto \frac{\left(\mathsf{neg}\left(\frac{\mathsf{fma}\left(3, y, 1\right) \cdot y}{x}\right)\right) + y}{x \cdot x} \]
      5. lift-/.f64N/A

        \[\leadsto \frac{\left(\mathsf{neg}\left(\frac{\mathsf{fma}\left(3, y, 1\right) \cdot y}{x}\right)\right) + y}{x \cdot x} \]
      6. lift-*.f64N/A

        \[\leadsto \frac{\left(\mathsf{neg}\left(\frac{\mathsf{fma}\left(3, y, 1\right) \cdot y}{x}\right)\right) + y}{x \cdot x} \]
      7. lift-fma.f64N/A

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

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

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

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

        \[\leadsto \frac{\frac{\frac{\mathsf{fma}\left(3, y, 1\right) \cdot y}{-x} + y}{x}}{x} \]
      2. lift-/.f64N/A

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

        \[\leadsto \frac{\frac{\frac{\mathsf{fma}\left(3, y, 1\right) \cdot y}{-x} + y}{x}}{x} \]
      4. lift-fma.f64N/A

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

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

        \[\leadsto \frac{\frac{\left(\left(2 + 1\right) \cdot y + 1\right) \cdot \frac{y}{-x} + y}{x}}{x} \]
      7. distribute-rgt1-inN/A

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

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

        \[\leadsto \frac{\frac{\mathsf{fma}\left(1 + \left(y + 2 \cdot y\right), \frac{y}{-x}, y\right)}{x}}{x} \]
      10. +-commutativeN/A

        \[\leadsto \frac{\frac{\mathsf{fma}\left(\left(y + 2 \cdot y\right) + 1, \frac{y}{-x}, y\right)}{x}}{x} \]
      11. distribute-rgt1-inN/A

        \[\leadsto \frac{\frac{\mathsf{fma}\left(\left(2 + 1\right) \cdot y + 1, \frac{y}{-x}, y\right)}{x}}{x} \]
      12. metadata-evalN/A

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

        \[\leadsto \frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(3, y, 1\right), \frac{y}{-x}, y\right)}{x}}{x} \]
      14. lower-/.f6438.3

        \[\leadsto \frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(3, y, 1\right), \frac{y}{-x}, y\right)}{x}}{x} \]
    8. Applied rewrites38.3%

      \[\leadsto \frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(3, y, 1\right), \frac{y}{-x}, y\right)}{x}}{\color{blue}{x}} \]

    if -8.49999999999999977e145 < x < -1.25e50

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.25e50 < x < -1.45000000000000009e-15

    1. Initial program 69.0%

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

        \[\leadsto \frac{\color{blue}{x \cdot y}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      2. *-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)} \]
      3. lower-*.f6469.0

        \[\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. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.45000000000000009e-15 < x

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 83.1% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -8.5 \cdot 10^{+145}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(3, y, 1\right), \frac{y}{-x}, y\right)}{x}}{x}\\ \mathbf{elif}\;x \leq -6.5:\\ \;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + x} \cdot \frac{y}{1 + y}}{y + x}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= x -8.5e+145)
   (/ (/ (fma (fma 3.0 y 1.0) (/ y (- x)) y) x) x)
   (if (<= x -6.5)
     (* (/ x (* (+ y x) (+ y x))) (/ y x))
     (/ (* (/ x (+ y x)) (/ y (+ 1.0 y))) (+ y x)))))
double code(double x, double y) {
	double tmp;
	if (x <= -8.5e+145) {
		tmp = (fma(fma(3.0, y, 1.0), (y / -x), y) / x) / x;
	} else if (x <= -6.5) {
		tmp = (x / ((y + x) * (y + x))) * (y / x);
	} else {
		tmp = ((x / (y + x)) * (y / (1.0 + y))) / (y + x);
	}
	return tmp;
}
function code(x, y)
	tmp = 0.0
	if (x <= -8.5e+145)
		tmp = Float64(Float64(fma(fma(3.0, y, 1.0), Float64(y / Float64(-x)), y) / x) / x);
	elseif (x <= -6.5)
		tmp = Float64(Float64(x / Float64(Float64(y + x) * Float64(y + x))) * Float64(y / x));
	else
		tmp = Float64(Float64(Float64(x / Float64(y + x)) * Float64(y / Float64(1.0 + y))) / Float64(y + x));
	end
	return tmp
end
code[x_, y_] := If[LessEqual[x, -8.5e+145], N[(N[(N[(N[(3.0 * y + 1.0), $MachinePrecision] * N[(y / (-x)), $MachinePrecision] + y), $MachinePrecision] / x), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, -6.5], N[(N[(x / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(y / N[(1.0 + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.5 \cdot 10^{+145}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(3, y, 1\right), \frac{y}{-x}, y\right)}{x}}{x}\\

\mathbf{elif}\;x \leq -6.5:\\
\;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{x}\\

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


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

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(-\frac{\left(\left(y + 2 \cdot y\right) + 1\right) \cdot y}{x}\right) + y}{{x}^{2}} \]
      10. distribute-rgt1-inN/A

        \[\leadsto \frac{\left(-\frac{\left(\left(2 + 1\right) \cdot y + 1\right) \cdot y}{x}\right) + y}{{x}^{2}} \]
      11. metadata-evalN/A

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

        \[\leadsto \frac{\left(-\frac{\mathsf{fma}\left(3, y, 1\right) \cdot y}{x}\right) + y}{{x}^{2}} \]
      13. unpow2N/A

        \[\leadsto \frac{\left(-\frac{\mathsf{fma}\left(3, y, 1\right) \cdot y}{x}\right) + y}{x \cdot \color{blue}{x}} \]
      14. lower-*.f6433.5

        \[\leadsto \frac{\left(-\frac{\mathsf{fma}\left(3, y, 1\right) \cdot y}{x}\right) + y}{x \cdot \color{blue}{x}} \]
    4. Applied rewrites33.5%

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

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

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

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

        \[\leadsto \frac{\left(\mathsf{neg}\left(\frac{\mathsf{fma}\left(3, y, 1\right) \cdot y}{x}\right)\right) + y}{x \cdot x} \]
      5. lift-/.f64N/A

        \[\leadsto \frac{\left(\mathsf{neg}\left(\frac{\mathsf{fma}\left(3, y, 1\right) \cdot y}{x}\right)\right) + y}{x \cdot x} \]
      6. lift-*.f64N/A

        \[\leadsto \frac{\left(\mathsf{neg}\left(\frac{\mathsf{fma}\left(3, y, 1\right) \cdot y}{x}\right)\right) + y}{x \cdot x} \]
      7. lift-fma.f64N/A

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

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

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

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

        \[\leadsto \frac{\frac{\frac{\mathsf{fma}\left(3, y, 1\right) \cdot y}{-x} + y}{x}}{x} \]
      2. lift-/.f64N/A

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

        \[\leadsto \frac{\frac{\frac{\mathsf{fma}\left(3, y, 1\right) \cdot y}{-x} + y}{x}}{x} \]
      4. lift-fma.f64N/A

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

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

        \[\leadsto \frac{\frac{\left(\left(2 + 1\right) \cdot y + 1\right) \cdot \frac{y}{-x} + y}{x}}{x} \]
      7. distribute-rgt1-inN/A

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

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

        \[\leadsto \frac{\frac{\mathsf{fma}\left(1 + \left(y + 2 \cdot y\right), \frac{y}{-x}, y\right)}{x}}{x} \]
      10. +-commutativeN/A

        \[\leadsto \frac{\frac{\mathsf{fma}\left(\left(y + 2 \cdot y\right) + 1, \frac{y}{-x}, y\right)}{x}}{x} \]
      11. distribute-rgt1-inN/A

        \[\leadsto \frac{\frac{\mathsf{fma}\left(\left(2 + 1\right) \cdot y + 1, \frac{y}{-x}, y\right)}{x}}{x} \]
      12. metadata-evalN/A

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

        \[\leadsto \frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(3, y, 1\right), \frac{y}{-x}, y\right)}{x}}{x} \]
      14. lower-/.f6438.3

        \[\leadsto \frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(3, y, 1\right), \frac{y}{-x}, y\right)}{x}}{x} \]
    8. Applied rewrites38.3%

      \[\leadsto \frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(3, y, 1\right), \frac{y}{-x}, y\right)}{x}}{\color{blue}{x}} \]

    if -8.49999999999999977e145 < x < -6.5

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.5 < x

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 80.6% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -8.5 \cdot 10^{+145}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(3, y, 1\right), \frac{y}{-x}, y\right)}{x}}{x}\\ \mathbf{elif}\;x \leq -6.5:\\ \;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{1 + y}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= x -8.5e+145)
   (/ (/ (fma (fma 3.0 y 1.0) (/ y (- x)) y) x) x)
   (if (<= x -6.5)
     (* (/ x (* (+ y x) (+ y x))) (/ y x))
     (* (/ (/ x (+ y x)) (+ y x)) (/ y (+ 1.0 y))))))
double code(double x, double y) {
	double tmp;
	if (x <= -8.5e+145) {
		tmp = (fma(fma(3.0, y, 1.0), (y / -x), y) / x) / x;
	} else if (x <= -6.5) {
		tmp = (x / ((y + x) * (y + x))) * (y / x);
	} else {
		tmp = ((x / (y + x)) / (y + x)) * (y / (1.0 + y));
	}
	return tmp;
}
function code(x, y)
	tmp = 0.0
	if (x <= -8.5e+145)
		tmp = Float64(Float64(fma(fma(3.0, y, 1.0), Float64(y / Float64(-x)), y) / x) / x);
	elseif (x <= -6.5)
		tmp = Float64(Float64(x / Float64(Float64(y + x) * Float64(y + x))) * Float64(y / x));
	else
		tmp = Float64(Float64(Float64(x / Float64(y + x)) / Float64(y + x)) * Float64(y / Float64(1.0 + y)));
	end
	return tmp
end
code[x_, y_] := If[LessEqual[x, -8.5e+145], N[(N[(N[(N[(3.0 * y + 1.0), $MachinePrecision] * N[(y / (-x)), $MachinePrecision] + y), $MachinePrecision] / x), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, -6.5], N[(N[(x / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(y / N[(1.0 + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.5 \cdot 10^{+145}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(3, y, 1\right), \frac{y}{-x}, y\right)}{x}}{x}\\

\mathbf{elif}\;x \leq -6.5:\\
\;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{x}\\

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


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

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(-\frac{\left(\left(y + 2 \cdot y\right) + 1\right) \cdot y}{x}\right) + y}{{x}^{2}} \]
      10. distribute-rgt1-inN/A

        \[\leadsto \frac{\left(-\frac{\left(\left(2 + 1\right) \cdot y + 1\right) \cdot y}{x}\right) + y}{{x}^{2}} \]
      11. metadata-evalN/A

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

        \[\leadsto \frac{\left(-\frac{\mathsf{fma}\left(3, y, 1\right) \cdot y}{x}\right) + y}{{x}^{2}} \]
      13. unpow2N/A

        \[\leadsto \frac{\left(-\frac{\mathsf{fma}\left(3, y, 1\right) \cdot y}{x}\right) + y}{x \cdot \color{blue}{x}} \]
      14. lower-*.f6433.5

        \[\leadsto \frac{\left(-\frac{\mathsf{fma}\left(3, y, 1\right) \cdot y}{x}\right) + y}{x \cdot \color{blue}{x}} \]
    4. Applied rewrites33.5%

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

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

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

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

        \[\leadsto \frac{\left(\mathsf{neg}\left(\frac{\mathsf{fma}\left(3, y, 1\right) \cdot y}{x}\right)\right) + y}{x \cdot x} \]
      5. lift-/.f64N/A

        \[\leadsto \frac{\left(\mathsf{neg}\left(\frac{\mathsf{fma}\left(3, y, 1\right) \cdot y}{x}\right)\right) + y}{x \cdot x} \]
      6. lift-*.f64N/A

        \[\leadsto \frac{\left(\mathsf{neg}\left(\frac{\mathsf{fma}\left(3, y, 1\right) \cdot y}{x}\right)\right) + y}{x \cdot x} \]
      7. lift-fma.f64N/A

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

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

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

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

        \[\leadsto \frac{\frac{\frac{\mathsf{fma}\left(3, y, 1\right) \cdot y}{-x} + y}{x}}{x} \]
      2. lift-/.f64N/A

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

        \[\leadsto \frac{\frac{\frac{\mathsf{fma}\left(3, y, 1\right) \cdot y}{-x} + y}{x}}{x} \]
      4. lift-fma.f64N/A

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

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

        \[\leadsto \frac{\frac{\left(\left(2 + 1\right) \cdot y + 1\right) \cdot \frac{y}{-x} + y}{x}}{x} \]
      7. distribute-rgt1-inN/A

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

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

        \[\leadsto \frac{\frac{\mathsf{fma}\left(1 + \left(y + 2 \cdot y\right), \frac{y}{-x}, y\right)}{x}}{x} \]
      10. +-commutativeN/A

        \[\leadsto \frac{\frac{\mathsf{fma}\left(\left(y + 2 \cdot y\right) + 1, \frac{y}{-x}, y\right)}{x}}{x} \]
      11. distribute-rgt1-inN/A

        \[\leadsto \frac{\frac{\mathsf{fma}\left(\left(2 + 1\right) \cdot y + 1, \frac{y}{-x}, y\right)}{x}}{x} \]
      12. metadata-evalN/A

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

        \[\leadsto \frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(3, y, 1\right), \frac{y}{-x}, y\right)}{x}}{x} \]
      14. lower-/.f6438.3

        \[\leadsto \frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(3, y, 1\right), \frac{y}{-x}, y\right)}{x}}{x} \]
    8. Applied rewrites38.3%

      \[\leadsto \frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(3, y, 1\right), \frac{y}{-x}, y\right)}{x}}{\color{blue}{x}} \]

    if -8.49999999999999977e145 < x < -6.5

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.5 < x

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 68.7% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\left(y + x\right) \cdot \left(y + x\right)}\\ \mathbf{if}\;x \leq -8.5 \cdot 10^{+145}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(3, y, 1\right), \frac{y}{-x}, y\right)}{x}}{x}\\ \mathbf{elif}\;x \leq -6.5:\\ \;\;\;\;t\_0 \cdot \frac{y}{x}\\ \mathbf{elif}\;x \leq -1.9 \cdot 10^{-191}:\\ \;\;\;\;t\_0 \cdot \frac{y}{1 + y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{1 + y}}{y + x}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (/ x (* (+ y x) (+ y x)))))
   (if (<= x -8.5e+145)
     (/ (/ (fma (fma 3.0 y 1.0) (/ y (- x)) y) x) x)
     (if (<= x -6.5)
       (* t_0 (/ y x))
       (if (<= x -1.9e-191)
         (* t_0 (/ y (+ 1.0 y)))
         (/ (/ x (+ 1.0 y)) (+ y x)))))))
double code(double x, double y) {
	double t_0 = x / ((y + x) * (y + x));
	double tmp;
	if (x <= -8.5e+145) {
		tmp = (fma(fma(3.0, y, 1.0), (y / -x), y) / x) / x;
	} else if (x <= -6.5) {
		tmp = t_0 * (y / x);
	} else if (x <= -1.9e-191) {
		tmp = t_0 * (y / (1.0 + y));
	} else {
		tmp = (x / (1.0 + y)) / (y + x);
	}
	return tmp;
}
function code(x, y)
	t_0 = Float64(x / Float64(Float64(y + x) * Float64(y + x)))
	tmp = 0.0
	if (x <= -8.5e+145)
		tmp = Float64(Float64(fma(fma(3.0, y, 1.0), Float64(y / Float64(-x)), y) / x) / x);
	elseif (x <= -6.5)
		tmp = Float64(t_0 * Float64(y / x));
	elseif (x <= -1.9e-191)
		tmp = Float64(t_0 * Float64(y / Float64(1.0 + y)));
	else
		tmp = Float64(Float64(x / Float64(1.0 + y)) / Float64(y + x));
	end
	return tmp
end
code[x_, y_] := Block[{t$95$0 = N[(x / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -8.5e+145], N[(N[(N[(N[(3.0 * y + 1.0), $MachinePrecision] * N[(y / (-x)), $MachinePrecision] + y), $MachinePrecision] / x), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, -6.5], N[(t$95$0 * N[(y / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.9e-191], N[(t$95$0 * N[(y / N[(1.0 + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(1.0 + y), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{x}{\left(y + x\right) \cdot \left(y + x\right)}\\
\mathbf{if}\;x \leq -8.5 \cdot 10^{+145}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(3, y, 1\right), \frac{y}{-x}, y\right)}{x}}{x}\\

\mathbf{elif}\;x \leq -6.5:\\
\;\;\;\;t\_0 \cdot \frac{y}{x}\\

\mathbf{elif}\;x \leq -1.9 \cdot 10^{-191}:\\
\;\;\;\;t\_0 \cdot \frac{y}{1 + y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -8.49999999999999977e145

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(-\frac{\left(\left(y + 2 \cdot y\right) + 1\right) \cdot y}{x}\right) + y}{{x}^{2}} \]
      10. distribute-rgt1-inN/A

        \[\leadsto \frac{\left(-\frac{\left(\left(2 + 1\right) \cdot y + 1\right) \cdot y}{x}\right) + y}{{x}^{2}} \]
      11. metadata-evalN/A

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

        \[\leadsto \frac{\left(-\frac{\mathsf{fma}\left(3, y, 1\right) \cdot y}{x}\right) + y}{{x}^{2}} \]
      13. unpow2N/A

        \[\leadsto \frac{\left(-\frac{\mathsf{fma}\left(3, y, 1\right) \cdot y}{x}\right) + y}{x \cdot \color{blue}{x}} \]
      14. lower-*.f6433.5

        \[\leadsto \frac{\left(-\frac{\mathsf{fma}\left(3, y, 1\right) \cdot y}{x}\right) + y}{x \cdot \color{blue}{x}} \]
    4. Applied rewrites33.5%

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

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

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

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

        \[\leadsto \frac{\left(\mathsf{neg}\left(\frac{\mathsf{fma}\left(3, y, 1\right) \cdot y}{x}\right)\right) + y}{x \cdot x} \]
      5. lift-/.f64N/A

        \[\leadsto \frac{\left(\mathsf{neg}\left(\frac{\mathsf{fma}\left(3, y, 1\right) \cdot y}{x}\right)\right) + y}{x \cdot x} \]
      6. lift-*.f64N/A

        \[\leadsto \frac{\left(\mathsf{neg}\left(\frac{\mathsf{fma}\left(3, y, 1\right) \cdot y}{x}\right)\right) + y}{x \cdot x} \]
      7. lift-fma.f64N/A

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

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

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

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

        \[\leadsto \frac{\frac{\frac{\mathsf{fma}\left(3, y, 1\right) \cdot y}{-x} + y}{x}}{x} \]
      2. lift-/.f64N/A

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

        \[\leadsto \frac{\frac{\frac{\mathsf{fma}\left(3, y, 1\right) \cdot y}{-x} + y}{x}}{x} \]
      4. lift-fma.f64N/A

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

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

        \[\leadsto \frac{\frac{\left(\left(2 + 1\right) \cdot y + 1\right) \cdot \frac{y}{-x} + y}{x}}{x} \]
      7. distribute-rgt1-inN/A

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

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

        \[\leadsto \frac{\frac{\mathsf{fma}\left(1 + \left(y + 2 \cdot y\right), \frac{y}{-x}, y\right)}{x}}{x} \]
      10. +-commutativeN/A

        \[\leadsto \frac{\frac{\mathsf{fma}\left(\left(y + 2 \cdot y\right) + 1, \frac{y}{-x}, y\right)}{x}}{x} \]
      11. distribute-rgt1-inN/A

        \[\leadsto \frac{\frac{\mathsf{fma}\left(\left(2 + 1\right) \cdot y + 1, \frac{y}{-x}, y\right)}{x}}{x} \]
      12. metadata-evalN/A

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

        \[\leadsto \frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(3, y, 1\right), \frac{y}{-x}, y\right)}{x}}{x} \]
      14. lower-/.f6438.3

        \[\leadsto \frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(3, y, 1\right), \frac{y}{-x}, y\right)}{x}}{x} \]
    8. Applied rewrites38.3%

      \[\leadsto \frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(3, y, 1\right), \frac{y}{-x}, y\right)}{x}}{\color{blue}{x}} \]

    if -8.49999999999999977e145 < x < -6.5

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)}} \]
      19. metadata-evalN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(x + y\right) - \color{blue}{-1}} \]
      20. lower--.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - -1}} \]
      21. +-commutativeN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
      22. lower-+.f6487.6

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
    3. Applied rewrites87.6%

      \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1}} \]
    4. Taylor expanded in x around inf

      \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \color{blue}{\frac{y}{x}} \]
    5. Step-by-step derivation
      1. lower-/.f6446.9

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{x}} \]
    6. Applied rewrites46.9%

      \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \color{blue}{\frac{y}{x}} \]

    if -6.5 < x < -1.8999999999999999e-191

    1. Initial program 69.0%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{x \cdot y}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      2. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
      3. lift-*.f64N/A

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
      4. lift-*.f64N/A

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\color{blue}{\left(x + y\right)} \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      6. 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)} \]
      7. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\color{blue}{\left(x + y\right)} + 1\right)} \]
      8. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
      9. times-fracN/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      10. lower-*.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      11. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      12. lower-*.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      13. +-commutativeN/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      14. lower-+.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      15. +-commutativeN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      16. lower-+.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      17. lower-/.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \color{blue}{\frac{y}{\left(x + y\right) + 1}} \]
      18. add-flipN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)}} \]
      19. metadata-evalN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(x + y\right) - \color{blue}{-1}} \]
      20. lower--.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - -1}} \]
      21. +-commutativeN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
      22. lower-+.f6487.6

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
    3. Applied rewrites87.6%

      \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1}} \]
    4. Taylor expanded in x around 0

      \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{1 + y}} \]
    5. Step-by-step derivation
      1. lower-+.f6475.0

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{1 + \color{blue}{y}} \]
    6. Applied rewrites75.0%

      \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{1 + y}} \]

    if -1.8999999999999999e-191 < x

    1. Initial program 69.0%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{x \cdot y}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      2. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
      3. lift-*.f64N/A

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
      4. lift-*.f64N/A

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\color{blue}{\left(x + y\right)} \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      6. 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)} \]
      7. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\color{blue}{\left(x + y\right)} + 1\right)} \]
      8. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
      9. times-fracN/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      10. lower-*.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      11. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      12. lower-*.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      13. +-commutativeN/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      14. lower-+.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      15. +-commutativeN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      16. lower-+.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      17. lower-/.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \color{blue}{\frac{y}{\left(x + y\right) + 1}} \]
      18. add-flipN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)}} \]
      19. metadata-evalN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(x + y\right) - \color{blue}{-1}} \]
      20. lower--.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - -1}} \]
      21. +-commutativeN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
      22. lower-+.f6487.6

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
    3. Applied rewrites87.6%

      \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1}} \]
    4. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      3. lift-+.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1} \]
      4. lift-+.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      5. associate-/r*N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      6. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      7. lower-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      8. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{\color{blue}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      9. lift-+.f6499.8

        \[\leadsto \frac{\frac{x}{y + x}}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
    5. Applied rewrites99.8%

      \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}} \]
      2. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{y + x}}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      3. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      4. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{\color{blue}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      5. lift-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      6. lift-/.f64N/A

        \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \color{blue}{\frac{y}{\left(y + x\right) - -1}} \]
      7. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
      8. lift--.f64N/A

        \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right) - -1}} \]
      9. associate-*l/N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
      10. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
      11. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}}{y + x} \]
      12. lift-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x} \]
      13. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x} \]
      14. lift--.f64N/A

        \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right) - -1}}}{y + x} \]
      15. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1}}{y + x} \]
      16. lift-/.f64N/A

        \[\leadsto \frac{\frac{x}{y + x} \cdot \color{blue}{\frac{y}{\left(y + x\right) - -1}}}{y + x} \]
      17. lift-+.f6499.8

        \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{\color{blue}{y + x}} \]
    7. Applied rewrites99.8%

      \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
    8. Taylor expanded in x around 0

      \[\leadsto \frac{\color{blue}{\frac{x}{1 + y}}}{y + x} \]
    9. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{\frac{x}{\color{blue}{1 + y}}}{y + x} \]
      2. lower-+.f6450.9

        \[\leadsto \frac{\frac{x}{1 + \color{blue}{y}}}{y + x} \]
    10. Applied rewrites50.9%

      \[\leadsto \frac{\color{blue}{\frac{x}{1 + y}}}{y + x} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 10: 68.7% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\left(y + x\right) \cdot \left(y + x\right)}\\ \mathbf{if}\;x \leq -8.5 \cdot 10^{+145}:\\ \;\;\;\;\frac{\frac{y}{x}}{y + x}\\ \mathbf{elif}\;x \leq -6.5:\\ \;\;\;\;t\_0 \cdot \frac{y}{x}\\ \mathbf{elif}\;x \leq -1.9 \cdot 10^{-191}:\\ \;\;\;\;t\_0 \cdot \frac{y}{1 + y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{1 + y}}{y + x}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (/ x (* (+ y x) (+ y x)))))
   (if (<= x -8.5e+145)
     (/ (/ y x) (+ y x))
     (if (<= x -6.5)
       (* t_0 (/ y x))
       (if (<= x -1.9e-191)
         (* t_0 (/ y (+ 1.0 y)))
         (/ (/ x (+ 1.0 y)) (+ y x)))))))
double code(double x, double y) {
	double t_0 = x / ((y + x) * (y + x));
	double tmp;
	if (x <= -8.5e+145) {
		tmp = (y / x) / (y + x);
	} else if (x <= -6.5) {
		tmp = t_0 * (y / x);
	} else if (x <= -1.9e-191) {
		tmp = t_0 * (y / (1.0 + y));
	} else {
		tmp = (x / (1.0 + y)) / (y + x);
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: t_0
    real(8) :: tmp
    t_0 = x / ((y + x) * (y + x))
    if (x <= (-8.5d+145)) then
        tmp = (y / x) / (y + x)
    else if (x <= (-6.5d0)) then
        tmp = t_0 * (y / x)
    else if (x <= (-1.9d-191)) then
        tmp = t_0 * (y / (1.0d0 + y))
    else
        tmp = (x / (1.0d0 + y)) / (y + x)
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double t_0 = x / ((y + x) * (y + x));
	double tmp;
	if (x <= -8.5e+145) {
		tmp = (y / x) / (y + x);
	} else if (x <= -6.5) {
		tmp = t_0 * (y / x);
	} else if (x <= -1.9e-191) {
		tmp = t_0 * (y / (1.0 + y));
	} else {
		tmp = (x / (1.0 + y)) / (y + x);
	}
	return tmp;
}
def code(x, y):
	t_0 = x / ((y + x) * (y + x))
	tmp = 0
	if x <= -8.5e+145:
		tmp = (y / x) / (y + x)
	elif x <= -6.5:
		tmp = t_0 * (y / x)
	elif x <= -1.9e-191:
		tmp = t_0 * (y / (1.0 + y))
	else:
		tmp = (x / (1.0 + y)) / (y + x)
	return tmp
function code(x, y)
	t_0 = Float64(x / Float64(Float64(y + x) * Float64(y + x)))
	tmp = 0.0
	if (x <= -8.5e+145)
		tmp = Float64(Float64(y / x) / Float64(y + x));
	elseif (x <= -6.5)
		tmp = Float64(t_0 * Float64(y / x));
	elseif (x <= -1.9e-191)
		tmp = Float64(t_0 * Float64(y / Float64(1.0 + y)));
	else
		tmp = Float64(Float64(x / Float64(1.0 + y)) / Float64(y + x));
	end
	return tmp
end
function tmp_2 = code(x, y)
	t_0 = x / ((y + x) * (y + x));
	tmp = 0.0;
	if (x <= -8.5e+145)
		tmp = (y / x) / (y + x);
	elseif (x <= -6.5)
		tmp = t_0 * (y / x);
	elseif (x <= -1.9e-191)
		tmp = t_0 * (y / (1.0 + y));
	else
		tmp = (x / (1.0 + y)) / (y + x);
	end
	tmp_2 = tmp;
end
code[x_, y_] := Block[{t$95$0 = N[(x / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -8.5e+145], N[(N[(y / x), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -6.5], N[(t$95$0 * N[(y / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.9e-191], N[(t$95$0 * N[(y / N[(1.0 + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(1.0 + y), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{x}{\left(y + x\right) \cdot \left(y + x\right)}\\
\mathbf{if}\;x \leq -8.5 \cdot 10^{+145}:\\
\;\;\;\;\frac{\frac{y}{x}}{y + x}\\

\mathbf{elif}\;x \leq -6.5:\\
\;\;\;\;t\_0 \cdot \frac{y}{x}\\

\mathbf{elif}\;x \leq -1.9 \cdot 10^{-191}:\\
\;\;\;\;t\_0 \cdot \frac{y}{1 + y}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{1 + y}}{y + x}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -8.49999999999999977e145

    1. Initial program 69.0%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{x \cdot y}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      2. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
      3. lift-*.f64N/A

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
      4. lift-*.f64N/A

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\color{blue}{\left(x + y\right)} \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      6. 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)} \]
      7. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\color{blue}{\left(x + y\right)} + 1\right)} \]
      8. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
      9. times-fracN/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      10. lower-*.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      11. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      12. lower-*.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      13. +-commutativeN/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      14. lower-+.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      15. +-commutativeN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      16. lower-+.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      17. lower-/.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \color{blue}{\frac{y}{\left(x + y\right) + 1}} \]
      18. add-flipN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)}} \]
      19. metadata-evalN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(x + y\right) - \color{blue}{-1}} \]
      20. lower--.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - -1}} \]
      21. +-commutativeN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
      22. lower-+.f6487.6

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
    3. Applied rewrites87.6%

      \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1}} \]
    4. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      3. lift-+.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1} \]
      4. lift-+.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      5. associate-/r*N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      6. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      7. lower-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      8. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{\color{blue}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      9. lift-+.f6499.8

        \[\leadsto \frac{\frac{x}{y + x}}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
    5. Applied rewrites99.8%

      \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}} \]
      2. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{y + x}}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      3. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      4. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{\color{blue}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      5. lift-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      6. lift-/.f64N/A

        \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \color{blue}{\frac{y}{\left(y + x\right) - -1}} \]
      7. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
      8. lift--.f64N/A

        \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right) - -1}} \]
      9. associate-*l/N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
      10. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
      11. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}}{y + x} \]
      12. lift-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x} \]
      13. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x} \]
      14. lift--.f64N/A

        \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right) - -1}}}{y + x} \]
      15. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1}}{y + x} \]
      16. lift-/.f64N/A

        \[\leadsto \frac{\frac{x}{y + x} \cdot \color{blue}{\frac{y}{\left(y + x\right) - -1}}}{y + x} \]
      17. lift-+.f6499.8

        \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{\color{blue}{y + x}} \]
    7. Applied rewrites99.8%

      \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
    8. Taylor expanded in x around inf

      \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{y + x} \]
    9. Step-by-step derivation
      1. lower-/.f6438.9

        \[\leadsto \frac{\frac{y}{\color{blue}{x}}}{y + x} \]
    10. Applied rewrites38.9%

      \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{y + x} \]

    if -8.49999999999999977e145 < x < -6.5

    1. Initial program 69.0%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{x \cdot y}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      2. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
      3. lift-*.f64N/A

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
      4. lift-*.f64N/A

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\color{blue}{\left(x + y\right)} \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      6. 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)} \]
      7. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\color{blue}{\left(x + y\right)} + 1\right)} \]
      8. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
      9. times-fracN/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      10. lower-*.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      11. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      12. lower-*.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      13. +-commutativeN/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      14. lower-+.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      15. +-commutativeN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      16. lower-+.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      17. lower-/.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \color{blue}{\frac{y}{\left(x + y\right) + 1}} \]
      18. add-flipN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)}} \]
      19. metadata-evalN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(x + y\right) - \color{blue}{-1}} \]
      20. lower--.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - -1}} \]
      21. +-commutativeN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
      22. lower-+.f6487.6

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
    3. Applied rewrites87.6%

      \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1}} \]
    4. Taylor expanded in x around inf

      \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \color{blue}{\frac{y}{x}} \]
    5. Step-by-step derivation
      1. lower-/.f6446.9

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{x}} \]
    6. Applied rewrites46.9%

      \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \color{blue}{\frac{y}{x}} \]

    if -6.5 < x < -1.8999999999999999e-191

    1. Initial program 69.0%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{x \cdot y}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      2. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
      3. lift-*.f64N/A

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
      4. lift-*.f64N/A

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\color{blue}{\left(x + y\right)} \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      6. 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)} \]
      7. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\color{blue}{\left(x + y\right)} + 1\right)} \]
      8. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
      9. times-fracN/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      10. lower-*.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      11. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      12. lower-*.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      13. +-commutativeN/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      14. lower-+.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      15. +-commutativeN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      16. lower-+.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      17. lower-/.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \color{blue}{\frac{y}{\left(x + y\right) + 1}} \]
      18. add-flipN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)}} \]
      19. metadata-evalN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(x + y\right) - \color{blue}{-1}} \]
      20. lower--.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - -1}} \]
      21. +-commutativeN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
      22. lower-+.f6487.6

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
    3. Applied rewrites87.6%

      \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1}} \]
    4. Taylor expanded in x around 0

      \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{1 + y}} \]
    5. Step-by-step derivation
      1. lower-+.f6475.0

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{1 + \color{blue}{y}} \]
    6. Applied rewrites75.0%

      \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{1 + y}} \]

    if -1.8999999999999999e-191 < x

    1. Initial program 69.0%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{x \cdot y}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      2. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
      3. lift-*.f64N/A

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
      4. lift-*.f64N/A

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\color{blue}{\left(x + y\right)} \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      6. 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)} \]
      7. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\color{blue}{\left(x + y\right)} + 1\right)} \]
      8. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
      9. times-fracN/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      10. lower-*.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      11. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      12. lower-*.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      13. +-commutativeN/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      14. lower-+.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      15. +-commutativeN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      16. lower-+.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      17. lower-/.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \color{blue}{\frac{y}{\left(x + y\right) + 1}} \]
      18. add-flipN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)}} \]
      19. metadata-evalN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(x + y\right) - \color{blue}{-1}} \]
      20. lower--.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - -1}} \]
      21. +-commutativeN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
      22. lower-+.f6487.6

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
    3. Applied rewrites87.6%

      \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1}} \]
    4. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      3. lift-+.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1} \]
      4. lift-+.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      5. associate-/r*N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      6. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      7. lower-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      8. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{\color{blue}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      9. lift-+.f6499.8

        \[\leadsto \frac{\frac{x}{y + x}}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
    5. Applied rewrites99.8%

      \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}} \]
      2. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{y + x}}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      3. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      4. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{\color{blue}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      5. lift-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      6. lift-/.f64N/A

        \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \color{blue}{\frac{y}{\left(y + x\right) - -1}} \]
      7. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
      8. lift--.f64N/A

        \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right) - -1}} \]
      9. associate-*l/N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
      10. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
      11. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}}{y + x} \]
      12. lift-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x} \]
      13. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x} \]
      14. lift--.f64N/A

        \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right) - -1}}}{y + x} \]
      15. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1}}{y + x} \]
      16. lift-/.f64N/A

        \[\leadsto \frac{\frac{x}{y + x} \cdot \color{blue}{\frac{y}{\left(y + x\right) - -1}}}{y + x} \]
      17. lift-+.f6499.8

        \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{\color{blue}{y + x}} \]
    7. Applied rewrites99.8%

      \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
    8. Taylor expanded in x around 0

      \[\leadsto \frac{\color{blue}{\frac{x}{1 + y}}}{y + x} \]
    9. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{\frac{x}{\color{blue}{1 + y}}}{y + x} \]
      2. lower-+.f6450.9

        \[\leadsto \frac{\frac{x}{1 + \color{blue}{y}}}{y + x} \]
    10. Applied rewrites50.9%

      \[\leadsto \frac{\color{blue}{\frac{x}{1 + y}}}{y + x} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 11: 67.0% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -8.5 \cdot 10^{+145}:\\ \;\;\;\;\frac{\frac{y}{x}}{y + x}\\ \mathbf{elif}\;x \leq -1.1:\\ \;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{x}\\ \mathbf{elif}\;x \leq -1.05 \cdot 10^{-150}:\\ \;\;\;\;\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{1 + y}}{y + x}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= x -8.5e+145)
   (/ (/ y x) (+ y x))
   (if (<= x -1.1)
     (* (/ x (* (+ y x) (+ y x))) (/ y x))
     (if (<= x -1.05e-150)
       (/ (* x y) (* (* (+ x y) (+ x y)) (+ 1.0 y)))
       (/ (/ x (+ 1.0 y)) (+ y x))))))
double code(double x, double y) {
	double tmp;
	if (x <= -8.5e+145) {
		tmp = (y / x) / (y + x);
	} else if (x <= -1.1) {
		tmp = (x / ((y + x) * (y + x))) * (y / x);
	} else if (x <= -1.05e-150) {
		tmp = (x * y) / (((x + y) * (x + y)) * (1.0 + y));
	} else {
		tmp = (x / (1.0 + y)) / (y + x);
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (x <= (-8.5d+145)) then
        tmp = (y / x) / (y + x)
    else if (x <= (-1.1d0)) then
        tmp = (x / ((y + x) * (y + x))) * (y / x)
    else if (x <= (-1.05d-150)) then
        tmp = (x * y) / (((x + y) * (x + y)) * (1.0d0 + y))
    else
        tmp = (x / (1.0d0 + y)) / (y + x)
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (x <= -8.5e+145) {
		tmp = (y / x) / (y + x);
	} else if (x <= -1.1) {
		tmp = (x / ((y + x) * (y + x))) * (y / x);
	} else if (x <= -1.05e-150) {
		tmp = (x * y) / (((x + y) * (x + y)) * (1.0 + y));
	} else {
		tmp = (x / (1.0 + y)) / (y + x);
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= -8.5e+145:
		tmp = (y / x) / (y + x)
	elif x <= -1.1:
		tmp = (x / ((y + x) * (y + x))) * (y / x)
	elif x <= -1.05e-150:
		tmp = (x * y) / (((x + y) * (x + y)) * (1.0 + y))
	else:
		tmp = (x / (1.0 + y)) / (y + x)
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= -8.5e+145)
		tmp = Float64(Float64(y / x) / Float64(y + x));
	elseif (x <= -1.1)
		tmp = Float64(Float64(x / Float64(Float64(y + x) * Float64(y + x))) * Float64(y / x));
	elseif (x <= -1.05e-150)
		tmp = Float64(Float64(x * y) / Float64(Float64(Float64(x + y) * Float64(x + y)) * Float64(1.0 + y)));
	else
		tmp = Float64(Float64(x / Float64(1.0 + y)) / Float64(y + x));
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= -8.5e+145)
		tmp = (y / x) / (y + x);
	elseif (x <= -1.1)
		tmp = (x / ((y + x) * (y + x))) * (y / x);
	elseif (x <= -1.05e-150)
		tmp = (x * y) / (((x + y) * (x + y)) * (1.0 + y));
	else
		tmp = (x / (1.0 + y)) / (y + x);
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, -8.5e+145], N[(N[(y / x), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.1], N[(N[(x / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.05e-150], N[(N[(x * y), $MachinePrecision] / N[(N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(1.0 + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(1.0 + y), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.5 \cdot 10^{+145}:\\
\;\;\;\;\frac{\frac{y}{x}}{y + x}\\

\mathbf{elif}\;x \leq -1.1:\\
\;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{x}\\

\mathbf{elif}\;x \leq -1.05 \cdot 10^{-150}:\\
\;\;\;\;\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + y\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{1 + y}}{y + x}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -8.49999999999999977e145

    1. Initial program 69.0%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{x \cdot y}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      2. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
      3. lift-*.f64N/A

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
      4. lift-*.f64N/A

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\color{blue}{\left(x + y\right)} \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      6. 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)} \]
      7. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\color{blue}{\left(x + y\right)} + 1\right)} \]
      8. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
      9. times-fracN/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      10. lower-*.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      11. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      12. lower-*.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      13. +-commutativeN/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      14. lower-+.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      15. +-commutativeN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      16. lower-+.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      17. lower-/.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \color{blue}{\frac{y}{\left(x + y\right) + 1}} \]
      18. add-flipN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)}} \]
      19. metadata-evalN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(x + y\right) - \color{blue}{-1}} \]
      20. lower--.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - -1}} \]
      21. +-commutativeN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
      22. lower-+.f6487.6

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
    3. Applied rewrites87.6%

      \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1}} \]
    4. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      3. lift-+.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1} \]
      4. lift-+.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      5. associate-/r*N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      6. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      7. lower-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      8. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{\color{blue}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      9. lift-+.f6499.8

        \[\leadsto \frac{\frac{x}{y + x}}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
    5. Applied rewrites99.8%

      \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}} \]
      2. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{y + x}}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      3. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      4. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{\color{blue}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      5. lift-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      6. lift-/.f64N/A

        \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \color{blue}{\frac{y}{\left(y + x\right) - -1}} \]
      7. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
      8. lift--.f64N/A

        \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right) - -1}} \]
      9. associate-*l/N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
      10. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
      11. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}}{y + x} \]
      12. lift-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x} \]
      13. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x} \]
      14. lift--.f64N/A

        \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right) - -1}}}{y + x} \]
      15. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1}}{y + x} \]
      16. lift-/.f64N/A

        \[\leadsto \frac{\frac{x}{y + x} \cdot \color{blue}{\frac{y}{\left(y + x\right) - -1}}}{y + x} \]
      17. lift-+.f6499.8

        \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{\color{blue}{y + x}} \]
    7. Applied rewrites99.8%

      \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
    8. Taylor expanded in x around inf

      \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{y + x} \]
    9. Step-by-step derivation
      1. lower-/.f6438.9

        \[\leadsto \frac{\frac{y}{\color{blue}{x}}}{y + x} \]
    10. Applied rewrites38.9%

      \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{y + x} \]

    if -8.49999999999999977e145 < x < -1.1000000000000001

    1. Initial program 69.0%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{x \cdot y}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      2. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
      3. lift-*.f64N/A

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
      4. lift-*.f64N/A

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\color{blue}{\left(x + y\right)} \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      6. 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)} \]
      7. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\color{blue}{\left(x + y\right)} + 1\right)} \]
      8. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
      9. times-fracN/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      10. lower-*.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      11. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      12. lower-*.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      13. +-commutativeN/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      14. lower-+.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      15. +-commutativeN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      16. lower-+.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      17. lower-/.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \color{blue}{\frac{y}{\left(x + y\right) + 1}} \]
      18. add-flipN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)}} \]
      19. metadata-evalN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(x + y\right) - \color{blue}{-1}} \]
      20. lower--.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - -1}} \]
      21. +-commutativeN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
      22. lower-+.f6487.6

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
    3. Applied rewrites87.6%

      \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1}} \]
    4. Taylor expanded in x around inf

      \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \color{blue}{\frac{y}{x}} \]
    5. Step-by-step derivation
      1. lower-/.f6446.9

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{x}} \]
    6. Applied rewrites46.9%

      \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \color{blue}{\frac{y}{x}} \]

    if -1.1000000000000001 < x < -1.0500000000000001e-150

    1. Initial program 69.0%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Taylor expanded in x around 0

      \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(1 + y\right)}} \]
    3. Step-by-step derivation
      1. lower-+.f6458.7

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + \color{blue}{y}\right)} \]
    4. Applied rewrites58.7%

      \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(1 + y\right)}} \]

    if -1.0500000000000001e-150 < x

    1. Initial program 69.0%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{x \cdot y}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      2. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
      3. lift-*.f64N/A

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
      4. lift-*.f64N/A

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\color{blue}{\left(x + y\right)} \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      6. 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)} \]
      7. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\color{blue}{\left(x + y\right)} + 1\right)} \]
      8. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
      9. times-fracN/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      10. lower-*.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      11. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      12. lower-*.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      13. +-commutativeN/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      14. lower-+.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      15. +-commutativeN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      16. lower-+.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      17. lower-/.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \color{blue}{\frac{y}{\left(x + y\right) + 1}} \]
      18. add-flipN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)}} \]
      19. metadata-evalN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(x + y\right) - \color{blue}{-1}} \]
      20. lower--.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - -1}} \]
      21. +-commutativeN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
      22. lower-+.f6487.6

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
    3. Applied rewrites87.6%

      \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1}} \]
    4. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      3. lift-+.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1} \]
      4. lift-+.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      5. associate-/r*N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      6. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      7. lower-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      8. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{\color{blue}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      9. lift-+.f6499.8

        \[\leadsto \frac{\frac{x}{y + x}}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
    5. Applied rewrites99.8%

      \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}} \]
      2. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{y + x}}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      3. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      4. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{\color{blue}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      5. lift-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      6. lift-/.f64N/A

        \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \color{blue}{\frac{y}{\left(y + x\right) - -1}} \]
      7. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
      8. lift--.f64N/A

        \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right) - -1}} \]
      9. associate-*l/N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
      10. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
      11. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}}{y + x} \]
      12. lift-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x} \]
      13. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x} \]
      14. lift--.f64N/A

        \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right) - -1}}}{y + x} \]
      15. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1}}{y + x} \]
      16. lift-/.f64N/A

        \[\leadsto \frac{\frac{x}{y + x} \cdot \color{blue}{\frac{y}{\left(y + x\right) - -1}}}{y + x} \]
      17. lift-+.f6499.8

        \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{\color{blue}{y + x}} \]
    7. Applied rewrites99.8%

      \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
    8. Taylor expanded in x around 0

      \[\leadsto \frac{\color{blue}{\frac{x}{1 + y}}}{y + x} \]
    9. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{\frac{x}{\color{blue}{1 + y}}}{y + x} \]
      2. lower-+.f6450.9

        \[\leadsto \frac{\frac{x}{1 + \color{blue}{y}}}{y + x} \]
    10. Applied rewrites50.9%

      \[\leadsto \frac{\color{blue}{\frac{x}{1 + y}}}{y + x} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 12: 65.4% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -8.5 \cdot 10^{+145}:\\ \;\;\;\;\frac{\frac{y}{x}}{y + x}\\ \mathbf{elif}\;x \leq -1 \cdot 10^{+32}:\\ \;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{x}\\ \mathbf{elif}\;x \leq -5.6 \cdot 10^{-100}:\\ \;\;\;\;\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + x\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{1 + y}}{y + x}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= x -8.5e+145)
   (/ (/ y x) (+ y x))
   (if (<= x -1e+32)
     (* (/ x (* (+ y x) (+ y x))) (/ y x))
     (if (<= x -5.6e-100)
       (/ (* x y) (* (* (+ x y) (+ x y)) (+ 1.0 x)))
       (/ (/ x (+ 1.0 y)) (+ y x))))))
double code(double x, double y) {
	double tmp;
	if (x <= -8.5e+145) {
		tmp = (y / x) / (y + x);
	} else if (x <= -1e+32) {
		tmp = (x / ((y + x) * (y + x))) * (y / x);
	} else if (x <= -5.6e-100) {
		tmp = (x * y) / (((x + y) * (x + y)) * (1.0 + x));
	} else {
		tmp = (x / (1.0 + y)) / (y + x);
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (x <= (-8.5d+145)) then
        tmp = (y / x) / (y + x)
    else if (x <= (-1d+32)) then
        tmp = (x / ((y + x) * (y + x))) * (y / x)
    else if (x <= (-5.6d-100)) then
        tmp = (x * y) / (((x + y) * (x + y)) * (1.0d0 + x))
    else
        tmp = (x / (1.0d0 + y)) / (y + x)
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (x <= -8.5e+145) {
		tmp = (y / x) / (y + x);
	} else if (x <= -1e+32) {
		tmp = (x / ((y + x) * (y + x))) * (y / x);
	} else if (x <= -5.6e-100) {
		tmp = (x * y) / (((x + y) * (x + y)) * (1.0 + x));
	} else {
		tmp = (x / (1.0 + y)) / (y + x);
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= -8.5e+145:
		tmp = (y / x) / (y + x)
	elif x <= -1e+32:
		tmp = (x / ((y + x) * (y + x))) * (y / x)
	elif x <= -5.6e-100:
		tmp = (x * y) / (((x + y) * (x + y)) * (1.0 + x))
	else:
		tmp = (x / (1.0 + y)) / (y + x)
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= -8.5e+145)
		tmp = Float64(Float64(y / x) / Float64(y + x));
	elseif (x <= -1e+32)
		tmp = Float64(Float64(x / Float64(Float64(y + x) * Float64(y + x))) * Float64(y / x));
	elseif (x <= -5.6e-100)
		tmp = Float64(Float64(x * y) / Float64(Float64(Float64(x + y) * Float64(x + y)) * Float64(1.0 + x)));
	else
		tmp = Float64(Float64(x / Float64(1.0 + y)) / Float64(y + x));
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= -8.5e+145)
		tmp = (y / x) / (y + x);
	elseif (x <= -1e+32)
		tmp = (x / ((y + x) * (y + x))) * (y / x);
	elseif (x <= -5.6e-100)
		tmp = (x * y) / (((x + y) * (x + y)) * (1.0 + x));
	else
		tmp = (x / (1.0 + y)) / (y + x);
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, -8.5e+145], N[(N[(y / x), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1e+32], N[(N[(x / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -5.6e-100], N[(N[(x * y), $MachinePrecision] / N[(N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(1.0 + y), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.5 \cdot 10^{+145}:\\
\;\;\;\;\frac{\frac{y}{x}}{y + x}\\

\mathbf{elif}\;x \leq -1 \cdot 10^{+32}:\\
\;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{x}\\

\mathbf{elif}\;x \leq -5.6 \cdot 10^{-100}:\\
\;\;\;\;\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + x\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{1 + y}}{y + x}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -8.49999999999999977e145

    1. Initial program 69.0%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{x \cdot y}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      2. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
      3. lift-*.f64N/A

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
      4. lift-*.f64N/A

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\color{blue}{\left(x + y\right)} \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      6. 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)} \]
      7. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\color{blue}{\left(x + y\right)} + 1\right)} \]
      8. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
      9. times-fracN/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      10. lower-*.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      11. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      12. lower-*.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      13. +-commutativeN/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      14. lower-+.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      15. +-commutativeN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      16. lower-+.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      17. lower-/.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \color{blue}{\frac{y}{\left(x + y\right) + 1}} \]
      18. add-flipN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)}} \]
      19. metadata-evalN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(x + y\right) - \color{blue}{-1}} \]
      20. lower--.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - -1}} \]
      21. +-commutativeN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
      22. lower-+.f6487.6

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
    3. Applied rewrites87.6%

      \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1}} \]
    4. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      3. lift-+.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1} \]
      4. lift-+.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      5. associate-/r*N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      6. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      7. lower-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      8. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{\color{blue}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      9. lift-+.f6499.8

        \[\leadsto \frac{\frac{x}{y + x}}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
    5. Applied rewrites99.8%

      \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}} \]
      2. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{y + x}}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      3. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      4. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{\color{blue}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      5. lift-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      6. lift-/.f64N/A

        \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \color{blue}{\frac{y}{\left(y + x\right) - -1}} \]
      7. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
      8. lift--.f64N/A

        \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right) - -1}} \]
      9. associate-*l/N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
      10. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
      11. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}}{y + x} \]
      12. lift-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x} \]
      13. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x} \]
      14. lift--.f64N/A

        \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right) - -1}}}{y + x} \]
      15. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1}}{y + x} \]
      16. lift-/.f64N/A

        \[\leadsto \frac{\frac{x}{y + x} \cdot \color{blue}{\frac{y}{\left(y + x\right) - -1}}}{y + x} \]
      17. lift-+.f6499.8

        \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{\color{blue}{y + x}} \]
    7. Applied rewrites99.8%

      \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
    8. Taylor expanded in x around inf

      \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{y + x} \]
    9. Step-by-step derivation
      1. lower-/.f6438.9

        \[\leadsto \frac{\frac{y}{\color{blue}{x}}}{y + x} \]
    10. Applied rewrites38.9%

      \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{y + x} \]

    if -8.49999999999999977e145 < x < -1.00000000000000005e32

    1. Initial program 69.0%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{x \cdot y}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      2. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
      3. lift-*.f64N/A

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
      4. lift-*.f64N/A

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\color{blue}{\left(x + y\right)} \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      6. 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)} \]
      7. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\color{blue}{\left(x + y\right)} + 1\right)} \]
      8. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
      9. times-fracN/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      10. lower-*.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      11. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      12. lower-*.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      13. +-commutativeN/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      14. lower-+.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      15. +-commutativeN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      16. lower-+.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      17. lower-/.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \color{blue}{\frac{y}{\left(x + y\right) + 1}} \]
      18. add-flipN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)}} \]
      19. metadata-evalN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(x + y\right) - \color{blue}{-1}} \]
      20. lower--.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - -1}} \]
      21. +-commutativeN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
      22. lower-+.f6487.6

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
    3. Applied rewrites87.6%

      \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1}} \]
    4. Taylor expanded in x around inf

      \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \color{blue}{\frac{y}{x}} \]
    5. Step-by-step derivation
      1. lower-/.f6446.9

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{x}} \]
    6. Applied rewrites46.9%

      \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \color{blue}{\frac{y}{x}} \]

    if -1.00000000000000005e32 < x < -5.59999999999999991e-100

    1. Initial program 69.0%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. 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.2

        \[\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.2%

      \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(1 + x\right)}} \]

    if -5.59999999999999991e-100 < x

    1. Initial program 69.0%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{x \cdot y}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      2. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
      3. lift-*.f64N/A

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
      4. lift-*.f64N/A

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\color{blue}{\left(x + y\right)} \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      6. 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)} \]
      7. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\color{blue}{\left(x + y\right)} + 1\right)} \]
      8. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
      9. times-fracN/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      10. lower-*.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      11. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      12. lower-*.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      13. +-commutativeN/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      14. lower-+.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      15. +-commutativeN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      16. lower-+.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      17. lower-/.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \color{blue}{\frac{y}{\left(x + y\right) + 1}} \]
      18. add-flipN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)}} \]
      19. metadata-evalN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(x + y\right) - \color{blue}{-1}} \]
      20. lower--.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - -1}} \]
      21. +-commutativeN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
      22. lower-+.f6487.6

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
    3. Applied rewrites87.6%

      \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1}} \]
    4. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      3. lift-+.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1} \]
      4. lift-+.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      5. associate-/r*N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      6. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      7. lower-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      8. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{\color{blue}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      9. lift-+.f6499.8

        \[\leadsto \frac{\frac{x}{y + x}}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
    5. Applied rewrites99.8%

      \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}} \]
      2. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{y + x}}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      3. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      4. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{\color{blue}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      5. lift-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      6. lift-/.f64N/A

        \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \color{blue}{\frac{y}{\left(y + x\right) - -1}} \]
      7. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
      8. lift--.f64N/A

        \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right) - -1}} \]
      9. associate-*l/N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
      10. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
      11. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}}{y + x} \]
      12. lift-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x} \]
      13. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x} \]
      14. lift--.f64N/A

        \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right) - -1}}}{y + x} \]
      15. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1}}{y + x} \]
      16. lift-/.f64N/A

        \[\leadsto \frac{\frac{x}{y + x} \cdot \color{blue}{\frac{y}{\left(y + x\right) - -1}}}{y + x} \]
      17. lift-+.f6499.8

        \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{\color{blue}{y + x}} \]
    7. Applied rewrites99.8%

      \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
    8. Taylor expanded in x around 0

      \[\leadsto \frac{\color{blue}{\frac{x}{1 + y}}}{y + x} \]
    9. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{\frac{x}{\color{blue}{1 + y}}}{y + x} \]
      2. lower-+.f6450.9

        \[\leadsto \frac{\frac{x}{1 + \color{blue}{y}}}{y + x} \]
    10. Applied rewrites50.9%

      \[\leadsto \frac{\color{blue}{\frac{x}{1 + y}}}{y + x} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 13: 64.0% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -8.5 \cdot 10^{+145}:\\ \;\;\;\;\frac{\frac{y}{x}}{y + x}\\ \mathbf{elif}\;x \leq -3.6 \cdot 10^{+31}:\\ \;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{x}\\ \mathbf{elif}\;x \leq -2.2 \cdot 10^{-50}:\\ \;\;\;\;\frac{x \cdot y}{\left(x \cdot x\right) \cdot \left(\left(x + y\right) + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{1 + y}}{y + x}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= x -8.5e+145)
   (/ (/ y x) (+ y x))
   (if (<= x -3.6e+31)
     (* (/ x (* (+ y x) (+ y x))) (/ y x))
     (if (<= x -2.2e-50)
       (/ (* x y) (* (* x x) (+ (+ x y) 1.0)))
       (/ (/ x (+ 1.0 y)) (+ y x))))))
double code(double x, double y) {
	double tmp;
	if (x <= -8.5e+145) {
		tmp = (y / x) / (y + x);
	} else if (x <= -3.6e+31) {
		tmp = (x / ((y + x) * (y + x))) * (y / x);
	} else if (x <= -2.2e-50) {
		tmp = (x * y) / ((x * x) * ((x + y) + 1.0));
	} else {
		tmp = (x / (1.0 + y)) / (y + x);
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (x <= (-8.5d+145)) then
        tmp = (y / x) / (y + x)
    else if (x <= (-3.6d+31)) then
        tmp = (x / ((y + x) * (y + x))) * (y / x)
    else if (x <= (-2.2d-50)) then
        tmp = (x * y) / ((x * x) * ((x + y) + 1.0d0))
    else
        tmp = (x / (1.0d0 + y)) / (y + x)
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (x <= -8.5e+145) {
		tmp = (y / x) / (y + x);
	} else if (x <= -3.6e+31) {
		tmp = (x / ((y + x) * (y + x))) * (y / x);
	} else if (x <= -2.2e-50) {
		tmp = (x * y) / ((x * x) * ((x + y) + 1.0));
	} else {
		tmp = (x / (1.0 + y)) / (y + x);
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= -8.5e+145:
		tmp = (y / x) / (y + x)
	elif x <= -3.6e+31:
		tmp = (x / ((y + x) * (y + x))) * (y / x)
	elif x <= -2.2e-50:
		tmp = (x * y) / ((x * x) * ((x + y) + 1.0))
	else:
		tmp = (x / (1.0 + y)) / (y + x)
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= -8.5e+145)
		tmp = Float64(Float64(y / x) / Float64(y + x));
	elseif (x <= -3.6e+31)
		tmp = Float64(Float64(x / Float64(Float64(y + x) * Float64(y + x))) * Float64(y / x));
	elseif (x <= -2.2e-50)
		tmp = Float64(Float64(x * y) / Float64(Float64(x * x) * Float64(Float64(x + y) + 1.0)));
	else
		tmp = Float64(Float64(x / Float64(1.0 + y)) / Float64(y + x));
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= -8.5e+145)
		tmp = (y / x) / (y + x);
	elseif (x <= -3.6e+31)
		tmp = (x / ((y + x) * (y + x))) * (y / x);
	elseif (x <= -2.2e-50)
		tmp = (x * y) / ((x * x) * ((x + y) + 1.0));
	else
		tmp = (x / (1.0 + y)) / (y + x);
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, -8.5e+145], N[(N[(y / x), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.6e+31], N[(N[(x / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.2e-50], N[(N[(x * y), $MachinePrecision] / N[(N[(x * x), $MachinePrecision] * N[(N[(x + y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(1.0 + y), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.5 \cdot 10^{+145}:\\
\;\;\;\;\frac{\frac{y}{x}}{y + x}\\

\mathbf{elif}\;x \leq -3.6 \cdot 10^{+31}:\\
\;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{x}\\

\mathbf{elif}\;x \leq -2.2 \cdot 10^{-50}:\\
\;\;\;\;\frac{x \cdot y}{\left(x \cdot x\right) \cdot \left(\left(x + y\right) + 1\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{1 + y}}{y + x}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -8.49999999999999977e145

    1. Initial program 69.0%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{x \cdot y}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      2. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
      3. lift-*.f64N/A

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
      4. lift-*.f64N/A

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\color{blue}{\left(x + y\right)} \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      6. 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)} \]
      7. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\color{blue}{\left(x + y\right)} + 1\right)} \]
      8. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
      9. times-fracN/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      10. lower-*.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      11. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      12. lower-*.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      13. +-commutativeN/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      14. lower-+.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      15. +-commutativeN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      16. lower-+.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      17. lower-/.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \color{blue}{\frac{y}{\left(x + y\right) + 1}} \]
      18. add-flipN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)}} \]
      19. metadata-evalN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(x + y\right) - \color{blue}{-1}} \]
      20. lower--.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - -1}} \]
      21. +-commutativeN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
      22. lower-+.f6487.6

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
    3. Applied rewrites87.6%

      \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1}} \]
    4. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      3. lift-+.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1} \]
      4. lift-+.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      5. associate-/r*N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      6. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      7. lower-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      8. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{\color{blue}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      9. lift-+.f6499.8

        \[\leadsto \frac{\frac{x}{y + x}}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
    5. Applied rewrites99.8%

      \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}} \]
      2. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{y + x}}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      3. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      4. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{\color{blue}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      5. lift-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      6. lift-/.f64N/A

        \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \color{blue}{\frac{y}{\left(y + x\right) - -1}} \]
      7. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
      8. lift--.f64N/A

        \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right) - -1}} \]
      9. associate-*l/N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
      10. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
      11. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}}{y + x} \]
      12. lift-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x} \]
      13. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x} \]
      14. lift--.f64N/A

        \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right) - -1}}}{y + x} \]
      15. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1}}{y + x} \]
      16. lift-/.f64N/A

        \[\leadsto \frac{\frac{x}{y + x} \cdot \color{blue}{\frac{y}{\left(y + x\right) - -1}}}{y + x} \]
      17. lift-+.f6499.8

        \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{\color{blue}{y + x}} \]
    7. Applied rewrites99.8%

      \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
    8. Taylor expanded in x around inf

      \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{y + x} \]
    9. Step-by-step derivation
      1. lower-/.f6438.9

        \[\leadsto \frac{\frac{y}{\color{blue}{x}}}{y + x} \]
    10. Applied rewrites38.9%

      \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{y + x} \]

    if -8.49999999999999977e145 < x < -3.59999999999999996e31

    1. Initial program 69.0%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{x \cdot y}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      2. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
      3. lift-*.f64N/A

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
      4. lift-*.f64N/A

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\color{blue}{\left(x + y\right)} \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      6. 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)} \]
      7. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\color{blue}{\left(x + y\right)} + 1\right)} \]
      8. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
      9. times-fracN/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      10. lower-*.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      11. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      12. lower-*.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      13. +-commutativeN/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      14. lower-+.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      15. +-commutativeN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      16. lower-+.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      17. lower-/.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \color{blue}{\frac{y}{\left(x + y\right) + 1}} \]
      18. add-flipN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)}} \]
      19. metadata-evalN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(x + y\right) - \color{blue}{-1}} \]
      20. lower--.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - -1}} \]
      21. +-commutativeN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
      22. lower-+.f6487.6

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
    3. Applied rewrites87.6%

      \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1}} \]
    4. Taylor expanded in x around inf

      \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \color{blue}{\frac{y}{x}} \]
    5. Step-by-step derivation
      1. lower-/.f6446.9

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{x}} \]
    6. Applied rewrites46.9%

      \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \color{blue}{\frac{y}{x}} \]

    if -3.59999999999999996e31 < x < -2.1999999999999999e-50

    1. Initial program 69.0%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Taylor expanded in x around inf

      \[\leadsto \frac{x \cdot y}{\color{blue}{{x}^{2}} \cdot \left(\left(x + y\right) + 1\right)} \]
    3. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \frac{x \cdot y}{\left(x \cdot \color{blue}{x}\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      2. lower-*.f6436.1

        \[\leadsto \frac{x \cdot y}{\left(x \cdot \color{blue}{x}\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    4. Applied rewrites36.1%

      \[\leadsto \frac{x \cdot y}{\color{blue}{\left(x \cdot x\right)} \cdot \left(\left(x + y\right) + 1\right)} \]

    if -2.1999999999999999e-50 < x

    1. Initial program 69.0%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{x \cdot y}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      2. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
      3. lift-*.f64N/A

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
      4. lift-*.f64N/A

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\color{blue}{\left(x + y\right)} \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      6. 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)} \]
      7. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\color{blue}{\left(x + y\right)} + 1\right)} \]
      8. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
      9. times-fracN/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      10. lower-*.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      11. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      12. lower-*.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      13. +-commutativeN/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      14. lower-+.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      15. +-commutativeN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      16. lower-+.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      17. lower-/.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \color{blue}{\frac{y}{\left(x + y\right) + 1}} \]
      18. add-flipN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)}} \]
      19. metadata-evalN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(x + y\right) - \color{blue}{-1}} \]
      20. lower--.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - -1}} \]
      21. +-commutativeN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
      22. lower-+.f6487.6

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
    3. Applied rewrites87.6%

      \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1}} \]
    4. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      3. lift-+.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1} \]
      4. lift-+.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      5. associate-/r*N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      6. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      7. lower-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      8. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{\color{blue}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      9. lift-+.f6499.8

        \[\leadsto \frac{\frac{x}{y + x}}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
    5. Applied rewrites99.8%

      \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}} \]
      2. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{y + x}}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      3. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      4. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{\color{blue}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      5. lift-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      6. lift-/.f64N/A

        \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \color{blue}{\frac{y}{\left(y + x\right) - -1}} \]
      7. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
      8. lift--.f64N/A

        \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right) - -1}} \]
      9. associate-*l/N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
      10. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
      11. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}}{y + x} \]
      12. lift-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x} \]
      13. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x} \]
      14. lift--.f64N/A

        \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right) - -1}}}{y + x} \]
      15. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1}}{y + x} \]
      16. lift-/.f64N/A

        \[\leadsto \frac{\frac{x}{y + x} \cdot \color{blue}{\frac{y}{\left(y + x\right) - -1}}}{y + x} \]
      17. lift-+.f6499.8

        \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{\color{blue}{y + x}} \]
    7. Applied rewrites99.8%

      \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
    8. Taylor expanded in x around 0

      \[\leadsto \frac{\color{blue}{\frac{x}{1 + y}}}{y + x} \]
    9. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{\frac{x}{\color{blue}{1 + y}}}{y + x} \]
      2. lower-+.f6450.9

        \[\leadsto \frac{\frac{x}{1 + \color{blue}{y}}}{y + x} \]
    10. Applied rewrites50.9%

      \[\leadsto \frac{\color{blue}{\frac{x}{1 + y}}}{y + x} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 14: 62.6% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.56 \cdot 10^{-55}:\\ \;\;\;\;\frac{1 \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{1 + y}}{y + x}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= x -1.56e-55)
   (/ (* 1.0 (/ y (- (+ y x) -1.0))) (+ y x))
   (/ (/ x (+ 1.0 y)) (+ y x))))
double code(double x, double y) {
	double tmp;
	if (x <= -1.56e-55) {
		tmp = (1.0 * (y / ((y + x) - -1.0))) / (y + x);
	} else {
		tmp = (x / (1.0 + y)) / (y + x);
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (x <= (-1.56d-55)) then
        tmp = (1.0d0 * (y / ((y + x) - (-1.0d0)))) / (y + x)
    else
        tmp = (x / (1.0d0 + y)) / (y + x)
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (x <= -1.56e-55) {
		tmp = (1.0 * (y / ((y + x) - -1.0))) / (y + x);
	} else {
		tmp = (x / (1.0 + y)) / (y + x);
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= -1.56e-55:
		tmp = (1.0 * (y / ((y + x) - -1.0))) / (y + x)
	else:
		tmp = (x / (1.0 + y)) / (y + x)
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= -1.56e-55)
		tmp = Float64(Float64(1.0 * Float64(y / Float64(Float64(y + x) - -1.0))) / Float64(y + x));
	else
		tmp = Float64(Float64(x / Float64(1.0 + y)) / Float64(y + x));
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= -1.56e-55)
		tmp = (1.0 * (y / ((y + x) - -1.0))) / (y + x);
	else
		tmp = (x / (1.0 + y)) / (y + x);
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, -1.56e-55], N[(N[(1.0 * N[(y / N[(N[(y + x), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(1.0 + y), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.56 \cdot 10^{-55}:\\
\;\;\;\;\frac{1 \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{1 + y}}{y + x}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.56e-55

    1. Initial program 69.0%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{x \cdot y}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      2. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
      3. lift-*.f64N/A

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
      4. lift-*.f64N/A

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\color{blue}{\left(x + y\right)} \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      6. 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)} \]
      7. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\color{blue}{\left(x + y\right)} + 1\right)} \]
      8. lift-+.f64N/A

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
      9. times-fracN/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      10. lower-*.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      11. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      12. lower-*.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      13. +-commutativeN/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      14. lower-+.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      15. +-commutativeN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      16. lower-+.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      17. lower-/.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \color{blue}{\frac{y}{\left(x + y\right) + 1}} \]
      18. add-flipN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)}} \]
      19. metadata-evalN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(x + y\right) - \color{blue}{-1}} \]
      20. lower--.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - -1}} \]
      21. +-commutativeN/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
      22. lower-+.f6487.6

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
    3. Applied rewrites87.6%

      \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1}} \]
    4. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      3. lift-+.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1} \]
      4. lift-+.f64N/A

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      5. associate-/r*N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      6. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      7. lower-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      8. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{\color{blue}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      9. lift-+.f6499.8

        \[\leadsto \frac{\frac{x}{y + x}}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
    5. Applied rewrites99.8%

      \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}} \]
      2. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{y + x}}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      3. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      4. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{\color{blue}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      5. lift-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      6. lift-/.f64N/A

        \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \color{blue}{\frac{y}{\left(y + x\right) - -1}} \]
      7. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
      8. lift--.f64N/A

        \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right) - -1}} \]
      9. associate-*l/N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
      10. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
      11. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}}{y + x} \]
      12. lift-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x} \]
      13. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x} \]
      14. lift--.f64N/A

        \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right) - -1}}}{y + x} \]
      15. lift-+.f64N/A

        \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1}}{y + x} \]
      16. lift-/.f64N/A

        \[\leadsto \frac{\frac{x}{y + x} \cdot \color{blue}{\frac{y}{\left(y + x\right) - -1}}}{y + x} \]
      17. lift-+.f6499.8

        \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{\color{blue}{y + x}} \]
    7. Applied rewrites99.8%

      \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
    8. Taylor expanded in x around inf

      \[\leadsto \frac{\color{blue}{1} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x} \]
    9. Step-by-step derivation
      1. Applied rewrites51.7%

        \[\leadsto \frac{\color{blue}{1} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x} \]

      if -1.56e-55 < x

      1. Initial program 69.0%

        \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      2. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \frac{\color{blue}{x \cdot y}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        2. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        3. lift-*.f64N/A

          \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        4. lift-*.f64N/A

          \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)} \]
        5. lift-+.f64N/A

          \[\leadsto \frac{x \cdot y}{\left(\color{blue}{\left(x + y\right)} \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        6. 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)} \]
        7. lift-+.f64N/A

          \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\color{blue}{\left(x + y\right)} + 1\right)} \]
        8. lift-+.f64N/A

          \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
        9. times-fracN/A

          \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
        10. lower-*.f64N/A

          \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
        11. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
        12. lower-*.f64N/A

          \[\leadsto \frac{x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
        13. +-commutativeN/A

          \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
        14. lower-+.f64N/A

          \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
        15. +-commutativeN/A

          \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
        16. lower-+.f64N/A

          \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
        17. lower-/.f64N/A

          \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \color{blue}{\frac{y}{\left(x + y\right) + 1}} \]
        18. add-flipN/A

          \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)}} \]
        19. metadata-evalN/A

          \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(x + y\right) - \color{blue}{-1}} \]
        20. lower--.f64N/A

          \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - -1}} \]
        21. +-commutativeN/A

          \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
        22. lower-+.f6487.6

          \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
      3. Applied rewrites87.6%

        \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1}} \]
      4. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
        3. lift-+.f64N/A

          \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1} \]
        4. lift-+.f64N/A

          \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
        5. associate-/r*N/A

          \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
        6. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
        7. lower-/.f64N/A

          \[\leadsto \frac{\color{blue}{\frac{x}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
        8. lift-+.f64N/A

          \[\leadsto \frac{\frac{x}{\color{blue}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
        9. lift-+.f6499.8

          \[\leadsto \frac{\frac{x}{y + x}}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      5. Applied rewrites99.8%

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      6. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}} \]
        2. lift-+.f64N/A

          \[\leadsto \frac{\frac{x}{y + x}}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
        3. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
        4. lift-+.f64N/A

          \[\leadsto \frac{\frac{x}{\color{blue}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
        5. lift-/.f64N/A

          \[\leadsto \frac{\color{blue}{\frac{x}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
        6. lift-/.f64N/A

          \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \color{blue}{\frac{y}{\left(y + x\right) - -1}} \]
        7. lift-+.f64N/A

          \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
        8. lift--.f64N/A

          \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right) - -1}} \]
        9. associate-*l/N/A

          \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
        10. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
        11. lower-*.f64N/A

          \[\leadsto \frac{\color{blue}{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}}{y + x} \]
        12. lift-/.f64N/A

          \[\leadsto \frac{\color{blue}{\frac{x}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x} \]
        13. lift-+.f64N/A

          \[\leadsto \frac{\frac{x}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x} \]
        14. lift--.f64N/A

          \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right) - -1}}}{y + x} \]
        15. lift-+.f64N/A

          \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1}}{y + x} \]
        16. lift-/.f64N/A

          \[\leadsto \frac{\frac{x}{y + x} \cdot \color{blue}{\frac{y}{\left(y + x\right) - -1}}}{y + x} \]
        17. lift-+.f6499.8

          \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{\color{blue}{y + x}} \]
      7. Applied rewrites99.8%

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
      8. Taylor expanded in x around 0

        \[\leadsto \frac{\color{blue}{\frac{x}{1 + y}}}{y + x} \]
      9. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{\frac{x}{\color{blue}{1 + y}}}{y + x} \]
        2. lower-+.f6450.9

          \[\leadsto \frac{\frac{x}{1 + \color{blue}{y}}}{y + x} \]
      10. Applied rewrites50.9%

        \[\leadsto \frac{\color{blue}{\frac{x}{1 + y}}}{y + x} \]
    10. Recombined 2 regimes into one program.
    11. Add Preprocessing

    Alternative 15: 62.6% accurate, 1.1× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3.35 \cdot 10^{+15}:\\ \;\;\;\;\frac{\frac{y}{x}}{y + x}\\ \mathbf{elif}\;x \leq -2.2 \cdot 10^{-50}:\\ \;\;\;\;\frac{y}{\left(1 + x\right) \cdot x}\\ \mathbf{elif}\;x \leq 10^{-35}:\\ \;\;\;\;\frac{x}{\left(1 + y\right) \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{y}\\ \end{array} \end{array} \]
    (FPCore (x y)
     :precision binary64
     (if (<= x -3.35e+15)
       (/ (/ y x) (+ y x))
       (if (<= x -2.2e-50)
         (/ y (* (+ 1.0 x) x))
         (if (<= x 1e-35) (/ x (* (+ 1.0 y) y)) (/ (/ x y) y)))))
    double code(double x, double y) {
    	double tmp;
    	if (x <= -3.35e+15) {
    		tmp = (y / x) / (y + x);
    	} else if (x <= -2.2e-50) {
    		tmp = y / ((1.0 + x) * x);
    	} else if (x <= 1e-35) {
    		tmp = x / ((1.0 + y) * y);
    	} else {
    		tmp = (x / y) / 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 (x <= (-3.35d+15)) then
            tmp = (y / x) / (y + x)
        else if (x <= (-2.2d-50)) then
            tmp = y / ((1.0d0 + x) * x)
        else if (x <= 1d-35) then
            tmp = x / ((1.0d0 + y) * y)
        else
            tmp = (x / y) / y
        end if
        code = tmp
    end function
    
    public static double code(double x, double y) {
    	double tmp;
    	if (x <= -3.35e+15) {
    		tmp = (y / x) / (y + x);
    	} else if (x <= -2.2e-50) {
    		tmp = y / ((1.0 + x) * x);
    	} else if (x <= 1e-35) {
    		tmp = x / ((1.0 + y) * y);
    	} else {
    		tmp = (x / y) / y;
    	}
    	return tmp;
    }
    
    def code(x, y):
    	tmp = 0
    	if x <= -3.35e+15:
    		tmp = (y / x) / (y + x)
    	elif x <= -2.2e-50:
    		tmp = y / ((1.0 + x) * x)
    	elif x <= 1e-35:
    		tmp = x / ((1.0 + y) * y)
    	else:
    		tmp = (x / y) / y
    	return tmp
    
    function code(x, y)
    	tmp = 0.0
    	if (x <= -3.35e+15)
    		tmp = Float64(Float64(y / x) / Float64(y + x));
    	elseif (x <= -2.2e-50)
    		tmp = Float64(y / Float64(Float64(1.0 + x) * x));
    	elseif (x <= 1e-35)
    		tmp = Float64(x / Float64(Float64(1.0 + y) * y));
    	else
    		tmp = Float64(Float64(x / y) / y);
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y)
    	tmp = 0.0;
    	if (x <= -3.35e+15)
    		tmp = (y / x) / (y + x);
    	elseif (x <= -2.2e-50)
    		tmp = y / ((1.0 + x) * x);
    	elseif (x <= 1e-35)
    		tmp = x / ((1.0 + y) * y);
    	else
    		tmp = (x / y) / y;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_] := If[LessEqual[x, -3.35e+15], N[(N[(y / x), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.2e-50], N[(y / N[(N[(1.0 + x), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1e-35], N[(x / N[(N[(1.0 + y), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / y), $MachinePrecision]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;x \leq -3.35 \cdot 10^{+15}:\\
    \;\;\;\;\frac{\frac{y}{x}}{y + x}\\
    
    \mathbf{elif}\;x \leq -2.2 \cdot 10^{-50}:\\
    \;\;\;\;\frac{y}{\left(1 + x\right) \cdot x}\\
    
    \mathbf{elif}\;x \leq 10^{-35}:\\
    \;\;\;\;\frac{x}{\left(1 + y\right) \cdot y}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{\frac{x}{y}}{y}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if x < -3.35e15

      1. Initial program 69.0%

        \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      2. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \frac{\color{blue}{x \cdot y}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        2. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        3. lift-*.f64N/A

          \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        4. lift-*.f64N/A

          \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)} \]
        5. lift-+.f64N/A

          \[\leadsto \frac{x \cdot y}{\left(\color{blue}{\left(x + y\right)} \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        6. 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)} \]
        7. lift-+.f64N/A

          \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\color{blue}{\left(x + y\right)} + 1\right)} \]
        8. lift-+.f64N/A

          \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
        9. times-fracN/A

          \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
        10. lower-*.f64N/A

          \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
        11. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
        12. lower-*.f64N/A

          \[\leadsto \frac{x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
        13. +-commutativeN/A

          \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
        14. lower-+.f64N/A

          \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
        15. +-commutativeN/A

          \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
        16. lower-+.f64N/A

          \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
        17. lower-/.f64N/A

          \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \color{blue}{\frac{y}{\left(x + y\right) + 1}} \]
        18. add-flipN/A

          \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)}} \]
        19. metadata-evalN/A

          \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(x + y\right) - \color{blue}{-1}} \]
        20. lower--.f64N/A

          \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - -1}} \]
        21. +-commutativeN/A

          \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
        22. lower-+.f6487.6

          \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
      3. Applied rewrites87.6%

        \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1}} \]
      4. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
        3. lift-+.f64N/A

          \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1} \]
        4. lift-+.f64N/A

          \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
        5. associate-/r*N/A

          \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
        6. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
        7. lower-/.f64N/A

          \[\leadsto \frac{\color{blue}{\frac{x}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
        8. lift-+.f64N/A

          \[\leadsto \frac{\frac{x}{\color{blue}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
        9. lift-+.f6499.8

          \[\leadsto \frac{\frac{x}{y + x}}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      5. Applied rewrites99.8%

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      6. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}} \]
        2. lift-+.f64N/A

          \[\leadsto \frac{\frac{x}{y + x}}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
        3. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
        4. lift-+.f64N/A

          \[\leadsto \frac{\frac{x}{\color{blue}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
        5. lift-/.f64N/A

          \[\leadsto \frac{\color{blue}{\frac{x}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
        6. lift-/.f64N/A

          \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \color{blue}{\frac{y}{\left(y + x\right) - -1}} \]
        7. lift-+.f64N/A

          \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
        8. lift--.f64N/A

          \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right) - -1}} \]
        9. associate-*l/N/A

          \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
        10. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
        11. lower-*.f64N/A

          \[\leadsto \frac{\color{blue}{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}}{y + x} \]
        12. lift-/.f64N/A

          \[\leadsto \frac{\color{blue}{\frac{x}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x} \]
        13. lift-+.f64N/A

          \[\leadsto \frac{\frac{x}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x} \]
        14. lift--.f64N/A

          \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right) - -1}}}{y + x} \]
        15. lift-+.f64N/A

          \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1}}{y + x} \]
        16. lift-/.f64N/A

          \[\leadsto \frac{\frac{x}{y + x} \cdot \color{blue}{\frac{y}{\left(y + x\right) - -1}}}{y + x} \]
        17. lift-+.f6499.8

          \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{\color{blue}{y + x}} \]
      7. Applied rewrites99.8%

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
      8. Taylor expanded in x around inf

        \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{y + x} \]
      9. Step-by-step derivation
        1. lower-/.f6438.9

          \[\leadsto \frac{\frac{y}{\color{blue}{x}}}{y + x} \]
      10. Applied rewrites38.9%

        \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{y + x} \]

      if -3.35e15 < x < -2.1999999999999999e-50

      1. Initial program 69.0%

        \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      2. 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. *-commutativeN/A

          \[\leadsto \frac{y}{\left(1 + x\right) \cdot \color{blue}{x}} \]
        3. lower-*.f64N/A

          \[\leadsto \frac{y}{\left(1 + x\right) \cdot \color{blue}{x}} \]
        4. lower-+.f6448.8

          \[\leadsto \frac{y}{\left(1 + x\right) \cdot x} \]
      4. Applied rewrites48.8%

        \[\leadsto \color{blue}{\frac{y}{\left(1 + x\right) \cdot x}} \]

      if -2.1999999999999999e-50 < x < 1.00000000000000001e-35

      1. Initial program 69.0%

        \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      2. 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. *-commutativeN/A

          \[\leadsto \frac{x}{\left(1 + y\right) \cdot \color{blue}{y}} \]
        3. lower-*.f64N/A

          \[\leadsto \frac{x}{\left(1 + y\right) \cdot \color{blue}{y}} \]
        4. lower-+.f6448.9

          \[\leadsto \frac{x}{\left(1 + y\right) \cdot y} \]
      4. Applied rewrites48.9%

        \[\leadsto \color{blue}{\frac{x}{\left(1 + y\right) \cdot y}} \]

      if 1.00000000000000001e-35 < x

      1. Initial program 69.0%

        \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      2. Taylor expanded in y around inf

        \[\leadsto \color{blue}{\frac{x}{{y}^{2}}} \]
      3. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{x}{\color{blue}{{y}^{2}}} \]
        2. unpow2N/A

          \[\leadsto \frac{x}{y \cdot \color{blue}{y}} \]
        3. lower-*.f6436.2

          \[\leadsto \frac{x}{y \cdot \color{blue}{y}} \]
      4. Applied rewrites36.2%

        \[\leadsto \color{blue}{\frac{x}{y \cdot y}} \]
      5. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \frac{x}{\color{blue}{y \cdot y}} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{x}{y \cdot \color{blue}{y}} \]
        3. associate-/r*N/A

          \[\leadsto \frac{\frac{x}{y}}{\color{blue}{y}} \]
        4. lower-/.f64N/A

          \[\leadsto \frac{\frac{x}{y}}{\color{blue}{y}} \]
        5. lower-/.f6437.7

          \[\leadsto \frac{\frac{x}{y}}{y} \]
      6. Applied rewrites37.7%

        \[\leadsto \frac{\frac{x}{y}}{\color{blue}{y}} \]
    3. Recombined 4 regimes into one program.
    4. Add Preprocessing

    Alternative 16: 62.5% accurate, 1.1× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.56 \cdot 10^{-55}:\\ \;\;\;\;\frac{1}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{1 + y}}{y + x}\\ \end{array} \end{array} \]
    (FPCore (x y)
     :precision binary64
     (if (<= x -1.56e-55)
       (* (/ 1.0 (+ y x)) (/ y (- (+ y x) -1.0)))
       (/ (/ x (+ 1.0 y)) (+ y x))))
    double code(double x, double y) {
    	double tmp;
    	if (x <= -1.56e-55) {
    		tmp = (1.0 / (y + x)) * (y / ((y + x) - -1.0));
    	} else {
    		tmp = (x / (1.0 + y)) / (y + x);
    	}
    	return tmp;
    }
    
    module fmin_fmax_functions
        implicit none
        private
        public fmax
        public fmin
    
        interface fmax
            module procedure fmax88
            module procedure fmax44
            module procedure fmax84
            module procedure fmax48
        end interface
        interface fmin
            module procedure fmin88
            module procedure fmin44
            module procedure fmin84
            module procedure fmin48
        end interface
    contains
        real(8) function fmax88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(4) function fmax44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(8) function fmax84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmax48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
        end function
        real(8) function fmin88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(4) function fmin44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(8) function fmin84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmin48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
        end function
    end module
    
    real(8) function code(x, y)
    use fmin_fmax_functions
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8) :: tmp
        if (x <= (-1.56d-55)) then
            tmp = (1.0d0 / (y + x)) * (y / ((y + x) - (-1.0d0)))
        else
            tmp = (x / (1.0d0 + y)) / (y + x)
        end if
        code = tmp
    end function
    
    public static double code(double x, double y) {
    	double tmp;
    	if (x <= -1.56e-55) {
    		tmp = (1.0 / (y + x)) * (y / ((y + x) - -1.0));
    	} else {
    		tmp = (x / (1.0 + y)) / (y + x);
    	}
    	return tmp;
    }
    
    def code(x, y):
    	tmp = 0
    	if x <= -1.56e-55:
    		tmp = (1.0 / (y + x)) * (y / ((y + x) - -1.0))
    	else:
    		tmp = (x / (1.0 + y)) / (y + x)
    	return tmp
    
    function code(x, y)
    	tmp = 0.0
    	if (x <= -1.56e-55)
    		tmp = Float64(Float64(1.0 / Float64(y + x)) * Float64(y / Float64(Float64(y + x) - -1.0)));
    	else
    		tmp = Float64(Float64(x / Float64(1.0 + y)) / Float64(y + x));
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y)
    	tmp = 0.0;
    	if (x <= -1.56e-55)
    		tmp = (1.0 / (y + x)) * (y / ((y + x) - -1.0));
    	else
    		tmp = (x / (1.0 + y)) / (y + x);
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_] := If[LessEqual[x, -1.56e-55], N[(N[(1.0 / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(y / N[(N[(y + x), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(1.0 + y), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;x \leq -1.56 \cdot 10^{-55}:\\
    \;\;\;\;\frac{1}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{\frac{x}{1 + y}}{y + x}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if x < -1.56e-55

      1. Initial program 69.0%

        \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      2. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \frac{\color{blue}{x \cdot y}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        2. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        3. lift-*.f64N/A

          \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
        4. lift-*.f64N/A

          \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)} \]
        5. lift-+.f64N/A

          \[\leadsto \frac{x \cdot y}{\left(\color{blue}{\left(x + y\right)} \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        6. 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)} \]
        7. lift-+.f64N/A

          \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\color{blue}{\left(x + y\right)} + 1\right)} \]
        8. lift-+.f64N/A

          \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
        9. times-fracN/A

          \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
        10. lower-*.f64N/A

          \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
        11. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
        12. lower-*.f64N/A

          \[\leadsto \frac{x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
        13. +-commutativeN/A

          \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
        14. lower-+.f64N/A

          \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
        15. +-commutativeN/A

          \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
        16. lower-+.f64N/A

          \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
        17. lower-/.f64N/A

          \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \color{blue}{\frac{y}{\left(x + y\right) + 1}} \]
        18. add-flipN/A

          \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)}} \]
        19. metadata-evalN/A

          \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(x + y\right) - \color{blue}{-1}} \]
        20. lower--.f64N/A

          \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - -1}} \]
        21. +-commutativeN/A

          \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
        22. lower-+.f6487.6

          \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
      3. Applied rewrites87.6%

        \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1}} \]
      4. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
        3. lift-+.f64N/A

          \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1} \]
        4. lift-+.f64N/A

          \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
        5. associate-/r*N/A

          \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
        6. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
        7. lower-/.f64N/A

          \[\leadsto \frac{\color{blue}{\frac{x}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
        8. lift-+.f64N/A

          \[\leadsto \frac{\frac{x}{\color{blue}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
        9. lift-+.f6499.8

          \[\leadsto \frac{\frac{x}{y + x}}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      5. Applied rewrites99.8%

        \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
      6. Taylor expanded in x around inf

        \[\leadsto \frac{\color{blue}{1}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
      7. Step-by-step derivation
        1. Applied rewrites51.6%

          \[\leadsto \frac{\color{blue}{1}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]

        if -1.56e-55 < x

        1. Initial program 69.0%

          \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        2. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \frac{\color{blue}{x \cdot y}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          2. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
          3. lift-*.f64N/A

            \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
          4. lift-*.f64N/A

            \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)} \]
          5. lift-+.f64N/A

            \[\leadsto \frac{x \cdot y}{\left(\color{blue}{\left(x + y\right)} \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          6. 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)} \]
          7. lift-+.f64N/A

            \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\color{blue}{\left(x + y\right)} + 1\right)} \]
          8. lift-+.f64N/A

            \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
          9. times-fracN/A

            \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
          10. lower-*.f64N/A

            \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
          11. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
          12. lower-*.f64N/A

            \[\leadsto \frac{x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
          13. +-commutativeN/A

            \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
          14. lower-+.f64N/A

            \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
          15. +-commutativeN/A

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
          16. lower-+.f64N/A

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
          17. lower-/.f64N/A

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \color{blue}{\frac{y}{\left(x + y\right) + 1}} \]
          18. add-flipN/A

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)}} \]
          19. metadata-evalN/A

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(x + y\right) - \color{blue}{-1}} \]
          20. lower--.f64N/A

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - -1}} \]
          21. +-commutativeN/A

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
          22. lower-+.f6487.6

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
        3. Applied rewrites87.6%

          \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1}} \]
        4. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
          3. lift-+.f64N/A

            \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1} \]
          4. lift-+.f64N/A

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
          5. associate-/r*N/A

            \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
          6. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
          7. lower-/.f64N/A

            \[\leadsto \frac{\color{blue}{\frac{x}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
          8. lift-+.f64N/A

            \[\leadsto \frac{\frac{x}{\color{blue}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
          9. lift-+.f6499.8

            \[\leadsto \frac{\frac{x}{y + x}}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
        5. Applied rewrites99.8%

          \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
        6. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}} \]
          2. lift-+.f64N/A

            \[\leadsto \frac{\frac{x}{y + x}}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
          3. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
          4. lift-+.f64N/A

            \[\leadsto \frac{\frac{x}{\color{blue}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
          5. lift-/.f64N/A

            \[\leadsto \frac{\color{blue}{\frac{x}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
          6. lift-/.f64N/A

            \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \color{blue}{\frac{y}{\left(y + x\right) - -1}} \]
          7. lift-+.f64N/A

            \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
          8. lift--.f64N/A

            \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right) - -1}} \]
          9. associate-*l/N/A

            \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
          10. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
          11. lower-*.f64N/A

            \[\leadsto \frac{\color{blue}{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}}{y + x} \]
          12. lift-/.f64N/A

            \[\leadsto \frac{\color{blue}{\frac{x}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x} \]
          13. lift-+.f64N/A

            \[\leadsto \frac{\frac{x}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x} \]
          14. lift--.f64N/A

            \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right) - -1}}}{y + x} \]
          15. lift-+.f64N/A

            \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1}}{y + x} \]
          16. lift-/.f64N/A

            \[\leadsto \frac{\frac{x}{y + x} \cdot \color{blue}{\frac{y}{\left(y + x\right) - -1}}}{y + x} \]
          17. lift-+.f6499.8

            \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{\color{blue}{y + x}} \]
        7. Applied rewrites99.8%

          \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
        8. Taylor expanded in x around 0

          \[\leadsto \frac{\color{blue}{\frac{x}{1 + y}}}{y + x} \]
        9. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{\frac{x}{\color{blue}{1 + y}}}{y + x} \]
          2. lower-+.f6450.9

            \[\leadsto \frac{\frac{x}{1 + \color{blue}{y}}}{y + x} \]
        10. Applied rewrites50.9%

          \[\leadsto \frac{\color{blue}{\frac{x}{1 + y}}}{y + x} \]
      8. Recombined 2 regimes into one program.
      9. Add Preprocessing

      Alternative 17: 62.4% accurate, 1.2× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3.35 \cdot 10^{+15}:\\ \;\;\;\;\frac{\frac{y}{x}}{y + x}\\ \mathbf{elif}\;x \leq -1.56 \cdot 10^{-55}:\\ \;\;\;\;\frac{y}{\left(1 + x\right) \cdot x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{1 + y}}{y + x}\\ \end{array} \end{array} \]
      (FPCore (x y)
       :precision binary64
       (if (<= x -3.35e+15)
         (/ (/ y x) (+ y x))
         (if (<= x -1.56e-55) (/ y (* (+ 1.0 x) x)) (/ (/ x (+ 1.0 y)) (+ y x)))))
      double code(double x, double y) {
      	double tmp;
      	if (x <= -3.35e+15) {
      		tmp = (y / x) / (y + x);
      	} else if (x <= -1.56e-55) {
      		tmp = y / ((1.0 + x) * x);
      	} else {
      		tmp = (x / (1.0 + y)) / (y + x);
      	}
      	return tmp;
      }
      
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(x, y)
      use fmin_fmax_functions
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8) :: tmp
          if (x <= (-3.35d+15)) then
              tmp = (y / x) / (y + x)
          else if (x <= (-1.56d-55)) then
              tmp = y / ((1.0d0 + x) * x)
          else
              tmp = (x / (1.0d0 + y)) / (y + x)
          end if
          code = tmp
      end function
      
      public static double code(double x, double y) {
      	double tmp;
      	if (x <= -3.35e+15) {
      		tmp = (y / x) / (y + x);
      	} else if (x <= -1.56e-55) {
      		tmp = y / ((1.0 + x) * x);
      	} else {
      		tmp = (x / (1.0 + y)) / (y + x);
      	}
      	return tmp;
      }
      
      def code(x, y):
      	tmp = 0
      	if x <= -3.35e+15:
      		tmp = (y / x) / (y + x)
      	elif x <= -1.56e-55:
      		tmp = y / ((1.0 + x) * x)
      	else:
      		tmp = (x / (1.0 + y)) / (y + x)
      	return tmp
      
      function code(x, y)
      	tmp = 0.0
      	if (x <= -3.35e+15)
      		tmp = Float64(Float64(y / x) / Float64(y + x));
      	elseif (x <= -1.56e-55)
      		tmp = Float64(y / Float64(Float64(1.0 + x) * x));
      	else
      		tmp = Float64(Float64(x / Float64(1.0 + y)) / Float64(y + x));
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y)
      	tmp = 0.0;
      	if (x <= -3.35e+15)
      		tmp = (y / x) / (y + x);
      	elseif (x <= -1.56e-55)
      		tmp = y / ((1.0 + x) * x);
      	else
      		tmp = (x / (1.0 + y)) / (y + x);
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_] := If[LessEqual[x, -3.35e+15], N[(N[(y / x), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.56e-55], N[(y / N[(N[(1.0 + x), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(1.0 + y), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;x \leq -3.35 \cdot 10^{+15}:\\
      \;\;\;\;\frac{\frac{y}{x}}{y + x}\\
      
      \mathbf{elif}\;x \leq -1.56 \cdot 10^{-55}:\\
      \;\;\;\;\frac{y}{\left(1 + x\right) \cdot x}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{\frac{x}{1 + y}}{y + x}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if x < -3.35e15

        1. Initial program 69.0%

          \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        2. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \frac{\color{blue}{x \cdot y}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          2. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
          3. lift-*.f64N/A

            \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
          4. lift-*.f64N/A

            \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)} \]
          5. lift-+.f64N/A

            \[\leadsto \frac{x \cdot y}{\left(\color{blue}{\left(x + y\right)} \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          6. 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)} \]
          7. lift-+.f64N/A

            \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\color{blue}{\left(x + y\right)} + 1\right)} \]
          8. lift-+.f64N/A

            \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
          9. times-fracN/A

            \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
          10. lower-*.f64N/A

            \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
          11. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
          12. lower-*.f64N/A

            \[\leadsto \frac{x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
          13. +-commutativeN/A

            \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
          14. lower-+.f64N/A

            \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
          15. +-commutativeN/A

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
          16. lower-+.f64N/A

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
          17. lower-/.f64N/A

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \color{blue}{\frac{y}{\left(x + y\right) + 1}} \]
          18. add-flipN/A

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)}} \]
          19. metadata-evalN/A

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(x + y\right) - \color{blue}{-1}} \]
          20. lower--.f64N/A

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - -1}} \]
          21. +-commutativeN/A

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
          22. lower-+.f6487.6

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
        3. Applied rewrites87.6%

          \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1}} \]
        4. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
          3. lift-+.f64N/A

            \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1} \]
          4. lift-+.f64N/A

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
          5. associate-/r*N/A

            \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
          6. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
          7. lower-/.f64N/A

            \[\leadsto \frac{\color{blue}{\frac{x}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
          8. lift-+.f64N/A

            \[\leadsto \frac{\frac{x}{\color{blue}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
          9. lift-+.f6499.8

            \[\leadsto \frac{\frac{x}{y + x}}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
        5. Applied rewrites99.8%

          \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
        6. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}} \]
          2. lift-+.f64N/A

            \[\leadsto \frac{\frac{x}{y + x}}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
          3. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
          4. lift-+.f64N/A

            \[\leadsto \frac{\frac{x}{\color{blue}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
          5. lift-/.f64N/A

            \[\leadsto \frac{\color{blue}{\frac{x}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
          6. lift-/.f64N/A

            \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \color{blue}{\frac{y}{\left(y + x\right) - -1}} \]
          7. lift-+.f64N/A

            \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
          8. lift--.f64N/A

            \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right) - -1}} \]
          9. associate-*l/N/A

            \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
          10. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
          11. lower-*.f64N/A

            \[\leadsto \frac{\color{blue}{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}}{y + x} \]
          12. lift-/.f64N/A

            \[\leadsto \frac{\color{blue}{\frac{x}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x} \]
          13. lift-+.f64N/A

            \[\leadsto \frac{\frac{x}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x} \]
          14. lift--.f64N/A

            \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right) - -1}}}{y + x} \]
          15. lift-+.f64N/A

            \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1}}{y + x} \]
          16. lift-/.f64N/A

            \[\leadsto \frac{\frac{x}{y + x} \cdot \color{blue}{\frac{y}{\left(y + x\right) - -1}}}{y + x} \]
          17. lift-+.f6499.8

            \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{\color{blue}{y + x}} \]
        7. Applied rewrites99.8%

          \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
        8. Taylor expanded in x around inf

          \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{y + x} \]
        9. Step-by-step derivation
          1. lower-/.f6438.9

            \[\leadsto \frac{\frac{y}{\color{blue}{x}}}{y + x} \]
        10. Applied rewrites38.9%

          \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{y + x} \]

        if -3.35e15 < x < -1.56e-55

        1. Initial program 69.0%

          \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        2. 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. *-commutativeN/A

            \[\leadsto \frac{y}{\left(1 + x\right) \cdot \color{blue}{x}} \]
          3. lower-*.f64N/A

            \[\leadsto \frac{y}{\left(1 + x\right) \cdot \color{blue}{x}} \]
          4. lower-+.f6448.8

            \[\leadsto \frac{y}{\left(1 + x\right) \cdot x} \]
        4. Applied rewrites48.8%

          \[\leadsto \color{blue}{\frac{y}{\left(1 + x\right) \cdot x}} \]

        if -1.56e-55 < x

        1. Initial program 69.0%

          \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        2. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \frac{\color{blue}{x \cdot y}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          2. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
          3. lift-*.f64N/A

            \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
          4. lift-*.f64N/A

            \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)} \]
          5. lift-+.f64N/A

            \[\leadsto \frac{x \cdot y}{\left(\color{blue}{\left(x + y\right)} \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          6. 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)} \]
          7. lift-+.f64N/A

            \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\color{blue}{\left(x + y\right)} + 1\right)} \]
          8. lift-+.f64N/A

            \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
          9. times-fracN/A

            \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
          10. lower-*.f64N/A

            \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
          11. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
          12. lower-*.f64N/A

            \[\leadsto \frac{x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
          13. +-commutativeN/A

            \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
          14. lower-+.f64N/A

            \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
          15. +-commutativeN/A

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
          16. lower-+.f64N/A

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
          17. lower-/.f64N/A

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \color{blue}{\frac{y}{\left(x + y\right) + 1}} \]
          18. add-flipN/A

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)}} \]
          19. metadata-evalN/A

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(x + y\right) - \color{blue}{-1}} \]
          20. lower--.f64N/A

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - -1}} \]
          21. +-commutativeN/A

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
          22. lower-+.f6487.6

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
        3. Applied rewrites87.6%

          \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1}} \]
        4. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
          3. lift-+.f64N/A

            \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1} \]
          4. lift-+.f64N/A

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
          5. associate-/r*N/A

            \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
          6. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
          7. lower-/.f64N/A

            \[\leadsto \frac{\color{blue}{\frac{x}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
          8. lift-+.f64N/A

            \[\leadsto \frac{\frac{x}{\color{blue}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
          9. lift-+.f6499.8

            \[\leadsto \frac{\frac{x}{y + x}}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
        5. Applied rewrites99.8%

          \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
        6. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}} \]
          2. lift-+.f64N/A

            \[\leadsto \frac{\frac{x}{y + x}}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
          3. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
          4. lift-+.f64N/A

            \[\leadsto \frac{\frac{x}{\color{blue}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
          5. lift-/.f64N/A

            \[\leadsto \frac{\color{blue}{\frac{x}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
          6. lift-/.f64N/A

            \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \color{blue}{\frac{y}{\left(y + x\right) - -1}} \]
          7. lift-+.f64N/A

            \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
          8. lift--.f64N/A

            \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right) - -1}} \]
          9. associate-*l/N/A

            \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
          10. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
          11. lower-*.f64N/A

            \[\leadsto \frac{\color{blue}{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}}{y + x} \]
          12. lift-/.f64N/A

            \[\leadsto \frac{\color{blue}{\frac{x}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x} \]
          13. lift-+.f64N/A

            \[\leadsto \frac{\frac{x}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x} \]
          14. lift--.f64N/A

            \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right) - -1}}}{y + x} \]
          15. lift-+.f64N/A

            \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1}}{y + x} \]
          16. lift-/.f64N/A

            \[\leadsto \frac{\frac{x}{y + x} \cdot \color{blue}{\frac{y}{\left(y + x\right) - -1}}}{y + x} \]
          17. lift-+.f6499.8

            \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{\color{blue}{y + x}} \]
        7. Applied rewrites99.8%

          \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
        8. Taylor expanded in x around 0

          \[\leadsto \frac{\color{blue}{\frac{x}{1 + y}}}{y + x} \]
        9. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{\frac{x}{\color{blue}{1 + y}}}{y + x} \]
          2. lower-+.f6450.9

            \[\leadsto \frac{\frac{x}{1 + \color{blue}{y}}}{y + x} \]
        10. Applied rewrites50.9%

          \[\leadsto \frac{\color{blue}{\frac{x}{1 + y}}}{y + x} \]
      3. Recombined 3 regimes into one program.
      4. Add Preprocessing

      Alternative 18: 62.1% accurate, 1.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.56 \cdot 10^{-55}:\\ \;\;\;\;\frac{\frac{y}{1 + x}}{y + x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{1 + y}}{y + x}\\ \end{array} \end{array} \]
      (FPCore (x y)
       :precision binary64
       (if (<= x -1.56e-55) (/ (/ y (+ 1.0 x)) (+ y x)) (/ (/ x (+ 1.0 y)) (+ y x))))
      double code(double x, double y) {
      	double tmp;
      	if (x <= -1.56e-55) {
      		tmp = (y / (1.0 + x)) / (y + x);
      	} else {
      		tmp = (x / (1.0 + y)) / (y + x);
      	}
      	return tmp;
      }
      
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(x, y)
      use fmin_fmax_functions
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8) :: tmp
          if (x <= (-1.56d-55)) then
              tmp = (y / (1.0d0 + x)) / (y + x)
          else
              tmp = (x / (1.0d0 + y)) / (y + x)
          end if
          code = tmp
      end function
      
      public static double code(double x, double y) {
      	double tmp;
      	if (x <= -1.56e-55) {
      		tmp = (y / (1.0 + x)) / (y + x);
      	} else {
      		tmp = (x / (1.0 + y)) / (y + x);
      	}
      	return tmp;
      }
      
      def code(x, y):
      	tmp = 0
      	if x <= -1.56e-55:
      		tmp = (y / (1.0 + x)) / (y + x)
      	else:
      		tmp = (x / (1.0 + y)) / (y + x)
      	return tmp
      
      function code(x, y)
      	tmp = 0.0
      	if (x <= -1.56e-55)
      		tmp = Float64(Float64(y / Float64(1.0 + x)) / Float64(y + x));
      	else
      		tmp = Float64(Float64(x / Float64(1.0 + y)) / Float64(y + x));
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y)
      	tmp = 0.0;
      	if (x <= -1.56e-55)
      		tmp = (y / (1.0 + x)) / (y + x);
      	else
      		tmp = (x / (1.0 + y)) / (y + x);
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_] := If[LessEqual[x, -1.56e-55], N[(N[(y / N[(1.0 + x), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(1.0 + y), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;x \leq -1.56 \cdot 10^{-55}:\\
      \;\;\;\;\frac{\frac{y}{1 + x}}{y + x}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{\frac{x}{1 + y}}{y + x}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if x < -1.56e-55

        1. Initial program 69.0%

          \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        2. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \frac{\color{blue}{x \cdot y}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          2. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
          3. lift-*.f64N/A

            \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
          4. lift-*.f64N/A

            \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)} \]
          5. lift-+.f64N/A

            \[\leadsto \frac{x \cdot y}{\left(\color{blue}{\left(x + y\right)} \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          6. 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)} \]
          7. lift-+.f64N/A

            \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\color{blue}{\left(x + y\right)} + 1\right)} \]
          8. lift-+.f64N/A

            \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
          9. times-fracN/A

            \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
          10. lower-*.f64N/A

            \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
          11. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
          12. lower-*.f64N/A

            \[\leadsto \frac{x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
          13. +-commutativeN/A

            \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
          14. lower-+.f64N/A

            \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
          15. +-commutativeN/A

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
          16. lower-+.f64N/A

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
          17. lower-/.f64N/A

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \color{blue}{\frac{y}{\left(x + y\right) + 1}} \]
          18. add-flipN/A

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)}} \]
          19. metadata-evalN/A

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(x + y\right) - \color{blue}{-1}} \]
          20. lower--.f64N/A

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - -1}} \]
          21. +-commutativeN/A

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
          22. lower-+.f6487.6

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
        3. Applied rewrites87.6%

          \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1}} \]
        4. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
          3. lift-+.f64N/A

            \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1} \]
          4. lift-+.f64N/A

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
          5. associate-/r*N/A

            \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
          6. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
          7. lower-/.f64N/A

            \[\leadsto \frac{\color{blue}{\frac{x}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
          8. lift-+.f64N/A

            \[\leadsto \frac{\frac{x}{\color{blue}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
          9. lift-+.f6499.8

            \[\leadsto \frac{\frac{x}{y + x}}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
        5. Applied rewrites99.8%

          \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
        6. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}} \]
          2. lift-+.f64N/A

            \[\leadsto \frac{\frac{x}{y + x}}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
          3. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
          4. lift-+.f64N/A

            \[\leadsto \frac{\frac{x}{\color{blue}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
          5. lift-/.f64N/A

            \[\leadsto \frac{\color{blue}{\frac{x}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
          6. lift-/.f64N/A

            \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \color{blue}{\frac{y}{\left(y + x\right) - -1}} \]
          7. lift-+.f64N/A

            \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
          8. lift--.f64N/A

            \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right) - -1}} \]
          9. associate-*l/N/A

            \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
          10. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
          11. lower-*.f64N/A

            \[\leadsto \frac{\color{blue}{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}}{y + x} \]
          12. lift-/.f64N/A

            \[\leadsto \frac{\color{blue}{\frac{x}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x} \]
          13. lift-+.f64N/A

            \[\leadsto \frac{\frac{x}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x} \]
          14. lift--.f64N/A

            \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right) - -1}}}{y + x} \]
          15. lift-+.f64N/A

            \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1}}{y + x} \]
          16. lift-/.f64N/A

            \[\leadsto \frac{\frac{x}{y + x} \cdot \color{blue}{\frac{y}{\left(y + x\right) - -1}}}{y + x} \]
          17. lift-+.f6499.8

            \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{\color{blue}{y + x}} \]
        7. Applied rewrites99.8%

          \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
        8. Taylor expanded in y around 0

          \[\leadsto \frac{\color{blue}{\frac{y}{1 + x}}}{y + x} \]
        9. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{\frac{y}{\color{blue}{1 + x}}}{y + x} \]
          2. lower-+.f6450.9

            \[\leadsto \frac{\frac{y}{1 + \color{blue}{x}}}{y + x} \]
        10. Applied rewrites50.9%

          \[\leadsto \frac{\color{blue}{\frac{y}{1 + x}}}{y + x} \]

        if -1.56e-55 < x

        1. Initial program 69.0%

          \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        2. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \frac{\color{blue}{x \cdot y}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          2. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
          3. lift-*.f64N/A

            \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
          4. lift-*.f64N/A

            \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)} \]
          5. lift-+.f64N/A

            \[\leadsto \frac{x \cdot y}{\left(\color{blue}{\left(x + y\right)} \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
          6. 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)} \]
          7. lift-+.f64N/A

            \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\color{blue}{\left(x + y\right)} + 1\right)} \]
          8. lift-+.f64N/A

            \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(\left(x + y\right) + 1\right)}} \]
          9. times-fracN/A

            \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
          10. lower-*.f64N/A

            \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
          11. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
          12. lower-*.f64N/A

            \[\leadsto \frac{x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
          13. +-commutativeN/A

            \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
          14. lower-+.f64N/A

            \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
          15. +-commutativeN/A

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
          16. lower-+.f64N/A

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
          17. lower-/.f64N/A

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \color{blue}{\frac{y}{\left(x + y\right) + 1}} \]
          18. add-flipN/A

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - \left(\mathsf{neg}\left(1\right)\right)}} \]
          19. metadata-evalN/A

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(x + y\right) - \color{blue}{-1}} \]
          20. lower--.f64N/A

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) - -1}} \]
          21. +-commutativeN/A

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
          22. lower-+.f6487.6

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
        3. Applied rewrites87.6%

          \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1}} \]
        4. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
          3. lift-+.f64N/A

            \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(y + x\right)} \cdot \frac{y}{\left(y + x\right) - -1} \]
          4. lift-+.f64N/A

            \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(y + x\right) - -1} \]
          5. associate-/r*N/A

            \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
          6. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
          7. lower-/.f64N/A

            \[\leadsto \frac{\color{blue}{\frac{x}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
          8. lift-+.f64N/A

            \[\leadsto \frac{\frac{x}{\color{blue}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
          9. lift-+.f6499.8

            \[\leadsto \frac{\frac{x}{y + x}}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
        5. Applied rewrites99.8%

          \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
        6. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}} \]
          2. lift-+.f64N/A

            \[\leadsto \frac{\frac{x}{y + x}}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
          3. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{x}{y + x}}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1} \]
          4. lift-+.f64N/A

            \[\leadsto \frac{\frac{x}{\color{blue}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
          5. lift-/.f64N/A

            \[\leadsto \frac{\color{blue}{\frac{x}{y + x}}}{y + x} \cdot \frac{y}{\left(y + x\right) - -1} \]
          6. lift-/.f64N/A

            \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \color{blue}{\frac{y}{\left(y + x\right) - -1}} \]
          7. lift-+.f64N/A

            \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1} \]
          8. lift--.f64N/A

            \[\leadsto \frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right) - -1}} \]
          9. associate-*l/N/A

            \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
          10. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
          11. lower-*.f64N/A

            \[\leadsto \frac{\color{blue}{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}}{y + x} \]
          12. lift-/.f64N/A

            \[\leadsto \frac{\color{blue}{\frac{x}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x} \]
          13. lift-+.f64N/A

            \[\leadsto \frac{\frac{x}{\color{blue}{y + x}} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x} \]
          14. lift--.f64N/A

            \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right) - -1}}}{y + x} \]
          15. lift-+.f64N/A

            \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\color{blue}{\left(y + x\right)} - -1}}{y + x} \]
          16. lift-/.f64N/A

            \[\leadsto \frac{\frac{x}{y + x} \cdot \color{blue}{\frac{y}{\left(y + x\right) - -1}}}{y + x} \]
          17. lift-+.f6499.8

            \[\leadsto \frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{\color{blue}{y + x}} \]
        7. Applied rewrites99.8%

          \[\leadsto \color{blue}{\frac{\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) - -1}}{y + x}} \]
        8. Taylor expanded in x around 0

          \[\leadsto \frac{\color{blue}{\frac{x}{1 + y}}}{y + x} \]
        9. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{\frac{x}{\color{blue}{1 + y}}}{y + x} \]
          2. lower-+.f6450.9

            \[\leadsto \frac{\frac{x}{1 + \color{blue}{y}}}{y + x} \]
        10. Applied rewrites50.9%

          \[\leadsto \frac{\color{blue}{\frac{x}{1 + y}}}{y + x} \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 19: 62.1% accurate, 1.1× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -4 \cdot 10^{+153}:\\ \;\;\;\;\frac{\frac{y}{x}}{x}\\ \mathbf{elif}\;x \leq -2.2 \cdot 10^{-50}:\\ \;\;\;\;\frac{y}{\left(1 + x\right) \cdot x}\\ \mathbf{elif}\;x \leq 10^{-35}:\\ \;\;\;\;\frac{x}{\left(1 + y\right) \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{y}\\ \end{array} \end{array} \]
      (FPCore (x y)
       :precision binary64
       (if (<= x -4e+153)
         (/ (/ y x) x)
         (if (<= x -2.2e-50)
           (/ y (* (+ 1.0 x) x))
           (if (<= x 1e-35) (/ x (* (+ 1.0 y) y)) (/ (/ x y) y)))))
      double code(double x, double y) {
      	double tmp;
      	if (x <= -4e+153) {
      		tmp = (y / x) / x;
      	} else if (x <= -2.2e-50) {
      		tmp = y / ((1.0 + x) * x);
      	} else if (x <= 1e-35) {
      		tmp = x / ((1.0 + y) * y);
      	} else {
      		tmp = (x / y) / 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 (x <= (-4d+153)) then
              tmp = (y / x) / x
          else if (x <= (-2.2d-50)) then
              tmp = y / ((1.0d0 + x) * x)
          else if (x <= 1d-35) then
              tmp = x / ((1.0d0 + y) * y)
          else
              tmp = (x / y) / y
          end if
          code = tmp
      end function
      
      public static double code(double x, double y) {
      	double tmp;
      	if (x <= -4e+153) {
      		tmp = (y / x) / x;
      	} else if (x <= -2.2e-50) {
      		tmp = y / ((1.0 + x) * x);
      	} else if (x <= 1e-35) {
      		tmp = x / ((1.0 + y) * y);
      	} else {
      		tmp = (x / y) / y;
      	}
      	return tmp;
      }
      
      def code(x, y):
      	tmp = 0
      	if x <= -4e+153:
      		tmp = (y / x) / x
      	elif x <= -2.2e-50:
      		tmp = y / ((1.0 + x) * x)
      	elif x <= 1e-35:
      		tmp = x / ((1.0 + y) * y)
      	else:
      		tmp = (x / y) / y
      	return tmp
      
      function code(x, y)
      	tmp = 0.0
      	if (x <= -4e+153)
      		tmp = Float64(Float64(y / x) / x);
      	elseif (x <= -2.2e-50)
      		tmp = Float64(y / Float64(Float64(1.0 + x) * x));
      	elseif (x <= 1e-35)
      		tmp = Float64(x / Float64(Float64(1.0 + y) * y));
      	else
      		tmp = Float64(Float64(x / y) / y);
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y)
      	tmp = 0.0;
      	if (x <= -4e+153)
      		tmp = (y / x) / x;
      	elseif (x <= -2.2e-50)
      		tmp = y / ((1.0 + x) * x);
      	elseif (x <= 1e-35)
      		tmp = x / ((1.0 + y) * y);
      	else
      		tmp = (x / y) / y;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_] := If[LessEqual[x, -4e+153], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, -2.2e-50], N[(y / N[(N[(1.0 + x), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1e-35], N[(x / N[(N[(1.0 + y), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / y), $MachinePrecision]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;x \leq -4 \cdot 10^{+153}:\\
      \;\;\;\;\frac{\frac{y}{x}}{x}\\
      
      \mathbf{elif}\;x \leq -2.2 \cdot 10^{-50}:\\
      \;\;\;\;\frac{y}{\left(1 + x\right) \cdot x}\\
      
      \mathbf{elif}\;x \leq 10^{-35}:\\
      \;\;\;\;\frac{x}{\left(1 + y\right) \cdot y}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{\frac{x}{y}}{y}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if x < -4e153

        1. Initial program 69.0%

          \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        2. Taylor expanded in x around inf

          \[\leadsto \color{blue}{\frac{y}{{x}^{2}}} \]
        3. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{y}{\color{blue}{{x}^{2}}} \]
          2. unpow2N/A

            \[\leadsto \frac{y}{x \cdot \color{blue}{x}} \]
          3. lower-*.f6436.9

            \[\leadsto \frac{y}{x \cdot \color{blue}{x}} \]
        4. Applied rewrites36.9%

          \[\leadsto \color{blue}{\frac{y}{x \cdot x}} \]
        5. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \frac{y}{x \cdot \color{blue}{x}} \]
          2. lift-/.f64N/A

            \[\leadsto \frac{y}{\color{blue}{x \cdot x}} \]
          3. associate-/r*N/A

            \[\leadsto \frac{\frac{y}{x}}{\color{blue}{x}} \]
          4. lower-/.f64N/A

            \[\leadsto \frac{\frac{y}{x}}{\color{blue}{x}} \]
          5. lift-/.f6438.5

            \[\leadsto \frac{\frac{y}{x}}{x} \]
        6. Applied rewrites38.5%

          \[\leadsto \frac{\frac{y}{x}}{\color{blue}{x}} \]

        if -4e153 < x < -2.1999999999999999e-50

        1. Initial program 69.0%

          \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        2. 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. *-commutativeN/A

            \[\leadsto \frac{y}{\left(1 + x\right) \cdot \color{blue}{x}} \]
          3. lower-*.f64N/A

            \[\leadsto \frac{y}{\left(1 + x\right) \cdot \color{blue}{x}} \]
          4. lower-+.f6448.8

            \[\leadsto \frac{y}{\left(1 + x\right) \cdot x} \]
        4. Applied rewrites48.8%

          \[\leadsto \color{blue}{\frac{y}{\left(1 + x\right) \cdot x}} \]

        if -2.1999999999999999e-50 < x < 1.00000000000000001e-35

        1. Initial program 69.0%

          \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        2. 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. *-commutativeN/A

            \[\leadsto \frac{x}{\left(1 + y\right) \cdot \color{blue}{y}} \]
          3. lower-*.f64N/A

            \[\leadsto \frac{x}{\left(1 + y\right) \cdot \color{blue}{y}} \]
          4. lower-+.f6448.9

            \[\leadsto \frac{x}{\left(1 + y\right) \cdot y} \]
        4. Applied rewrites48.9%

          \[\leadsto \color{blue}{\frac{x}{\left(1 + y\right) \cdot y}} \]

        if 1.00000000000000001e-35 < x

        1. Initial program 69.0%

          \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        2. Taylor expanded in y around inf

          \[\leadsto \color{blue}{\frac{x}{{y}^{2}}} \]
        3. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{x}{\color{blue}{{y}^{2}}} \]
          2. unpow2N/A

            \[\leadsto \frac{x}{y \cdot \color{blue}{y}} \]
          3. lower-*.f6436.2

            \[\leadsto \frac{x}{y \cdot \color{blue}{y}} \]
        4. Applied rewrites36.2%

          \[\leadsto \color{blue}{\frac{x}{y \cdot y}} \]
        5. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \frac{x}{\color{blue}{y \cdot y}} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{x}{y \cdot \color{blue}{y}} \]
          3. associate-/r*N/A

            \[\leadsto \frac{\frac{x}{y}}{\color{blue}{y}} \]
          4. lower-/.f64N/A

            \[\leadsto \frac{\frac{x}{y}}{\color{blue}{y}} \]
          5. lower-/.f6437.7

            \[\leadsto \frac{\frac{x}{y}}{y} \]
        6. Applied rewrites37.7%

          \[\leadsto \frac{\frac{x}{y}}{\color{blue}{y}} \]
      3. Recombined 4 regimes into one program.
      4. Add Preprocessing

      Alternative 20: 62.0% accurate, 1.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -38:\\ \;\;\;\;\frac{\frac{y}{x}}{x}\\ \mathbf{elif}\;x \leq 10^{-35}:\\ \;\;\;\;\frac{x}{\left(1 + y\right) \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{y}\\ \end{array} \end{array} \]
      (FPCore (x y)
       :precision binary64
       (if (<= x -38.0)
         (/ (/ y x) x)
         (if (<= x 1e-35) (/ x (* (+ 1.0 y) y)) (/ (/ x y) y))))
      double code(double x, double y) {
      	double tmp;
      	if (x <= -38.0) {
      		tmp = (y / x) / x;
      	} else if (x <= 1e-35) {
      		tmp = x / ((1.0 + y) * y);
      	} else {
      		tmp = (x / y) / 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 (x <= (-38.0d0)) then
              tmp = (y / x) / x
          else if (x <= 1d-35) then
              tmp = x / ((1.0d0 + y) * y)
          else
              tmp = (x / y) / y
          end if
          code = tmp
      end function
      
      public static double code(double x, double y) {
      	double tmp;
      	if (x <= -38.0) {
      		tmp = (y / x) / x;
      	} else if (x <= 1e-35) {
      		tmp = x / ((1.0 + y) * y);
      	} else {
      		tmp = (x / y) / y;
      	}
      	return tmp;
      }
      
      def code(x, y):
      	tmp = 0
      	if x <= -38.0:
      		tmp = (y / x) / x
      	elif x <= 1e-35:
      		tmp = x / ((1.0 + y) * y)
      	else:
      		tmp = (x / y) / y
      	return tmp
      
      function code(x, y)
      	tmp = 0.0
      	if (x <= -38.0)
      		tmp = Float64(Float64(y / x) / x);
      	elseif (x <= 1e-35)
      		tmp = Float64(x / Float64(Float64(1.0 + y) * y));
      	else
      		tmp = Float64(Float64(x / y) / y);
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y)
      	tmp = 0.0;
      	if (x <= -38.0)
      		tmp = (y / x) / x;
      	elseif (x <= 1e-35)
      		tmp = x / ((1.0 + y) * y);
      	else
      		tmp = (x / y) / y;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_] := If[LessEqual[x, -38.0], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, 1e-35], N[(x / N[(N[(1.0 + y), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / y), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;x \leq -38:\\
      \;\;\;\;\frac{\frac{y}{x}}{x}\\
      
      \mathbf{elif}\;x \leq 10^{-35}:\\
      \;\;\;\;\frac{x}{\left(1 + y\right) \cdot y}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{\frac{x}{y}}{y}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if x < -38

        1. Initial program 69.0%

          \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        2. Taylor expanded in x around inf

          \[\leadsto \color{blue}{\frac{y}{{x}^{2}}} \]
        3. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{y}{\color{blue}{{x}^{2}}} \]
          2. unpow2N/A

            \[\leadsto \frac{y}{x \cdot \color{blue}{x}} \]
          3. lower-*.f6436.9

            \[\leadsto \frac{y}{x \cdot \color{blue}{x}} \]
        4. Applied rewrites36.9%

          \[\leadsto \color{blue}{\frac{y}{x \cdot x}} \]
        5. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \frac{y}{x \cdot \color{blue}{x}} \]
          2. lift-/.f64N/A

            \[\leadsto \frac{y}{\color{blue}{x \cdot x}} \]
          3. associate-/r*N/A

            \[\leadsto \frac{\frac{y}{x}}{\color{blue}{x}} \]
          4. lower-/.f64N/A

            \[\leadsto \frac{\frac{y}{x}}{\color{blue}{x}} \]
          5. lift-/.f6438.5

            \[\leadsto \frac{\frac{y}{x}}{x} \]
        6. Applied rewrites38.5%

          \[\leadsto \frac{\frac{y}{x}}{\color{blue}{x}} \]

        if -38 < x < 1.00000000000000001e-35

        1. Initial program 69.0%

          \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        2. 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. *-commutativeN/A

            \[\leadsto \frac{x}{\left(1 + y\right) \cdot \color{blue}{y}} \]
          3. lower-*.f64N/A

            \[\leadsto \frac{x}{\left(1 + y\right) \cdot \color{blue}{y}} \]
          4. lower-+.f6448.9

            \[\leadsto \frac{x}{\left(1 + y\right) \cdot y} \]
        4. Applied rewrites48.9%

          \[\leadsto \color{blue}{\frac{x}{\left(1 + y\right) \cdot y}} \]

        if 1.00000000000000001e-35 < x

        1. Initial program 69.0%

          \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        2. Taylor expanded in y around inf

          \[\leadsto \color{blue}{\frac{x}{{y}^{2}}} \]
        3. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{x}{\color{blue}{{y}^{2}}} \]
          2. unpow2N/A

            \[\leadsto \frac{x}{y \cdot \color{blue}{y}} \]
          3. lower-*.f6436.2

            \[\leadsto \frac{x}{y \cdot \color{blue}{y}} \]
        4. Applied rewrites36.2%

          \[\leadsto \color{blue}{\frac{x}{y \cdot y}} \]
        5. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \frac{x}{\color{blue}{y \cdot y}} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{x}{y \cdot \color{blue}{y}} \]
          3. associate-/r*N/A

            \[\leadsto \frac{\frac{x}{y}}{\color{blue}{y}} \]
          4. lower-/.f64N/A

            \[\leadsto \frac{\frac{x}{y}}{\color{blue}{y}} \]
          5. lower-/.f6437.7

            \[\leadsto \frac{\frac{x}{y}}{y} \]
        6. Applied rewrites37.7%

          \[\leadsto \frac{\frac{x}{y}}{\color{blue}{y}} \]
      3. Recombined 3 regimes into one program.
      4. Add Preprocessing

      Alternative 21: 51.2% accurate, 2.1× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 27000000000000:\\ \;\;\;\;\frac{\frac{y}{x}}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{y}\\ \end{array} \end{array} \]
      (FPCore (x y)
       :precision binary64
       (if (<= y 27000000000000.0) (/ (/ y x) x) (/ (/ x y) y)))
      double code(double x, double y) {
      	double tmp;
      	if (y <= 27000000000000.0) {
      		tmp = (y / x) / x;
      	} else {
      		tmp = (x / y) / 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 <= 27000000000000.0d0) then
              tmp = (y / x) / x
          else
              tmp = (x / y) / y
          end if
          code = tmp
      end function
      
      public static double code(double x, double y) {
      	double tmp;
      	if (y <= 27000000000000.0) {
      		tmp = (y / x) / x;
      	} else {
      		tmp = (x / y) / y;
      	}
      	return tmp;
      }
      
      def code(x, y):
      	tmp = 0
      	if y <= 27000000000000.0:
      		tmp = (y / x) / x
      	else:
      		tmp = (x / y) / y
      	return tmp
      
      function code(x, y)
      	tmp = 0.0
      	if (y <= 27000000000000.0)
      		tmp = Float64(Float64(y / x) / x);
      	else
      		tmp = Float64(Float64(x / y) / y);
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y)
      	tmp = 0.0;
      	if (y <= 27000000000000.0)
      		tmp = (y / x) / x;
      	else
      		tmp = (x / y) / y;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_] := If[LessEqual[y, 27000000000000.0], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / y), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;y \leq 27000000000000:\\
      \;\;\;\;\frac{\frac{y}{x}}{x}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{\frac{x}{y}}{y}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if y < 2.7e13

        1. Initial program 69.0%

          \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        2. Taylor expanded in x around inf

          \[\leadsto \color{blue}{\frac{y}{{x}^{2}}} \]
        3. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{y}{\color{blue}{{x}^{2}}} \]
          2. unpow2N/A

            \[\leadsto \frac{y}{x \cdot \color{blue}{x}} \]
          3. lower-*.f6436.9

            \[\leadsto \frac{y}{x \cdot \color{blue}{x}} \]
        4. Applied rewrites36.9%

          \[\leadsto \color{blue}{\frac{y}{x \cdot x}} \]
        5. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \frac{y}{x \cdot \color{blue}{x}} \]
          2. lift-/.f64N/A

            \[\leadsto \frac{y}{\color{blue}{x \cdot x}} \]
          3. associate-/r*N/A

            \[\leadsto \frac{\frac{y}{x}}{\color{blue}{x}} \]
          4. lower-/.f64N/A

            \[\leadsto \frac{\frac{y}{x}}{\color{blue}{x}} \]
          5. lift-/.f6438.5

            \[\leadsto \frac{\frac{y}{x}}{x} \]
        6. Applied rewrites38.5%

          \[\leadsto \frac{\frac{y}{x}}{\color{blue}{x}} \]

        if 2.7e13 < y

        1. Initial program 69.0%

          \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        2. Taylor expanded in y around inf

          \[\leadsto \color{blue}{\frac{x}{{y}^{2}}} \]
        3. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{x}{\color{blue}{{y}^{2}}} \]
          2. unpow2N/A

            \[\leadsto \frac{x}{y \cdot \color{blue}{y}} \]
          3. lower-*.f6436.2

            \[\leadsto \frac{x}{y \cdot \color{blue}{y}} \]
        4. Applied rewrites36.2%

          \[\leadsto \color{blue}{\frac{x}{y \cdot y}} \]
        5. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \frac{x}{\color{blue}{y \cdot y}} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{x}{y \cdot \color{blue}{y}} \]
          3. associate-/r*N/A

            \[\leadsto \frac{\frac{x}{y}}{\color{blue}{y}} \]
          4. lower-/.f64N/A

            \[\leadsto \frac{\frac{x}{y}}{\color{blue}{y}} \]
          5. lower-/.f6437.7

            \[\leadsto \frac{\frac{x}{y}}{y} \]
        6. Applied rewrites37.7%

          \[\leadsto \frac{\frac{x}{y}}{\color{blue}{y}} \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 22: 50.4% accurate, 2.1× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 27000000000000:\\ \;\;\;\;\frac{y}{x \cdot x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{y}\\ \end{array} \end{array} \]
      (FPCore (x y)
       :precision binary64
       (if (<= y 27000000000000.0) (/ y (* x x)) (/ (/ x y) y)))
      double code(double x, double y) {
      	double tmp;
      	if (y <= 27000000000000.0) {
      		tmp = y / (x * x);
      	} else {
      		tmp = (x / y) / 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 <= 27000000000000.0d0) then
              tmp = y / (x * x)
          else
              tmp = (x / y) / y
          end if
          code = tmp
      end function
      
      public static double code(double x, double y) {
      	double tmp;
      	if (y <= 27000000000000.0) {
      		tmp = y / (x * x);
      	} else {
      		tmp = (x / y) / y;
      	}
      	return tmp;
      }
      
      def code(x, y):
      	tmp = 0
      	if y <= 27000000000000.0:
      		tmp = y / (x * x)
      	else:
      		tmp = (x / y) / y
      	return tmp
      
      function code(x, y)
      	tmp = 0.0
      	if (y <= 27000000000000.0)
      		tmp = Float64(y / Float64(x * x));
      	else
      		tmp = Float64(Float64(x / y) / y);
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y)
      	tmp = 0.0;
      	if (y <= 27000000000000.0)
      		tmp = y / (x * x);
      	else
      		tmp = (x / y) / y;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_] := If[LessEqual[y, 27000000000000.0], N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / y), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;y \leq 27000000000000:\\
      \;\;\;\;\frac{y}{x \cdot x}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{\frac{x}{y}}{y}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if y < 2.7e13

        1. Initial program 69.0%

          \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        2. Taylor expanded in x around inf

          \[\leadsto \color{blue}{\frac{y}{{x}^{2}}} \]
        3. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{y}{\color{blue}{{x}^{2}}} \]
          2. unpow2N/A

            \[\leadsto \frac{y}{x \cdot \color{blue}{x}} \]
          3. lower-*.f6436.9

            \[\leadsto \frac{y}{x \cdot \color{blue}{x}} \]
        4. Applied rewrites36.9%

          \[\leadsto \color{blue}{\frac{y}{x \cdot x}} \]

        if 2.7e13 < y

        1. Initial program 69.0%

          \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        2. Taylor expanded in y around inf

          \[\leadsto \color{blue}{\frac{x}{{y}^{2}}} \]
        3. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{x}{\color{blue}{{y}^{2}}} \]
          2. unpow2N/A

            \[\leadsto \frac{x}{y \cdot \color{blue}{y}} \]
          3. lower-*.f6436.2

            \[\leadsto \frac{x}{y \cdot \color{blue}{y}} \]
        4. Applied rewrites36.2%

          \[\leadsto \color{blue}{\frac{x}{y \cdot y}} \]
        5. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \frac{x}{\color{blue}{y \cdot y}} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{x}{y \cdot \color{blue}{y}} \]
          3. associate-/r*N/A

            \[\leadsto \frac{\frac{x}{y}}{\color{blue}{y}} \]
          4. lower-/.f64N/A

            \[\leadsto \frac{\frac{x}{y}}{\color{blue}{y}} \]
          5. lower-/.f6437.7

            \[\leadsto \frac{\frac{x}{y}}{y} \]
        6. Applied rewrites37.7%

          \[\leadsto \frac{\frac{x}{y}}{\color{blue}{y}} \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 23: 49.6% accurate, 2.2× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 27000000000000:\\ \;\;\;\;\frac{y}{x \cdot x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot y}\\ \end{array} \end{array} \]
      (FPCore (x y)
       :precision binary64
       (if (<= y 27000000000000.0) (/ y (* x x)) (/ x (* y y))))
      double code(double x, double y) {
      	double tmp;
      	if (y <= 27000000000000.0) {
      		tmp = y / (x * x);
      	} else {
      		tmp = x / (y * 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 <= 27000000000000.0d0) then
              tmp = y / (x * x)
          else
              tmp = x / (y * y)
          end if
          code = tmp
      end function
      
      public static double code(double x, double y) {
      	double tmp;
      	if (y <= 27000000000000.0) {
      		tmp = y / (x * x);
      	} else {
      		tmp = x / (y * y);
      	}
      	return tmp;
      }
      
      def code(x, y):
      	tmp = 0
      	if y <= 27000000000000.0:
      		tmp = y / (x * x)
      	else:
      		tmp = x / (y * y)
      	return tmp
      
      function code(x, y)
      	tmp = 0.0
      	if (y <= 27000000000000.0)
      		tmp = Float64(y / Float64(x * x));
      	else
      		tmp = Float64(x / Float64(y * y));
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y)
      	tmp = 0.0;
      	if (y <= 27000000000000.0)
      		tmp = y / (x * x);
      	else
      		tmp = x / (y * y);
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_] := If[LessEqual[y, 27000000000000.0], N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;y \leq 27000000000000:\\
      \;\;\;\;\frac{y}{x \cdot x}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{x}{y \cdot y}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if y < 2.7e13

        1. Initial program 69.0%

          \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        2. Taylor expanded in x around inf

          \[\leadsto \color{blue}{\frac{y}{{x}^{2}}} \]
        3. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{y}{\color{blue}{{x}^{2}}} \]
          2. unpow2N/A

            \[\leadsto \frac{y}{x \cdot \color{blue}{x}} \]
          3. lower-*.f6436.9

            \[\leadsto \frac{y}{x \cdot \color{blue}{x}} \]
        4. Applied rewrites36.9%

          \[\leadsto \color{blue}{\frac{y}{x \cdot x}} \]

        if 2.7e13 < y

        1. Initial program 69.0%

          \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        2. Taylor expanded in y around inf

          \[\leadsto \color{blue}{\frac{x}{{y}^{2}}} \]
        3. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{x}{\color{blue}{{y}^{2}}} \]
          2. unpow2N/A

            \[\leadsto \frac{x}{y \cdot \color{blue}{y}} \]
          3. lower-*.f6436.2

            \[\leadsto \frac{x}{y \cdot \color{blue}{y}} \]
        4. Applied rewrites36.2%

          \[\leadsto \color{blue}{\frac{x}{y \cdot y}} \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 24: 36.2% accurate, 3.3× speedup?

      \[\begin{array}{l} \\ \frac{x}{y \cdot y} \end{array} \]
      (FPCore (x y) :precision binary64 (/ x (* y y)))
      double code(double x, double y) {
      	return x / (y * 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 * y)
      end function
      
      public static double code(double x, double y) {
      	return x / (y * y);
      }
      
      def code(x, y):
      	return x / (y * y)
      
      function code(x, y)
      	return Float64(x / Float64(y * y))
      end
      
      function tmp = code(x, y)
      	tmp = x / (y * y);
      end
      
      code[x_, y_] := N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision]
      
      \begin{array}{l}
      
      \\
      \frac{x}{y \cdot y}
      \end{array}
      
      Derivation
      1. Initial program 69.0%

        \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      2. Taylor expanded in y around inf

        \[\leadsto \color{blue}{\frac{x}{{y}^{2}}} \]
      3. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{x}{\color{blue}{{y}^{2}}} \]
        2. unpow2N/A

          \[\leadsto \frac{x}{y \cdot \color{blue}{y}} \]
        3. lower-*.f6436.2

          \[\leadsto \frac{x}{y \cdot \color{blue}{y}} \]
      4. Applied rewrites36.2%

        \[\leadsto \color{blue}{\frac{x}{y \cdot y}} \]
      5. Add Preprocessing

      Reproduce

      ?
      herbie shell --seed 2025134 
      (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))))