
(FPCore (x y) :precision binary64 (/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))
double code(double x, double y) {
return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0d0))
end function
public static double code(double x, double y) {
return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
}
def code(x, y): return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0))
function code(x, y) return Float64(Float64(x * y) / Float64(Float64(Float64(x + y) * Float64(x + y)) * Float64(Float64(x + y) + 1.0))) end
function tmp = code(x, y) tmp = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0)); end
code[x_, y_] := N[(N[(x * y), $MachinePrecision] / N[(N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(N[(x + y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))
double code(double x, double y) {
return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0d0))
end function
public static double code(double x, double y) {
return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
}
def code(x, y): return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0))
function code(x, y) return Float64(Float64(x * y) / Float64(Float64(Float64(x + y) * Float64(x + y)) * Float64(Float64(x + y) + 1.0))) end
function tmp = code(x, y) tmp = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0)); end
code[x_, y_] := N[(N[(x * y), $MachinePrecision] / N[(N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(N[(x + y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}
\end{array}
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (if (<= x -1.15e+67) (* (/ y x) (/ 1.0 x)) (* x (/ (/ y (* (+ x (+ y 1.0)) (+ x y))) (+ x y)))))
assert(x < y);
double code(double x, double y) {
double tmp;
if (x <= -1.15e+67) {
tmp = (y / x) * (1.0 / x);
} else {
tmp = x * ((y / ((x + (y + 1.0)) * (x + y))) / (x + y));
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-1.15d+67)) then
tmp = (y / x) * (1.0d0 / x)
else
tmp = x * ((y / ((x + (y + 1.0d0)) * (x + y))) / (x + y))
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double tmp;
if (x <= -1.15e+67) {
tmp = (y / x) * (1.0 / x);
} else {
tmp = x * ((y / ((x + (y + 1.0)) * (x + y))) / (x + y));
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): tmp = 0 if x <= -1.15e+67: tmp = (y / x) * (1.0 / x) else: tmp = x * ((y / ((x + (y + 1.0)) * (x + y))) / (x + y)) return tmp
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (x <= -1.15e+67) tmp = Float64(Float64(y / x) * Float64(1.0 / x)); else tmp = Float64(x * Float64(Float64(y / Float64(Float64(x + Float64(y + 1.0)) * Float64(x + y))) / Float64(x + y))); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
tmp = 0.0;
if (x <= -1.15e+67)
tmp = (y / x) * (1.0 / x);
else
tmp = x * ((y / ((x + (y + 1.0)) * (x + y))) / (x + y));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := If[LessEqual[x, -1.15e+67], N[(N[(y / x), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / N[(N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.15 \cdot 10^{+67}:\\
\;\;\;\;\frac{y}{x} \cdot \frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\frac{y}{\left(x + \left(y + 1\right)\right) \cdot \left(x + y\right)}}{x + y}\\
\end{array}
\end{array}
if x < -1.1499999999999999e67Initial program 61.4%
associate-/l*71.8%
associate-+l+71.8%
Simplified71.8%
associate-*r/61.4%
associate-+r+61.4%
*-commutative61.4%
distribute-rgt1-in19.9%
cube-mult19.9%
fma-undefine61.4%
add-sqr-sqrt56.8%
pow256.8%
Applied egg-rr0.0%
Taylor expanded in x around inf 48.0%
unpow248.0%
*-commutative48.0%
associate-*r*48.0%
associate-*r*48.0%
add-sqr-sqrt86.2%
*-commutative86.2%
un-div-inv86.2%
Applied egg-rr86.2%
if -1.1499999999999999e67 < x Initial program 70.2%
associate-/l*82.6%
associate-+l+82.6%
Simplified82.6%
*-un-lft-identity82.6%
associate-+r+82.6%
associate-*l*82.6%
times-frac91.8%
associate-+r+91.8%
Applied egg-rr91.8%
associate-*l/91.9%
*-lft-identity91.9%
*-commutative91.9%
Simplified91.9%
Final simplification90.4%
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
:precision binary64
(if (<= x -1.1e+69)
(* (/ y x) (/ 1.0 x))
(if (<= x -3.15e-180)
(* x (/ y (* (+ x (+ y 1.0)) (* (+ x y) (+ x y)))))
(/ (/ x (+ y 1.0)) (+ x y)))))assert(x < y);
double code(double x, double y) {
double tmp;
if (x <= -1.1e+69) {
tmp = (y / x) * (1.0 / x);
} else if (x <= -3.15e-180) {
tmp = x * (y / ((x + (y + 1.0)) * ((x + y) * (x + y))));
} else {
tmp = (x / (y + 1.0)) / (x + y);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-1.1d+69)) then
tmp = (y / x) * (1.0d0 / x)
else if (x <= (-3.15d-180)) then
tmp = x * (y / ((x + (y + 1.0d0)) * ((x + y) * (x + y))))
else
tmp = (x / (y + 1.0d0)) / (x + y)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double tmp;
if (x <= -1.1e+69) {
tmp = (y / x) * (1.0 / x);
} else if (x <= -3.15e-180) {
tmp = x * (y / ((x + (y + 1.0)) * ((x + y) * (x + y))));
} else {
tmp = (x / (y + 1.0)) / (x + y);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): tmp = 0 if x <= -1.1e+69: tmp = (y / x) * (1.0 / x) elif x <= -3.15e-180: tmp = x * (y / ((x + (y + 1.0)) * ((x + y) * (x + y)))) else: tmp = (x / (y + 1.0)) / (x + y) return tmp
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (x <= -1.1e+69) tmp = Float64(Float64(y / x) * Float64(1.0 / x)); elseif (x <= -3.15e-180) tmp = Float64(x * Float64(y / Float64(Float64(x + Float64(y + 1.0)) * Float64(Float64(x + y) * Float64(x + y))))); else tmp = Float64(Float64(x / Float64(y + 1.0)) / Float64(x + y)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
tmp = 0.0;
if (x <= -1.1e+69)
tmp = (y / x) * (1.0 / x);
elseif (x <= -3.15e-180)
tmp = x * (y / ((x + (y + 1.0)) * ((x + y) * (x + y))));
else
tmp = (x / (y + 1.0)) / (x + y);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := If[LessEqual[x, -1.1e+69], N[(N[(y / x), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.15e-180], N[(x * N[(y / N[(N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.1 \cdot 10^{+69}:\\
\;\;\;\;\frac{y}{x} \cdot \frac{1}{x}\\
\mathbf{elif}\;x \leq -3.15 \cdot 10^{-180}:\\
\;\;\;\;x \cdot \frac{y}{\left(x + \left(y + 1\right)\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + 1}}{x + y}\\
\end{array}
\end{array}
if x < -1.1000000000000001e69Initial program 61.4%
associate-/l*71.8%
associate-+l+71.8%
Simplified71.8%
associate-*r/61.4%
associate-+r+61.4%
*-commutative61.4%
distribute-rgt1-in19.9%
cube-mult19.9%
fma-undefine61.4%
add-sqr-sqrt56.8%
pow256.8%
Applied egg-rr0.0%
Taylor expanded in x around inf 48.0%
unpow248.0%
*-commutative48.0%
associate-*r*48.0%
associate-*r*48.0%
add-sqr-sqrt86.2%
*-commutative86.2%
un-div-inv86.2%
Applied egg-rr86.2%
if -1.1000000000000001e69 < x < -3.1499999999999998e-180Initial program 81.5%
associate-/l*91.1%
associate-+l+91.1%
Simplified91.1%
if -3.1499999999999998e-180 < x Initial program 66.4%
associate-/l*79.8%
associate-+l+79.8%
Simplified79.8%
*-un-lft-identity79.8%
associate-+r+79.8%
associate-*l*79.8%
times-frac90.6%
associate-+r+90.6%
Applied egg-rr90.6%
associate-*l/90.7%
*-lft-identity90.7%
*-commutative90.7%
Simplified90.7%
Taylor expanded in x around 0 61.6%
+-commutative61.6%
Simplified61.6%
associate-*r/62.5%
un-div-inv62.5%
+-commutative62.5%
Applied egg-rr62.5%
Final simplification74.0%
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
:precision binary64
(if (<= x -1.0)
(/ (/ y x) x)
(if (<= x -1.42e-98)
(/ y x)
(if (<= x 6e-144) (/ x y) (* (/ x y) (/ 1.0 y))))))assert(x < y);
double code(double x, double y) {
double tmp;
if (x <= -1.0) {
tmp = (y / x) / x;
} else if (x <= -1.42e-98) {
tmp = y / x;
} else if (x <= 6e-144) {
tmp = x / y;
} else {
tmp = (x / y) * (1.0 / y);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-1.0d0)) then
tmp = (y / x) / x
else if (x <= (-1.42d-98)) then
tmp = y / x
else if (x <= 6d-144) then
tmp = x / y
else
tmp = (x / y) * (1.0d0 / y)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double tmp;
if (x <= -1.0) {
tmp = (y / x) / x;
} else if (x <= -1.42e-98) {
tmp = y / x;
} else if (x <= 6e-144) {
tmp = x / y;
} else {
tmp = (x / y) * (1.0 / y);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): tmp = 0 if x <= -1.0: tmp = (y / x) / x elif x <= -1.42e-98: tmp = y / x elif x <= 6e-144: tmp = x / y else: tmp = (x / y) * (1.0 / y) return tmp
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (x <= -1.0) tmp = Float64(Float64(y / x) / x); elseif (x <= -1.42e-98) tmp = Float64(y / x); elseif (x <= 6e-144) tmp = Float64(x / y); else tmp = Float64(Float64(x / y) * Float64(1.0 / y)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
tmp = 0.0;
if (x <= -1.0)
tmp = (y / x) / x;
elseif (x <= -1.42e-98)
tmp = y / x;
elseif (x <= 6e-144)
tmp = x / y;
else
tmp = (x / y) * (1.0 / y);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := If[LessEqual[x, -1.0], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, -1.42e-98], N[(y / x), $MachinePrecision], If[LessEqual[x, 6e-144], N[(x / y), $MachinePrecision], N[(N[(x / y), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;x \leq -1.42 \cdot 10^{-98}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;x \leq 6 \cdot 10^{-144}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{1}{y}\\
\end{array}
\end{array}
if x < -1Initial program 62.0%
associate-/l*72.8%
associate-+l+72.8%
Simplified72.8%
associate-*r/62.0%
associate-+r+62.0%
*-commutative62.0%
distribute-rgt1-in26.5%
cube-mult26.5%
fma-undefine62.0%
add-sqr-sqrt54.5%
pow254.5%
Applied egg-rr0.0%
Taylor expanded in x around inf 44.6%
unpow244.6%
associate-*l/44.6%
*-un-lft-identity44.6%
associate-*r/44.7%
associate-*r*44.7%
add-sqr-sqrt78.8%
*-commutative78.8%
un-div-inv78.8%
Applied egg-rr78.8%
if -1 < x < -1.41999999999999999e-98Initial program 89.1%
associate-/l*99.4%
associate-+l+99.4%
Simplified99.4%
Taylor expanded in y around 0 57.2%
associate-/r*57.2%
+-commutative57.2%
Simplified57.2%
Taylor expanded in x around 0 57.2%
if -1.41999999999999999e-98 < x < 5.9999999999999997e-144Initial program 73.1%
associate-/l*81.7%
associate-+l+81.7%
Simplified81.7%
Taylor expanded in x around 0 88.5%
+-commutative88.5%
Simplified88.5%
Taylor expanded in y around 0 68.1%
if 5.9999999999999997e-144 < x Initial program 65.0%
associate-/l*80.7%
associate-+l+80.7%
Simplified80.7%
Taylor expanded in x around 0 42.1%
+-commutative42.1%
Simplified42.1%
*-un-lft-identity42.1%
*-commutative42.1%
times-frac45.9%
Applied egg-rr45.9%
*-commutative45.9%
Simplified45.9%
Taylor expanded in y around inf 40.2%
Final simplification61.1%
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
:precision binary64
(if (<= x -1.0)
(* (/ y x) (/ 1.0 x))
(if (<= x -4.5e-97)
(/ y x)
(if (<= x 4.7e-147) (/ x y) (* (/ x y) (/ 1.0 y))))))assert(x < y);
double code(double x, double y) {
double tmp;
if (x <= -1.0) {
tmp = (y / x) * (1.0 / x);
} else if (x <= -4.5e-97) {
tmp = y / x;
} else if (x <= 4.7e-147) {
tmp = x / y;
} else {
tmp = (x / y) * (1.0 / y);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-1.0d0)) then
tmp = (y / x) * (1.0d0 / x)
else if (x <= (-4.5d-97)) then
tmp = y / x
else if (x <= 4.7d-147) then
tmp = x / y
else
tmp = (x / y) * (1.0d0 / y)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double tmp;
if (x <= -1.0) {
tmp = (y / x) * (1.0 / x);
} else if (x <= -4.5e-97) {
tmp = y / x;
} else if (x <= 4.7e-147) {
tmp = x / y;
} else {
tmp = (x / y) * (1.0 / y);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): tmp = 0 if x <= -1.0: tmp = (y / x) * (1.0 / x) elif x <= -4.5e-97: tmp = y / x elif x <= 4.7e-147: tmp = x / y else: tmp = (x / y) * (1.0 / y) return tmp
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (x <= -1.0) tmp = Float64(Float64(y / x) * Float64(1.0 / x)); elseif (x <= -4.5e-97) tmp = Float64(y / x); elseif (x <= 4.7e-147) tmp = Float64(x / y); else tmp = Float64(Float64(x / y) * Float64(1.0 / y)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
tmp = 0.0;
if (x <= -1.0)
tmp = (y / x) * (1.0 / x);
elseif (x <= -4.5e-97)
tmp = y / x;
elseif (x <= 4.7e-147)
tmp = x / y;
else
tmp = (x / y) * (1.0 / y);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := If[LessEqual[x, -1.0], N[(N[(y / x), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -4.5e-97], N[(y / x), $MachinePrecision], If[LessEqual[x, 4.7e-147], N[(x / y), $MachinePrecision], N[(N[(x / y), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1:\\
\;\;\;\;\frac{y}{x} \cdot \frac{1}{x}\\
\mathbf{elif}\;x \leq -4.5 \cdot 10^{-97}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;x \leq 4.7 \cdot 10^{-147}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{1}{y}\\
\end{array}
\end{array}
if x < -1Initial program 62.0%
associate-/l*72.8%
associate-+l+72.8%
Simplified72.8%
associate-*r/62.0%
associate-+r+62.0%
*-commutative62.0%
distribute-rgt1-in26.5%
cube-mult26.5%
fma-undefine62.0%
add-sqr-sqrt54.5%
pow254.5%
Applied egg-rr0.0%
Taylor expanded in x around inf 44.6%
unpow244.6%
*-commutative44.6%
associate-*r*44.7%
associate-*r*44.6%
add-sqr-sqrt78.8%
*-commutative78.8%
un-div-inv78.9%
Applied egg-rr78.9%
if -1 < x < -4.5000000000000001e-97Initial program 89.1%
associate-/l*99.4%
associate-+l+99.4%
Simplified99.4%
Taylor expanded in y around 0 57.2%
associate-/r*57.2%
+-commutative57.2%
Simplified57.2%
Taylor expanded in x around 0 57.2%
if -4.5000000000000001e-97 < x < 4.69999999999999989e-147Initial program 73.1%
associate-/l*81.7%
associate-+l+81.7%
Simplified81.7%
Taylor expanded in x around 0 88.5%
+-commutative88.5%
Simplified88.5%
Taylor expanded in y around 0 68.1%
if 4.69999999999999989e-147 < x Initial program 65.0%
associate-/l*80.7%
associate-+l+80.7%
Simplified80.7%
Taylor expanded in x around 0 42.1%
+-commutative42.1%
Simplified42.1%
*-un-lft-identity42.1%
*-commutative42.1%
times-frac45.9%
Applied egg-rr45.9%
*-commutative45.9%
Simplified45.9%
Taylor expanded in y around inf 40.2%
Final simplification61.1%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (if (<= x -1.0) (* (/ y x) (/ 1.0 x)) (if (<= x -5e-84) (/ y x) (/ x (* y (+ y 1.0))))))
assert(x < y);
double code(double x, double y) {
double tmp;
if (x <= -1.0) {
tmp = (y / x) * (1.0 / x);
} else if (x <= -5e-84) {
tmp = y / x;
} else {
tmp = x / (y * (y + 1.0));
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-1.0d0)) then
tmp = (y / x) * (1.0d0 / x)
else if (x <= (-5d-84)) then
tmp = y / x
else
tmp = x / (y * (y + 1.0d0))
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double tmp;
if (x <= -1.0) {
tmp = (y / x) * (1.0 / x);
} else if (x <= -5e-84) {
tmp = y / x;
} else {
tmp = x / (y * (y + 1.0));
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): tmp = 0 if x <= -1.0: tmp = (y / x) * (1.0 / x) elif x <= -5e-84: tmp = y / x else: tmp = x / (y * (y + 1.0)) return tmp
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (x <= -1.0) tmp = Float64(Float64(y / x) * Float64(1.0 / x)); elseif (x <= -5e-84) tmp = Float64(y / x); else tmp = Float64(x / Float64(y * Float64(y + 1.0))); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
tmp = 0.0;
if (x <= -1.0)
tmp = (y / x) * (1.0 / x);
elseif (x <= -5e-84)
tmp = y / x;
else
tmp = x / (y * (y + 1.0));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := If[LessEqual[x, -1.0], N[(N[(y / x), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -5e-84], N[(y / x), $MachinePrecision], N[(x / N[(y * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1:\\
\;\;\;\;\frac{y}{x} \cdot \frac{1}{x}\\
\mathbf{elif}\;x \leq -5 \cdot 10^{-84}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\end{array}
\end{array}
if x < -1Initial program 62.0%
associate-/l*72.8%
associate-+l+72.8%
Simplified72.8%
associate-*r/62.0%
associate-+r+62.0%
*-commutative62.0%
distribute-rgt1-in26.5%
cube-mult26.5%
fma-undefine62.0%
add-sqr-sqrt54.5%
pow254.5%
Applied egg-rr0.0%
Taylor expanded in x around inf 44.6%
unpow244.6%
*-commutative44.6%
associate-*r*44.7%
associate-*r*44.6%
add-sqr-sqrt78.8%
*-commutative78.8%
un-div-inv78.9%
Applied egg-rr78.9%
if -1 < x < -5.0000000000000002e-84Initial program 93.6%
associate-/l*99.6%
associate-+l+99.5%
Simplified99.5%
Taylor expanded in y around 0 57.9%
associate-/r*57.9%
+-commutative57.9%
Simplified57.9%
Taylor expanded in x around 0 57.9%
if -5.0000000000000002e-84 < x Initial program 68.4%
associate-/l*81.4%
associate-+l+81.4%
Simplified81.4%
Taylor expanded in x around 0 62.5%
+-commutative62.5%
Simplified62.5%
Final simplification67.3%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (if (<= x -5e+145) (* (/ y x) (/ 1.0 x)) (if (<= x -3.6e-84) (/ y (* x (+ x 1.0))) (/ x (* y (+ y 1.0))))))
assert(x < y);
double code(double x, double y) {
double tmp;
if (x <= -5e+145) {
tmp = (y / x) * (1.0 / x);
} else if (x <= -3.6e-84) {
tmp = y / (x * (x + 1.0));
} else {
tmp = x / (y * (y + 1.0));
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-5d+145)) then
tmp = (y / x) * (1.0d0 / x)
else if (x <= (-3.6d-84)) then
tmp = y / (x * (x + 1.0d0))
else
tmp = x / (y * (y + 1.0d0))
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double tmp;
if (x <= -5e+145) {
tmp = (y / x) * (1.0 / x);
} else if (x <= -3.6e-84) {
tmp = y / (x * (x + 1.0));
} else {
tmp = x / (y * (y + 1.0));
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): tmp = 0 if x <= -5e+145: tmp = (y / x) * (1.0 / x) elif x <= -3.6e-84: tmp = y / (x * (x + 1.0)) else: tmp = x / (y * (y + 1.0)) return tmp
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (x <= -5e+145) tmp = Float64(Float64(y / x) * Float64(1.0 / x)); elseif (x <= -3.6e-84) tmp = Float64(y / Float64(x * Float64(x + 1.0))); else tmp = Float64(x / Float64(y * Float64(y + 1.0))); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
tmp = 0.0;
if (x <= -5e+145)
tmp = (y / x) * (1.0 / x);
elseif (x <= -3.6e-84)
tmp = y / (x * (x + 1.0));
else
tmp = x / (y * (y + 1.0));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := If[LessEqual[x, -5e+145], N[(N[(y / x), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.6e-84], N[(y / N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5 \cdot 10^{+145}:\\
\;\;\;\;\frac{y}{x} \cdot \frac{1}{x}\\
\mathbf{elif}\;x \leq -3.6 \cdot 10^{-84}:\\
\;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\end{array}
\end{array}
if x < -4.99999999999999967e145Initial program 63.9%
associate-/l*77.9%
associate-+l+77.9%
Simplified77.9%
associate-*r/63.9%
associate-+r+63.9%
*-commutative63.9%
distribute-rgt1-in4.5%
cube-mult4.5%
fma-undefine63.9%
add-sqr-sqrt63.9%
pow263.9%
Applied egg-rr0.0%
Taylor expanded in x around inf 55.7%
unpow255.7%
*-commutative55.7%
associate-*r*55.7%
associate-*r*55.7%
add-sqr-sqrt93.1%
*-commutative93.1%
un-div-inv93.2%
Applied egg-rr93.2%
if -4.99999999999999967e145 < x < -3.60000000000000003e-84Initial program 70.4%
associate-/l*76.8%
associate-+l+76.7%
Simplified76.7%
Taylor expanded in y around 0 59.0%
if -3.60000000000000003e-84 < x Initial program 68.4%
associate-/l*81.4%
associate-+l+81.4%
Simplified81.4%
Taylor expanded in x around 0 62.5%
+-commutative62.5%
Simplified62.5%
Final simplification67.3%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (if (<= x -1e+143) (* (/ y x) (/ 1.0 x)) (if (<= x -4.5e-84) (/ y (* x (+ x 1.0))) (/ (/ x y) (+ y 1.0)))))
assert(x < y);
double code(double x, double y) {
double tmp;
if (x <= -1e+143) {
tmp = (y / x) * (1.0 / x);
} else if (x <= -4.5e-84) {
tmp = y / (x * (x + 1.0));
} else {
tmp = (x / y) / (y + 1.0);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-1d+143)) then
tmp = (y / x) * (1.0d0 / x)
else if (x <= (-4.5d-84)) then
tmp = y / (x * (x + 1.0d0))
else
tmp = (x / y) / (y + 1.0d0)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double tmp;
if (x <= -1e+143) {
tmp = (y / x) * (1.0 / x);
} else if (x <= -4.5e-84) {
tmp = y / (x * (x + 1.0));
} else {
tmp = (x / y) / (y + 1.0);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): tmp = 0 if x <= -1e+143: tmp = (y / x) * (1.0 / x) elif x <= -4.5e-84: tmp = y / (x * (x + 1.0)) else: tmp = (x / y) / (y + 1.0) return tmp
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (x <= -1e+143) tmp = Float64(Float64(y / x) * Float64(1.0 / x)); elseif (x <= -4.5e-84) tmp = Float64(y / Float64(x * Float64(x + 1.0))); else tmp = Float64(Float64(x / y) / Float64(y + 1.0)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
tmp = 0.0;
if (x <= -1e+143)
tmp = (y / x) * (1.0 / x);
elseif (x <= -4.5e-84)
tmp = y / (x * (x + 1.0));
else
tmp = (x / y) / (y + 1.0);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := If[LessEqual[x, -1e+143], N[(N[(y / x), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -4.5e-84], N[(y / N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1 \cdot 10^{+143}:\\
\;\;\;\;\frac{y}{x} \cdot \frac{1}{x}\\
\mathbf{elif}\;x \leq -4.5 \cdot 10^{-84}:\\
\;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + 1}\\
\end{array}
\end{array}
if x < -1e143Initial program 62.6%
associate-/l*76.4%
associate-+l+76.4%
Simplified76.4%
associate-*r/62.6%
associate-+r+62.6%
*-commutative62.6%
distribute-rgt1-in4.4%
cube-mult4.4%
fma-undefine62.6%
add-sqr-sqrt62.6%
pow262.6%
Applied egg-rr0.0%
Taylor expanded in x around inf 54.5%
unpow254.5%
*-commutative54.5%
associate-*r*54.5%
associate-*r*54.5%
add-sqr-sqrt91.2%
*-commutative91.2%
un-div-inv91.3%
Applied egg-rr91.3%
if -1e143 < x < -4.50000000000000016e-84Initial program 71.8%
associate-/l*78.1%
associate-+l+78.1%
Simplified78.1%
Taylor expanded in y around 0 60.1%
if -4.50000000000000016e-84 < x Initial program 68.4%
associate-/l*81.4%
associate-+l+81.4%
Simplified81.4%
*-un-lft-identity81.4%
associate-+r+81.4%
associate-*l*81.4%
times-frac91.6%
associate-+r+91.6%
Applied egg-rr91.6%
associate-*l/91.7%
*-lft-identity91.7%
*-commutative91.7%
Simplified91.7%
Taylor expanded in x around 0 62.5%
associate-/r*64.6%
+-commutative64.6%
Simplified64.6%
Final simplification68.6%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (if (<= x -1.0) (/ (/ y x) x) (if (<= x -2.6e-101) (/ y x) (/ x y))))
assert(x < y);
double code(double x, double y) {
double tmp;
if (x <= -1.0) {
tmp = (y / x) / x;
} else if (x <= -2.6e-101) {
tmp = y / x;
} else {
tmp = x / y;
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-1.0d0)) then
tmp = (y / x) / x
else if (x <= (-2.6d-101)) then
tmp = y / x
else
tmp = x / y
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double tmp;
if (x <= -1.0) {
tmp = (y / x) / x;
} else if (x <= -2.6e-101) {
tmp = y / x;
} else {
tmp = x / y;
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): tmp = 0 if x <= -1.0: tmp = (y / x) / x elif x <= -2.6e-101: tmp = y / x else: tmp = x / y return tmp
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (x <= -1.0) tmp = Float64(Float64(y / x) / x); elseif (x <= -2.6e-101) tmp = Float64(y / x); else tmp = Float64(x / y); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
tmp = 0.0;
if (x <= -1.0)
tmp = (y / x) / x;
elseif (x <= -2.6e-101)
tmp = y / x;
else
tmp = x / y;
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := If[LessEqual[x, -1.0], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, -2.6e-101], N[(y / x), $MachinePrecision], N[(x / y), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;x \leq -2.6 \cdot 10^{-101}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
if x < -1Initial program 62.0%
associate-/l*72.8%
associate-+l+72.8%
Simplified72.8%
associate-*r/62.0%
associate-+r+62.0%
*-commutative62.0%
distribute-rgt1-in26.5%
cube-mult26.5%
fma-undefine62.0%
add-sqr-sqrt54.5%
pow254.5%
Applied egg-rr0.0%
Taylor expanded in x around inf 44.6%
unpow244.6%
associate-*l/44.6%
*-un-lft-identity44.6%
associate-*r/44.7%
associate-*r*44.7%
add-sqr-sqrt78.8%
*-commutative78.8%
un-div-inv78.8%
Applied egg-rr78.8%
if -1 < x < -2.6000000000000001e-101Initial program 89.1%
associate-/l*99.4%
associate-+l+99.4%
Simplified99.4%
Taylor expanded in y around 0 57.2%
associate-/r*57.2%
+-commutative57.2%
Simplified57.2%
Taylor expanded in x around 0 57.2%
if -2.6000000000000001e-101 < x Initial program 68.6%
associate-/l*81.2%
associate-+l+81.2%
Simplified81.2%
Taylor expanded in x around 0 62.7%
+-commutative62.7%
Simplified62.7%
Taylor expanded in y around 0 36.3%
Final simplification51.1%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (if (<= x -3.6e-84) (/ (/ y x) (+ x 1.0)) (/ (/ x y) (+ y 1.0))))
assert(x < y);
double code(double x, double y) {
double tmp;
if (x <= -3.6e-84) {
tmp = (y / x) / (x + 1.0);
} else {
tmp = (x / y) / (y + 1.0);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-3.6d-84)) then
tmp = (y / x) / (x + 1.0d0)
else
tmp = (x / y) / (y + 1.0d0)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double tmp;
if (x <= -3.6e-84) {
tmp = (y / x) / (x + 1.0);
} else {
tmp = (x / y) / (y + 1.0);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): tmp = 0 if x <= -3.6e-84: tmp = (y / x) / (x + 1.0) else: tmp = (x / y) / (y + 1.0) return tmp
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (x <= -3.6e-84) tmp = Float64(Float64(y / x) / Float64(x + 1.0)); else tmp = Float64(Float64(x / y) / Float64(y + 1.0)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
tmp = 0.0;
if (x <= -3.6e-84)
tmp = (y / x) / (x + 1.0);
else
tmp = (x / y) / (y + 1.0);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := If[LessEqual[x, -3.6e-84], N[(N[(y / x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.6 \cdot 10^{-84}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + 1}\\
\end{array}
\end{array}
if x < -3.60000000000000003e-84Initial program 67.3%
associate-/l*77.3%
associate-+l+77.3%
Simplified77.3%
Taylor expanded in y around 0 69.0%
associate-/r*75.4%
+-commutative75.4%
Simplified75.4%
if -3.60000000000000003e-84 < x Initial program 68.4%
associate-/l*81.4%
associate-+l+81.4%
Simplified81.4%
*-un-lft-identity81.4%
associate-+r+81.4%
associate-*l*81.4%
times-frac91.6%
associate-+r+91.6%
Applied egg-rr91.6%
associate-*l/91.7%
*-lft-identity91.7%
*-commutative91.7%
Simplified91.7%
Taylor expanded in x around 0 62.5%
associate-/r*64.6%
+-commutative64.6%
Simplified64.6%
Final simplification68.6%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (if (<= x -7.5e-97) (/ y x) (/ x y)))
assert(x < y);
double code(double x, double y) {
double tmp;
if (x <= -7.5e-97) {
tmp = y / x;
} else {
tmp = x / y;
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-7.5d-97)) then
tmp = y / x
else
tmp = x / y
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double tmp;
if (x <= -7.5e-97) {
tmp = y / x;
} else {
tmp = x / y;
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): tmp = 0 if x <= -7.5e-97: tmp = y / x else: tmp = x / y return tmp
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (x <= -7.5e-97) tmp = Float64(y / x); else tmp = Float64(x / y); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
tmp = 0.0;
if (x <= -7.5e-97)
tmp = y / x;
else
tmp = x / y;
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := If[LessEqual[x, -7.5e-97], N[(y / x), $MachinePrecision], N[(x / y), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.5 \cdot 10^{-97}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
if x < -7.5e-97Initial program 67.0%
associate-/l*77.7%
associate-+l+77.7%
Simplified77.7%
Taylor expanded in y around 0 68.7%
associate-/r*74.9%
+-commutative74.9%
Simplified74.9%
Taylor expanded in x around 0 31.7%
if -7.5e-97 < x Initial program 68.6%
associate-/l*81.2%
associate-+l+81.2%
Simplified81.2%
Taylor expanded in x around 0 62.7%
+-commutative62.7%
Simplified62.7%
Taylor expanded in y around 0 36.3%
Final simplification34.6%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (/ x y))
assert(x < y);
double code(double x, double y) {
return x / y;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = x / y
end function
assert x < y;
public static double code(double x, double y) {
return x / y;
}
[x, y] = sort([x, y]) def code(x, y): return x / y
x, y = sort([x, y]) function code(x, y) return Float64(x / y) end
x, y = num2cell(sort([x, y])){:}
function tmp = code(x, y)
tmp = x / y;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := N[(x / y), $MachinePrecision]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\frac{x}{y}
\end{array}
Initial program 68.0%
associate-/l*79.9%
associate-+l+79.8%
Simplified79.8%
Taylor expanded in x around 0 48.2%
+-commutative48.2%
Simplified48.2%
Taylor expanded in y around 0 24.4%
Final simplification24.4%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 1.0)
assert(x < y);
double code(double x, double y) {
return 1.0;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0
end function
assert x < y;
public static double code(double x, double y) {
return 1.0;
}
[x, y] = sort([x, y]) def code(x, y): return 1.0
x, y = sort([x, y]) function code(x, y) return 1.0 end
x, y = num2cell(sort([x, y])){:}
function tmp = code(x, y)
tmp = 1.0;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := 1.0
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
1
\end{array}
Initial program 68.0%
associate-/l*79.9%
associate-+l+79.8%
Simplified79.8%
*-un-lft-identity79.8%
associate-+r+79.9%
associate-*l*79.8%
times-frac87.9%
associate-+r+87.9%
Applied egg-rr87.9%
associate-*l/88.0%
*-lft-identity88.0%
*-commutative88.0%
Simplified88.0%
Taylor expanded in x around 0 50.5%
+-commutative50.5%
Simplified50.5%
Taylor expanded in y around 0 3.5%
Final simplification3.5%
(FPCore (x y) :precision binary64 (/ (/ (/ x (+ (+ y 1.0) x)) (+ y x)) (/ 1.0 (/ y (+ y x)))))
double code(double x, double y) {
return ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((x / ((y + 1.0d0) + x)) / (y + x)) / (1.0d0 / (y / (y + x)))
end function
public static double code(double x, double y) {
return ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x)));
}
def code(x, y): return ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x)))
function code(x, y) return Float64(Float64(Float64(x / Float64(Float64(y + 1.0) + x)) / Float64(y + x)) / Float64(1.0 / Float64(y / Float64(y + x)))) end
function tmp = code(x, y) tmp = ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x))); end
code[x_, y_] := N[(N[(N[(x / N[(N[(y + 1.0), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(1.0 / N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{\frac{x}{\left(y + 1\right) + x}}{y + x}}{\frac{1}{\frac{y}{y + x}}}
\end{array}
herbie shell --seed 2024059
(FPCore (x y)
:name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, A"
:precision binary64
:alt
(/ (/ (/ x (+ (+ y 1.0) x)) (+ y x)) (/ 1.0 (/ y (+ y x))))
(/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))