Statistics.Distribution.Beta:$cvariance from math-functions-0.1.5.2

Percentage Accurate: 83.1% → 96.5%
Time: 8.6s
Alternatives: 14
Speedup: 0.9×

Specification

?
\[\begin{array}{l} \\ \frac{x \cdot y}{\left(z \cdot z\right) \cdot \left(z + 1\right)} \end{array} \]
(FPCore (x y z) :precision binary64 (/ (* x y) (* (* z z) (+ z 1.0))))
double code(double x, double y, double z) {
	return (x * y) / ((z * z) * (z + 1.0));
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = (x * y) / ((z * z) * (z + 1.0d0))
end function
public static double code(double x, double y, double z) {
	return (x * y) / ((z * z) * (z + 1.0));
}
def code(x, y, z):
	return (x * y) / ((z * z) * (z + 1.0))
function code(x, y, z)
	return Float64(Float64(x * y) / Float64(Float64(z * z) * Float64(z + 1.0)))
end
function tmp = code(x, y, z)
	tmp = (x * y) / ((z * z) * (z + 1.0));
end
code[x_, y_, z_] := N[(N[(x * y), $MachinePrecision] / N[(N[(z * z), $MachinePrecision] * N[(z + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 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: 83.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{x \cdot y}{\left(z \cdot z\right) \cdot \left(z + 1\right)} \end{array} \]
(FPCore (x y z) :precision binary64 (/ (* x y) (* (* z z) (+ z 1.0))))
double code(double x, double y, double z) {
	return (x * y) / ((z * z) * (z + 1.0));
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = (x * y) / ((z * z) * (z + 1.0d0))
end function
public static double code(double x, double y, double z) {
	return (x * y) / ((z * z) * (z + 1.0));
}
def code(x, y, z):
	return (x * y) / ((z * z) * (z + 1.0))
function code(x, y, z)
	return Float64(Float64(x * y) / Float64(Float64(z * z) * Float64(z + 1.0)))
end
function tmp = code(x, y, z)
	tmp = (x * y) / ((z * z) * (z + 1.0));
end
code[x_, y_, z_] := N[(N[(x * y), $MachinePrecision] / N[(N[(z * z), $MachinePrecision] * N[(z + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 96.5% accurate, 0.7× speedup?

\[\begin{array}{l} [x, y, z] = \mathsf{sort}([x, y, z])\\ \\ \frac{\frac{\frac{x}{z} \cdot y}{1 + z}}{z} \end{array} \]
NOTE: x, y, and z should be sorted in increasing order before calling this function.
(FPCore (x y z) :precision binary64 (/ (/ (* (/ x z) y) (+ 1.0 z)) z))
assert(x < y && y < z);
double code(double x, double y, double z) {
	return (((x / z) * y) / (1.0 + z)) / z;
}
NOTE: x, y, and z should be sorted in increasing order before calling this function.
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = (((x / z) * y) / (1.0d0 + z)) / z
end function
assert x < y && y < z;
public static double code(double x, double y, double z) {
	return (((x / z) * y) / (1.0 + z)) / z;
}
[x, y, z] = sort([x, y, z])
def code(x, y, z):
	return (((x / z) * y) / (1.0 + z)) / z
x, y, z = sort([x, y, z])
function code(x, y, z)
	return Float64(Float64(Float64(Float64(x / z) * y) / Float64(1.0 + z)) / z)
end
x, y, z = num2cell(sort([x, y, z])){:}
function tmp = code(x, y, z)
	tmp = (((x / z) * y) / (1.0 + z)) / z;
end
NOTE: x, y, and z should be sorted in increasing order before calling this function.
code[x_, y_, z_] := N[(N[(N[(N[(x / z), $MachinePrecision] * y), $MachinePrecision] / N[(1.0 + z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}
[x, y, z] = \mathsf{sort}([x, y, z])\\
\\
\frac{\frac{\frac{x}{z} \cdot y}{1 + z}}{z}
\end{array}
Derivation
  1. Initial program 89.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\frac{\color{blue}{y \cdot \frac{x}{z}}}{z + 1}}{z} \]
    14. lower-/.f6498.6

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

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

      \[\leadsto \frac{\frac{y \cdot \frac{x}{z}}{\color{blue}{1 + z}}}{z} \]
    17. lower-+.f6498.6

      \[\leadsto \frac{\frac{y \cdot \frac{x}{z}}{\color{blue}{1 + z}}}{z} \]
  4. Applied rewrites98.6%

    \[\leadsto \color{blue}{\frac{\frac{y \cdot \frac{x}{z}}{1 + z}}{z}} \]
  5. Final simplification98.6%

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

Alternative 2: 91.0% accurate, 0.5× speedup?

\[\begin{array}{l} [x, y, z] = \mathsf{sort}([x, y, z])\\ \\ \begin{array}{l} t_0 := \left(z \cdot z\right) \cdot \left(1 + z\right)\\ t_1 := \frac{y}{\mathsf{fma}\left(z, z, z\right) \cdot z} \cdot x\\ \mathbf{if}\;t\_0 \leq -1 \cdot 10^{+21}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-37}:\\ \;\;\;\;\frac{\frac{x}{z} \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
NOTE: x, y, and z should be sorted in increasing order before calling this function.
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (* (* z z) (+ 1.0 z))) (t_1 (* (/ y (* (fma z z z) z)) x)))
   (if (<= t_0 -1e+21) t_1 (if (<= t_0 2e-37) (/ (* (/ x z) y) z) t_1))))
assert(x < y && y < z);
double code(double x, double y, double z) {
	double t_0 = (z * z) * (1.0 + z);
	double t_1 = (y / (fma(z, z, z) * z)) * x;
	double tmp;
	if (t_0 <= -1e+21) {
		tmp = t_1;
	} else if (t_0 <= 2e-37) {
		tmp = ((x / z) * y) / z;
	} else {
		tmp = t_1;
	}
	return tmp;
}
x, y, z = sort([x, y, z])
function code(x, y, z)
	t_0 = Float64(Float64(z * z) * Float64(1.0 + z))
	t_1 = Float64(Float64(y / Float64(fma(z, z, z) * z)) * x)
	tmp = 0.0
	if (t_0 <= -1e+21)
		tmp = t_1;
	elseif (t_0 <= 2e-37)
		tmp = Float64(Float64(Float64(x / z) * y) / z);
	else
		tmp = t_1;
	end
	return tmp
end
NOTE: x, y, and z should be sorted in increasing order before calling this function.
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(z * z), $MachinePrecision] * N[(1.0 + z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(y / N[(N[(z * z + z), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[t$95$0, -1e+21], t$95$1, If[LessEqual[t$95$0, 2e-37], N[(N[(N[(x / z), $MachinePrecision] * y), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z] = \mathsf{sort}([x, y, z])\\
\\
\begin{array}{l}
t_0 := \left(z \cdot z\right) \cdot \left(1 + z\right)\\
t_1 := \frac{y}{\mathsf{fma}\left(z, z, z\right) \cdot z} \cdot x\\
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{+21}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-37}:\\
\;\;\;\;\frac{\frac{x}{z} \cdot y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 z z) (+.f64 z #s(literal 1 binary64))) < -1e21 or 2.00000000000000013e-37 < (*.f64 (*.f64 z z) (+.f64 z #s(literal 1 binary64)))

    1. Initial program 89.3%

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

      \[\leadsto \frac{x \cdot y}{\color{blue}{{z}^{2}}} \]
    4. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \frac{x \cdot y}{\color{blue}{z \cdot z}} \]
      2. lower-*.f6455.6

        \[\leadsto \frac{x \cdot y}{\color{blue}{z \cdot z}} \]
    5. Applied rewrites55.6%

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z \cdot z}} \]
      4. *-commutativeN/A

        \[\leadsto \color{blue}{\frac{y}{z \cdot z} \cdot x} \]
      5. lower-*.f64N/A

        \[\leadsto \color{blue}{\frac{y}{z \cdot z} \cdot x} \]
      6. lower-/.f6461.6

        \[\leadsto \color{blue}{\frac{y}{z \cdot z}} \cdot x \]
    7. Applied rewrites61.6%

      \[\leadsto \color{blue}{\frac{y}{z \cdot z} \cdot x} \]
    8. Taylor expanded in z around 0

      \[\leadsto \frac{y}{\color{blue}{{z}^{2} \cdot \left(1 + z\right)}} \cdot x \]
    9. Step-by-step derivation
      1. distribute-lft-inN/A

        \[\leadsto \frac{y}{\color{blue}{{z}^{2} \cdot 1 + {z}^{2} \cdot z}} \cdot x \]
      2. *-rgt-identityN/A

        \[\leadsto \frac{y}{\color{blue}{{z}^{2}} + {z}^{2} \cdot z} \cdot x \]
      3. unpow2N/A

        \[\leadsto \frac{y}{\color{blue}{z \cdot z} + {z}^{2} \cdot z} \cdot x \]
      4. distribute-rgt-inN/A

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

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

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

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

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

        \[\leadsto \frac{y}{\color{blue}{\mathsf{fma}\left(z, z, z\right)} \cdot z} \cdot x \]
    10. Applied rewrites89.1%

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

    if -1e21 < (*.f64 (*.f64 z z) (+.f64 z #s(literal 1 binary64))) < 2.00000000000000013e-37

    1. Initial program 90.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{\color{blue}{y \cdot \frac{x}{z}}}{z + 1}}{z} \]
      14. lower-/.f6498.8

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

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

        \[\leadsto \frac{\frac{y \cdot \frac{x}{z}}{\color{blue}{1 + z}}}{z} \]
      17. lower-+.f6498.8

        \[\leadsto \frac{\frac{y \cdot \frac{x}{z}}{\color{blue}{1 + z}}}{z} \]
    4. Applied rewrites98.8%

      \[\leadsto \color{blue}{\frac{\frac{y \cdot \frac{x}{z}}{1 + z}}{z}} \]
    5. Taylor expanded in z around 0

      \[\leadsto \color{blue}{\frac{x \cdot y}{{z}^{2}}} \]
    6. Step-by-step derivation
      1. unpow2N/A

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

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{z}}{z}} \]
      3. lower-/.f64N/A

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

        \[\leadsto \frac{\color{blue}{\frac{x \cdot y}{z}}}{z} \]
      5. lower-*.f6494.6

        \[\leadsto \frac{\frac{\color{blue}{x \cdot y}}{z}}{z} \]
    7. Applied rewrites94.6%

      \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{z}}{z}} \]
    8. Step-by-step derivation
      1. Applied rewrites98.8%

        \[\leadsto \frac{\frac{x}{z} \cdot y}{z} \]
    9. Recombined 2 regimes into one program.
    10. Final simplification94.2%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\left(z \cdot z\right) \cdot \left(1 + z\right) \leq -1 \cdot 10^{+21}:\\ \;\;\;\;\frac{y}{\mathsf{fma}\left(z, z, z\right) \cdot z} \cdot x\\ \mathbf{elif}\;\left(z \cdot z\right) \cdot \left(1 + z\right) \leq 2 \cdot 10^{-37}:\\ \;\;\;\;\frac{\frac{x}{z} \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\mathsf{fma}\left(z, z, z\right) \cdot z} \cdot x\\ \end{array} \]
    11. Add Preprocessing

    Alternative 3: 82.0% accurate, 0.7× speedup?

    \[\begin{array}{l} [x, y, z] = \mathsf{sort}([x, y, z])\\ \\ \begin{array}{l} \mathbf{if}\;x \cdot y \leq 10^{-187}:\\ \;\;\;\;\frac{\frac{y}{z}}{\frac{z}{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\left(z \cdot z\right) \cdot \left(1 + z\right)}\\ \end{array} \end{array} \]
    NOTE: x, y, and z should be sorted in increasing order before calling this function.
    (FPCore (x y z)
     :precision binary64
     (if (<= (* x y) 1e-187)
       (/ (/ y z) (/ z x))
       (/ (* x y) (* (* z z) (+ 1.0 z)))))
    assert(x < y && y < z);
    double code(double x, double y, double z) {
    	double tmp;
    	if ((x * y) <= 1e-187) {
    		tmp = (y / z) / (z / x);
    	} else {
    		tmp = (x * y) / ((z * z) * (1.0 + z));
    	}
    	return tmp;
    }
    
    NOTE: x, y, and z should be sorted in increasing order before calling this function.
    real(8) function code(x, y, z)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8) :: tmp
        if ((x * y) <= 1d-187) then
            tmp = (y / z) / (z / x)
        else
            tmp = (x * y) / ((z * z) * (1.0d0 + z))
        end if
        code = tmp
    end function
    
    assert x < y && y < z;
    public static double code(double x, double y, double z) {
    	double tmp;
    	if ((x * y) <= 1e-187) {
    		tmp = (y / z) / (z / x);
    	} else {
    		tmp = (x * y) / ((z * z) * (1.0 + z));
    	}
    	return tmp;
    }
    
    [x, y, z] = sort([x, y, z])
    def code(x, y, z):
    	tmp = 0
    	if (x * y) <= 1e-187:
    		tmp = (y / z) / (z / x)
    	else:
    		tmp = (x * y) / ((z * z) * (1.0 + z))
    	return tmp
    
    x, y, z = sort([x, y, z])
    function code(x, y, z)
    	tmp = 0.0
    	if (Float64(x * y) <= 1e-187)
    		tmp = Float64(Float64(y / z) / Float64(z / x));
    	else
    		tmp = Float64(Float64(x * y) / Float64(Float64(z * z) * Float64(1.0 + z)));
    	end
    	return tmp
    end
    
    x, y, z = num2cell(sort([x, y, z])){:}
    function tmp_2 = code(x, y, z)
    	tmp = 0.0;
    	if ((x * y) <= 1e-187)
    		tmp = (y / z) / (z / x);
    	else
    		tmp = (x * y) / ((z * z) * (1.0 + z));
    	end
    	tmp_2 = tmp;
    end
    
    NOTE: x, y, and z should be sorted in increasing order before calling this function.
    code[x_, y_, z_] := If[LessEqual[N[(x * y), $MachinePrecision], 1e-187], N[(N[(y / z), $MachinePrecision] / N[(z / x), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] / N[(N[(z * z), $MachinePrecision] * N[(1.0 + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    [x, y, z] = \mathsf{sort}([x, y, z])\\
    \\
    \begin{array}{l}
    \mathbf{if}\;x \cdot y \leq 10^{-187}:\\
    \;\;\;\;\frac{\frac{y}{z}}{\frac{z}{x}}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{x \cdot y}{\left(z \cdot z\right) \cdot \left(1 + z\right)}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (*.f64 x y) < 1e-187

      1. Initial program 88.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\frac{\color{blue}{y \cdot \frac{x}{z}}}{z + 1}}{z} \]
        14. lower-/.f6498.5

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

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

          \[\leadsto \frac{\frac{y \cdot \frac{x}{z}}{\color{blue}{1 + z}}}{z} \]
        17. lower-+.f6498.5

          \[\leadsto \frac{\frac{y \cdot \frac{x}{z}}{\color{blue}{1 + z}}}{z} \]
      4. Applied rewrites98.5%

        \[\leadsto \color{blue}{\frac{\frac{y \cdot \frac{x}{z}}{1 + z}}{z}} \]
      5. Taylor expanded in z around 0

        \[\leadsto \color{blue}{\frac{x \cdot y}{{z}^{2}}} \]
      6. Step-by-step derivation
        1. unpow2N/A

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

          \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{z}}{z}} \]
        3. lower-/.f64N/A

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

          \[\leadsto \frac{\color{blue}{\frac{x \cdot y}{z}}}{z} \]
        5. lower-*.f6474.0

          \[\leadsto \frac{\frac{\color{blue}{x \cdot y}}{z}}{z} \]
      7. Applied rewrites74.0%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{z}}{z}} \]
      8. Step-by-step derivation
        1. Applied rewrites80.3%

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

        if 1e-187 < (*.f64 x y)

        1. Initial program 92.0%

          \[\frac{x \cdot y}{\left(z \cdot z\right) \cdot \left(z + 1\right)} \]
        2. Add Preprocessing
      9. Recombined 2 regimes into one program.
      10. Final simplification84.9%

        \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq 10^{-187}:\\ \;\;\;\;\frac{\frac{y}{z}}{\frac{z}{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\left(z \cdot z\right) \cdot \left(1 + z\right)}\\ \end{array} \]
      11. Add Preprocessing

      Alternative 4: 93.7% accurate, 0.7× speedup?

      \[\begin{array}{l} [x, y, z] = \mathsf{sort}([x, y, z])\\ \\ \frac{\frac{y}{1 + z}}{\frac{z}{x} \cdot z} \end{array} \]
      NOTE: x, y, and z should be sorted in increasing order before calling this function.
      (FPCore (x y z) :precision binary64 (/ (/ y (+ 1.0 z)) (* (/ z x) z)))
      assert(x < y && y < z);
      double code(double x, double y, double z) {
      	return (y / (1.0 + z)) / ((z / x) * z);
      }
      
      NOTE: x, y, and z should be sorted in increasing order before calling this function.
      real(8) function code(x, y, z)
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          code = (y / (1.0d0 + z)) / ((z / x) * z)
      end function
      
      assert x < y && y < z;
      public static double code(double x, double y, double z) {
      	return (y / (1.0 + z)) / ((z / x) * z);
      }
      
      [x, y, z] = sort([x, y, z])
      def code(x, y, z):
      	return (y / (1.0 + z)) / ((z / x) * z)
      
      x, y, z = sort([x, y, z])
      function code(x, y, z)
      	return Float64(Float64(y / Float64(1.0 + z)) / Float64(Float64(z / x) * z))
      end
      
      x, y, z = num2cell(sort([x, y, z])){:}
      function tmp = code(x, y, z)
      	tmp = (y / (1.0 + z)) / ((z / x) * z);
      end
      
      NOTE: x, y, and z should be sorted in increasing order before calling this function.
      code[x_, y_, z_] := N[(N[(y / N[(1.0 + z), $MachinePrecision]), $MachinePrecision] / N[(N[(z / x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]
      
      \begin{array}{l}
      [x, y, z] = \mathsf{sort}([x, y, z])\\
      \\
      \frac{\frac{y}{1 + z}}{\frac{z}{x} \cdot z}
      \end{array}
      
      Derivation
      1. Initial program 89.7%

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

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

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

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

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

          \[\leadsto \color{blue}{\frac{y}{z + 1} \cdot \frac{x}{z \cdot z}} \]
        6. clear-numN/A

          \[\leadsto \frac{y}{z + 1} \cdot \color{blue}{\frac{1}{\frac{z \cdot z}{x}}} \]
        7. un-div-invN/A

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\frac{y}{1 + z}}{\color{blue}{z \cdot \frac{z}{x}}} \]
        16. lower-/.f6496.8

          \[\leadsto \frac{\frac{y}{1 + z}}{z \cdot \color{blue}{\frac{z}{x}}} \]
      4. Applied rewrites96.8%

        \[\leadsto \color{blue}{\frac{\frac{y}{1 + z}}{z \cdot \frac{z}{x}}} \]
      5. Final simplification96.8%

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

      Alternative 5: 93.5% accurate, 0.7× speedup?

      \[\begin{array}{l} [x, y, z] = \mathsf{sort}([x, y, z])\\ \\ \frac{\frac{x}{z}}{z} \cdot \frac{y}{1 + z} \end{array} \]
      NOTE: x, y, and z should be sorted in increasing order before calling this function.
      (FPCore (x y z) :precision binary64 (* (/ (/ x z) z) (/ y (+ 1.0 z))))
      assert(x < y && y < z);
      double code(double x, double y, double z) {
      	return ((x / z) / z) * (y / (1.0 + z));
      }
      
      NOTE: x, y, and z should be sorted in increasing order before calling this function.
      real(8) function code(x, y, z)
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          code = ((x / z) / z) * (y / (1.0d0 + z))
      end function
      
      assert x < y && y < z;
      public static double code(double x, double y, double z) {
      	return ((x / z) / z) * (y / (1.0 + z));
      }
      
      [x, y, z] = sort([x, y, z])
      def code(x, y, z):
      	return ((x / z) / z) * (y / (1.0 + z))
      
      x, y, z = sort([x, y, z])
      function code(x, y, z)
      	return Float64(Float64(Float64(x / z) / z) * Float64(y / Float64(1.0 + z)))
      end
      
      x, y, z = num2cell(sort([x, y, z])){:}
      function tmp = code(x, y, z)
      	tmp = ((x / z) / z) * (y / (1.0 + z));
      end
      
      NOTE: x, y, and z should be sorted in increasing order before calling this function.
      code[x_, y_, z_] := N[(N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision] * N[(y / N[(1.0 + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
      
      \begin{array}{l}
      [x, y, z] = \mathsf{sort}([x, y, z])\\
      \\
      \frac{\frac{x}{z}}{z} \cdot \frac{y}{1 + z}
      \end{array}
      
      Derivation
      1. Initial program 89.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\frac{\color{blue}{y \cdot \frac{x}{z}}}{z + 1}}{z} \]
        14. lower-/.f6498.6

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

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

          \[\leadsto \frac{\frac{y \cdot \frac{x}{z}}{\color{blue}{1 + z}}}{z} \]
        17. lower-+.f6498.6

          \[\leadsto \frac{\frac{y \cdot \frac{x}{z}}{\color{blue}{1 + z}}}{z} \]
      4. Applied rewrites98.6%

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\frac{x}{z}}{z} \cdot \color{blue}{\frac{y}{1 + z}} \]
      6. Applied rewrites95.9%

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{z} \cdot \frac{y}{1 + z}} \]
      7. Add Preprocessing

      Alternative 6: 81.8% accurate, 0.7× speedup?

      \[\begin{array}{l} [x, y, z] = \mathsf{sort}([x, y, z])\\ \\ \begin{array}{l} \mathbf{if}\;x \cdot y \leq 10^{-187}:\\ \;\;\;\;\frac{y}{z} \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\left(z \cdot z\right) \cdot \left(1 + z\right)}\\ \end{array} \end{array} \]
      NOTE: x, y, and z should be sorted in increasing order before calling this function.
      (FPCore (x y z)
       :precision binary64
       (if (<= (* x y) 1e-187)
         (* (/ y z) (/ x z))
         (/ (* x y) (* (* z z) (+ 1.0 z)))))
      assert(x < y && y < z);
      double code(double x, double y, double z) {
      	double tmp;
      	if ((x * y) <= 1e-187) {
      		tmp = (y / z) * (x / z);
      	} else {
      		tmp = (x * y) / ((z * z) * (1.0 + z));
      	}
      	return tmp;
      }
      
      NOTE: x, y, and z should be sorted in increasing order before calling this function.
      real(8) function code(x, y, z)
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8) :: tmp
          if ((x * y) <= 1d-187) then
              tmp = (y / z) * (x / z)
          else
              tmp = (x * y) / ((z * z) * (1.0d0 + z))
          end if
          code = tmp
      end function
      
      assert x < y && y < z;
      public static double code(double x, double y, double z) {
      	double tmp;
      	if ((x * y) <= 1e-187) {
      		tmp = (y / z) * (x / z);
      	} else {
      		tmp = (x * y) / ((z * z) * (1.0 + z));
      	}
      	return tmp;
      }
      
      [x, y, z] = sort([x, y, z])
      def code(x, y, z):
      	tmp = 0
      	if (x * y) <= 1e-187:
      		tmp = (y / z) * (x / z)
      	else:
      		tmp = (x * y) / ((z * z) * (1.0 + z))
      	return tmp
      
      x, y, z = sort([x, y, z])
      function code(x, y, z)
      	tmp = 0.0
      	if (Float64(x * y) <= 1e-187)
      		tmp = Float64(Float64(y / z) * Float64(x / z));
      	else
      		tmp = Float64(Float64(x * y) / Float64(Float64(z * z) * Float64(1.0 + z)));
      	end
      	return tmp
      end
      
      x, y, z = num2cell(sort([x, y, z])){:}
      function tmp_2 = code(x, y, z)
      	tmp = 0.0;
      	if ((x * y) <= 1e-187)
      		tmp = (y / z) * (x / z);
      	else
      		tmp = (x * y) / ((z * z) * (1.0 + z));
      	end
      	tmp_2 = tmp;
      end
      
      NOTE: x, y, and z should be sorted in increasing order before calling this function.
      code[x_, y_, z_] := If[LessEqual[N[(x * y), $MachinePrecision], 1e-187], N[(N[(y / z), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] / N[(N[(z * z), $MachinePrecision] * N[(1.0 + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      [x, y, z] = \mathsf{sort}([x, y, z])\\
      \\
      \begin{array}{l}
      \mathbf{if}\;x \cdot y \leq 10^{-187}:\\
      \;\;\;\;\frac{y}{z} \cdot \frac{x}{z}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{x \cdot y}{\left(z \cdot z\right) \cdot \left(1 + z\right)}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (*.f64 x y) < 1e-187

        1. Initial program 88.3%

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

          \[\leadsto \color{blue}{\frac{x \cdot y}{{z}^{2}}} \]
        4. Step-by-step derivation
          1. unpow2N/A

            \[\leadsto \frac{x \cdot y}{\color{blue}{z \cdot z}} \]
          2. times-fracN/A

            \[\leadsto \color{blue}{\frac{x}{z} \cdot \frac{y}{z}} \]
          3. lower-*.f64N/A

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

            \[\leadsto \color{blue}{\frac{x}{z}} \cdot \frac{y}{z} \]
          5. lower-/.f6480.3

            \[\leadsto \frac{x}{z} \cdot \color{blue}{\frac{y}{z}} \]
        5. Applied rewrites80.3%

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

        if 1e-187 < (*.f64 x y)

        1. Initial program 92.0%

          \[\frac{x \cdot y}{\left(z \cdot z\right) \cdot \left(z + 1\right)} \]
        2. Add Preprocessing
      3. Recombined 2 regimes into one program.
      4. Final simplification84.9%

        \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq 10^{-187}:\\ \;\;\;\;\frac{y}{z} \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\left(z \cdot z\right) \cdot \left(1 + z\right)}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 7: 94.3% accurate, 0.8× speedup?

      \[\begin{array}{l} [x, y, z] = \mathsf{sort}([x, y, z])\\ \\ \frac{\frac{x}{z}}{\frac{\mathsf{fma}\left(z, z, z\right)}{y}} \end{array} \]
      NOTE: x, y, and z should be sorted in increasing order before calling this function.
      (FPCore (x y z) :precision binary64 (/ (/ x z) (/ (fma z z z) y)))
      assert(x < y && y < z);
      double code(double x, double y, double z) {
      	return (x / z) / (fma(z, z, z) / y);
      }
      
      x, y, z = sort([x, y, z])
      function code(x, y, z)
      	return Float64(Float64(x / z) / Float64(fma(z, z, z) / y))
      end
      
      NOTE: x, y, and z should be sorted in increasing order before calling this function.
      code[x_, y_, z_] := N[(N[(x / z), $MachinePrecision] / N[(N[(z * z + z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
      
      \begin{array}{l}
      [x, y, z] = \mathsf{sort}([x, y, z])\\
      \\
      \frac{\frac{x}{z}}{\frac{\mathsf{fma}\left(z, z, z\right)}{y}}
      \end{array}
      
      Derivation
      1. Initial program 89.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\frac{x}{z}}{\frac{\color{blue}{z \cdot z + z}}{y}} \]
        16. lower-fma.f6495.7

          \[\leadsto \frac{\frac{x}{z}}{\frac{\color{blue}{\mathsf{fma}\left(z, z, z\right)}}{y}} \]
      4. Applied rewrites95.7%

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{\frac{\mathsf{fma}\left(z, z, z\right)}{y}}} \]
      5. Add Preprocessing

      Alternative 8: 81.8% accurate, 0.8× speedup?

      \[\begin{array}{l} [x, y, z] = \mathsf{sort}([x, y, z])\\ \\ \begin{array}{l} \mathbf{if}\;x \cdot y \leq 10^{-187}:\\ \;\;\;\;\frac{y}{z} \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\mathsf{fma}\left(z, z, z\right) \cdot z}\\ \end{array} \end{array} \]
      NOTE: x, y, and z should be sorted in increasing order before calling this function.
      (FPCore (x y z)
       :precision binary64
       (if (<= (* x y) 1e-187) (* (/ y z) (/ x z)) (/ (* x y) (* (fma z z z) z))))
      assert(x < y && y < z);
      double code(double x, double y, double z) {
      	double tmp;
      	if ((x * y) <= 1e-187) {
      		tmp = (y / z) * (x / z);
      	} else {
      		tmp = (x * y) / (fma(z, z, z) * z);
      	}
      	return tmp;
      }
      
      x, y, z = sort([x, y, z])
      function code(x, y, z)
      	tmp = 0.0
      	if (Float64(x * y) <= 1e-187)
      		tmp = Float64(Float64(y / z) * Float64(x / z));
      	else
      		tmp = Float64(Float64(x * y) / Float64(fma(z, z, z) * z));
      	end
      	return tmp
      end
      
      NOTE: x, y, and z should be sorted in increasing order before calling this function.
      code[x_, y_, z_] := If[LessEqual[N[(x * y), $MachinePrecision], 1e-187], N[(N[(y / z), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] / N[(N[(z * z + z), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      [x, y, z] = \mathsf{sort}([x, y, z])\\
      \\
      \begin{array}{l}
      \mathbf{if}\;x \cdot y \leq 10^{-187}:\\
      \;\;\;\;\frac{y}{z} \cdot \frac{x}{z}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{x \cdot y}{\mathsf{fma}\left(z, z, z\right) \cdot z}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (*.f64 x y) < 1e-187

        1. Initial program 88.3%

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

          \[\leadsto \color{blue}{\frac{x \cdot y}{{z}^{2}}} \]
        4. Step-by-step derivation
          1. unpow2N/A

            \[\leadsto \frac{x \cdot y}{\color{blue}{z \cdot z}} \]
          2. times-fracN/A

            \[\leadsto \color{blue}{\frac{x}{z} \cdot \frac{y}{z}} \]
          3. lower-*.f64N/A

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

            \[\leadsto \color{blue}{\frac{x}{z}} \cdot \frac{y}{z} \]
          5. lower-/.f6480.3

            \[\leadsto \frac{x}{z} \cdot \color{blue}{\frac{y}{z}} \]
        5. Applied rewrites80.3%

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

        if 1e-187 < (*.f64 x y)

        1. Initial program 92.0%

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{y \cdot x}{\color{blue}{\left(z \cdot z + z\right)} \cdot z} \]
          12. lower-fma.f6492.0

            \[\leadsto \frac{y \cdot x}{\color{blue}{\mathsf{fma}\left(z, z, z\right)} \cdot z} \]
        4. Applied rewrites92.0%

          \[\leadsto \color{blue}{\frac{y \cdot x}{\mathsf{fma}\left(z, z, z\right) \cdot z}} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification84.9%

        \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq 10^{-187}:\\ \;\;\;\;\frac{y}{z} \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\mathsf{fma}\left(z, z, z\right) \cdot z}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 9: 81.7% accurate, 0.8× speedup?

      \[\begin{array}{l} [x, y, z] = \mathsf{sort}([x, y, z])\\ \\ \begin{array}{l} \mathbf{if}\;x \cdot y \leq 10^{-187}:\\ \;\;\;\;\frac{y}{z} \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(z, z, z\right) \cdot z} \cdot y\\ \end{array} \end{array} \]
      NOTE: x, y, and z should be sorted in increasing order before calling this function.
      (FPCore (x y z)
       :precision binary64
       (if (<= (* x y) 1e-187) (* (/ y z) (/ x z)) (* (/ x (* (fma z z z) z)) y)))
      assert(x < y && y < z);
      double code(double x, double y, double z) {
      	double tmp;
      	if ((x * y) <= 1e-187) {
      		tmp = (y / z) * (x / z);
      	} else {
      		tmp = (x / (fma(z, z, z) * z)) * y;
      	}
      	return tmp;
      }
      
      x, y, z = sort([x, y, z])
      function code(x, y, z)
      	tmp = 0.0
      	if (Float64(x * y) <= 1e-187)
      		tmp = Float64(Float64(y / z) * Float64(x / z));
      	else
      		tmp = Float64(Float64(x / Float64(fma(z, z, z) * z)) * y);
      	end
      	return tmp
      end
      
      NOTE: x, y, and z should be sorted in increasing order before calling this function.
      code[x_, y_, z_] := If[LessEqual[N[(x * y), $MachinePrecision], 1e-187], N[(N[(y / z), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(N[(z * z + z), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]]
      
      \begin{array}{l}
      [x, y, z] = \mathsf{sort}([x, y, z])\\
      \\
      \begin{array}{l}
      \mathbf{if}\;x \cdot y \leq 10^{-187}:\\
      \;\;\;\;\frac{y}{z} \cdot \frac{x}{z}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{x}{\mathsf{fma}\left(z, z, z\right) \cdot z} \cdot y\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (*.f64 x y) < 1e-187

        1. Initial program 88.3%

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

          \[\leadsto \color{blue}{\frac{x \cdot y}{{z}^{2}}} \]
        4. Step-by-step derivation
          1. unpow2N/A

            \[\leadsto \frac{x \cdot y}{\color{blue}{z \cdot z}} \]
          2. times-fracN/A

            \[\leadsto \color{blue}{\frac{x}{z} \cdot \frac{y}{z}} \]
          3. lower-*.f64N/A

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

            \[\leadsto \color{blue}{\frac{x}{z}} \cdot \frac{y}{z} \]
          5. lower-/.f6480.3

            \[\leadsto \frac{x}{z} \cdot \color{blue}{\frac{y}{z}} \]
        5. Applied rewrites80.3%

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

        if 1e-187 < (*.f64 x y)

        1. Initial program 92.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{\frac{\color{blue}{y \cdot \frac{x}{z}}}{z + 1}}{z} \]
          14. lower-/.f6498.8

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

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

            \[\leadsto \frac{\frac{y \cdot \frac{x}{z}}{\color{blue}{1 + z}}}{z} \]
          17. lower-+.f6498.8

            \[\leadsto \frac{\frac{y \cdot \frac{x}{z}}{\color{blue}{1 + z}}}{z} \]
        4. Applied rewrites98.8%

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{\frac{x}{z}}{z}} \cdot \frac{y}{1 + z} \]
          9. lower-/.f6493.8

            \[\leadsto \frac{\frac{x}{z}}{z} \cdot \color{blue}{\frac{y}{1 + z}} \]
        6. Applied rewrites93.8%

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

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

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

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

            \[\leadsto \frac{y}{1 + z} \cdot \color{blue}{\frac{\frac{x}{z}}{z}} \]
          5. frac-timesN/A

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

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

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

            \[\leadsto \frac{y \cdot \frac{x}{z}}{\color{blue}{z \cdot z + z}} \]
          9. lift-fma.f64N/A

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

            \[\leadsto \frac{y \cdot \color{blue}{\frac{x}{z}}}{\mathsf{fma}\left(z, z, z\right)} \]
          11. associate-*r/N/A

            \[\leadsto \frac{\color{blue}{\frac{y \cdot x}{z}}}{\mathsf{fma}\left(z, z, z\right)} \]
          12. *-commutativeN/A

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

            \[\leadsto \frac{\frac{\color{blue}{x \cdot y}}{z}}{\mathsf{fma}\left(z, z, z\right)} \]
          14. associate-/l/N/A

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

            \[\leadsto \frac{\color{blue}{x \cdot y}}{\mathsf{fma}\left(z, z, z\right) \cdot z} \]
          16. remove-double-negN/A

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

            \[\leadsto \frac{\left(\mathsf{neg}\left(\color{blue}{\left(-x\right)}\right)\right) \cdot y}{\mathsf{fma}\left(z, z, z\right) \cdot z} \]
          18. neg-mul-1N/A

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

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

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

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

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

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

            \[\leadsto \frac{-1}{\mathsf{fma}\left(z, z, z\right) \cdot z} \cdot \color{blue}{\left(\left(-x\right) \cdot y\right)} \]
          25. associate-*r*N/A

            \[\leadsto \color{blue}{\left(\frac{-1}{\mathsf{fma}\left(z, z, z\right) \cdot z} \cdot \left(-x\right)\right) \cdot y} \]
        8. Applied rewrites89.6%

          \[\leadsto \color{blue}{\frac{x}{\mathsf{fma}\left(z, z, z\right) \cdot z} \cdot y} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification83.9%

        \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq 10^{-187}:\\ \;\;\;\;\frac{y}{z} \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(z, z, z\right) \cdot z} \cdot y\\ \end{array} \]
      5. Add Preprocessing

      Alternative 10: 78.7% accurate, 0.9× speedup?

      \[\begin{array}{l} [x, y, z] = \mathsf{sort}([x, y, z])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq 2 \cdot 10^{+26}:\\ \;\;\;\;\frac{y}{z} \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z \cdot z} \cdot y\\ \end{array} \end{array} \]
      NOTE: x, y, and z should be sorted in increasing order before calling this function.
      (FPCore (x y z)
       :precision binary64
       (if (<= y 2e+26) (* (/ y z) (/ x z)) (* (/ x (* z z)) y)))
      assert(x < y && y < z);
      double code(double x, double y, double z) {
      	double tmp;
      	if (y <= 2e+26) {
      		tmp = (y / z) * (x / z);
      	} else {
      		tmp = (x / (z * z)) * y;
      	}
      	return tmp;
      }
      
      NOTE: x, y, and z should be sorted in increasing order before calling this function.
      real(8) function code(x, y, z)
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8) :: tmp
          if (y <= 2d+26) then
              tmp = (y / z) * (x / z)
          else
              tmp = (x / (z * z)) * y
          end if
          code = tmp
      end function
      
      assert x < y && y < z;
      public static double code(double x, double y, double z) {
      	double tmp;
      	if (y <= 2e+26) {
      		tmp = (y / z) * (x / z);
      	} else {
      		tmp = (x / (z * z)) * y;
      	}
      	return tmp;
      }
      
      [x, y, z] = sort([x, y, z])
      def code(x, y, z):
      	tmp = 0
      	if y <= 2e+26:
      		tmp = (y / z) * (x / z)
      	else:
      		tmp = (x / (z * z)) * y
      	return tmp
      
      x, y, z = sort([x, y, z])
      function code(x, y, z)
      	tmp = 0.0
      	if (y <= 2e+26)
      		tmp = Float64(Float64(y / z) * Float64(x / z));
      	else
      		tmp = Float64(Float64(x / Float64(z * z)) * y);
      	end
      	return tmp
      end
      
      x, y, z = num2cell(sort([x, y, z])){:}
      function tmp_2 = code(x, y, z)
      	tmp = 0.0;
      	if (y <= 2e+26)
      		tmp = (y / z) * (x / z);
      	else
      		tmp = (x / (z * z)) * y;
      	end
      	tmp_2 = tmp;
      end
      
      NOTE: x, y, and z should be sorted in increasing order before calling this function.
      code[x_, y_, z_] := If[LessEqual[y, 2e+26], N[(N[(y / z), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]]
      
      \begin{array}{l}
      [x, y, z] = \mathsf{sort}([x, y, z])\\
      \\
      \begin{array}{l}
      \mathbf{if}\;y \leq 2 \cdot 10^{+26}:\\
      \;\;\;\;\frac{y}{z} \cdot \frac{x}{z}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{x}{z \cdot z} \cdot y\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if y < 2.0000000000000001e26

        1. Initial program 88.9%

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

          \[\leadsto \color{blue}{\frac{x \cdot y}{{z}^{2}}} \]
        4. Step-by-step derivation
          1. unpow2N/A

            \[\leadsto \frac{x \cdot y}{\color{blue}{z \cdot z}} \]
          2. times-fracN/A

            \[\leadsto \color{blue}{\frac{x}{z} \cdot \frac{y}{z}} \]
          3. lower-*.f64N/A

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

            \[\leadsto \color{blue}{\frac{x}{z}} \cdot \frac{y}{z} \]
          5. lower-/.f6477.9

            \[\leadsto \frac{x}{z} \cdot \color{blue}{\frac{y}{z}} \]
        5. Applied rewrites77.9%

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

        if 2.0000000000000001e26 < y

        1. Initial program 93.7%

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

          \[\leadsto \frac{x \cdot y}{\color{blue}{{z}^{2}}} \]
        4. Step-by-step derivation
          1. unpow2N/A

            \[\leadsto \frac{x \cdot y}{\color{blue}{z \cdot z}} \]
          2. lower-*.f6478.3

            \[\leadsto \frac{x \cdot y}{\color{blue}{z \cdot z}} \]
        5. Applied rewrites78.3%

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

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

            \[\leadsto \frac{\color{blue}{x \cdot y}}{z \cdot z} \]
          3. *-commutativeN/A

            \[\leadsto \frac{\color{blue}{y \cdot x}}{z \cdot z} \]
          4. associate-/l*N/A

            \[\leadsto \color{blue}{y \cdot \frac{x}{z \cdot z}} \]
          5. lower-*.f64N/A

            \[\leadsto \color{blue}{y \cdot \frac{x}{z \cdot z}} \]
          6. lower-/.f6480.4

            \[\leadsto y \cdot \color{blue}{\frac{x}{z \cdot z}} \]
        7. Applied rewrites80.4%

          \[\leadsto \color{blue}{y \cdot \frac{x}{z \cdot z}} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification78.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 2 \cdot 10^{+26}:\\ \;\;\;\;\frac{y}{z} \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z \cdot z} \cdot y\\ \end{array} \]
      5. Add Preprocessing

      Alternative 11: 94.5% accurate, 0.9× speedup?

      \[\begin{array}{l} [x, y, z] = \mathsf{sort}([x, y, z])\\ \\ \frac{\frac{x}{z} \cdot y}{\mathsf{fma}\left(z, z, z\right)} \end{array} \]
      NOTE: x, y, and z should be sorted in increasing order before calling this function.
      (FPCore (x y z) :precision binary64 (/ (* (/ x z) y) (fma z z z)))
      assert(x < y && y < z);
      double code(double x, double y, double z) {
      	return ((x / z) * y) / fma(z, z, z);
      }
      
      x, y, z = sort([x, y, z])
      function code(x, y, z)
      	return Float64(Float64(Float64(x / z) * y) / fma(z, z, z))
      end
      
      NOTE: x, y, and z should be sorted in increasing order before calling this function.
      code[x_, y_, z_] := N[(N[(N[(x / z), $MachinePrecision] * y), $MachinePrecision] / N[(z * z + z), $MachinePrecision]), $MachinePrecision]
      
      \begin{array}{l}
      [x, y, z] = \mathsf{sort}([x, y, z])\\
      \\
      \frac{\frac{x}{z} \cdot y}{\mathsf{fma}\left(z, z, z\right)}
      \end{array}
      
      Derivation
      1. Initial program 89.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\frac{x}{z} \cdot y}{\color{blue}{z \cdot z + z}} \]
        14. lower-fma.f6496.8

          \[\leadsto \frac{\frac{x}{z} \cdot y}{\color{blue}{\mathsf{fma}\left(z, z, z\right)}} \]
      4. Applied rewrites96.8%

        \[\leadsto \color{blue}{\frac{\frac{x}{z} \cdot y}{\mathsf{fma}\left(z, z, z\right)}} \]
      5. Add Preprocessing

      Alternative 12: 94.1% accurate, 0.9× speedup?

      \[\begin{array}{l} [x, y, z] = \mathsf{sort}([x, y, z])\\ \\ \frac{x}{\mathsf{fma}\left(z, z, z\right)} \cdot \frac{y}{z} \end{array} \]
      NOTE: x, y, and z should be sorted in increasing order before calling this function.
      (FPCore (x y z) :precision binary64 (* (/ x (fma z z z)) (/ y z)))
      assert(x < y && y < z);
      double code(double x, double y, double z) {
      	return (x / fma(z, z, z)) * (y / z);
      }
      
      x, y, z = sort([x, y, z])
      function code(x, y, z)
      	return Float64(Float64(x / fma(z, z, z)) * Float64(y / z))
      end
      
      NOTE: x, y, and z should be sorted in increasing order before calling this function.
      code[x_, y_, z_] := N[(N[(x / N[(z * z + z), $MachinePrecision]), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]
      
      \begin{array}{l}
      [x, y, z] = \mathsf{sort}([x, y, z])\\
      \\
      \frac{x}{\mathsf{fma}\left(z, z, z\right)} \cdot \frac{y}{z}
      \end{array}
      
      Derivation
      1. Initial program 89.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{y}{z} \cdot \frac{x}{\color{blue}{z \cdot z + z}} \]
        14. lower-fma.f6496.3

          \[\leadsto \frac{y}{z} \cdot \frac{x}{\color{blue}{\mathsf{fma}\left(z, z, z\right)}} \]
      4. Applied rewrites96.3%

        \[\leadsto \color{blue}{\frac{y}{z} \cdot \frac{x}{\mathsf{fma}\left(z, z, z\right)}} \]
      5. Final simplification96.3%

        \[\leadsto \frac{x}{\mathsf{fma}\left(z, z, z\right)} \cdot \frac{y}{z} \]
      6. Add Preprocessing

      Alternative 13: 74.4% accurate, 1.1× speedup?

      \[\begin{array}{l} [x, y, z] = \mathsf{sort}([x, y, z])\\ \\ \frac{\frac{x}{z}}{z} \cdot y \end{array} \]
      NOTE: x, y, and z should be sorted in increasing order before calling this function.
      (FPCore (x y z) :precision binary64 (* (/ (/ x z) z) y))
      assert(x < y && y < z);
      double code(double x, double y, double z) {
      	return ((x / z) / z) * y;
      }
      
      NOTE: x, y, and z should be sorted in increasing order before calling this function.
      real(8) function code(x, y, z)
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          code = ((x / z) / z) * y
      end function
      
      assert x < y && y < z;
      public static double code(double x, double y, double z) {
      	return ((x / z) / z) * y;
      }
      
      [x, y, z] = sort([x, y, z])
      def code(x, y, z):
      	return ((x / z) / z) * y
      
      x, y, z = sort([x, y, z])
      function code(x, y, z)
      	return Float64(Float64(Float64(x / z) / z) * y)
      end
      
      x, y, z = num2cell(sort([x, y, z])){:}
      function tmp = code(x, y, z)
      	tmp = ((x / z) / z) * y;
      end
      
      NOTE: x, y, and z should be sorted in increasing order before calling this function.
      code[x_, y_, z_] := N[(N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision] * y), $MachinePrecision]
      
      \begin{array}{l}
      [x, y, z] = \mathsf{sort}([x, y, z])\\
      \\
      \frac{\frac{x}{z}}{z} \cdot y
      \end{array}
      
      Derivation
      1. Initial program 89.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\frac{\color{blue}{y \cdot \frac{x}{z}}}{z + 1}}{z} \]
        14. lower-/.f6498.6

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

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

          \[\leadsto \frac{\frac{y \cdot \frac{x}{z}}{\color{blue}{1 + z}}}{z} \]
        17. lower-+.f6498.6

          \[\leadsto \frac{\frac{y \cdot \frac{x}{z}}{\color{blue}{1 + z}}}{z} \]
      4. Applied rewrites98.6%

        \[\leadsto \color{blue}{\frac{\frac{y \cdot \frac{x}{z}}{1 + z}}{z}} \]
      5. Taylor expanded in z around 0

        \[\leadsto \color{blue}{\frac{x \cdot y}{{z}^{2}}} \]
      6. Step-by-step derivation
        1. unpow2N/A

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

          \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{z}}{z}} \]
        3. lower-/.f64N/A

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

          \[\leadsto \frac{\color{blue}{\frac{x \cdot y}{z}}}{z} \]
        5. lower-*.f6473.0

          \[\leadsto \frac{\frac{\color{blue}{x \cdot y}}{z}}{z} \]
      7. Applied rewrites73.0%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{z}}{z}} \]
      8. Step-by-step derivation
        1. Applied rewrites74.8%

          \[\leadsto \frac{\frac{x}{z}}{z} \cdot \color{blue}{y} \]
        2. Add Preprocessing

        Alternative 14: 72.9% accurate, 1.4× speedup?

        \[\begin{array}{l} [x, y, z] = \mathsf{sort}([x, y, z])\\ \\ \frac{x}{z \cdot z} \cdot y \end{array} \]
        NOTE: x, y, and z should be sorted in increasing order before calling this function.
        (FPCore (x y z) :precision binary64 (* (/ x (* z z)) y))
        assert(x < y && y < z);
        double code(double x, double y, double z) {
        	return (x / (z * z)) * y;
        }
        
        NOTE: x, y, and z should be sorted in increasing order before calling this function.
        real(8) function code(x, y, z)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            code = (x / (z * z)) * y
        end function
        
        assert x < y && y < z;
        public static double code(double x, double y, double z) {
        	return (x / (z * z)) * y;
        }
        
        [x, y, z] = sort([x, y, z])
        def code(x, y, z):
        	return (x / (z * z)) * y
        
        x, y, z = sort([x, y, z])
        function code(x, y, z)
        	return Float64(Float64(x / Float64(z * z)) * y)
        end
        
        x, y, z = num2cell(sort([x, y, z])){:}
        function tmp = code(x, y, z)
        	tmp = (x / (z * z)) * y;
        end
        
        NOTE: x, y, and z should be sorted in increasing order before calling this function.
        code[x_, y_, z_] := N[(N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]
        
        \begin{array}{l}
        [x, y, z] = \mathsf{sort}([x, y, z])\\
        \\
        \frac{x}{z \cdot z} \cdot y
        \end{array}
        
        Derivation
        1. Initial program 89.7%

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

          \[\leadsto \frac{x \cdot y}{\color{blue}{{z}^{2}}} \]
        4. Step-by-step derivation
          1. unpow2N/A

            \[\leadsto \frac{x \cdot y}{\color{blue}{z \cdot z}} \]
          2. lower-*.f6473.6

            \[\leadsto \frac{x \cdot y}{\color{blue}{z \cdot z}} \]
        5. Applied rewrites73.6%

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

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

            \[\leadsto \frac{\color{blue}{x \cdot y}}{z \cdot z} \]
          3. *-commutativeN/A

            \[\leadsto \frac{\color{blue}{y \cdot x}}{z \cdot z} \]
          4. associate-/l*N/A

            \[\leadsto \color{blue}{y \cdot \frac{x}{z \cdot z}} \]
          5. lower-*.f64N/A

            \[\leadsto \color{blue}{y \cdot \frac{x}{z \cdot z}} \]
          6. lower-/.f6475.4

            \[\leadsto y \cdot \color{blue}{\frac{x}{z \cdot z}} \]
        7. Applied rewrites75.4%

          \[\leadsto \color{blue}{y \cdot \frac{x}{z \cdot z}} \]
        8. Final simplification75.4%

          \[\leadsto \frac{x}{z \cdot z} \cdot y \]
        9. Add Preprocessing

        Developer Target 1: 95.5% accurate, 0.6× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z < 249.6182814532307:\\ \;\;\;\;\frac{y \cdot \frac{x}{z}}{z + z \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{y}{z}}{1 + z} \cdot x}{z}\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (if (< z 249.6182814532307)
           (/ (* y (/ x z)) (+ z (* z z)))
           (/ (* (/ (/ y z) (+ 1.0 z)) x) z)))
        double code(double x, double y, double z) {
        	double tmp;
        	if (z < 249.6182814532307) {
        		tmp = (y * (x / z)) / (z + (z * z));
        	} else {
        		tmp = (((y / z) / (1.0 + z)) * x) / z;
        	}
        	return tmp;
        }
        
        real(8) function code(x, y, z)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            real(8) :: tmp
            if (z < 249.6182814532307d0) then
                tmp = (y * (x / z)) / (z + (z * z))
            else
                tmp = (((y / z) / (1.0d0 + z)) * x) / z
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z) {
        	double tmp;
        	if (z < 249.6182814532307) {
        		tmp = (y * (x / z)) / (z + (z * z));
        	} else {
        		tmp = (((y / z) / (1.0 + z)) * x) / z;
        	}
        	return tmp;
        }
        
        def code(x, y, z):
        	tmp = 0
        	if z < 249.6182814532307:
        		tmp = (y * (x / z)) / (z + (z * z))
        	else:
        		tmp = (((y / z) / (1.0 + z)) * x) / z
        	return tmp
        
        function code(x, y, z)
        	tmp = 0.0
        	if (z < 249.6182814532307)
        		tmp = Float64(Float64(y * Float64(x / z)) / Float64(z + Float64(z * z)));
        	else
        		tmp = Float64(Float64(Float64(Float64(y / z) / Float64(1.0 + z)) * x) / z);
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z)
        	tmp = 0.0;
        	if (z < 249.6182814532307)
        		tmp = (y * (x / z)) / (z + (z * z));
        	else
        		tmp = (((y / z) / (1.0 + z)) * x) / z;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_] := If[Less[z, 249.6182814532307], N[(N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision] / N[(z + N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(y / z), $MachinePrecision] / N[(1.0 + z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] / z), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;z < 249.6182814532307:\\
        \;\;\;\;\frac{y \cdot \frac{x}{z}}{z + z \cdot z}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{\frac{\frac{y}{z}}{1 + z} \cdot x}{z}\\
        
        
        \end{array}
        \end{array}
        

        Reproduce

        ?
        herbie shell --seed 2024332 
        (FPCore (x y z)
          :name "Statistics.Distribution.Beta:$cvariance from math-functions-0.1.5.2"
          :precision binary64
        
          :alt
          (! :herbie-platform default (if (< z 2496182814532307/10000000000000) (/ (* y (/ x z)) (+ z (* z z))) (/ (* (/ (/ y z) (+ 1 z)) x) z)))
        
          (/ (* x y) (* (* z z) (+ z 1.0))))