Codec.Picture.Types:toneMapping from JuicyPixels-3.2.6.1

Percentage Accurate: 88.9% → 99.9%
Time: 2.9s
Alternatives: 15
Speedup: 1.0×

Specification

?
\[\frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1} \]
(FPCore (x y)
  :precision binary64
  :pre TRUE
  (/ (* x (+ (/ x y) 1.0)) (+ x 1.0)))
double code(double x, double y) {
	return (x * ((x / y) + 1.0)) / (x + 1.0);
}
real(8) function code(x, y)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = (x * ((x / y) + 1.0d0)) / (x + 1.0d0)
end function
public static double code(double x, double y) {
	return (x * ((x / y) + 1.0)) / (x + 1.0);
}
def code(x, y):
	return (x * ((x / y) + 1.0)) / (x + 1.0)
function code(x, y)
	return Float64(Float64(x * Float64(Float64(x / y) + 1.0)) / Float64(x + 1.0))
end
function tmp = code(x, y)
	tmp = (x * ((x / y) + 1.0)) / (x + 1.0);
end
code[x_, y_] := N[(N[(x * N[(N[(x / y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]
f(x, y):
	x in [-inf, +inf],
	y in [-inf, +inf]
code: THEORY
BEGIN
f(x, y: real): real =
	(x * ((x / y) + (1))) / (x + (1))
END code
\frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1}

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

\[\frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1} \]
(FPCore (x y)
  :precision binary64
  :pre TRUE
  (/ (* x (+ (/ x y) 1.0)) (+ x 1.0)))
double code(double x, double y) {
	return (x * ((x / y) + 1.0)) / (x + 1.0);
}
real(8) function code(x, y)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = (x * ((x / y) + 1.0d0)) / (x + 1.0d0)
end function
public static double code(double x, double y) {
	return (x * ((x / y) + 1.0)) / (x + 1.0);
}
def code(x, y):
	return (x * ((x / y) + 1.0)) / (x + 1.0)
function code(x, y)
	return Float64(Float64(x * Float64(Float64(x / y) + 1.0)) / Float64(x + 1.0))
end
function tmp = code(x, y)
	tmp = (x * ((x / y) + 1.0)) / (x + 1.0);
end
code[x_, y_] := N[(N[(x * N[(N[(x / y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]
f(x, y):
	x in [-inf, +inf],
	y in [-inf, +inf]
code: THEORY
BEGIN
f(x, y: real): real =
	(x * ((x / y) + (1))) / (x + (1))
END code
\frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1}

Alternative 1: 99.9% accurate, 0.3× speedup?

\[\begin{array}{l} t_0 := \frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1}\\ t_1 := \frac{x}{\frac{y}{x} + y}\\ \mathbf{if}\;t\_0 \leq -2 \cdot 10^{+41}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq 10^{+60}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{x}{y}, x, x\right)}{1 + x}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
(FPCore (x y)
  :precision binary64
  :pre TRUE
  (let* ((t_0 (/ (* x (+ (/ x y) 1.0)) (+ x 1.0)))
       (t_1 (/ x (+ (/ y x) y))))
  (if (<= t_0 -2e+41)
    t_1
    (if (<= t_0 1e+60) (/ (fma (/ x y) x x) (+ 1.0 x)) t_1))))
double code(double x, double y) {
	double t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
	double t_1 = x / ((y / x) + y);
	double tmp;
	if (t_0 <= -2e+41) {
		tmp = t_1;
	} else if (t_0 <= 1e+60) {
		tmp = fma((x / y), x, x) / (1.0 + x);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y)
	t_0 = Float64(Float64(x * Float64(Float64(x / y) + 1.0)) / Float64(x + 1.0))
	t_1 = Float64(x / Float64(Float64(y / x) + y))
	tmp = 0.0
	if (t_0 <= -2e+41)
		tmp = t_1;
	elseif (t_0 <= 1e+60)
		tmp = Float64(fma(Float64(x / y), x, x) / Float64(1.0 + x));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_] := Block[{t$95$0 = N[(N[(x * N[(N[(x / y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[(N[(y / x), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -2e+41], t$95$1, If[LessEqual[t$95$0, 1e+60], N[(N[(N[(x / y), $MachinePrecision] * x + x), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
f(x, y):
	x in [-inf, +inf],
	y in [-inf, +inf]
code: THEORY
BEGIN
f(x, y: real): real =
	LET t_0 = ((x * ((x / y) + (1))) / (x + (1))) IN
		LET t_1 = (x / ((y / x) + y)) IN
			LET tmp_1 = IF (t_0 <= (999999999999999949387135297074018866963645011013410073083904)) THEN ((((x / y) * x) + x) / ((1) + x)) ELSE t_1 ENDIF IN
			LET tmp = IF (t_0 <= (-200000000000000001240017290081556638990336)) THEN t_1 ELSE tmp_1 ENDIF IN
	tmp
END code
\begin{array}{l}
t_0 := \frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1}\\
t_1 := \frac{x}{\frac{y}{x} + y}\\
\mathbf{if}\;t\_0 \leq -2 \cdot 10^{+41}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_0 \leq 10^{+60}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\frac{x}{y}, x, x\right)}{1 + x}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < -2e41 or 9.9999999999999995e59 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64)))

    1. Initial program 88.9%

      \[\frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1} \]
    2. Step-by-step derivation
      1. Applied rewrites88.7%

        \[\leadsto \frac{1}{\frac{1 + x}{\mathsf{fma}\left(\frac{x}{y}, x, x\right)}} \]
      2. Step-by-step derivation
        1. Applied rewrites99.9%

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

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

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

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

            if -2e41 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < 9.9999999999999995e59

            1. Initial program 88.9%

              \[\frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1} \]
            2. Step-by-step derivation
              1. Applied rewrites88.9%

                \[\leadsto \frac{\mathsf{fma}\left(\frac{x}{y}, x, x\right)}{1 + x} \]
            3. Recombined 2 regimes into one program.
            4. Add Preprocessing

            Alternative 2: 99.9% accurate, 0.2× speedup?

            \[\begin{array}{l} t_0 := \frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1}\\ \mathbf{if}\;t\_0 \leq -2 \cdot 10^{+41}:\\ \;\;\;\;\frac{x}{\frac{y}{x} + y}\\ \mathbf{elif}\;t\_0 \leq 0.998:\\ \;\;\;\;x \cdot \frac{y + x}{\mathsf{fma}\left(y, x, y\right)}\\ \mathbf{elif}\;t\_0 \leq 2:\\ \;\;\;\;\frac{x}{1 + x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(1 + x\right) \cdot \frac{y}{x}}\\ \end{array} \]
            (FPCore (x y)
              :precision binary64
              :pre TRUE
              (let* ((t_0 (/ (* x (+ (/ x y) 1.0)) (+ x 1.0))))
              (if (<= t_0 -2e+41)
                (/ x (+ (/ y x) y))
                (if (<= t_0 0.998)
                  (* x (/ (+ y x) (fma y x y)))
                  (if (<= t_0 2.0) (/ x (+ 1.0 x)) (/ x (* (+ 1.0 x) (/ y x))))))))
            double code(double x, double y) {
            	double t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
            	double tmp;
            	if (t_0 <= -2e+41) {
            		tmp = x / ((y / x) + y);
            	} else if (t_0 <= 0.998) {
            		tmp = x * ((y + x) / fma(y, x, y));
            	} else if (t_0 <= 2.0) {
            		tmp = x / (1.0 + x);
            	} else {
            		tmp = x / ((1.0 + x) * (y / x));
            	}
            	return tmp;
            }
            
            function code(x, y)
            	t_0 = Float64(Float64(x * Float64(Float64(x / y) + 1.0)) / Float64(x + 1.0))
            	tmp = 0.0
            	if (t_0 <= -2e+41)
            		tmp = Float64(x / Float64(Float64(y / x) + y));
            	elseif (t_0 <= 0.998)
            		tmp = Float64(x * Float64(Float64(y + x) / fma(y, x, y)));
            	elseif (t_0 <= 2.0)
            		tmp = Float64(x / Float64(1.0 + x));
            	else
            		tmp = Float64(x / Float64(Float64(1.0 + x) * Float64(y / x)));
            	end
            	return tmp
            end
            
            code[x_, y_] := Block[{t$95$0 = N[(N[(x * N[(N[(x / y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -2e+41], N[(x / N[(N[(y / x), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 0.998], N[(x * N[(N[(y + x), $MachinePrecision] / N[(y * x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2.0], N[(x / N[(1.0 + x), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(1.0 + x), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
            
            f(x, y):
            	x in [-inf, +inf],
            	y in [-inf, +inf]
            code: THEORY
            BEGIN
            f(x, y: real): real =
            	LET t_0 = ((x * ((x / y) + (1))) / (x + (1))) IN
            		LET tmp_2 = IF (t_0 <= (2)) THEN (x / ((1) + x)) ELSE (x / (((1) + x) * (y / x))) ENDIF IN
            		LET tmp_1 = IF (t_0 <= (9979999999999999982236431605997495353221893310546875e-52)) THEN (x * ((y + x) / ((y * x) + y))) ELSE tmp_2 ENDIF IN
            		LET tmp = IF (t_0 <= (-200000000000000001240017290081556638990336)) THEN (x / ((y / x) + y)) ELSE tmp_1 ENDIF IN
            	tmp
            END code
            \begin{array}{l}
            t_0 := \frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1}\\
            \mathbf{if}\;t\_0 \leq -2 \cdot 10^{+41}:\\
            \;\;\;\;\frac{x}{\frac{y}{x} + y}\\
            
            \mathbf{elif}\;t\_0 \leq 0.998:\\
            \;\;\;\;x \cdot \frac{y + x}{\mathsf{fma}\left(y, x, y\right)}\\
            
            \mathbf{elif}\;t\_0 \leq 2:\\
            \;\;\;\;\frac{x}{1 + x}\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{x}{\left(1 + x\right) \cdot \frac{y}{x}}\\
            
            
            \end{array}
            
            Derivation
            1. Split input into 4 regimes
            2. if (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < -2e41

              1. Initial program 88.9%

                \[\frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1} \]
              2. Step-by-step derivation
                1. Applied rewrites88.7%

                  \[\leadsto \frac{1}{\frac{1 + x}{\mathsf{fma}\left(\frac{x}{y}, x, x\right)}} \]
                2. Step-by-step derivation
                  1. Applied rewrites99.9%

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

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

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

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

                      if -2e41 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < 0.998

                      1. Initial program 88.9%

                        \[\frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1} \]
                      2. Step-by-step derivation
                        1. Applied rewrites87.9%

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

                            \[\leadsto x \cdot \frac{y + x}{\mathsf{fma}\left(y, x, y\right)} \]

                          if 0.998 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < 2

                          1. Initial program 88.9%

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

                            \[\leadsto \frac{x}{1 + x} \]
                          3. Step-by-step derivation
                            1. Applied rewrites50.9%

                              \[\leadsto \frac{x}{1 + x} \]

                            if 2 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64)))

                            1. Initial program 88.9%

                              \[\frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1} \]
                            2. Step-by-step derivation
                              1. Applied rewrites88.7%

                                \[\leadsto \frac{1}{\frac{1 + x}{\mathsf{fma}\left(\frac{x}{y}, x, x\right)}} \]
                              2. Step-by-step derivation
                                1. Applied rewrites99.9%

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

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

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

                                Alternative 3: 98.4% accurate, 1.0× speedup?

                                \[\frac{x}{1 + x} \cdot \frac{y + x}{y} \]
                                (FPCore (x y)
                                  :precision binary64
                                  :pre TRUE
                                  (* (/ x (+ 1.0 x)) (/ (+ y x) y)))
                                double code(double x, double y) {
                                	return (x / (1.0 + x)) * ((y + x) / y);
                                }
                                
                                real(8) function code(x, y)
                                use fmin_fmax_functions
                                    real(8), intent (in) :: x
                                    real(8), intent (in) :: y
                                    code = (x / (1.0d0 + x)) * ((y + x) / y)
                                end function
                                
                                public static double code(double x, double y) {
                                	return (x / (1.0 + x)) * ((y + x) / y);
                                }
                                
                                def code(x, y):
                                	return (x / (1.0 + x)) * ((y + x) / y)
                                
                                function code(x, y)
                                	return Float64(Float64(x / Float64(1.0 + x)) * Float64(Float64(y + x) / y))
                                end
                                
                                function tmp = code(x, y)
                                	tmp = (x / (1.0 + x)) * ((y + x) / y);
                                end
                                
                                code[x_, y_] := N[(N[(x / N[(1.0 + x), $MachinePrecision]), $MachinePrecision] * N[(N[(y + x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
                                
                                f(x, y):
                                	x in [-inf, +inf],
                                	y in [-inf, +inf]
                                code: THEORY
                                BEGIN
                                f(x, y: real): real =
                                	(x / ((1) + x)) * ((y + x) / y)
                                END code
                                \frac{x}{1 + x} \cdot \frac{y + x}{y}
                                
                                Derivation
                                1. Initial program 88.9%

                                  \[\frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1} \]
                                2. Step-by-step derivation
                                  1. Applied rewrites99.9%

                                    \[\leadsto \frac{x}{1 + x} \cdot \frac{y + x}{y} \]
                                  2. Add Preprocessing

                                  Alternative 4: 98.1% accurate, 0.2× speedup?

                                  \[\begin{array}{l} t_0 := \frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1}\\ \mathbf{if}\;t\_0 \leq -50000:\\ \;\;\;\;\frac{x}{\frac{y}{x} + y}\\ \mathbf{elif}\;t\_0 \leq 10^{-23}:\\ \;\;\;\;\mathsf{fma}\left(\frac{1 - y}{y}, x, 1\right) \cdot x\\ \mathbf{elif}\;t\_0 \leq 2:\\ \;\;\;\;\frac{1}{1 + \frac{1}{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(1 + x\right) \cdot \frac{y}{x}}\\ \end{array} \]
                                  (FPCore (x y)
                                    :precision binary64
                                    :pre TRUE
                                    (let* ((t_0 (/ (* x (+ (/ x y) 1.0)) (+ x 1.0))))
                                    (if (<= t_0 -50000.0)
                                      (/ x (+ (/ y x) y))
                                      (if (<= t_0 1e-23)
                                        (* (fma (/ (- 1.0 y) y) x 1.0) x)
                                        (if (<= t_0 2.0)
                                          (/ 1.0 (+ 1.0 (/ 1.0 x)))
                                          (/ x (* (+ 1.0 x) (/ y x))))))))
                                  double code(double x, double y) {
                                  	double t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
                                  	double tmp;
                                  	if (t_0 <= -50000.0) {
                                  		tmp = x / ((y / x) + y);
                                  	} else if (t_0 <= 1e-23) {
                                  		tmp = fma(((1.0 - y) / y), x, 1.0) * x;
                                  	} else if (t_0 <= 2.0) {
                                  		tmp = 1.0 / (1.0 + (1.0 / x));
                                  	} else {
                                  		tmp = x / ((1.0 + x) * (y / x));
                                  	}
                                  	return tmp;
                                  }
                                  
                                  function code(x, y)
                                  	t_0 = Float64(Float64(x * Float64(Float64(x / y) + 1.0)) / Float64(x + 1.0))
                                  	tmp = 0.0
                                  	if (t_0 <= -50000.0)
                                  		tmp = Float64(x / Float64(Float64(y / x) + y));
                                  	elseif (t_0 <= 1e-23)
                                  		tmp = Float64(fma(Float64(Float64(1.0 - y) / y), x, 1.0) * x);
                                  	elseif (t_0 <= 2.0)
                                  		tmp = Float64(1.0 / Float64(1.0 + Float64(1.0 / x)));
                                  	else
                                  		tmp = Float64(x / Float64(Float64(1.0 + x) * Float64(y / x)));
                                  	end
                                  	return tmp
                                  end
                                  
                                  code[x_, y_] := Block[{t$95$0 = N[(N[(x * N[(N[(x / y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -50000.0], N[(x / N[(N[(y / x), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e-23], N[(N[(N[(N[(1.0 - y), $MachinePrecision] / y), $MachinePrecision] * x + 1.0), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t$95$0, 2.0], N[(1.0 / N[(1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(1.0 + x), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
                                  
                                  f(x, y):
                                  	x in [-inf, +inf],
                                  	y in [-inf, +inf]
                                  code: THEORY
                                  BEGIN
                                  f(x, y: real): real =
                                  	LET t_0 = ((x * ((x / y) + (1))) / (x + (1))) IN
                                  		LET tmp_2 = IF (t_0 <= (2)) THEN ((1) / ((1) + ((1) / x))) ELSE (x / (((1) + x) * (y / x))) ENDIF IN
                                  		LET tmp_1 = IF (t_0 <= (9999999999999999604346980148993092553230786866765862587503680141039208439934782290947623550891876220703125e-129)) THEN ((((((1) - y) / y) * x) + (1)) * x) ELSE tmp_2 ENDIF IN
                                  		LET tmp = IF (t_0 <= (-5e4)) THEN (x / ((y / x) + y)) ELSE tmp_1 ENDIF IN
                                  	tmp
                                  END code
                                  \begin{array}{l}
                                  t_0 := \frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1}\\
                                  \mathbf{if}\;t\_0 \leq -50000:\\
                                  \;\;\;\;\frac{x}{\frac{y}{x} + y}\\
                                  
                                  \mathbf{elif}\;t\_0 \leq 10^{-23}:\\
                                  \;\;\;\;\mathsf{fma}\left(\frac{1 - y}{y}, x, 1\right) \cdot x\\
                                  
                                  \mathbf{elif}\;t\_0 \leq 2:\\
                                  \;\;\;\;\frac{1}{1 + \frac{1}{x}}\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;\frac{x}{\left(1 + x\right) \cdot \frac{y}{x}}\\
                                  
                                  
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 4 regimes
                                  2. if (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < -5e4

                                    1. Initial program 88.9%

                                      \[\frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1} \]
                                    2. Step-by-step derivation
                                      1. Applied rewrites88.7%

                                        \[\leadsto \frac{1}{\frac{1 + x}{\mathsf{fma}\left(\frac{x}{y}, x, x\right)}} \]
                                      2. Step-by-step derivation
                                        1. Applied rewrites99.9%

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

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

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

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

                                            if -5e4 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < 9.9999999999999996e-24

                                            1. Initial program 88.9%

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

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

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

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

                                                if 9.9999999999999996e-24 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < 2

                                                1. Initial program 88.9%

                                                  \[\frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1} \]
                                                2. Step-by-step derivation
                                                  1. Applied rewrites88.7%

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

                                                    \[\leadsto \frac{1}{\frac{1 + x}{x}} \]
                                                  3. Step-by-step derivation
                                                    1. Applied rewrites50.8%

                                                      \[\leadsto \frac{1}{\frac{1 + x}{x}} \]
                                                    2. Taylor expanded in x around inf

                                                      \[\leadsto \frac{1}{1 + \frac{1}{x}} \]
                                                    3. Step-by-step derivation
                                                      1. Applied rewrites50.8%

                                                        \[\leadsto \frac{1}{1 + \frac{1}{x}} \]

                                                      if 2 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64)))

                                                      1. Initial program 88.9%

                                                        \[\frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1} \]
                                                      2. Step-by-step derivation
                                                        1. Applied rewrites88.7%

                                                          \[\leadsto \frac{1}{\frac{1 + x}{\mathsf{fma}\left(\frac{x}{y}, x, x\right)}} \]
                                                        2. Step-by-step derivation
                                                          1. Applied rewrites99.9%

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

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

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

                                                          Alternative 5: 98.0% accurate, 0.2× speedup?

                                                          \[\begin{array}{l} t_0 := \frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1}\\ \mathbf{if}\;t\_0 \leq -50000:\\ \;\;\;\;\frac{x}{\frac{y}{x} + y}\\ \mathbf{elif}\;t\_0 \leq 10^{-23}:\\ \;\;\;\;x \cdot \left(\frac{x}{y} + \frac{y}{y}\right)\\ \mathbf{elif}\;t\_0 \leq 2:\\ \;\;\;\;\frac{1}{1 + \frac{1}{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(1 + x\right) \cdot \frac{y}{x}}\\ \end{array} \]
                                                          (FPCore (x y)
                                                            :precision binary64
                                                            :pre TRUE
                                                            (let* ((t_0 (/ (* x (+ (/ x y) 1.0)) (+ x 1.0))))
                                                            (if (<= t_0 -50000.0)
                                                              (/ x (+ (/ y x) y))
                                                              (if (<= t_0 1e-23)
                                                                (* x (+ (/ x y) (/ y y)))
                                                                (if (<= t_0 2.0)
                                                                  (/ 1.0 (+ 1.0 (/ 1.0 x)))
                                                                  (/ x (* (+ 1.0 x) (/ y x))))))))
                                                          double code(double x, double y) {
                                                          	double t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
                                                          	double tmp;
                                                          	if (t_0 <= -50000.0) {
                                                          		tmp = x / ((y / x) + y);
                                                          	} else if (t_0 <= 1e-23) {
                                                          		tmp = x * ((x / y) + (y / y));
                                                          	} else if (t_0 <= 2.0) {
                                                          		tmp = 1.0 / (1.0 + (1.0 / x));
                                                          	} else {
                                                          		tmp = x / ((1.0 + x) * (y / x));
                                                          	}
                                                          	return tmp;
                                                          }
                                                          
                                                          real(8) function code(x, y)
                                                          use fmin_fmax_functions
                                                              real(8), intent (in) :: x
                                                              real(8), intent (in) :: y
                                                              real(8) :: t_0
                                                              real(8) :: tmp
                                                              t_0 = (x * ((x / y) + 1.0d0)) / (x + 1.0d0)
                                                              if (t_0 <= (-50000.0d0)) then
                                                                  tmp = x / ((y / x) + y)
                                                              else if (t_0 <= 1d-23) then
                                                                  tmp = x * ((x / y) + (y / y))
                                                              else if (t_0 <= 2.0d0) then
                                                                  tmp = 1.0d0 / (1.0d0 + (1.0d0 / x))
                                                              else
                                                                  tmp = x / ((1.0d0 + x) * (y / x))
                                                              end if
                                                              code = tmp
                                                          end function
                                                          
                                                          public static double code(double x, double y) {
                                                          	double t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
                                                          	double tmp;
                                                          	if (t_0 <= -50000.0) {
                                                          		tmp = x / ((y / x) + y);
                                                          	} else if (t_0 <= 1e-23) {
                                                          		tmp = x * ((x / y) + (y / y));
                                                          	} else if (t_0 <= 2.0) {
                                                          		tmp = 1.0 / (1.0 + (1.0 / x));
                                                          	} else {
                                                          		tmp = x / ((1.0 + x) * (y / x));
                                                          	}
                                                          	return tmp;
                                                          }
                                                          
                                                          def code(x, y):
                                                          	t_0 = (x * ((x / y) + 1.0)) / (x + 1.0)
                                                          	tmp = 0
                                                          	if t_0 <= -50000.0:
                                                          		tmp = x / ((y / x) + y)
                                                          	elif t_0 <= 1e-23:
                                                          		tmp = x * ((x / y) + (y / y))
                                                          	elif t_0 <= 2.0:
                                                          		tmp = 1.0 / (1.0 + (1.0 / x))
                                                          	else:
                                                          		tmp = x / ((1.0 + x) * (y / x))
                                                          	return tmp
                                                          
                                                          function code(x, y)
                                                          	t_0 = Float64(Float64(x * Float64(Float64(x / y) + 1.0)) / Float64(x + 1.0))
                                                          	tmp = 0.0
                                                          	if (t_0 <= -50000.0)
                                                          		tmp = Float64(x / Float64(Float64(y / x) + y));
                                                          	elseif (t_0 <= 1e-23)
                                                          		tmp = Float64(x * Float64(Float64(x / y) + Float64(y / y)));
                                                          	elseif (t_0 <= 2.0)
                                                          		tmp = Float64(1.0 / Float64(1.0 + Float64(1.0 / x)));
                                                          	else
                                                          		tmp = Float64(x / Float64(Float64(1.0 + x) * Float64(y / x)));
                                                          	end
                                                          	return tmp
                                                          end
                                                          
                                                          function tmp_2 = code(x, y)
                                                          	t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
                                                          	tmp = 0.0;
                                                          	if (t_0 <= -50000.0)
                                                          		tmp = x / ((y / x) + y);
                                                          	elseif (t_0 <= 1e-23)
                                                          		tmp = x * ((x / y) + (y / y));
                                                          	elseif (t_0 <= 2.0)
                                                          		tmp = 1.0 / (1.0 + (1.0 / x));
                                                          	else
                                                          		tmp = x / ((1.0 + x) * (y / x));
                                                          	end
                                                          	tmp_2 = tmp;
                                                          end
                                                          
                                                          code[x_, y_] := Block[{t$95$0 = N[(N[(x * N[(N[(x / y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -50000.0], N[(x / N[(N[(y / x), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e-23], N[(x * N[(N[(x / y), $MachinePrecision] + N[(y / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2.0], N[(1.0 / N[(1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(1.0 + x), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
                                                          
                                                          f(x, y):
                                                          	x in [-inf, +inf],
                                                          	y in [-inf, +inf]
                                                          code: THEORY
                                                          BEGIN
                                                          f(x, y: real): real =
                                                          	LET t_0 = ((x * ((x / y) + (1))) / (x + (1))) IN
                                                          		LET tmp_2 = IF (t_0 <= (2)) THEN ((1) / ((1) + ((1) / x))) ELSE (x / (((1) + x) * (y / x))) ENDIF IN
                                                          		LET tmp_1 = IF (t_0 <= (9999999999999999604346980148993092553230786866765862587503680141039208439934782290947623550891876220703125e-129)) THEN (x * ((x / y) + (y / y))) ELSE tmp_2 ENDIF IN
                                                          		LET tmp = IF (t_0 <= (-5e4)) THEN (x / ((y / x) + y)) ELSE tmp_1 ENDIF IN
                                                          	tmp
                                                          END code
                                                          \begin{array}{l}
                                                          t_0 := \frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1}\\
                                                          \mathbf{if}\;t\_0 \leq -50000:\\
                                                          \;\;\;\;\frac{x}{\frac{y}{x} + y}\\
                                                          
                                                          \mathbf{elif}\;t\_0 \leq 10^{-23}:\\
                                                          \;\;\;\;x \cdot \left(\frac{x}{y} + \frac{y}{y}\right)\\
                                                          
                                                          \mathbf{elif}\;t\_0 \leq 2:\\
                                                          \;\;\;\;\frac{1}{1 + \frac{1}{x}}\\
                                                          
                                                          \mathbf{else}:\\
                                                          \;\;\;\;\frac{x}{\left(1 + x\right) \cdot \frac{y}{x}}\\
                                                          
                                                          
                                                          \end{array}
                                                          
                                                          Derivation
                                                          1. Split input into 4 regimes
                                                          2. if (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < -5e4

                                                            1. Initial program 88.9%

                                                              \[\frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1} \]
                                                            2. Step-by-step derivation
                                                              1. Applied rewrites88.7%

                                                                \[\leadsto \frac{1}{\frac{1 + x}{\mathsf{fma}\left(\frac{x}{y}, x, x\right)}} \]
                                                              2. Step-by-step derivation
                                                                1. Applied rewrites99.9%

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

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

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

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

                                                                    if -5e4 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < 9.9999999999999996e-24

                                                                    1. Initial program 88.9%

                                                                      \[\frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1} \]
                                                                    2. Step-by-step derivation
                                                                      1. Applied rewrites87.9%

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

                                                                        \[\leadsto x \cdot \frac{y + x}{y} \]
                                                                      3. Step-by-step derivation
                                                                        1. Applied rewrites57.1%

                                                                          \[\leadsto x \cdot \frac{y + x}{y} \]
                                                                        2. Step-by-step derivation
                                                                          1. Applied rewrites57.1%

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

                                                                          if 9.9999999999999996e-24 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < 2

                                                                          1. Initial program 88.9%

                                                                            \[\frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1} \]
                                                                          2. Step-by-step derivation
                                                                            1. Applied rewrites88.7%

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

                                                                              \[\leadsto \frac{1}{\frac{1 + x}{x}} \]
                                                                            3. Step-by-step derivation
                                                                              1. Applied rewrites50.8%

                                                                                \[\leadsto \frac{1}{\frac{1 + x}{x}} \]
                                                                              2. Taylor expanded in x around inf

                                                                                \[\leadsto \frac{1}{1 + \frac{1}{x}} \]
                                                                              3. Step-by-step derivation
                                                                                1. Applied rewrites50.8%

                                                                                  \[\leadsto \frac{1}{1 + \frac{1}{x}} \]

                                                                                if 2 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64)))

                                                                                1. Initial program 88.9%

                                                                                  \[\frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1} \]
                                                                                2. Step-by-step derivation
                                                                                  1. Applied rewrites88.7%

                                                                                    \[\leadsto \frac{1}{\frac{1 + x}{\mathsf{fma}\left(\frac{x}{y}, x, x\right)}} \]
                                                                                  2. Step-by-step derivation
                                                                                    1. Applied rewrites99.9%

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

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

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

                                                                                    Alternative 6: 98.0% accurate, 0.2× speedup?

                                                                                    \[\begin{array}{l} t_0 := \frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1}\\ t_1 := \frac{x}{\frac{y}{x} + y}\\ \mathbf{if}\;t\_0 \leq -50000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq 10^{-23}:\\ \;\;\;\;x \cdot \left(\frac{x}{y} + \frac{y}{y}\right)\\ \mathbf{elif}\;t\_0 \leq 2:\\ \;\;\;\;\frac{1}{1 + \frac{1}{x}}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                                                                                    (FPCore (x y)
                                                                                      :precision binary64
                                                                                      :pre TRUE
                                                                                      (let* ((t_0 (/ (* x (+ (/ x y) 1.0)) (+ x 1.0)))
                                                                                           (t_1 (/ x (+ (/ y x) y))))
                                                                                      (if (<= t_0 -50000.0)
                                                                                        t_1
                                                                                        (if (<= t_0 1e-23)
                                                                                          (* x (+ (/ x y) (/ y y)))
                                                                                          (if (<= t_0 2.0) (/ 1.0 (+ 1.0 (/ 1.0 x))) t_1)))))
                                                                                    double code(double x, double y) {
                                                                                    	double t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
                                                                                    	double t_1 = x / ((y / x) + y);
                                                                                    	double tmp;
                                                                                    	if (t_0 <= -50000.0) {
                                                                                    		tmp = t_1;
                                                                                    	} else if (t_0 <= 1e-23) {
                                                                                    		tmp = x * ((x / y) + (y / y));
                                                                                    	} else if (t_0 <= 2.0) {
                                                                                    		tmp = 1.0 / (1.0 + (1.0 / x));
                                                                                    	} else {
                                                                                    		tmp = t_1;
                                                                                    	}
                                                                                    	return tmp;
                                                                                    }
                                                                                    
                                                                                    real(8) function code(x, y)
                                                                                    use fmin_fmax_functions
                                                                                        real(8), intent (in) :: x
                                                                                        real(8), intent (in) :: y
                                                                                        real(8) :: t_0
                                                                                        real(8) :: t_1
                                                                                        real(8) :: tmp
                                                                                        t_0 = (x * ((x / y) + 1.0d0)) / (x + 1.0d0)
                                                                                        t_1 = x / ((y / x) + y)
                                                                                        if (t_0 <= (-50000.0d0)) then
                                                                                            tmp = t_1
                                                                                        else if (t_0 <= 1d-23) then
                                                                                            tmp = x * ((x / y) + (y / y))
                                                                                        else if (t_0 <= 2.0d0) then
                                                                                            tmp = 1.0d0 / (1.0d0 + (1.0d0 / x))
                                                                                        else
                                                                                            tmp = t_1
                                                                                        end if
                                                                                        code = tmp
                                                                                    end function
                                                                                    
                                                                                    public static double code(double x, double y) {
                                                                                    	double t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
                                                                                    	double t_1 = x / ((y / x) + y);
                                                                                    	double tmp;
                                                                                    	if (t_0 <= -50000.0) {
                                                                                    		tmp = t_1;
                                                                                    	} else if (t_0 <= 1e-23) {
                                                                                    		tmp = x * ((x / y) + (y / y));
                                                                                    	} else if (t_0 <= 2.0) {
                                                                                    		tmp = 1.0 / (1.0 + (1.0 / x));
                                                                                    	} else {
                                                                                    		tmp = t_1;
                                                                                    	}
                                                                                    	return tmp;
                                                                                    }
                                                                                    
                                                                                    def code(x, y):
                                                                                    	t_0 = (x * ((x / y) + 1.0)) / (x + 1.0)
                                                                                    	t_1 = x / ((y / x) + y)
                                                                                    	tmp = 0
                                                                                    	if t_0 <= -50000.0:
                                                                                    		tmp = t_1
                                                                                    	elif t_0 <= 1e-23:
                                                                                    		tmp = x * ((x / y) + (y / y))
                                                                                    	elif t_0 <= 2.0:
                                                                                    		tmp = 1.0 / (1.0 + (1.0 / x))
                                                                                    	else:
                                                                                    		tmp = t_1
                                                                                    	return tmp
                                                                                    
                                                                                    function code(x, y)
                                                                                    	t_0 = Float64(Float64(x * Float64(Float64(x / y) + 1.0)) / Float64(x + 1.0))
                                                                                    	t_1 = Float64(x / Float64(Float64(y / x) + y))
                                                                                    	tmp = 0.0
                                                                                    	if (t_0 <= -50000.0)
                                                                                    		tmp = t_1;
                                                                                    	elseif (t_0 <= 1e-23)
                                                                                    		tmp = Float64(x * Float64(Float64(x / y) + Float64(y / y)));
                                                                                    	elseif (t_0 <= 2.0)
                                                                                    		tmp = Float64(1.0 / Float64(1.0 + Float64(1.0 / x)));
                                                                                    	else
                                                                                    		tmp = t_1;
                                                                                    	end
                                                                                    	return tmp
                                                                                    end
                                                                                    
                                                                                    function tmp_2 = code(x, y)
                                                                                    	t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
                                                                                    	t_1 = x / ((y / x) + y);
                                                                                    	tmp = 0.0;
                                                                                    	if (t_0 <= -50000.0)
                                                                                    		tmp = t_1;
                                                                                    	elseif (t_0 <= 1e-23)
                                                                                    		tmp = x * ((x / y) + (y / y));
                                                                                    	elseif (t_0 <= 2.0)
                                                                                    		tmp = 1.0 / (1.0 + (1.0 / x));
                                                                                    	else
                                                                                    		tmp = t_1;
                                                                                    	end
                                                                                    	tmp_2 = tmp;
                                                                                    end
                                                                                    
                                                                                    code[x_, y_] := Block[{t$95$0 = N[(N[(x * N[(N[(x / y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[(N[(y / x), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -50000.0], t$95$1, If[LessEqual[t$95$0, 1e-23], N[(x * N[(N[(x / y), $MachinePrecision] + N[(y / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2.0], N[(1.0 / N[(1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
                                                                                    
                                                                                    f(x, y):
                                                                                    	x in [-inf, +inf],
                                                                                    	y in [-inf, +inf]
                                                                                    code: THEORY
                                                                                    BEGIN
                                                                                    f(x, y: real): real =
                                                                                    	LET t_0 = ((x * ((x / y) + (1))) / (x + (1))) IN
                                                                                    		LET t_1 = (x / ((y / x) + y)) IN
                                                                                    			LET tmp_2 = IF (t_0 <= (2)) THEN ((1) / ((1) + ((1) / x))) ELSE t_1 ENDIF IN
                                                                                    			LET tmp_1 = IF (t_0 <= (9999999999999999604346980148993092553230786866765862587503680141039208439934782290947623550891876220703125e-129)) THEN (x * ((x / y) + (y / y))) ELSE tmp_2 ENDIF IN
                                                                                    			LET tmp = IF (t_0 <= (-5e4)) THEN t_1 ELSE tmp_1 ENDIF IN
                                                                                    	tmp
                                                                                    END code
                                                                                    \begin{array}{l}
                                                                                    t_0 := \frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1}\\
                                                                                    t_1 := \frac{x}{\frac{y}{x} + y}\\
                                                                                    \mathbf{if}\;t\_0 \leq -50000:\\
                                                                                    \;\;\;\;t\_1\\
                                                                                    
                                                                                    \mathbf{elif}\;t\_0 \leq 10^{-23}:\\
                                                                                    \;\;\;\;x \cdot \left(\frac{x}{y} + \frac{y}{y}\right)\\
                                                                                    
                                                                                    \mathbf{elif}\;t\_0 \leq 2:\\
                                                                                    \;\;\;\;\frac{1}{1 + \frac{1}{x}}\\
                                                                                    
                                                                                    \mathbf{else}:\\
                                                                                    \;\;\;\;t\_1\\
                                                                                    
                                                                                    
                                                                                    \end{array}
                                                                                    
                                                                                    Derivation
                                                                                    1. Split input into 3 regimes
                                                                                    2. if (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < -5e4 or 2 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64)))

                                                                                      1. Initial program 88.9%

                                                                                        \[\frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1} \]
                                                                                      2. Step-by-step derivation
                                                                                        1. Applied rewrites88.7%

                                                                                          \[\leadsto \frac{1}{\frac{1 + x}{\mathsf{fma}\left(\frac{x}{y}, x, x\right)}} \]
                                                                                        2. Step-by-step derivation
                                                                                          1. Applied rewrites99.9%

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

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

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

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

                                                                                              if -5e4 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < 9.9999999999999996e-24

                                                                                              1. Initial program 88.9%

                                                                                                \[\frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1} \]
                                                                                              2. Step-by-step derivation
                                                                                                1. Applied rewrites87.9%

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

                                                                                                  \[\leadsto x \cdot \frac{y + x}{y} \]
                                                                                                3. Step-by-step derivation
                                                                                                  1. Applied rewrites57.1%

                                                                                                    \[\leadsto x \cdot \frac{y + x}{y} \]
                                                                                                  2. Step-by-step derivation
                                                                                                    1. Applied rewrites57.1%

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

                                                                                                    if 9.9999999999999996e-24 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < 2

                                                                                                    1. Initial program 88.9%

                                                                                                      \[\frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1} \]
                                                                                                    2. Step-by-step derivation
                                                                                                      1. Applied rewrites88.7%

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

                                                                                                        \[\leadsto \frac{1}{\frac{1 + x}{x}} \]
                                                                                                      3. Step-by-step derivation
                                                                                                        1. Applied rewrites50.8%

                                                                                                          \[\leadsto \frac{1}{\frac{1 + x}{x}} \]
                                                                                                        2. Taylor expanded in x around inf

                                                                                                          \[\leadsto \frac{1}{1 + \frac{1}{x}} \]
                                                                                                        3. Step-by-step derivation
                                                                                                          1. Applied rewrites50.8%

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

                                                                                                        Alternative 7: 98.0% accurate, 0.2× speedup?

                                                                                                        \[\begin{array}{l} t_0 := \frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1}\\ t_1 := \frac{x}{\frac{y}{x} + y}\\ \mathbf{if}\;t\_0 \leq -50000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq 10^{-23}:\\ \;\;\;\;x \cdot \frac{y + x}{y}\\ \mathbf{elif}\;t\_0 \leq 2:\\ \;\;\;\;\frac{1}{1 + \frac{1}{x}}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                                                                                                        (FPCore (x y)
                                                                                                          :precision binary64
                                                                                                          :pre TRUE
                                                                                                          (let* ((t_0 (/ (* x (+ (/ x y) 1.0)) (+ x 1.0)))
                                                                                                               (t_1 (/ x (+ (/ y x) y))))
                                                                                                          (if (<= t_0 -50000.0)
                                                                                                            t_1
                                                                                                            (if (<= t_0 1e-23)
                                                                                                              (* x (/ (+ y x) y))
                                                                                                              (if (<= t_0 2.0) (/ 1.0 (+ 1.0 (/ 1.0 x))) t_1)))))
                                                                                                        double code(double x, double y) {
                                                                                                        	double t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
                                                                                                        	double t_1 = x / ((y / x) + y);
                                                                                                        	double tmp;
                                                                                                        	if (t_0 <= -50000.0) {
                                                                                                        		tmp = t_1;
                                                                                                        	} else if (t_0 <= 1e-23) {
                                                                                                        		tmp = x * ((y + x) / y);
                                                                                                        	} else if (t_0 <= 2.0) {
                                                                                                        		tmp = 1.0 / (1.0 + (1.0 / x));
                                                                                                        	} else {
                                                                                                        		tmp = t_1;
                                                                                                        	}
                                                                                                        	return tmp;
                                                                                                        }
                                                                                                        
                                                                                                        real(8) function code(x, y)
                                                                                                        use fmin_fmax_functions
                                                                                                            real(8), intent (in) :: x
                                                                                                            real(8), intent (in) :: y
                                                                                                            real(8) :: t_0
                                                                                                            real(8) :: t_1
                                                                                                            real(8) :: tmp
                                                                                                            t_0 = (x * ((x / y) + 1.0d0)) / (x + 1.0d0)
                                                                                                            t_1 = x / ((y / x) + y)
                                                                                                            if (t_0 <= (-50000.0d0)) then
                                                                                                                tmp = t_1
                                                                                                            else if (t_0 <= 1d-23) then
                                                                                                                tmp = x * ((y + x) / y)
                                                                                                            else if (t_0 <= 2.0d0) then
                                                                                                                tmp = 1.0d0 / (1.0d0 + (1.0d0 / x))
                                                                                                            else
                                                                                                                tmp = t_1
                                                                                                            end if
                                                                                                            code = tmp
                                                                                                        end function
                                                                                                        
                                                                                                        public static double code(double x, double y) {
                                                                                                        	double t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
                                                                                                        	double t_1 = x / ((y / x) + y);
                                                                                                        	double tmp;
                                                                                                        	if (t_0 <= -50000.0) {
                                                                                                        		tmp = t_1;
                                                                                                        	} else if (t_0 <= 1e-23) {
                                                                                                        		tmp = x * ((y + x) / y);
                                                                                                        	} else if (t_0 <= 2.0) {
                                                                                                        		tmp = 1.0 / (1.0 + (1.0 / x));
                                                                                                        	} else {
                                                                                                        		tmp = t_1;
                                                                                                        	}
                                                                                                        	return tmp;
                                                                                                        }
                                                                                                        
                                                                                                        def code(x, y):
                                                                                                        	t_0 = (x * ((x / y) + 1.0)) / (x + 1.0)
                                                                                                        	t_1 = x / ((y / x) + y)
                                                                                                        	tmp = 0
                                                                                                        	if t_0 <= -50000.0:
                                                                                                        		tmp = t_1
                                                                                                        	elif t_0 <= 1e-23:
                                                                                                        		tmp = x * ((y + x) / y)
                                                                                                        	elif t_0 <= 2.0:
                                                                                                        		tmp = 1.0 / (1.0 + (1.0 / x))
                                                                                                        	else:
                                                                                                        		tmp = t_1
                                                                                                        	return tmp
                                                                                                        
                                                                                                        function code(x, y)
                                                                                                        	t_0 = Float64(Float64(x * Float64(Float64(x / y) + 1.0)) / Float64(x + 1.0))
                                                                                                        	t_1 = Float64(x / Float64(Float64(y / x) + y))
                                                                                                        	tmp = 0.0
                                                                                                        	if (t_0 <= -50000.0)
                                                                                                        		tmp = t_1;
                                                                                                        	elseif (t_0 <= 1e-23)
                                                                                                        		tmp = Float64(x * Float64(Float64(y + x) / y));
                                                                                                        	elseif (t_0 <= 2.0)
                                                                                                        		tmp = Float64(1.0 / Float64(1.0 + Float64(1.0 / x)));
                                                                                                        	else
                                                                                                        		tmp = t_1;
                                                                                                        	end
                                                                                                        	return tmp
                                                                                                        end
                                                                                                        
                                                                                                        function tmp_2 = code(x, y)
                                                                                                        	t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
                                                                                                        	t_1 = x / ((y / x) + y);
                                                                                                        	tmp = 0.0;
                                                                                                        	if (t_0 <= -50000.0)
                                                                                                        		tmp = t_1;
                                                                                                        	elseif (t_0 <= 1e-23)
                                                                                                        		tmp = x * ((y + x) / y);
                                                                                                        	elseif (t_0 <= 2.0)
                                                                                                        		tmp = 1.0 / (1.0 + (1.0 / x));
                                                                                                        	else
                                                                                                        		tmp = t_1;
                                                                                                        	end
                                                                                                        	tmp_2 = tmp;
                                                                                                        end
                                                                                                        
                                                                                                        code[x_, y_] := Block[{t$95$0 = N[(N[(x * N[(N[(x / y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[(N[(y / x), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -50000.0], t$95$1, If[LessEqual[t$95$0, 1e-23], N[(x * N[(N[(y + x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2.0], N[(1.0 / N[(1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
                                                                                                        
                                                                                                        f(x, y):
                                                                                                        	x in [-inf, +inf],
                                                                                                        	y in [-inf, +inf]
                                                                                                        code: THEORY
                                                                                                        BEGIN
                                                                                                        f(x, y: real): real =
                                                                                                        	LET t_0 = ((x * ((x / y) + (1))) / (x + (1))) IN
                                                                                                        		LET t_1 = (x / ((y / x) + y)) IN
                                                                                                        			LET tmp_2 = IF (t_0 <= (2)) THEN ((1) / ((1) + ((1) / x))) ELSE t_1 ENDIF IN
                                                                                                        			LET tmp_1 = IF (t_0 <= (9999999999999999604346980148993092553230786866765862587503680141039208439934782290947623550891876220703125e-129)) THEN (x * ((y + x) / y)) ELSE tmp_2 ENDIF IN
                                                                                                        			LET tmp = IF (t_0 <= (-5e4)) THEN t_1 ELSE tmp_1 ENDIF IN
                                                                                                        	tmp
                                                                                                        END code
                                                                                                        \begin{array}{l}
                                                                                                        t_0 := \frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1}\\
                                                                                                        t_1 := \frac{x}{\frac{y}{x} + y}\\
                                                                                                        \mathbf{if}\;t\_0 \leq -50000:\\
                                                                                                        \;\;\;\;t\_1\\
                                                                                                        
                                                                                                        \mathbf{elif}\;t\_0 \leq 10^{-23}:\\
                                                                                                        \;\;\;\;x \cdot \frac{y + x}{y}\\
                                                                                                        
                                                                                                        \mathbf{elif}\;t\_0 \leq 2:\\
                                                                                                        \;\;\;\;\frac{1}{1 + \frac{1}{x}}\\
                                                                                                        
                                                                                                        \mathbf{else}:\\
                                                                                                        \;\;\;\;t\_1\\
                                                                                                        
                                                                                                        
                                                                                                        \end{array}
                                                                                                        
                                                                                                        Derivation
                                                                                                        1. Split input into 3 regimes
                                                                                                        2. if (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < -5e4 or 2 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64)))

                                                                                                          1. Initial program 88.9%

                                                                                                            \[\frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1} \]
                                                                                                          2. Step-by-step derivation
                                                                                                            1. Applied rewrites88.7%

                                                                                                              \[\leadsto \frac{1}{\frac{1 + x}{\mathsf{fma}\left(\frac{x}{y}, x, x\right)}} \]
                                                                                                            2. Step-by-step derivation
                                                                                                              1. Applied rewrites99.9%

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

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

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

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

                                                                                                                  if -5e4 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < 9.9999999999999996e-24

                                                                                                                  1. Initial program 88.9%

                                                                                                                    \[\frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1} \]
                                                                                                                  2. Step-by-step derivation
                                                                                                                    1. Applied rewrites87.9%

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

                                                                                                                      \[\leadsto x \cdot \frac{y + x}{y} \]
                                                                                                                    3. Step-by-step derivation
                                                                                                                      1. Applied rewrites57.1%

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

                                                                                                                      if 9.9999999999999996e-24 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < 2

                                                                                                                      1. Initial program 88.9%

                                                                                                                        \[\frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1} \]
                                                                                                                      2. Step-by-step derivation
                                                                                                                        1. Applied rewrites88.7%

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

                                                                                                                          \[\leadsto \frac{1}{\frac{1 + x}{x}} \]
                                                                                                                        3. Step-by-step derivation
                                                                                                                          1. Applied rewrites50.8%

                                                                                                                            \[\leadsto \frac{1}{\frac{1 + x}{x}} \]
                                                                                                                          2. Taylor expanded in x around inf

                                                                                                                            \[\leadsto \frac{1}{1 + \frac{1}{x}} \]
                                                                                                                          3. Step-by-step derivation
                                                                                                                            1. Applied rewrites50.8%

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

                                                                                                                          Alternative 8: 90.2% accurate, 0.2× speedup?

                                                                                                                          \[\begin{array}{l} t_0 := \frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1}\\ t_1 := x \cdot \frac{1}{y}\\ \mathbf{if}\;t\_0 \leq -1 \cdot 10^{+76}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq 10^{-23}:\\ \;\;\;\;x \cdot \frac{y + x}{y}\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+26}:\\ \;\;\;\;\frac{1}{1 + \frac{1}{x}}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                                                                                                                          (FPCore (x y)
                                                                                                                            :precision binary64
                                                                                                                            :pre TRUE
                                                                                                                            (let* ((t_0 (/ (* x (+ (/ x y) 1.0)) (+ x 1.0)))
                                                                                                                                 (t_1 (* x (/ 1.0 y))))
                                                                                                                            (if (<= t_0 -1e+76)
                                                                                                                              t_1
                                                                                                                              (if (<= t_0 1e-23)
                                                                                                                                (* x (/ (+ y x) y))
                                                                                                                                (if (<= t_0 5e+26) (/ 1.0 (+ 1.0 (/ 1.0 x))) t_1)))))
                                                                                                                          double code(double x, double y) {
                                                                                                                          	double t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
                                                                                                                          	double t_1 = x * (1.0 / y);
                                                                                                                          	double tmp;
                                                                                                                          	if (t_0 <= -1e+76) {
                                                                                                                          		tmp = t_1;
                                                                                                                          	} else if (t_0 <= 1e-23) {
                                                                                                                          		tmp = x * ((y + x) / y);
                                                                                                                          	} else if (t_0 <= 5e+26) {
                                                                                                                          		tmp = 1.0 / (1.0 + (1.0 / x));
                                                                                                                          	} else {
                                                                                                                          		tmp = t_1;
                                                                                                                          	}
                                                                                                                          	return tmp;
                                                                                                                          }
                                                                                                                          
                                                                                                                          real(8) function code(x, y)
                                                                                                                          use fmin_fmax_functions
                                                                                                                              real(8), intent (in) :: x
                                                                                                                              real(8), intent (in) :: y
                                                                                                                              real(8) :: t_0
                                                                                                                              real(8) :: t_1
                                                                                                                              real(8) :: tmp
                                                                                                                              t_0 = (x * ((x / y) + 1.0d0)) / (x + 1.0d0)
                                                                                                                              t_1 = x * (1.0d0 / y)
                                                                                                                              if (t_0 <= (-1d+76)) then
                                                                                                                                  tmp = t_1
                                                                                                                              else if (t_0 <= 1d-23) then
                                                                                                                                  tmp = x * ((y + x) / y)
                                                                                                                              else if (t_0 <= 5d+26) then
                                                                                                                                  tmp = 1.0d0 / (1.0d0 + (1.0d0 / x))
                                                                                                                              else
                                                                                                                                  tmp = t_1
                                                                                                                              end if
                                                                                                                              code = tmp
                                                                                                                          end function
                                                                                                                          
                                                                                                                          public static double code(double x, double y) {
                                                                                                                          	double t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
                                                                                                                          	double t_1 = x * (1.0 / y);
                                                                                                                          	double tmp;
                                                                                                                          	if (t_0 <= -1e+76) {
                                                                                                                          		tmp = t_1;
                                                                                                                          	} else if (t_0 <= 1e-23) {
                                                                                                                          		tmp = x * ((y + x) / y);
                                                                                                                          	} else if (t_0 <= 5e+26) {
                                                                                                                          		tmp = 1.0 / (1.0 + (1.0 / x));
                                                                                                                          	} else {
                                                                                                                          		tmp = t_1;
                                                                                                                          	}
                                                                                                                          	return tmp;
                                                                                                                          }
                                                                                                                          
                                                                                                                          def code(x, y):
                                                                                                                          	t_0 = (x * ((x / y) + 1.0)) / (x + 1.0)
                                                                                                                          	t_1 = x * (1.0 / y)
                                                                                                                          	tmp = 0
                                                                                                                          	if t_0 <= -1e+76:
                                                                                                                          		tmp = t_1
                                                                                                                          	elif t_0 <= 1e-23:
                                                                                                                          		tmp = x * ((y + x) / y)
                                                                                                                          	elif t_0 <= 5e+26:
                                                                                                                          		tmp = 1.0 / (1.0 + (1.0 / x))
                                                                                                                          	else:
                                                                                                                          		tmp = t_1
                                                                                                                          	return tmp
                                                                                                                          
                                                                                                                          function code(x, y)
                                                                                                                          	t_0 = Float64(Float64(x * Float64(Float64(x / y) + 1.0)) / Float64(x + 1.0))
                                                                                                                          	t_1 = Float64(x * Float64(1.0 / y))
                                                                                                                          	tmp = 0.0
                                                                                                                          	if (t_0 <= -1e+76)
                                                                                                                          		tmp = t_1;
                                                                                                                          	elseif (t_0 <= 1e-23)
                                                                                                                          		tmp = Float64(x * Float64(Float64(y + x) / y));
                                                                                                                          	elseif (t_0 <= 5e+26)
                                                                                                                          		tmp = Float64(1.0 / Float64(1.0 + Float64(1.0 / x)));
                                                                                                                          	else
                                                                                                                          		tmp = t_1;
                                                                                                                          	end
                                                                                                                          	return tmp
                                                                                                                          end
                                                                                                                          
                                                                                                                          function tmp_2 = code(x, y)
                                                                                                                          	t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
                                                                                                                          	t_1 = x * (1.0 / y);
                                                                                                                          	tmp = 0.0;
                                                                                                                          	if (t_0 <= -1e+76)
                                                                                                                          		tmp = t_1;
                                                                                                                          	elseif (t_0 <= 1e-23)
                                                                                                                          		tmp = x * ((y + x) / y);
                                                                                                                          	elseif (t_0 <= 5e+26)
                                                                                                                          		tmp = 1.0 / (1.0 + (1.0 / x));
                                                                                                                          	else
                                                                                                                          		tmp = t_1;
                                                                                                                          	end
                                                                                                                          	tmp_2 = tmp;
                                                                                                                          end
                                                                                                                          
                                                                                                                          code[x_, y_] := Block[{t$95$0 = N[(N[(x * N[(N[(x / y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1e+76], t$95$1, If[LessEqual[t$95$0, 1e-23], N[(x * N[(N[(y + x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+26], N[(1.0 / N[(1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
                                                                                                                          
                                                                                                                          f(x, y):
                                                                                                                          	x in [-inf, +inf],
                                                                                                                          	y in [-inf, +inf]
                                                                                                                          code: THEORY
                                                                                                                          BEGIN
                                                                                                                          f(x, y: real): real =
                                                                                                                          	LET t_0 = ((x * ((x / y) + (1))) / (x + (1))) IN
                                                                                                                          		LET t_1 = (x * ((1) / y)) IN
                                                                                                                          			LET tmp_2 = IF (t_0 <= (500000000000000006643777536)) THEN ((1) / ((1) + ((1) / x))) ELSE t_1 ENDIF IN
                                                                                                                          			LET tmp_1 = IF (t_0 <= (9999999999999999604346980148993092553230786866765862587503680141039208439934782290947623550891876220703125e-129)) THEN (x * ((y + x) / y)) ELSE tmp_2 ENDIF IN
                                                                                                                          			LET tmp = IF (t_0 <= (-10000000000000000470601344959054695891559601407866630764278709534898249531392)) THEN t_1 ELSE tmp_1 ENDIF IN
                                                                                                                          	tmp
                                                                                                                          END code
                                                                                                                          \begin{array}{l}
                                                                                                                          t_0 := \frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1}\\
                                                                                                                          t_1 := x \cdot \frac{1}{y}\\
                                                                                                                          \mathbf{if}\;t\_0 \leq -1 \cdot 10^{+76}:\\
                                                                                                                          \;\;\;\;t\_1\\
                                                                                                                          
                                                                                                                          \mathbf{elif}\;t\_0 \leq 10^{-23}:\\
                                                                                                                          \;\;\;\;x \cdot \frac{y + x}{y}\\
                                                                                                                          
                                                                                                                          \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+26}:\\
                                                                                                                          \;\;\;\;\frac{1}{1 + \frac{1}{x}}\\
                                                                                                                          
                                                                                                                          \mathbf{else}:\\
                                                                                                                          \;\;\;\;t\_1\\
                                                                                                                          
                                                                                                                          
                                                                                                                          \end{array}
                                                                                                                          
                                                                                                                          Derivation
                                                                                                                          1. Split input into 3 regimes
                                                                                                                          2. if (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < -1e76 or 5.0000000000000001e26 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64)))

                                                                                                                            1. Initial program 88.9%

                                                                                                                              \[\frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1} \]
                                                                                                                            2. Step-by-step derivation
                                                                                                                              1. Applied rewrites87.9%

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

                                                                                                                                \[\leadsto x \cdot \frac{1}{y} \]
                                                                                                                              3. Step-by-step derivation
                                                                                                                                1. Applied rewrites39.2%

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

                                                                                                                                if -1e76 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < 9.9999999999999996e-24

                                                                                                                                1. Initial program 88.9%

                                                                                                                                  \[\frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1} \]
                                                                                                                                2. Step-by-step derivation
                                                                                                                                  1. Applied rewrites87.9%

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

                                                                                                                                    \[\leadsto x \cdot \frac{y + x}{y} \]
                                                                                                                                  3. Step-by-step derivation
                                                                                                                                    1. Applied rewrites57.1%

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

                                                                                                                                    if 9.9999999999999996e-24 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < 5.0000000000000001e26

                                                                                                                                    1. Initial program 88.9%

                                                                                                                                      \[\frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1} \]
                                                                                                                                    2. Step-by-step derivation
                                                                                                                                      1. Applied rewrites88.7%

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

                                                                                                                                        \[\leadsto \frac{1}{\frac{1 + x}{x}} \]
                                                                                                                                      3. Step-by-step derivation
                                                                                                                                        1. Applied rewrites50.8%

                                                                                                                                          \[\leadsto \frac{1}{\frac{1 + x}{x}} \]
                                                                                                                                        2. Taylor expanded in x around inf

                                                                                                                                          \[\leadsto \frac{1}{1 + \frac{1}{x}} \]
                                                                                                                                        3. Step-by-step derivation
                                                                                                                                          1. Applied rewrites50.8%

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

                                                                                                                                        Alternative 9: 90.2% accurate, 0.3× speedup?

                                                                                                                                        \[\begin{array}{l} t_0 := \frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1}\\ t_1 := x \cdot \frac{1}{y}\\ \mathbf{if}\;t\_0 \leq -1 \cdot 10^{+76}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq 10^{-23}:\\ \;\;\;\;x \cdot \frac{y + x}{y}\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+26}:\\ \;\;\;\;\frac{x}{1 + x}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                                                                                                                                        (FPCore (x y)
                                                                                                                                          :precision binary64
                                                                                                                                          :pre TRUE
                                                                                                                                          (let* ((t_0 (/ (* x (+ (/ x y) 1.0)) (+ x 1.0)))
                                                                                                                                               (t_1 (* x (/ 1.0 y))))
                                                                                                                                          (if (<= t_0 -1e+76)
                                                                                                                                            t_1
                                                                                                                                            (if (<= t_0 1e-23)
                                                                                                                                              (* x (/ (+ y x) y))
                                                                                                                                              (if (<= t_0 5e+26) (/ x (+ 1.0 x)) t_1)))))
                                                                                                                                        double code(double x, double y) {
                                                                                                                                        	double t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
                                                                                                                                        	double t_1 = x * (1.0 / y);
                                                                                                                                        	double tmp;
                                                                                                                                        	if (t_0 <= -1e+76) {
                                                                                                                                        		tmp = t_1;
                                                                                                                                        	} else if (t_0 <= 1e-23) {
                                                                                                                                        		tmp = x * ((y + x) / y);
                                                                                                                                        	} else if (t_0 <= 5e+26) {
                                                                                                                                        		tmp = x / (1.0 + x);
                                                                                                                                        	} else {
                                                                                                                                        		tmp = t_1;
                                                                                                                                        	}
                                                                                                                                        	return tmp;
                                                                                                                                        }
                                                                                                                                        
                                                                                                                                        real(8) function code(x, y)
                                                                                                                                        use fmin_fmax_functions
                                                                                                                                            real(8), intent (in) :: x
                                                                                                                                            real(8), intent (in) :: y
                                                                                                                                            real(8) :: t_0
                                                                                                                                            real(8) :: t_1
                                                                                                                                            real(8) :: tmp
                                                                                                                                            t_0 = (x * ((x / y) + 1.0d0)) / (x + 1.0d0)
                                                                                                                                            t_1 = x * (1.0d0 / y)
                                                                                                                                            if (t_0 <= (-1d+76)) then
                                                                                                                                                tmp = t_1
                                                                                                                                            else if (t_0 <= 1d-23) then
                                                                                                                                                tmp = x * ((y + x) / y)
                                                                                                                                            else if (t_0 <= 5d+26) then
                                                                                                                                                tmp = x / (1.0d0 + x)
                                                                                                                                            else
                                                                                                                                                tmp = t_1
                                                                                                                                            end if
                                                                                                                                            code = tmp
                                                                                                                                        end function
                                                                                                                                        
                                                                                                                                        public static double code(double x, double y) {
                                                                                                                                        	double t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
                                                                                                                                        	double t_1 = x * (1.0 / y);
                                                                                                                                        	double tmp;
                                                                                                                                        	if (t_0 <= -1e+76) {
                                                                                                                                        		tmp = t_1;
                                                                                                                                        	} else if (t_0 <= 1e-23) {
                                                                                                                                        		tmp = x * ((y + x) / y);
                                                                                                                                        	} else if (t_0 <= 5e+26) {
                                                                                                                                        		tmp = x / (1.0 + x);
                                                                                                                                        	} else {
                                                                                                                                        		tmp = t_1;
                                                                                                                                        	}
                                                                                                                                        	return tmp;
                                                                                                                                        }
                                                                                                                                        
                                                                                                                                        def code(x, y):
                                                                                                                                        	t_0 = (x * ((x / y) + 1.0)) / (x + 1.0)
                                                                                                                                        	t_1 = x * (1.0 / y)
                                                                                                                                        	tmp = 0
                                                                                                                                        	if t_0 <= -1e+76:
                                                                                                                                        		tmp = t_1
                                                                                                                                        	elif t_0 <= 1e-23:
                                                                                                                                        		tmp = x * ((y + x) / y)
                                                                                                                                        	elif t_0 <= 5e+26:
                                                                                                                                        		tmp = x / (1.0 + x)
                                                                                                                                        	else:
                                                                                                                                        		tmp = t_1
                                                                                                                                        	return tmp
                                                                                                                                        
                                                                                                                                        function code(x, y)
                                                                                                                                        	t_0 = Float64(Float64(x * Float64(Float64(x / y) + 1.0)) / Float64(x + 1.0))
                                                                                                                                        	t_1 = Float64(x * Float64(1.0 / y))
                                                                                                                                        	tmp = 0.0
                                                                                                                                        	if (t_0 <= -1e+76)
                                                                                                                                        		tmp = t_1;
                                                                                                                                        	elseif (t_0 <= 1e-23)
                                                                                                                                        		tmp = Float64(x * Float64(Float64(y + x) / y));
                                                                                                                                        	elseif (t_0 <= 5e+26)
                                                                                                                                        		tmp = Float64(x / Float64(1.0 + x));
                                                                                                                                        	else
                                                                                                                                        		tmp = t_1;
                                                                                                                                        	end
                                                                                                                                        	return tmp
                                                                                                                                        end
                                                                                                                                        
                                                                                                                                        function tmp_2 = code(x, y)
                                                                                                                                        	t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
                                                                                                                                        	t_1 = x * (1.0 / y);
                                                                                                                                        	tmp = 0.0;
                                                                                                                                        	if (t_0 <= -1e+76)
                                                                                                                                        		tmp = t_1;
                                                                                                                                        	elseif (t_0 <= 1e-23)
                                                                                                                                        		tmp = x * ((y + x) / y);
                                                                                                                                        	elseif (t_0 <= 5e+26)
                                                                                                                                        		tmp = x / (1.0 + x);
                                                                                                                                        	else
                                                                                                                                        		tmp = t_1;
                                                                                                                                        	end
                                                                                                                                        	tmp_2 = tmp;
                                                                                                                                        end
                                                                                                                                        
                                                                                                                                        code[x_, y_] := Block[{t$95$0 = N[(N[(x * N[(N[(x / y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1e+76], t$95$1, If[LessEqual[t$95$0, 1e-23], N[(x * N[(N[(y + x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+26], N[(x / N[(1.0 + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
                                                                                                                                        
                                                                                                                                        f(x, y):
                                                                                                                                        	x in [-inf, +inf],
                                                                                                                                        	y in [-inf, +inf]
                                                                                                                                        code: THEORY
                                                                                                                                        BEGIN
                                                                                                                                        f(x, y: real): real =
                                                                                                                                        	LET t_0 = ((x * ((x / y) + (1))) / (x + (1))) IN
                                                                                                                                        		LET t_1 = (x * ((1) / y)) IN
                                                                                                                                        			LET tmp_2 = IF (t_0 <= (500000000000000006643777536)) THEN (x / ((1) + x)) ELSE t_1 ENDIF IN
                                                                                                                                        			LET tmp_1 = IF (t_0 <= (9999999999999999604346980148993092553230786866765862587503680141039208439934782290947623550891876220703125e-129)) THEN (x * ((y + x) / y)) ELSE tmp_2 ENDIF IN
                                                                                                                                        			LET tmp = IF (t_0 <= (-10000000000000000470601344959054695891559601407866630764278709534898249531392)) THEN t_1 ELSE tmp_1 ENDIF IN
                                                                                                                                        	tmp
                                                                                                                                        END code
                                                                                                                                        \begin{array}{l}
                                                                                                                                        t_0 := \frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1}\\
                                                                                                                                        t_1 := x \cdot \frac{1}{y}\\
                                                                                                                                        \mathbf{if}\;t\_0 \leq -1 \cdot 10^{+76}:\\
                                                                                                                                        \;\;\;\;t\_1\\
                                                                                                                                        
                                                                                                                                        \mathbf{elif}\;t\_0 \leq 10^{-23}:\\
                                                                                                                                        \;\;\;\;x \cdot \frac{y + x}{y}\\
                                                                                                                                        
                                                                                                                                        \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+26}:\\
                                                                                                                                        \;\;\;\;\frac{x}{1 + x}\\
                                                                                                                                        
                                                                                                                                        \mathbf{else}:\\
                                                                                                                                        \;\;\;\;t\_1\\
                                                                                                                                        
                                                                                                                                        
                                                                                                                                        \end{array}
                                                                                                                                        
                                                                                                                                        Derivation
                                                                                                                                        1. Split input into 3 regimes
                                                                                                                                        2. if (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < -1e76 or 5.0000000000000001e26 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64)))

                                                                                                                                          1. Initial program 88.9%

                                                                                                                                            \[\frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1} \]
                                                                                                                                          2. Step-by-step derivation
                                                                                                                                            1. Applied rewrites87.9%

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

                                                                                                                                              \[\leadsto x \cdot \frac{1}{y} \]
                                                                                                                                            3. Step-by-step derivation
                                                                                                                                              1. Applied rewrites39.2%

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

                                                                                                                                              if -1e76 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < 9.9999999999999996e-24

                                                                                                                                              1. Initial program 88.9%

                                                                                                                                                \[\frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1} \]
                                                                                                                                              2. Step-by-step derivation
                                                                                                                                                1. Applied rewrites87.9%

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

                                                                                                                                                  \[\leadsto x \cdot \frac{y + x}{y} \]
                                                                                                                                                3. Step-by-step derivation
                                                                                                                                                  1. Applied rewrites57.1%

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

                                                                                                                                                  if 9.9999999999999996e-24 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < 5.0000000000000001e26

                                                                                                                                                  1. Initial program 88.9%

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

                                                                                                                                                    \[\leadsto \frac{x}{1 + x} \]
                                                                                                                                                  3. Step-by-step derivation
                                                                                                                                                    1. Applied rewrites50.9%

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

                                                                                                                                                  Alternative 10: 85.4% accurate, 0.3× speedup?

                                                                                                                                                  \[\begin{array}{l} t_0 := \frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1}\\ t_1 := x \cdot \frac{1}{y}\\ \mathbf{if}\;t\_0 \leq -1 \cdot 10^{+76}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq -2 \cdot 10^{-5}:\\ \;\;\;\;\frac{x}{\frac{y}{x}}\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+26}:\\ \;\;\;\;\frac{x}{1 + x}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                                                                                                                                                  (FPCore (x y)
                                                                                                                                                    :precision binary64
                                                                                                                                                    :pre TRUE
                                                                                                                                                    (let* ((t_0 (/ (* x (+ (/ x y) 1.0)) (+ x 1.0)))
                                                                                                                                                         (t_1 (* x (/ 1.0 y))))
                                                                                                                                                    (if (<= t_0 -1e+76)
                                                                                                                                                      t_1
                                                                                                                                                      (if (<= t_0 -2e-5)
                                                                                                                                                        (/ x (/ y x))
                                                                                                                                                        (if (<= t_0 5e+26) (/ x (+ 1.0 x)) t_1)))))
                                                                                                                                                  double code(double x, double y) {
                                                                                                                                                  	double t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
                                                                                                                                                  	double t_1 = x * (1.0 / y);
                                                                                                                                                  	double tmp;
                                                                                                                                                  	if (t_0 <= -1e+76) {
                                                                                                                                                  		tmp = t_1;
                                                                                                                                                  	} else if (t_0 <= -2e-5) {
                                                                                                                                                  		tmp = x / (y / x);
                                                                                                                                                  	} else if (t_0 <= 5e+26) {
                                                                                                                                                  		tmp = x / (1.0 + x);
                                                                                                                                                  	} else {
                                                                                                                                                  		tmp = t_1;
                                                                                                                                                  	}
                                                                                                                                                  	return tmp;
                                                                                                                                                  }
                                                                                                                                                  
                                                                                                                                                  real(8) function code(x, y)
                                                                                                                                                  use fmin_fmax_functions
                                                                                                                                                      real(8), intent (in) :: x
                                                                                                                                                      real(8), intent (in) :: y
                                                                                                                                                      real(8) :: t_0
                                                                                                                                                      real(8) :: t_1
                                                                                                                                                      real(8) :: tmp
                                                                                                                                                      t_0 = (x * ((x / y) + 1.0d0)) / (x + 1.0d0)
                                                                                                                                                      t_1 = x * (1.0d0 / y)
                                                                                                                                                      if (t_0 <= (-1d+76)) then
                                                                                                                                                          tmp = t_1
                                                                                                                                                      else if (t_0 <= (-2d-5)) then
                                                                                                                                                          tmp = x / (y / x)
                                                                                                                                                      else if (t_0 <= 5d+26) then
                                                                                                                                                          tmp = x / (1.0d0 + x)
                                                                                                                                                      else
                                                                                                                                                          tmp = t_1
                                                                                                                                                      end if
                                                                                                                                                      code = tmp
                                                                                                                                                  end function
                                                                                                                                                  
                                                                                                                                                  public static double code(double x, double y) {
                                                                                                                                                  	double t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
                                                                                                                                                  	double t_1 = x * (1.0 / y);
                                                                                                                                                  	double tmp;
                                                                                                                                                  	if (t_0 <= -1e+76) {
                                                                                                                                                  		tmp = t_1;
                                                                                                                                                  	} else if (t_0 <= -2e-5) {
                                                                                                                                                  		tmp = x / (y / x);
                                                                                                                                                  	} else if (t_0 <= 5e+26) {
                                                                                                                                                  		tmp = x / (1.0 + x);
                                                                                                                                                  	} else {
                                                                                                                                                  		tmp = t_1;
                                                                                                                                                  	}
                                                                                                                                                  	return tmp;
                                                                                                                                                  }
                                                                                                                                                  
                                                                                                                                                  def code(x, y):
                                                                                                                                                  	t_0 = (x * ((x / y) + 1.0)) / (x + 1.0)
                                                                                                                                                  	t_1 = x * (1.0 / y)
                                                                                                                                                  	tmp = 0
                                                                                                                                                  	if t_0 <= -1e+76:
                                                                                                                                                  		tmp = t_1
                                                                                                                                                  	elif t_0 <= -2e-5:
                                                                                                                                                  		tmp = x / (y / x)
                                                                                                                                                  	elif t_0 <= 5e+26:
                                                                                                                                                  		tmp = x / (1.0 + x)
                                                                                                                                                  	else:
                                                                                                                                                  		tmp = t_1
                                                                                                                                                  	return tmp
                                                                                                                                                  
                                                                                                                                                  function code(x, y)
                                                                                                                                                  	t_0 = Float64(Float64(x * Float64(Float64(x / y) + 1.0)) / Float64(x + 1.0))
                                                                                                                                                  	t_1 = Float64(x * Float64(1.0 / y))
                                                                                                                                                  	tmp = 0.0
                                                                                                                                                  	if (t_0 <= -1e+76)
                                                                                                                                                  		tmp = t_1;
                                                                                                                                                  	elseif (t_0 <= -2e-5)
                                                                                                                                                  		tmp = Float64(x / Float64(y / x));
                                                                                                                                                  	elseif (t_0 <= 5e+26)
                                                                                                                                                  		tmp = Float64(x / Float64(1.0 + x));
                                                                                                                                                  	else
                                                                                                                                                  		tmp = t_1;
                                                                                                                                                  	end
                                                                                                                                                  	return tmp
                                                                                                                                                  end
                                                                                                                                                  
                                                                                                                                                  function tmp_2 = code(x, y)
                                                                                                                                                  	t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
                                                                                                                                                  	t_1 = x * (1.0 / y);
                                                                                                                                                  	tmp = 0.0;
                                                                                                                                                  	if (t_0 <= -1e+76)
                                                                                                                                                  		tmp = t_1;
                                                                                                                                                  	elseif (t_0 <= -2e-5)
                                                                                                                                                  		tmp = x / (y / x);
                                                                                                                                                  	elseif (t_0 <= 5e+26)
                                                                                                                                                  		tmp = x / (1.0 + x);
                                                                                                                                                  	else
                                                                                                                                                  		tmp = t_1;
                                                                                                                                                  	end
                                                                                                                                                  	tmp_2 = tmp;
                                                                                                                                                  end
                                                                                                                                                  
                                                                                                                                                  code[x_, y_] := Block[{t$95$0 = N[(N[(x * N[(N[(x / y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1e+76], t$95$1, If[LessEqual[t$95$0, -2e-5], N[(x / N[(y / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+26], N[(x / N[(1.0 + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
                                                                                                                                                  
                                                                                                                                                  f(x, y):
                                                                                                                                                  	x in [-inf, +inf],
                                                                                                                                                  	y in [-inf, +inf]
                                                                                                                                                  code: THEORY
                                                                                                                                                  BEGIN
                                                                                                                                                  f(x, y: real): real =
                                                                                                                                                  	LET t_0 = ((x * ((x / y) + (1))) / (x + (1))) IN
                                                                                                                                                  		LET t_1 = (x * ((1) / y)) IN
                                                                                                                                                  			LET tmp_2 = IF (t_0 <= (500000000000000006643777536)) THEN (x / ((1) + x)) ELSE t_1 ENDIF IN
                                                                                                                                                  			LET tmp_1 = IF (t_0 <= (-2000000000000000163606107828062619091724627651274204254150390625e-68)) THEN (x / (y / x)) ELSE tmp_2 ENDIF IN
                                                                                                                                                  			LET tmp = IF (t_0 <= (-10000000000000000470601344959054695891559601407866630764278709534898249531392)) THEN t_1 ELSE tmp_1 ENDIF IN
                                                                                                                                                  	tmp
                                                                                                                                                  END code
                                                                                                                                                  \begin{array}{l}
                                                                                                                                                  t_0 := \frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1}\\
                                                                                                                                                  t_1 := x \cdot \frac{1}{y}\\
                                                                                                                                                  \mathbf{if}\;t\_0 \leq -1 \cdot 10^{+76}:\\
                                                                                                                                                  \;\;\;\;t\_1\\
                                                                                                                                                  
                                                                                                                                                  \mathbf{elif}\;t\_0 \leq -2 \cdot 10^{-5}:\\
                                                                                                                                                  \;\;\;\;\frac{x}{\frac{y}{x}}\\
                                                                                                                                                  
                                                                                                                                                  \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+26}:\\
                                                                                                                                                  \;\;\;\;\frac{x}{1 + x}\\
                                                                                                                                                  
                                                                                                                                                  \mathbf{else}:\\
                                                                                                                                                  \;\;\;\;t\_1\\
                                                                                                                                                  
                                                                                                                                                  
                                                                                                                                                  \end{array}
                                                                                                                                                  
                                                                                                                                                  Derivation
                                                                                                                                                  1. Split input into 3 regimes
                                                                                                                                                  2. if (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < -1e76 or 5.0000000000000001e26 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64)))

                                                                                                                                                    1. Initial program 88.9%

                                                                                                                                                      \[\frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1} \]
                                                                                                                                                    2. Step-by-step derivation
                                                                                                                                                      1. Applied rewrites87.9%

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

                                                                                                                                                        \[\leadsto x \cdot \frac{1}{y} \]
                                                                                                                                                      3. Step-by-step derivation
                                                                                                                                                        1. Applied rewrites39.2%

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

                                                                                                                                                        if -1e76 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < -2.0000000000000002e-5

                                                                                                                                                        1. Initial program 88.9%

                                                                                                                                                          \[\frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1} \]
                                                                                                                                                        2. Step-by-step derivation
                                                                                                                                                          1. Applied rewrites88.7%

                                                                                                                                                            \[\leadsto \frac{1}{\frac{1 + x}{\mathsf{fma}\left(\frac{x}{y}, x, x\right)}} \]
                                                                                                                                                          2. Step-by-step derivation
                                                                                                                                                            1. Applied rewrites99.9%

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

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

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

                                                                                                                                                                \[\leadsto \frac{x}{\frac{y}{x}} \]
                                                                                                                                                              3. Step-by-step derivation
                                                                                                                                                                1. Applied rewrites21.4%

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

                                                                                                                                                                if -2.0000000000000002e-5 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < 5.0000000000000001e26

                                                                                                                                                                1. Initial program 88.9%

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

                                                                                                                                                                  \[\leadsto \frac{x}{1 + x} \]
                                                                                                                                                                3. Step-by-step derivation
                                                                                                                                                                  1. Applied rewrites50.9%

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

                                                                                                                                                                Alternative 11: 84.2% accurate, 0.3× speedup?

                                                                                                                                                                \[\begin{array}{l} t_0 := \frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1}\\ t_1 := x \cdot \frac{1}{y}\\ \mathbf{if}\;t\_0 \leq -1 \cdot 10^{+76}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq -2 \cdot 10^{-5}:\\ \;\;\;\;x \cdot \frac{x}{y}\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+26}:\\ \;\;\;\;\frac{x}{1 + x}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                                                                                                                                                                (FPCore (x y)
                                                                                                                                                                  :precision binary64
                                                                                                                                                                  :pre TRUE
                                                                                                                                                                  (let* ((t_0 (/ (* x (+ (/ x y) 1.0)) (+ x 1.0)))
                                                                                                                                                                       (t_1 (* x (/ 1.0 y))))
                                                                                                                                                                  (if (<= t_0 -1e+76)
                                                                                                                                                                    t_1
                                                                                                                                                                    (if (<= t_0 -2e-5)
                                                                                                                                                                      (* x (/ x y))
                                                                                                                                                                      (if (<= t_0 5e+26) (/ x (+ 1.0 x)) t_1)))))
                                                                                                                                                                double code(double x, double y) {
                                                                                                                                                                	double t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
                                                                                                                                                                	double t_1 = x * (1.0 / y);
                                                                                                                                                                	double tmp;
                                                                                                                                                                	if (t_0 <= -1e+76) {
                                                                                                                                                                		tmp = t_1;
                                                                                                                                                                	} else if (t_0 <= -2e-5) {
                                                                                                                                                                		tmp = x * (x / y);
                                                                                                                                                                	} else if (t_0 <= 5e+26) {
                                                                                                                                                                		tmp = x / (1.0 + x);
                                                                                                                                                                	} else {
                                                                                                                                                                		tmp = t_1;
                                                                                                                                                                	}
                                                                                                                                                                	return tmp;
                                                                                                                                                                }
                                                                                                                                                                
                                                                                                                                                                real(8) function code(x, y)
                                                                                                                                                                use fmin_fmax_functions
                                                                                                                                                                    real(8), intent (in) :: x
                                                                                                                                                                    real(8), intent (in) :: y
                                                                                                                                                                    real(8) :: t_0
                                                                                                                                                                    real(8) :: t_1
                                                                                                                                                                    real(8) :: tmp
                                                                                                                                                                    t_0 = (x * ((x / y) + 1.0d0)) / (x + 1.0d0)
                                                                                                                                                                    t_1 = x * (1.0d0 / y)
                                                                                                                                                                    if (t_0 <= (-1d+76)) then
                                                                                                                                                                        tmp = t_1
                                                                                                                                                                    else if (t_0 <= (-2d-5)) then
                                                                                                                                                                        tmp = x * (x / y)
                                                                                                                                                                    else if (t_0 <= 5d+26) then
                                                                                                                                                                        tmp = x / (1.0d0 + x)
                                                                                                                                                                    else
                                                                                                                                                                        tmp = t_1
                                                                                                                                                                    end if
                                                                                                                                                                    code = tmp
                                                                                                                                                                end function
                                                                                                                                                                
                                                                                                                                                                public static double code(double x, double y) {
                                                                                                                                                                	double t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
                                                                                                                                                                	double t_1 = x * (1.0 / y);
                                                                                                                                                                	double tmp;
                                                                                                                                                                	if (t_0 <= -1e+76) {
                                                                                                                                                                		tmp = t_1;
                                                                                                                                                                	} else if (t_0 <= -2e-5) {
                                                                                                                                                                		tmp = x * (x / y);
                                                                                                                                                                	} else if (t_0 <= 5e+26) {
                                                                                                                                                                		tmp = x / (1.0 + x);
                                                                                                                                                                	} else {
                                                                                                                                                                		tmp = t_1;
                                                                                                                                                                	}
                                                                                                                                                                	return tmp;
                                                                                                                                                                }
                                                                                                                                                                
                                                                                                                                                                def code(x, y):
                                                                                                                                                                	t_0 = (x * ((x / y) + 1.0)) / (x + 1.0)
                                                                                                                                                                	t_1 = x * (1.0 / y)
                                                                                                                                                                	tmp = 0
                                                                                                                                                                	if t_0 <= -1e+76:
                                                                                                                                                                		tmp = t_1
                                                                                                                                                                	elif t_0 <= -2e-5:
                                                                                                                                                                		tmp = x * (x / y)
                                                                                                                                                                	elif t_0 <= 5e+26:
                                                                                                                                                                		tmp = x / (1.0 + x)
                                                                                                                                                                	else:
                                                                                                                                                                		tmp = t_1
                                                                                                                                                                	return tmp
                                                                                                                                                                
                                                                                                                                                                function code(x, y)
                                                                                                                                                                	t_0 = Float64(Float64(x * Float64(Float64(x / y) + 1.0)) / Float64(x + 1.0))
                                                                                                                                                                	t_1 = Float64(x * Float64(1.0 / y))
                                                                                                                                                                	tmp = 0.0
                                                                                                                                                                	if (t_0 <= -1e+76)
                                                                                                                                                                		tmp = t_1;
                                                                                                                                                                	elseif (t_0 <= -2e-5)
                                                                                                                                                                		tmp = Float64(x * Float64(x / y));
                                                                                                                                                                	elseif (t_0 <= 5e+26)
                                                                                                                                                                		tmp = Float64(x / Float64(1.0 + x));
                                                                                                                                                                	else
                                                                                                                                                                		tmp = t_1;
                                                                                                                                                                	end
                                                                                                                                                                	return tmp
                                                                                                                                                                end
                                                                                                                                                                
                                                                                                                                                                function tmp_2 = code(x, y)
                                                                                                                                                                	t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
                                                                                                                                                                	t_1 = x * (1.0 / y);
                                                                                                                                                                	tmp = 0.0;
                                                                                                                                                                	if (t_0 <= -1e+76)
                                                                                                                                                                		tmp = t_1;
                                                                                                                                                                	elseif (t_0 <= -2e-5)
                                                                                                                                                                		tmp = x * (x / y);
                                                                                                                                                                	elseif (t_0 <= 5e+26)
                                                                                                                                                                		tmp = x / (1.0 + x);
                                                                                                                                                                	else
                                                                                                                                                                		tmp = t_1;
                                                                                                                                                                	end
                                                                                                                                                                	tmp_2 = tmp;
                                                                                                                                                                end
                                                                                                                                                                
                                                                                                                                                                code[x_, y_] := Block[{t$95$0 = N[(N[(x * N[(N[(x / y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1e+76], t$95$1, If[LessEqual[t$95$0, -2e-5], N[(x * N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+26], N[(x / N[(1.0 + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
                                                                                                                                                                
                                                                                                                                                                f(x, y):
                                                                                                                                                                	x in [-inf, +inf],
                                                                                                                                                                	y in [-inf, +inf]
                                                                                                                                                                code: THEORY
                                                                                                                                                                BEGIN
                                                                                                                                                                f(x, y: real): real =
                                                                                                                                                                	LET t_0 = ((x * ((x / y) + (1))) / (x + (1))) IN
                                                                                                                                                                		LET t_1 = (x * ((1) / y)) IN
                                                                                                                                                                			LET tmp_2 = IF (t_0 <= (500000000000000006643777536)) THEN (x / ((1) + x)) ELSE t_1 ENDIF IN
                                                                                                                                                                			LET tmp_1 = IF (t_0 <= (-2000000000000000163606107828062619091724627651274204254150390625e-68)) THEN (x * (x / y)) ELSE tmp_2 ENDIF IN
                                                                                                                                                                			LET tmp = IF (t_0 <= (-10000000000000000470601344959054695891559601407866630764278709534898249531392)) THEN t_1 ELSE tmp_1 ENDIF IN
                                                                                                                                                                	tmp
                                                                                                                                                                END code
                                                                                                                                                                \begin{array}{l}
                                                                                                                                                                t_0 := \frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1}\\
                                                                                                                                                                t_1 := x \cdot \frac{1}{y}\\
                                                                                                                                                                \mathbf{if}\;t\_0 \leq -1 \cdot 10^{+76}:\\
                                                                                                                                                                \;\;\;\;t\_1\\
                                                                                                                                                                
                                                                                                                                                                \mathbf{elif}\;t\_0 \leq -2 \cdot 10^{-5}:\\
                                                                                                                                                                \;\;\;\;x \cdot \frac{x}{y}\\
                                                                                                                                                                
                                                                                                                                                                \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+26}:\\
                                                                                                                                                                \;\;\;\;\frac{x}{1 + x}\\
                                                                                                                                                                
                                                                                                                                                                \mathbf{else}:\\
                                                                                                                                                                \;\;\;\;t\_1\\
                                                                                                                                                                
                                                                                                                                                                
                                                                                                                                                                \end{array}
                                                                                                                                                                
                                                                                                                                                                Derivation
                                                                                                                                                                1. Split input into 3 regimes
                                                                                                                                                                2. if (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < -1e76 or 5.0000000000000001e26 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64)))

                                                                                                                                                                  1. Initial program 88.9%

                                                                                                                                                                    \[\frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1} \]
                                                                                                                                                                  2. Step-by-step derivation
                                                                                                                                                                    1. Applied rewrites87.9%

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

                                                                                                                                                                      \[\leadsto x \cdot \frac{1}{y} \]
                                                                                                                                                                    3. Step-by-step derivation
                                                                                                                                                                      1. Applied rewrites39.2%

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

                                                                                                                                                                      if -1e76 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < -2.0000000000000002e-5

                                                                                                                                                                      1. Initial program 88.9%

                                                                                                                                                                        \[\frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1} \]
                                                                                                                                                                      2. Step-by-step derivation
                                                                                                                                                                        1. Applied rewrites87.9%

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

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

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

                                                                                                                                                                            \[\leadsto x \cdot \frac{x}{y} \]
                                                                                                                                                                          3. Step-by-step derivation
                                                                                                                                                                            1. Applied rewrites21.4%

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

                                                                                                                                                                            if -2.0000000000000002e-5 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < 5.0000000000000001e26

                                                                                                                                                                            1. Initial program 88.9%

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

                                                                                                                                                                              \[\leadsto \frac{x}{1 + x} \]
                                                                                                                                                                            3. Step-by-step derivation
                                                                                                                                                                              1. Applied rewrites50.9%

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

                                                                                                                                                                            Alternative 12: 84.2% accurate, 0.4× speedup?

                                                                                                                                                                            \[\begin{array}{l} t_0 := \frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1}\\ t_1 := x \cdot \frac{1}{y}\\ \mathbf{if}\;t\_0 \leq -50000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+26}:\\ \;\;\;\;\frac{x}{1 + x}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                                                                                                                                                                            (FPCore (x y)
                                                                                                                                                                              :precision binary64
                                                                                                                                                                              :pre TRUE
                                                                                                                                                                              (let* ((t_0 (/ (* x (+ (/ x y) 1.0)) (+ x 1.0)))
                                                                                                                                                                                   (t_1 (* x (/ 1.0 y))))
                                                                                                                                                                              (if (<= t_0 -50000.0) t_1 (if (<= t_0 5e+26) (/ x (+ 1.0 x)) t_1))))
                                                                                                                                                                            double code(double x, double y) {
                                                                                                                                                                            	double t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
                                                                                                                                                                            	double t_1 = x * (1.0 / y);
                                                                                                                                                                            	double tmp;
                                                                                                                                                                            	if (t_0 <= -50000.0) {
                                                                                                                                                                            		tmp = t_1;
                                                                                                                                                                            	} else if (t_0 <= 5e+26) {
                                                                                                                                                                            		tmp = x / (1.0 + x);
                                                                                                                                                                            	} else {
                                                                                                                                                                            		tmp = t_1;
                                                                                                                                                                            	}
                                                                                                                                                                            	return tmp;
                                                                                                                                                                            }
                                                                                                                                                                            
                                                                                                                                                                            real(8) function code(x, y)
                                                                                                                                                                            use fmin_fmax_functions
                                                                                                                                                                                real(8), intent (in) :: x
                                                                                                                                                                                real(8), intent (in) :: y
                                                                                                                                                                                real(8) :: t_0
                                                                                                                                                                                real(8) :: t_1
                                                                                                                                                                                real(8) :: tmp
                                                                                                                                                                                t_0 = (x * ((x / y) + 1.0d0)) / (x + 1.0d0)
                                                                                                                                                                                t_1 = x * (1.0d0 / y)
                                                                                                                                                                                if (t_0 <= (-50000.0d0)) then
                                                                                                                                                                                    tmp = t_1
                                                                                                                                                                                else if (t_0 <= 5d+26) then
                                                                                                                                                                                    tmp = x / (1.0d0 + x)
                                                                                                                                                                                else
                                                                                                                                                                                    tmp = t_1
                                                                                                                                                                                end if
                                                                                                                                                                                code = tmp
                                                                                                                                                                            end function
                                                                                                                                                                            
                                                                                                                                                                            public static double code(double x, double y) {
                                                                                                                                                                            	double t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
                                                                                                                                                                            	double t_1 = x * (1.0 / y);
                                                                                                                                                                            	double tmp;
                                                                                                                                                                            	if (t_0 <= -50000.0) {
                                                                                                                                                                            		tmp = t_1;
                                                                                                                                                                            	} else if (t_0 <= 5e+26) {
                                                                                                                                                                            		tmp = x / (1.0 + x);
                                                                                                                                                                            	} else {
                                                                                                                                                                            		tmp = t_1;
                                                                                                                                                                            	}
                                                                                                                                                                            	return tmp;
                                                                                                                                                                            }
                                                                                                                                                                            
                                                                                                                                                                            def code(x, y):
                                                                                                                                                                            	t_0 = (x * ((x / y) + 1.0)) / (x + 1.0)
                                                                                                                                                                            	t_1 = x * (1.0 / y)
                                                                                                                                                                            	tmp = 0
                                                                                                                                                                            	if t_0 <= -50000.0:
                                                                                                                                                                            		tmp = t_1
                                                                                                                                                                            	elif t_0 <= 5e+26:
                                                                                                                                                                            		tmp = x / (1.0 + x)
                                                                                                                                                                            	else:
                                                                                                                                                                            		tmp = t_1
                                                                                                                                                                            	return tmp
                                                                                                                                                                            
                                                                                                                                                                            function code(x, y)
                                                                                                                                                                            	t_0 = Float64(Float64(x * Float64(Float64(x / y) + 1.0)) / Float64(x + 1.0))
                                                                                                                                                                            	t_1 = Float64(x * Float64(1.0 / y))
                                                                                                                                                                            	tmp = 0.0
                                                                                                                                                                            	if (t_0 <= -50000.0)
                                                                                                                                                                            		tmp = t_1;
                                                                                                                                                                            	elseif (t_0 <= 5e+26)
                                                                                                                                                                            		tmp = Float64(x / Float64(1.0 + x));
                                                                                                                                                                            	else
                                                                                                                                                                            		tmp = t_1;
                                                                                                                                                                            	end
                                                                                                                                                                            	return tmp
                                                                                                                                                                            end
                                                                                                                                                                            
                                                                                                                                                                            function tmp_2 = code(x, y)
                                                                                                                                                                            	t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
                                                                                                                                                                            	t_1 = x * (1.0 / y);
                                                                                                                                                                            	tmp = 0.0;
                                                                                                                                                                            	if (t_0 <= -50000.0)
                                                                                                                                                                            		tmp = t_1;
                                                                                                                                                                            	elseif (t_0 <= 5e+26)
                                                                                                                                                                            		tmp = x / (1.0 + x);
                                                                                                                                                                            	else
                                                                                                                                                                            		tmp = t_1;
                                                                                                                                                                            	end
                                                                                                                                                                            	tmp_2 = tmp;
                                                                                                                                                                            end
                                                                                                                                                                            
                                                                                                                                                                            code[x_, y_] := Block[{t$95$0 = N[(N[(x * N[(N[(x / y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -50000.0], t$95$1, If[LessEqual[t$95$0, 5e+26], N[(x / N[(1.0 + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
                                                                                                                                                                            
                                                                                                                                                                            f(x, y):
                                                                                                                                                                            	x in [-inf, +inf],
                                                                                                                                                                            	y in [-inf, +inf]
                                                                                                                                                                            code: THEORY
                                                                                                                                                                            BEGIN
                                                                                                                                                                            f(x, y: real): real =
                                                                                                                                                                            	LET t_0 = ((x * ((x / y) + (1))) / (x + (1))) IN
                                                                                                                                                                            		LET t_1 = (x * ((1) / y)) IN
                                                                                                                                                                            			LET tmp_1 = IF (t_0 <= (500000000000000006643777536)) THEN (x / ((1) + x)) ELSE t_1 ENDIF IN
                                                                                                                                                                            			LET tmp = IF (t_0 <= (-5e4)) THEN t_1 ELSE tmp_1 ENDIF IN
                                                                                                                                                                            	tmp
                                                                                                                                                                            END code
                                                                                                                                                                            \begin{array}{l}
                                                                                                                                                                            t_0 := \frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1}\\
                                                                                                                                                                            t_1 := x \cdot \frac{1}{y}\\
                                                                                                                                                                            \mathbf{if}\;t\_0 \leq -50000:\\
                                                                                                                                                                            \;\;\;\;t\_1\\
                                                                                                                                                                            
                                                                                                                                                                            \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+26}:\\
                                                                                                                                                                            \;\;\;\;\frac{x}{1 + x}\\
                                                                                                                                                                            
                                                                                                                                                                            \mathbf{else}:\\
                                                                                                                                                                            \;\;\;\;t\_1\\
                                                                                                                                                                            
                                                                                                                                                                            
                                                                                                                                                                            \end{array}
                                                                                                                                                                            
                                                                                                                                                                            Derivation
                                                                                                                                                                            1. Split input into 2 regimes
                                                                                                                                                                            2. if (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < -5e4 or 5.0000000000000001e26 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64)))

                                                                                                                                                                              1. Initial program 88.9%

                                                                                                                                                                                \[\frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1} \]
                                                                                                                                                                              2. Step-by-step derivation
                                                                                                                                                                                1. Applied rewrites87.9%

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

                                                                                                                                                                                  \[\leadsto x \cdot \frac{1}{y} \]
                                                                                                                                                                                3. Step-by-step derivation
                                                                                                                                                                                  1. Applied rewrites39.2%

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

                                                                                                                                                                                  if -5e4 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < 5.0000000000000001e26

                                                                                                                                                                                  1. Initial program 88.9%

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

                                                                                                                                                                                    \[\leadsto \frac{x}{1 + x} \]
                                                                                                                                                                                  3. Step-by-step derivation
                                                                                                                                                                                    1. Applied rewrites50.9%

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

                                                                                                                                                                                  Alternative 13: 58.1% accurate, 0.6× speedup?

                                                                                                                                                                                  \[\begin{array}{l} \mathbf{if}\;\frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1} \leq -1 \cdot 10^{+76}:\\ \;\;\;\;\frac{-1}{0}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 + x}\\ \end{array} \]
                                                                                                                                                                                  (FPCore (x y)
                                                                                                                                                                                    :precision binary64
                                                                                                                                                                                    :pre TRUE
                                                                                                                                                                                    (if (<= (/ (* x (+ (/ x y) 1.0)) (+ x 1.0)) -1e+76)
                                                                                                                                                                                    (/ -1.0 0.0)
                                                                                                                                                                                    (/ x (+ 1.0 x))))
                                                                                                                                                                                  double code(double x, double y) {
                                                                                                                                                                                  	double tmp;
                                                                                                                                                                                  	if (((x * ((x / y) + 1.0)) / (x + 1.0)) <= -1e+76) {
                                                                                                                                                                                  		tmp = -1.0 / 0.0;
                                                                                                                                                                                  	} else {
                                                                                                                                                                                  		tmp = x / (1.0 + x);
                                                                                                                                                                                  	}
                                                                                                                                                                                  	return tmp;
                                                                                                                                                                                  }
                                                                                                                                                                                  
                                                                                                                                                                                  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 * ((x / y) + 1.0d0)) / (x + 1.0d0)) <= (-1d+76)) then
                                                                                                                                                                                          tmp = (-1.0d0) / 0.0d0
                                                                                                                                                                                      else
                                                                                                                                                                                          tmp = x / (1.0d0 + x)
                                                                                                                                                                                      end if
                                                                                                                                                                                      code = tmp
                                                                                                                                                                                  end function
                                                                                                                                                                                  
                                                                                                                                                                                  public static double code(double x, double y) {
                                                                                                                                                                                  	double tmp;
                                                                                                                                                                                  	if (((x * ((x / y) + 1.0)) / (x + 1.0)) <= -1e+76) {
                                                                                                                                                                                  		tmp = -1.0 / 0.0;
                                                                                                                                                                                  	} else {
                                                                                                                                                                                  		tmp = x / (1.0 + x);
                                                                                                                                                                                  	}
                                                                                                                                                                                  	return tmp;
                                                                                                                                                                                  }
                                                                                                                                                                                  
                                                                                                                                                                                  def code(x, y):
                                                                                                                                                                                  	tmp = 0
                                                                                                                                                                                  	if ((x * ((x / y) + 1.0)) / (x + 1.0)) <= -1e+76:
                                                                                                                                                                                  		tmp = -1.0 / 0.0
                                                                                                                                                                                  	else:
                                                                                                                                                                                  		tmp = x / (1.0 + x)
                                                                                                                                                                                  	return tmp
                                                                                                                                                                                  
                                                                                                                                                                                  function code(x, y)
                                                                                                                                                                                  	tmp = 0.0
                                                                                                                                                                                  	if (Float64(Float64(x * Float64(Float64(x / y) + 1.0)) / Float64(x + 1.0)) <= -1e+76)
                                                                                                                                                                                  		tmp = Float64(-1.0 / 0.0);
                                                                                                                                                                                  	else
                                                                                                                                                                                  		tmp = Float64(x / Float64(1.0 + x));
                                                                                                                                                                                  	end
                                                                                                                                                                                  	return tmp
                                                                                                                                                                                  end
                                                                                                                                                                                  
                                                                                                                                                                                  function tmp_2 = code(x, y)
                                                                                                                                                                                  	tmp = 0.0;
                                                                                                                                                                                  	if (((x * ((x / y) + 1.0)) / (x + 1.0)) <= -1e+76)
                                                                                                                                                                                  		tmp = -1.0 / 0.0;
                                                                                                                                                                                  	else
                                                                                                                                                                                  		tmp = x / (1.0 + x);
                                                                                                                                                                                  	end
                                                                                                                                                                                  	tmp_2 = tmp;
                                                                                                                                                                                  end
                                                                                                                                                                                  
                                                                                                                                                                                  code[x_, y_] := If[LessEqual[N[(N[(x * N[(N[(x / y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], -1e+76], N[(-1.0 / 0.0), $MachinePrecision], N[(x / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]]
                                                                                                                                                                                  
                                                                                                                                                                                  f(x, y):
                                                                                                                                                                                  	x in [-inf, +inf],
                                                                                                                                                                                  	y in [-inf, +inf]
                                                                                                                                                                                  code: THEORY
                                                                                                                                                                                  BEGIN
                                                                                                                                                                                  f(x, y: real): real =
                                                                                                                                                                                  	LET tmp = IF (((x * ((x / y) + (1))) / (x + (1))) <= (-10000000000000000470601344959054695891559601407866630764278709534898249531392)) THEN ((-1) / (0)) ELSE (x / ((1) + x)) ENDIF IN
                                                                                                                                                                                  	tmp
                                                                                                                                                                                  END code
                                                                                                                                                                                  \begin{array}{l}
                                                                                                                                                                                  \mathbf{if}\;\frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1} \leq -1 \cdot 10^{+76}:\\
                                                                                                                                                                                  \;\;\;\;\frac{-1}{0}\\
                                                                                                                                                                                  
                                                                                                                                                                                  \mathbf{else}:\\
                                                                                                                                                                                  \;\;\;\;\frac{x}{1 + x}\\
                                                                                                                                                                                  
                                                                                                                                                                                  
                                                                                                                                                                                  \end{array}
                                                                                                                                                                                  
                                                                                                                                                                                  Derivation
                                                                                                                                                                                  1. Split input into 2 regimes
                                                                                                                                                                                  2. if (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < -1e76

                                                                                                                                                                                    1. Initial program 88.9%

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

                                                                                                                                                                                      \[\leadsto \frac{x}{1 + x} \]
                                                                                                                                                                                    3. Step-by-step derivation
                                                                                                                                                                                      1. Applied rewrites50.9%

                                                                                                                                                                                        \[\leadsto \frac{x}{1 + x} \]
                                                                                                                                                                                      2. Taylor expanded in x around inf

                                                                                                                                                                                        \[\leadsto 1 - \frac{1}{x} \]
                                                                                                                                                                                      3. Step-by-step derivation
                                                                                                                                                                                        1. Applied rewrites13.6%

                                                                                                                                                                                          \[\leadsto 1 - \frac{1}{x} \]
                                                                                                                                                                                        2. Taylor expanded in x around 0

                                                                                                                                                                                          \[\leadsto \frac{-1}{x} \]
                                                                                                                                                                                        3. Step-by-step derivation
                                                                                                                                                                                          1. Applied rewrites2.4%

                                                                                                                                                                                            \[\leadsto \frac{-1}{x} \]
                                                                                                                                                                                          2. Taylor expanded in undef-var around zero

                                                                                                                                                                                            \[\leadsto \frac{-1}{0} \]
                                                                                                                                                                                          3. Step-by-step derivation
                                                                                                                                                                                            1. Applied rewrites8.4%

                                                                                                                                                                                              \[\leadsto \frac{-1}{0} \]

                                                                                                                                                                                            if -1e76 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64)))

                                                                                                                                                                                            1. Initial program 88.9%

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

                                                                                                                                                                                              \[\leadsto \frac{x}{1 + x} \]
                                                                                                                                                                                            3. Step-by-step derivation
                                                                                                                                                                                              1. Applied rewrites50.9%

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

                                                                                                                                                                                            Alternative 14: 8.4% accurate, 3.5× speedup?

                                                                                                                                                                                            \[\frac{-1}{0} \]
                                                                                                                                                                                            (FPCore (x y)
                                                                                                                                                                                              :precision binary64
                                                                                                                                                                                              :pre TRUE
                                                                                                                                                                                              (/ -1.0 0.0))
                                                                                                                                                                                            double code(double x, double y) {
                                                                                                                                                                                            	return -1.0 / 0.0;
                                                                                                                                                                                            }
                                                                                                                                                                                            
                                                                                                                                                                                            real(8) function code(x, y)
                                                                                                                                                                                            use fmin_fmax_functions
                                                                                                                                                                                                real(8), intent (in) :: x
                                                                                                                                                                                                real(8), intent (in) :: y
                                                                                                                                                                                                code = (-1.0d0) / 0.0d0
                                                                                                                                                                                            end function
                                                                                                                                                                                            
                                                                                                                                                                                            public static double code(double x, double y) {
                                                                                                                                                                                            	return -1.0 / 0.0;
                                                                                                                                                                                            }
                                                                                                                                                                                            
                                                                                                                                                                                            def code(x, y):
                                                                                                                                                                                            	return -1.0 / 0.0
                                                                                                                                                                                            
                                                                                                                                                                                            function code(x, y)
                                                                                                                                                                                            	return Float64(-1.0 / 0.0)
                                                                                                                                                                                            end
                                                                                                                                                                                            
                                                                                                                                                                                            function tmp = code(x, y)
                                                                                                                                                                                            	tmp = -1.0 / 0.0;
                                                                                                                                                                                            end
                                                                                                                                                                                            
                                                                                                                                                                                            code[x_, y_] := N[(-1.0 / 0.0), $MachinePrecision]
                                                                                                                                                                                            
                                                                                                                                                                                            f(x, y):
                                                                                                                                                                                            	x in [-inf, +inf],
                                                                                                                                                                                            	y in [-inf, +inf]
                                                                                                                                                                                            code: THEORY
                                                                                                                                                                                            BEGIN
                                                                                                                                                                                            f(x, y: real): real =
                                                                                                                                                                                            	(-1) / (0)
                                                                                                                                                                                            END code
                                                                                                                                                                                            \frac{-1}{0}
                                                                                                                                                                                            
                                                                                                                                                                                            Derivation
                                                                                                                                                                                            1. Initial program 88.9%

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

                                                                                                                                                                                              \[\leadsto \frac{x}{1 + x} \]
                                                                                                                                                                                            3. Step-by-step derivation
                                                                                                                                                                                              1. Applied rewrites50.9%

                                                                                                                                                                                                \[\leadsto \frac{x}{1 + x} \]
                                                                                                                                                                                              2. Taylor expanded in x around inf

                                                                                                                                                                                                \[\leadsto 1 - \frac{1}{x} \]
                                                                                                                                                                                              3. Step-by-step derivation
                                                                                                                                                                                                1. Applied rewrites13.6%

                                                                                                                                                                                                  \[\leadsto 1 - \frac{1}{x} \]
                                                                                                                                                                                                2. Taylor expanded in x around 0

                                                                                                                                                                                                  \[\leadsto \frac{-1}{x} \]
                                                                                                                                                                                                3. Step-by-step derivation
                                                                                                                                                                                                  1. Applied rewrites2.4%

                                                                                                                                                                                                    \[\leadsto \frac{-1}{x} \]
                                                                                                                                                                                                  2. Taylor expanded in undef-var around zero

                                                                                                                                                                                                    \[\leadsto \frac{-1}{0} \]
                                                                                                                                                                                                  3. Step-by-step derivation
                                                                                                                                                                                                    1. Applied rewrites8.4%

                                                                                                                                                                                                      \[\leadsto \frac{-1}{0} \]
                                                                                                                                                                                                    2. Add Preprocessing

                                                                                                                                                                                                    Alternative 15: 2.4% accurate, 3.5× speedup?

                                                                                                                                                                                                    \[\frac{-1}{x} \]
                                                                                                                                                                                                    (FPCore (x y)
                                                                                                                                                                                                      :precision binary64
                                                                                                                                                                                                      :pre TRUE
                                                                                                                                                                                                      (/ -1.0 x))
                                                                                                                                                                                                    double code(double x, double y) {
                                                                                                                                                                                                    	return -1.0 / x;
                                                                                                                                                                                                    }
                                                                                                                                                                                                    
                                                                                                                                                                                                    real(8) function code(x, y)
                                                                                                                                                                                                    use fmin_fmax_functions
                                                                                                                                                                                                        real(8), intent (in) :: x
                                                                                                                                                                                                        real(8), intent (in) :: y
                                                                                                                                                                                                        code = (-1.0d0) / x
                                                                                                                                                                                                    end function
                                                                                                                                                                                                    
                                                                                                                                                                                                    public static double code(double x, double y) {
                                                                                                                                                                                                    	return -1.0 / x;
                                                                                                                                                                                                    }
                                                                                                                                                                                                    
                                                                                                                                                                                                    def code(x, y):
                                                                                                                                                                                                    	return -1.0 / x
                                                                                                                                                                                                    
                                                                                                                                                                                                    function code(x, y)
                                                                                                                                                                                                    	return Float64(-1.0 / x)
                                                                                                                                                                                                    end
                                                                                                                                                                                                    
                                                                                                                                                                                                    function tmp = code(x, y)
                                                                                                                                                                                                    	tmp = -1.0 / x;
                                                                                                                                                                                                    end
                                                                                                                                                                                                    
                                                                                                                                                                                                    code[x_, y_] := N[(-1.0 / x), $MachinePrecision]
                                                                                                                                                                                                    
                                                                                                                                                                                                    f(x, y):
                                                                                                                                                                                                    	x in [-inf, +inf],
                                                                                                                                                                                                    	y in [-inf, +inf]
                                                                                                                                                                                                    code: THEORY
                                                                                                                                                                                                    BEGIN
                                                                                                                                                                                                    f(x, y: real): real =
                                                                                                                                                                                                    	(-1) / x
                                                                                                                                                                                                    END code
                                                                                                                                                                                                    \frac{-1}{x}
                                                                                                                                                                                                    
                                                                                                                                                                                                    Derivation
                                                                                                                                                                                                    1. Initial program 88.9%

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

                                                                                                                                                                                                      \[\leadsto \frac{x}{1 + x} \]
                                                                                                                                                                                                    3. Step-by-step derivation
                                                                                                                                                                                                      1. Applied rewrites50.9%

                                                                                                                                                                                                        \[\leadsto \frac{x}{1 + x} \]
                                                                                                                                                                                                      2. Taylor expanded in x around inf

                                                                                                                                                                                                        \[\leadsto 1 - \frac{1}{x} \]
                                                                                                                                                                                                      3. Step-by-step derivation
                                                                                                                                                                                                        1. Applied rewrites13.6%

                                                                                                                                                                                                          \[\leadsto 1 - \frac{1}{x} \]
                                                                                                                                                                                                        2. Taylor expanded in x around 0

                                                                                                                                                                                                          \[\leadsto \frac{-1}{x} \]
                                                                                                                                                                                                        3. Step-by-step derivation
                                                                                                                                                                                                          1. Applied rewrites2.4%

                                                                                                                                                                                                            \[\leadsto \frac{-1}{x} \]
                                                                                                                                                                                                          2. Add Preprocessing

                                                                                                                                                                                                          Reproduce

                                                                                                                                                                                                          ?
                                                                                                                                                                                                          herbie shell --seed 2026092 
                                                                                                                                                                                                          (FPCore (x y)
                                                                                                                                                                                                            :name "Codec.Picture.Types:toneMapping from JuicyPixels-3.2.6.1"
                                                                                                                                                                                                            :precision binary64
                                                                                                                                                                                                            (/ (* x (+ (/ x y) 1.0)) (+ x 1.0)))