
(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 24 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 (/ (/ y (+ y x)) (* (+ y x) (/ (+ y (+ x 1.0)) x))))
assert(x < y);
double code(double x, double y) {
return (y / (y + x)) / ((y + x) * ((y + (x + 1.0)) / x));
}
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 = (y / (y + x)) / ((y + x) * ((y + (x + 1.0d0)) / x))
end function
assert x < y;
public static double code(double x, double y) {
return (y / (y + x)) / ((y + x) * ((y + (x + 1.0)) / x));
}
[x, y] = sort([x, y]) def code(x, y): return (y / (y + x)) / ((y + x) * ((y + (x + 1.0)) / x))
x, y = sort([x, y]) function code(x, y) return Float64(Float64(y / Float64(y + x)) / Float64(Float64(y + x) * Float64(Float64(y + Float64(x + 1.0)) / x))) end
x, y = num2cell(sort([x, y])){:}
function tmp = code(x, y)
tmp = (y / (y + x)) / ((y + x) * ((y + (x + 1.0)) / x));
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(N[(y + x), $MachinePrecision] * N[(N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\frac{\frac{y}{y + x}}{\left(y + x\right) \cdot \frac{y + \left(x + 1\right)}{x}}
\end{array}
Initial program 72.3%
associate-*l*72.3%
+-commutative72.3%
+-commutative72.3%
+-commutative72.3%
associate-*l*72.3%
*-commutative72.3%
associate-*r/84.7%
*-commutative84.7%
distribute-rgt1-in67.1%
fma-def84.7%
+-commutative84.7%
+-commutative84.7%
cube-unmult84.7%
+-commutative84.7%
Simplified84.7%
associate-*r/72.3%
fma-udef57.5%
cube-mult57.5%
distribute-rgt1-in72.3%
*-commutative72.3%
+-commutative72.3%
associate-+r+72.3%
frac-times88.8%
*-commutative88.8%
clear-num88.7%
associate-/r*99.7%
frac-times99.5%
*-un-lft-identity99.5%
+-commutative99.5%
+-commutative99.5%
Applied egg-rr99.5%
Final simplification99.5%
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ x (+ y x))))
(if (<= y 2e-19)
(* t_0 (/ (/ y (+ x 1.0)) (+ y x)))
(if (<= y 3.8e+153)
(* (/ x (* (+ y x) (+ y x))) (/ y (+ y (+ x 1.0))))
(/ t_0 (+ y (+ x (+ x 1.0))))))))assert(x < y);
double code(double x, double y) {
double t_0 = x / (y + x);
double tmp;
if (y <= 2e-19) {
tmp = t_0 * ((y / (x + 1.0)) / (y + x));
} else if (y <= 3.8e+153) {
tmp = (x / ((y + x) * (y + x))) * (y / (y + (x + 1.0)));
} else {
tmp = t_0 / (y + (x + (x + 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) :: t_0
real(8) :: tmp
t_0 = x / (y + x)
if (y <= 2d-19) then
tmp = t_0 * ((y / (x + 1.0d0)) / (y + x))
else if (y <= 3.8d+153) then
tmp = (x / ((y + x) * (y + x))) * (y / (y + (x + 1.0d0)))
else
tmp = t_0 / (y + (x + (x + 1.0d0)))
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double t_0 = x / (y + x);
double tmp;
if (y <= 2e-19) {
tmp = t_0 * ((y / (x + 1.0)) / (y + x));
} else if (y <= 3.8e+153) {
tmp = (x / ((y + x) * (y + x))) * (y / (y + (x + 1.0)));
} else {
tmp = t_0 / (y + (x + (x + 1.0)));
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): t_0 = x / (y + x) tmp = 0 if y <= 2e-19: tmp = t_0 * ((y / (x + 1.0)) / (y + x)) elif y <= 3.8e+153: tmp = (x / ((y + x) * (y + x))) * (y / (y + (x + 1.0))) else: tmp = t_0 / (y + (x + (x + 1.0))) return tmp
x, y = sort([x, y]) function code(x, y) t_0 = Float64(x / Float64(y + x)) tmp = 0.0 if (y <= 2e-19) tmp = Float64(t_0 * Float64(Float64(y / Float64(x + 1.0)) / Float64(y + x))); elseif (y <= 3.8e+153) tmp = Float64(Float64(x / Float64(Float64(y + x) * Float64(y + x))) * Float64(y / Float64(y + Float64(x + 1.0)))); else tmp = Float64(t_0 / Float64(y + Float64(x + Float64(x + 1.0)))); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
t_0 = x / (y + x);
tmp = 0.0;
if (y <= 2e-19)
tmp = t_0 * ((y / (x + 1.0)) / (y + x));
elseif (y <= 3.8e+153)
tmp = (x / ((y + x) * (y + x))) * (y / (y + (x + 1.0)));
else
tmp = t_0 / (y + (x + (x + 1.0)));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_] := Block[{t$95$0 = N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 2e-19], N[(t$95$0 * N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.8e+153], N[(N[(x / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y / N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 / N[(y + N[(x + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_0 := \frac{x}{y + x}\\
\mathbf{if}\;y \leq 2 \cdot 10^{-19}:\\
\;\;\;\;t_0 \cdot \frac{\frac{y}{x + 1}}{y + x}\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{+153}:\\
\;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{y + \left(x + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_0}{y + \left(x + \left(x + 1\right)\right)}\\
\end{array}
\end{array}
if y < 2e-19Initial program 75.9%
associate-*l*75.9%
+-commutative75.9%
+-commutative75.9%
+-commutative75.9%
associate-*l*75.9%
*-commutative75.9%
associate-*r/87.7%
*-commutative87.7%
distribute-rgt1-in66.4%
fma-def87.7%
+-commutative87.7%
+-commutative87.7%
cube-unmult87.7%
+-commutative87.7%
Simplified87.7%
associate-*r/75.9%
*-commutative75.9%
fma-udef56.6%
cube-mult56.6%
distribute-rgt1-in75.9%
*-commutative75.9%
+-commutative75.9%
associate-+r+75.9%
frac-times91.3%
*-commutative91.3%
clear-num91.2%
associate-/r*99.7%
frac-times99.3%
*-un-lft-identity99.3%
+-commutative99.3%
+-commutative99.3%
Applied egg-rr99.3%
Taylor expanded in y around 0 85.2%
+-commutative85.2%
Simplified85.2%
clear-num85.7%
associate-/r/85.3%
associate-/r*85.8%
clear-num85.8%
+-commutative85.8%
Applied egg-rr85.8%
if 2e-19 < y < 3.79999999999999966e153Initial program 64.6%
times-frac85.8%
+-commutative85.8%
associate-+l+85.8%
Simplified85.8%
if 3.79999999999999966e153 < y Initial program 58.5%
associate-*l*58.5%
+-commutative58.5%
+-commutative58.5%
+-commutative58.5%
associate-*l*58.5%
*-commutative58.5%
associate-*r/75.9%
*-commutative75.9%
distribute-rgt1-in75.8%
fma-def75.9%
+-commutative75.9%
+-commutative75.9%
cube-unmult75.9%
+-commutative75.9%
Simplified75.9%
associate-*r/58.5%
*-commutative58.5%
fma-udef58.5%
cube-mult58.5%
distribute-rgt1-in58.5%
*-commutative58.5%
+-commutative58.5%
associate-+r+58.5%
frac-times75.9%
*-commutative75.9%
clear-num75.9%
associate-/r*99.9%
frac-times99.8%
*-un-lft-identity99.8%
+-commutative99.8%
+-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in y around -inf 96.6%
mul-1-neg96.6%
unsub-neg96.6%
neg-mul-196.6%
+-commutative96.6%
unsub-neg96.6%
distribute-lft-in96.6%
metadata-eval96.6%
neg-mul-196.6%
unsub-neg96.6%
Simplified96.6%
Final simplification87.1%
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ x (+ y x))))
(if (<= y 4.4e-20)
(* t_0 (/ (/ y (+ x 1.0)) (+ y x)))
(if (<= y 1.35e+154)
(* (/ y (* (+ y x) (+ y x))) (/ x (+ y (+ x 1.0))))
(/ t_0 (+ y (+ x (+ x 1.0))))))))assert(x < y);
double code(double x, double y) {
double t_0 = x / (y + x);
double tmp;
if (y <= 4.4e-20) {
tmp = t_0 * ((y / (x + 1.0)) / (y + x));
} else if (y <= 1.35e+154) {
tmp = (y / ((y + x) * (y + x))) * (x / (y + (x + 1.0)));
} else {
tmp = t_0 / (y + (x + (x + 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) :: t_0
real(8) :: tmp
t_0 = x / (y + x)
if (y <= 4.4d-20) then
tmp = t_0 * ((y / (x + 1.0d0)) / (y + x))
else if (y <= 1.35d+154) then
tmp = (y / ((y + x) * (y + x))) * (x / (y + (x + 1.0d0)))
else
tmp = t_0 / (y + (x + (x + 1.0d0)))
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double t_0 = x / (y + x);
double tmp;
if (y <= 4.4e-20) {
tmp = t_0 * ((y / (x + 1.0)) / (y + x));
} else if (y <= 1.35e+154) {
tmp = (y / ((y + x) * (y + x))) * (x / (y + (x + 1.0)));
} else {
tmp = t_0 / (y + (x + (x + 1.0)));
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): t_0 = x / (y + x) tmp = 0 if y <= 4.4e-20: tmp = t_0 * ((y / (x + 1.0)) / (y + x)) elif y <= 1.35e+154: tmp = (y / ((y + x) * (y + x))) * (x / (y + (x + 1.0))) else: tmp = t_0 / (y + (x + (x + 1.0))) return tmp
x, y = sort([x, y]) function code(x, y) t_0 = Float64(x / Float64(y + x)) tmp = 0.0 if (y <= 4.4e-20) tmp = Float64(t_0 * Float64(Float64(y / Float64(x + 1.0)) / Float64(y + x))); elseif (y <= 1.35e+154) tmp = Float64(Float64(y / Float64(Float64(y + x) * Float64(y + x))) * Float64(x / Float64(y + Float64(x + 1.0)))); else tmp = Float64(t_0 / Float64(y + Float64(x + Float64(x + 1.0)))); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
t_0 = x / (y + x);
tmp = 0.0;
if (y <= 4.4e-20)
tmp = t_0 * ((y / (x + 1.0)) / (y + x));
elseif (y <= 1.35e+154)
tmp = (y / ((y + x) * (y + x))) * (x / (y + (x + 1.0)));
else
tmp = t_0 / (y + (x + (x + 1.0)));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_] := Block[{t$95$0 = N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 4.4e-20], N[(t$95$0 * N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.35e+154], N[(N[(y / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x / N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 / N[(y + N[(x + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_0 := \frac{x}{y + x}\\
\mathbf{if}\;y \leq 4.4 \cdot 10^{-20}:\\
\;\;\;\;t_0 \cdot \frac{\frac{y}{x + 1}}{y + x}\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{y + \left(x + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_0}{y + \left(x + \left(x + 1\right)\right)}\\
\end{array}
\end{array}
if y < 4.39999999999999982e-20Initial program 75.9%
associate-*l*75.9%
+-commutative75.9%
+-commutative75.9%
+-commutative75.9%
associate-*l*75.9%
*-commutative75.9%
associate-*r/87.7%
*-commutative87.7%
distribute-rgt1-in66.4%
fma-def87.7%
+-commutative87.7%
+-commutative87.7%
cube-unmult87.7%
+-commutative87.7%
Simplified87.7%
associate-*r/75.9%
*-commutative75.9%
fma-udef56.6%
cube-mult56.6%
distribute-rgt1-in75.9%
*-commutative75.9%
+-commutative75.9%
associate-+r+75.9%
frac-times91.3%
*-commutative91.3%
clear-num91.2%
associate-/r*99.7%
frac-times99.3%
*-un-lft-identity99.3%
+-commutative99.3%
+-commutative99.3%
Applied egg-rr99.3%
Taylor expanded in y around 0 85.2%
+-commutative85.2%
Simplified85.2%
clear-num85.7%
associate-/r/85.3%
associate-/r*85.8%
clear-num85.8%
+-commutative85.8%
Applied egg-rr85.8%
if 4.39999999999999982e-20 < y < 1.35000000000000003e154Initial program 64.6%
associate-*l*64.6%
+-commutative64.6%
+-commutative64.6%
+-commutative64.6%
*-commutative64.6%
associate-*l*64.6%
times-frac85.9%
+-commutative85.9%
+-commutative85.9%
associate-+l+85.9%
Simplified85.9%
if 1.35000000000000003e154 < y Initial program 58.5%
associate-*l*58.5%
+-commutative58.5%
+-commutative58.5%
+-commutative58.5%
associate-*l*58.5%
*-commutative58.5%
associate-*r/75.9%
*-commutative75.9%
distribute-rgt1-in75.8%
fma-def75.9%
+-commutative75.9%
+-commutative75.9%
cube-unmult75.9%
+-commutative75.9%
Simplified75.9%
associate-*r/58.5%
*-commutative58.5%
fma-udef58.5%
cube-mult58.5%
distribute-rgt1-in58.5%
*-commutative58.5%
+-commutative58.5%
associate-+r+58.5%
frac-times75.9%
*-commutative75.9%
clear-num75.9%
associate-/r*99.9%
frac-times99.8%
*-un-lft-identity99.8%
+-commutative99.8%
+-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in y around -inf 96.6%
mul-1-neg96.6%
unsub-neg96.6%
neg-mul-196.6%
+-commutative96.6%
unsub-neg96.6%
distribute-lft-in96.6%
metadata-eval96.6%
neg-mul-196.6%
unsub-neg96.6%
Simplified96.6%
Final simplification87.1%
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ x (+ y x))))
(if (<= x -2.05e-10)
(/ (/ y (+ y x)) (+ x (- y (- -1.0 y))))
(if (<= x -6.5e-179)
(* (/ x (* (+ y x) (+ y x))) (/ y (+ y 1.0)))
(if (<= x -2.2e-231)
(/ t_0 (* (+ y x) (/ 1.0 y)))
(/ t_0 (+ y (+ x (+ x 1.0)))))))))assert(x < y);
double code(double x, double y) {
double t_0 = x / (y + x);
double tmp;
if (x <= -2.05e-10) {
tmp = (y / (y + x)) / (x + (y - (-1.0 - y)));
} else if (x <= -6.5e-179) {
tmp = (x / ((y + x) * (y + x))) * (y / (y + 1.0));
} else if (x <= -2.2e-231) {
tmp = t_0 / ((y + x) * (1.0 / y));
} else {
tmp = t_0 / (y + (x + (x + 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) :: t_0
real(8) :: tmp
t_0 = x / (y + x)
if (x <= (-2.05d-10)) then
tmp = (y / (y + x)) / (x + (y - ((-1.0d0) - y)))
else if (x <= (-6.5d-179)) then
tmp = (x / ((y + x) * (y + x))) * (y / (y + 1.0d0))
else if (x <= (-2.2d-231)) then
tmp = t_0 / ((y + x) * (1.0d0 / y))
else
tmp = t_0 / (y + (x + (x + 1.0d0)))
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double t_0 = x / (y + x);
double tmp;
if (x <= -2.05e-10) {
tmp = (y / (y + x)) / (x + (y - (-1.0 - y)));
} else if (x <= -6.5e-179) {
tmp = (x / ((y + x) * (y + x))) * (y / (y + 1.0));
} else if (x <= -2.2e-231) {
tmp = t_0 / ((y + x) * (1.0 / y));
} else {
tmp = t_0 / (y + (x + (x + 1.0)));
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): t_0 = x / (y + x) tmp = 0 if x <= -2.05e-10: tmp = (y / (y + x)) / (x + (y - (-1.0 - y))) elif x <= -6.5e-179: tmp = (x / ((y + x) * (y + x))) * (y / (y + 1.0)) elif x <= -2.2e-231: tmp = t_0 / ((y + x) * (1.0 / y)) else: tmp = t_0 / (y + (x + (x + 1.0))) return tmp
x, y = sort([x, y]) function code(x, y) t_0 = Float64(x / Float64(y + x)) tmp = 0.0 if (x <= -2.05e-10) tmp = Float64(Float64(y / Float64(y + x)) / Float64(x + Float64(y - Float64(-1.0 - y)))); elseif (x <= -6.5e-179) tmp = Float64(Float64(x / Float64(Float64(y + x) * Float64(y + x))) * Float64(y / Float64(y + 1.0))); elseif (x <= -2.2e-231) tmp = Float64(t_0 / Float64(Float64(y + x) * Float64(1.0 / y))); else tmp = Float64(t_0 / Float64(y + Float64(x + Float64(x + 1.0)))); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
t_0 = x / (y + x);
tmp = 0.0;
if (x <= -2.05e-10)
tmp = (y / (y + x)) / (x + (y - (-1.0 - y)));
elseif (x <= -6.5e-179)
tmp = (x / ((y + x) * (y + x))) * (y / (y + 1.0));
elseif (x <= -2.2e-231)
tmp = t_0 / ((y + x) * (1.0 / y));
else
tmp = t_0 / (y + (x + (x + 1.0)));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_] := Block[{t$95$0 = N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.05e-10], N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(x + N[(y - N[(-1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -6.5e-179], N[(N[(x / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.2e-231], N[(t$95$0 / N[(N[(y + x), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 / N[(y + N[(x + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_0 := \frac{x}{y + x}\\
\mathbf{if}\;x \leq -2.05 \cdot 10^{-10}:\\
\;\;\;\;\frac{\frac{y}{y + x}}{x + \left(y - \left(-1 - y\right)\right)}\\
\mathbf{elif}\;x \leq -6.5 \cdot 10^{-179}:\\
\;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{y + 1}\\
\mathbf{elif}\;x \leq -2.2 \cdot 10^{-231}:\\
\;\;\;\;\frac{t_0}{\left(y + x\right) \cdot \frac{1}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_0}{y + \left(x + \left(x + 1\right)\right)}\\
\end{array}
\end{array}
if x < -2.0499999999999999e-10Initial program 64.1%
associate-*l*64.1%
+-commutative64.1%
+-commutative64.1%
+-commutative64.1%
associate-*l*64.1%
*-commutative64.1%
associate-*r/79.7%
*-commutative79.7%
distribute-rgt1-in31.7%
fma-def79.7%
+-commutative79.7%
+-commutative79.7%
cube-unmult79.7%
+-commutative79.7%
Simplified79.7%
associate-*r/64.1%
fma-udef26.3%
cube-mult26.3%
distribute-rgt1-in64.1%
*-commutative64.1%
+-commutative64.1%
associate-+r+64.1%
frac-times81.2%
*-commutative81.2%
clear-num81.2%
associate-/r*99.7%
frac-times99.8%
*-un-lft-identity99.8%
+-commutative99.8%
+-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in x around -inf 81.6%
mul-1-neg81.6%
unsub-neg81.6%
neg-mul-181.6%
+-commutative81.6%
unsub-neg81.6%
distribute-lft-in81.6%
metadata-eval81.6%
neg-mul-181.6%
unsub-neg81.6%
Simplified81.6%
if -2.0499999999999999e-10 < x < -6.49999999999999996e-179Initial program 81.1%
times-frac99.7%
+-commutative99.7%
associate-+l+99.7%
Simplified99.7%
Taylor expanded in x around 0 99.7%
+-commutative99.7%
Simplified99.7%
if -6.49999999999999996e-179 < x < -2.20000000000000009e-231Initial program 72.7%
associate-*l*72.7%
+-commutative72.7%
+-commutative72.7%
+-commutative72.7%
associate-*l*72.7%
*-commutative72.7%
associate-*r/80.2%
*-commutative80.2%
distribute-rgt1-in71.1%
fma-def80.2%
+-commutative80.2%
+-commutative80.2%
cube-unmult80.2%
+-commutative80.2%
Simplified80.2%
associate-*r/72.7%
*-commutative72.7%
fma-udef63.7%
cube-mult63.7%
distribute-rgt1-in72.7%
*-commutative72.7%
+-commutative72.7%
associate-+r+72.7%
frac-times80.2%
*-commutative80.2%
clear-num80.2%
associate-/r*99.9%
frac-times99.7%
*-un-lft-identity99.7%
+-commutative99.7%
+-commutative99.7%
Applied egg-rr99.7%
Taylor expanded in y around 0 90.4%
+-commutative90.4%
Simplified90.4%
Taylor expanded in x around 0 90.4%
if -2.20000000000000009e-231 < x Initial program 73.7%
associate-*l*73.7%
+-commutative73.7%
+-commutative73.7%
+-commutative73.7%
associate-*l*73.7%
*-commutative73.7%
associate-*r/85.0%
*-commutative85.0%
distribute-rgt1-in77.2%
fma-def85.0%
+-commutative85.0%
+-commutative85.0%
cube-unmult85.0%
+-commutative85.0%
Simplified85.0%
associate-*r/73.7%
*-commutative73.7%
fma-udef66.4%
cube-mult66.4%
distribute-rgt1-in73.7%
*-commutative73.7%
+-commutative73.7%
associate-+r+73.7%
frac-times90.0%
*-commutative90.0%
clear-num89.9%
associate-/r*99.7%
frac-times99.4%
*-un-lft-identity99.4%
+-commutative99.4%
+-commutative99.4%
Applied egg-rr99.4%
Taylor expanded in y around -inf 59.4%
mul-1-neg59.4%
unsub-neg59.4%
neg-mul-159.4%
+-commutative59.4%
unsub-neg59.4%
distribute-lft-in59.4%
metadata-eval59.4%
neg-mul-159.4%
unsub-neg59.4%
Simplified59.4%
Final simplification71.2%
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ x (+ y x))))
(if (<= x -1.6e-14)
(/ (/ y (+ y x)) (+ x 1.0))
(if (<= x -2.2e-231) (/ t_0 (* (+ y x) (/ 1.0 y))) (/ t_0 (+ y 1.0))))))assert(x < y);
double code(double x, double y) {
double t_0 = x / (y + x);
double tmp;
if (x <= -1.6e-14) {
tmp = (y / (y + x)) / (x + 1.0);
} else if (x <= -2.2e-231) {
tmp = t_0 / ((y + x) * (1.0 / y));
} else {
tmp = t_0 / (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) :: t_0
real(8) :: tmp
t_0 = x / (y + x)
if (x <= (-1.6d-14)) then
tmp = (y / (y + x)) / (x + 1.0d0)
else if (x <= (-2.2d-231)) then
tmp = t_0 / ((y + x) * (1.0d0 / y))
else
tmp = t_0 / (y + 1.0d0)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double t_0 = x / (y + x);
double tmp;
if (x <= -1.6e-14) {
tmp = (y / (y + x)) / (x + 1.0);
} else if (x <= -2.2e-231) {
tmp = t_0 / ((y + x) * (1.0 / y));
} else {
tmp = t_0 / (y + 1.0);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): t_0 = x / (y + x) tmp = 0 if x <= -1.6e-14: tmp = (y / (y + x)) / (x + 1.0) elif x <= -2.2e-231: tmp = t_0 / ((y + x) * (1.0 / y)) else: tmp = t_0 / (y + 1.0) return tmp
x, y = sort([x, y]) function code(x, y) t_0 = Float64(x / Float64(y + x)) tmp = 0.0 if (x <= -1.6e-14) tmp = Float64(Float64(y / Float64(y + x)) / Float64(x + 1.0)); elseif (x <= -2.2e-231) tmp = Float64(t_0 / Float64(Float64(y + x) * Float64(1.0 / y))); else tmp = Float64(t_0 / Float64(y + 1.0)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
t_0 = x / (y + x);
tmp = 0.0;
if (x <= -1.6e-14)
tmp = (y / (y + x)) / (x + 1.0);
elseif (x <= -2.2e-231)
tmp = t_0 / ((y + x) * (1.0 / y));
else
tmp = t_0 / (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_] := Block[{t$95$0 = N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.6e-14], N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.2e-231], N[(t$95$0 / N[(N[(y + x), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_0 := \frac{x}{y + x}\\
\mathbf{if}\;x \leq -1.6 \cdot 10^{-14}:\\
\;\;\;\;\frac{\frac{y}{y + x}}{x + 1}\\
\mathbf{elif}\;x \leq -2.2 \cdot 10^{-231}:\\
\;\;\;\;\frac{t_0}{\left(y + x\right) \cdot \frac{1}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_0}{y + 1}\\
\end{array}
\end{array}
if x < -1.6000000000000001e-14Initial program 64.6%
associate-*l*64.6%
+-commutative64.6%
+-commutative64.6%
+-commutative64.6%
associate-*l*64.6%
*-commutative64.6%
associate-*r/80.0%
*-commutative80.0%
distribute-rgt1-in31.2%
fma-def80.0%
+-commutative80.0%
+-commutative80.0%
cube-unmult80.0%
+-commutative80.0%
Simplified80.0%
associate-*r/64.6%
fma-udef25.9%
cube-mult25.9%
distribute-rgt1-in64.6%
*-commutative64.6%
+-commutative64.6%
associate-+r+64.6%
frac-times81.5%
*-commutative81.5%
clear-num81.5%
associate-/r*99.7%
frac-times99.8%
*-un-lft-identity99.8%
+-commutative99.8%
+-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 80.1%
+-commutative80.1%
Simplified80.1%
if -1.6000000000000001e-14 < x < -2.20000000000000009e-231Initial program 78.5%
associate-*l*78.5%
+-commutative78.5%
+-commutative78.5%
+-commutative78.5%
associate-*l*78.5%
*-commutative78.5%
associate-*r/90.3%
*-commutative90.3%
distribute-rgt1-in83.3%
fma-def90.3%
+-commutative90.3%
+-commutative90.3%
cube-unmult90.3%
+-commutative90.3%
Simplified90.3%
associate-*r/78.5%
*-commutative78.5%
fma-udef71.6%
cube-mult71.6%
distribute-rgt1-in78.5%
*-commutative78.5%
+-commutative78.5%
associate-+r+78.5%
frac-times94.7%
*-commutative94.7%
clear-num94.7%
associate-/r*99.7%
frac-times99.6%
*-un-lft-identity99.6%
+-commutative99.6%
+-commutative99.6%
Applied egg-rr99.6%
Taylor expanded in y around 0 73.3%
+-commutative73.3%
Simplified73.3%
Taylor expanded in x around 0 73.3%
if -2.20000000000000009e-231 < x Initial program 73.7%
associate-*l*73.7%
+-commutative73.7%
+-commutative73.7%
+-commutative73.7%
associate-*l*73.7%
*-commutative73.7%
associate-*r/85.0%
*-commutative85.0%
distribute-rgt1-in77.2%
fma-def85.0%
+-commutative85.0%
+-commutative85.0%
cube-unmult85.0%
+-commutative85.0%
Simplified85.0%
associate-*r/73.7%
*-commutative73.7%
fma-udef66.4%
cube-mult66.4%
distribute-rgt1-in73.7%
*-commutative73.7%
+-commutative73.7%
associate-+r+73.7%
frac-times90.0%
*-commutative90.0%
clear-num89.9%
associate-/r*99.7%
frac-times99.4%
*-un-lft-identity99.4%
+-commutative99.4%
+-commutative99.4%
Applied egg-rr99.4%
Taylor expanded in x around 0 58.3%
+-commutative58.3%
Simplified58.3%
Final simplification66.1%
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ x (+ y x))))
(if (<= x -5.5e-14)
(/ (/ y (+ y x)) (+ x 1.0))
(if (<= x -1.7e-231)
(/ t_0 (* (+ y x) (/ 1.0 y)))
(/ t_0 (+ y (+ x (+ x 1.0))))))))assert(x < y);
double code(double x, double y) {
double t_0 = x / (y + x);
double tmp;
if (x <= -5.5e-14) {
tmp = (y / (y + x)) / (x + 1.0);
} else if (x <= -1.7e-231) {
tmp = t_0 / ((y + x) * (1.0 / y));
} else {
tmp = t_0 / (y + (x + (x + 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) :: t_0
real(8) :: tmp
t_0 = x / (y + x)
if (x <= (-5.5d-14)) then
tmp = (y / (y + x)) / (x + 1.0d0)
else if (x <= (-1.7d-231)) then
tmp = t_0 / ((y + x) * (1.0d0 / y))
else
tmp = t_0 / (y + (x + (x + 1.0d0)))
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double t_0 = x / (y + x);
double tmp;
if (x <= -5.5e-14) {
tmp = (y / (y + x)) / (x + 1.0);
} else if (x <= -1.7e-231) {
tmp = t_0 / ((y + x) * (1.0 / y));
} else {
tmp = t_0 / (y + (x + (x + 1.0)));
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): t_0 = x / (y + x) tmp = 0 if x <= -5.5e-14: tmp = (y / (y + x)) / (x + 1.0) elif x <= -1.7e-231: tmp = t_0 / ((y + x) * (1.0 / y)) else: tmp = t_0 / (y + (x + (x + 1.0))) return tmp
x, y = sort([x, y]) function code(x, y) t_0 = Float64(x / Float64(y + x)) tmp = 0.0 if (x <= -5.5e-14) tmp = Float64(Float64(y / Float64(y + x)) / Float64(x + 1.0)); elseif (x <= -1.7e-231) tmp = Float64(t_0 / Float64(Float64(y + x) * Float64(1.0 / y))); else tmp = Float64(t_0 / Float64(y + Float64(x + Float64(x + 1.0)))); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
t_0 = x / (y + x);
tmp = 0.0;
if (x <= -5.5e-14)
tmp = (y / (y + x)) / (x + 1.0);
elseif (x <= -1.7e-231)
tmp = t_0 / ((y + x) * (1.0 / y));
else
tmp = t_0 / (y + (x + (x + 1.0)));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_] := Block[{t$95$0 = N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.5e-14], N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.7e-231], N[(t$95$0 / N[(N[(y + x), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 / N[(y + N[(x + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_0 := \frac{x}{y + x}\\
\mathbf{if}\;x \leq -5.5 \cdot 10^{-14}:\\
\;\;\;\;\frac{\frac{y}{y + x}}{x + 1}\\
\mathbf{elif}\;x \leq -1.7 \cdot 10^{-231}:\\
\;\;\;\;\frac{t_0}{\left(y + x\right) \cdot \frac{1}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_0}{y + \left(x + \left(x + 1\right)\right)}\\
\end{array}
\end{array}
if x < -5.49999999999999991e-14Initial program 64.6%
associate-*l*64.6%
+-commutative64.6%
+-commutative64.6%
+-commutative64.6%
associate-*l*64.6%
*-commutative64.6%
associate-*r/80.0%
*-commutative80.0%
distribute-rgt1-in31.2%
fma-def80.0%
+-commutative80.0%
+-commutative80.0%
cube-unmult80.0%
+-commutative80.0%
Simplified80.0%
associate-*r/64.6%
fma-udef25.9%
cube-mult25.9%
distribute-rgt1-in64.6%
*-commutative64.6%
+-commutative64.6%
associate-+r+64.6%
frac-times81.5%
*-commutative81.5%
clear-num81.5%
associate-/r*99.7%
frac-times99.8%
*-un-lft-identity99.8%
+-commutative99.8%
+-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 80.1%
+-commutative80.1%
Simplified80.1%
if -5.49999999999999991e-14 < x < -1.7e-231Initial program 78.5%
associate-*l*78.5%
+-commutative78.5%
+-commutative78.5%
+-commutative78.5%
associate-*l*78.5%
*-commutative78.5%
associate-*r/90.3%
*-commutative90.3%
distribute-rgt1-in83.3%
fma-def90.3%
+-commutative90.3%
+-commutative90.3%
cube-unmult90.3%
+-commutative90.3%
Simplified90.3%
associate-*r/78.5%
*-commutative78.5%
fma-udef71.6%
cube-mult71.6%
distribute-rgt1-in78.5%
*-commutative78.5%
+-commutative78.5%
associate-+r+78.5%
frac-times94.7%
*-commutative94.7%
clear-num94.7%
associate-/r*99.7%
frac-times99.6%
*-un-lft-identity99.6%
+-commutative99.6%
+-commutative99.6%
Applied egg-rr99.6%
Taylor expanded in y around 0 73.3%
+-commutative73.3%
Simplified73.3%
Taylor expanded in x around 0 73.3%
if -1.7e-231 < x Initial program 73.7%
associate-*l*73.7%
+-commutative73.7%
+-commutative73.7%
+-commutative73.7%
associate-*l*73.7%
*-commutative73.7%
associate-*r/85.0%
*-commutative85.0%
distribute-rgt1-in77.2%
fma-def85.0%
+-commutative85.0%
+-commutative85.0%
cube-unmult85.0%
+-commutative85.0%
Simplified85.0%
associate-*r/73.7%
*-commutative73.7%
fma-udef66.4%
cube-mult66.4%
distribute-rgt1-in73.7%
*-commutative73.7%
+-commutative73.7%
associate-+r+73.7%
frac-times90.0%
*-commutative90.0%
clear-num89.9%
associate-/r*99.7%
frac-times99.4%
*-un-lft-identity99.4%
+-commutative99.4%
+-commutative99.4%
Applied egg-rr99.4%
Taylor expanded in y around -inf 59.4%
mul-1-neg59.4%
unsub-neg59.4%
neg-mul-159.4%
+-commutative59.4%
unsub-neg59.4%
distribute-lft-in59.4%
metadata-eval59.4%
neg-mul-159.4%
unsub-neg59.4%
Simplified59.4%
Final simplification66.7%
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ x (+ y x))))
(if (<= x -4.6e-16)
(/ (/ y (+ y x)) (+ x (- y (- -1.0 y))))
(if (<= x -1.8e-231)
(/ t_0 (* (+ y x) (/ 1.0 y)))
(/ t_0 (+ y (+ x (+ x 1.0))))))))assert(x < y);
double code(double x, double y) {
double t_0 = x / (y + x);
double tmp;
if (x <= -4.6e-16) {
tmp = (y / (y + x)) / (x + (y - (-1.0 - y)));
} else if (x <= -1.8e-231) {
tmp = t_0 / ((y + x) * (1.0 / y));
} else {
tmp = t_0 / (y + (x + (x + 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) :: t_0
real(8) :: tmp
t_0 = x / (y + x)
if (x <= (-4.6d-16)) then
tmp = (y / (y + x)) / (x + (y - ((-1.0d0) - y)))
else if (x <= (-1.8d-231)) then
tmp = t_0 / ((y + x) * (1.0d0 / y))
else
tmp = t_0 / (y + (x + (x + 1.0d0)))
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double t_0 = x / (y + x);
double tmp;
if (x <= -4.6e-16) {
tmp = (y / (y + x)) / (x + (y - (-1.0 - y)));
} else if (x <= -1.8e-231) {
tmp = t_0 / ((y + x) * (1.0 / y));
} else {
tmp = t_0 / (y + (x + (x + 1.0)));
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): t_0 = x / (y + x) tmp = 0 if x <= -4.6e-16: tmp = (y / (y + x)) / (x + (y - (-1.0 - y))) elif x <= -1.8e-231: tmp = t_0 / ((y + x) * (1.0 / y)) else: tmp = t_0 / (y + (x + (x + 1.0))) return tmp
x, y = sort([x, y]) function code(x, y) t_0 = Float64(x / Float64(y + x)) tmp = 0.0 if (x <= -4.6e-16) tmp = Float64(Float64(y / Float64(y + x)) / Float64(x + Float64(y - Float64(-1.0 - y)))); elseif (x <= -1.8e-231) tmp = Float64(t_0 / Float64(Float64(y + x) * Float64(1.0 / y))); else tmp = Float64(t_0 / Float64(y + Float64(x + Float64(x + 1.0)))); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
t_0 = x / (y + x);
tmp = 0.0;
if (x <= -4.6e-16)
tmp = (y / (y + x)) / (x + (y - (-1.0 - y)));
elseif (x <= -1.8e-231)
tmp = t_0 / ((y + x) * (1.0 / y));
else
tmp = t_0 / (y + (x + (x + 1.0)));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_] := Block[{t$95$0 = N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.6e-16], N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(x + N[(y - N[(-1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.8e-231], N[(t$95$0 / N[(N[(y + x), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 / N[(y + N[(x + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_0 := \frac{x}{y + x}\\
\mathbf{if}\;x \leq -4.6 \cdot 10^{-16}:\\
\;\;\;\;\frac{\frac{y}{y + x}}{x + \left(y - \left(-1 - y\right)\right)}\\
\mathbf{elif}\;x \leq -1.8 \cdot 10^{-231}:\\
\;\;\;\;\frac{t_0}{\left(y + x\right) \cdot \frac{1}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_0}{y + \left(x + \left(x + 1\right)\right)}\\
\end{array}
\end{array}
if x < -4.5999999999999998e-16Initial program 64.6%
associate-*l*64.6%
+-commutative64.6%
+-commutative64.6%
+-commutative64.6%
associate-*l*64.6%
*-commutative64.6%
associate-*r/80.0%
*-commutative80.0%
distribute-rgt1-in31.2%
fma-def80.0%
+-commutative80.0%
+-commutative80.0%
cube-unmult80.0%
+-commutative80.0%
Simplified80.0%
associate-*r/64.6%
fma-udef25.9%
cube-mult25.9%
distribute-rgt1-in64.6%
*-commutative64.6%
+-commutative64.6%
associate-+r+64.6%
frac-times81.5%
*-commutative81.5%
clear-num81.5%
associate-/r*99.7%
frac-times99.8%
*-un-lft-identity99.8%
+-commutative99.8%
+-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in x around -inf 80.5%
mul-1-neg80.5%
unsub-neg80.5%
neg-mul-180.5%
+-commutative80.5%
unsub-neg80.5%
distribute-lft-in80.5%
metadata-eval80.5%
neg-mul-180.5%
unsub-neg80.5%
Simplified80.5%
if -4.5999999999999998e-16 < x < -1.79999999999999987e-231Initial program 78.5%
associate-*l*78.5%
+-commutative78.5%
+-commutative78.5%
+-commutative78.5%
associate-*l*78.5%
*-commutative78.5%
associate-*r/90.3%
*-commutative90.3%
distribute-rgt1-in83.3%
fma-def90.3%
+-commutative90.3%
+-commutative90.3%
cube-unmult90.3%
+-commutative90.3%
Simplified90.3%
associate-*r/78.5%
*-commutative78.5%
fma-udef71.6%
cube-mult71.6%
distribute-rgt1-in78.5%
*-commutative78.5%
+-commutative78.5%
associate-+r+78.5%
frac-times94.7%
*-commutative94.7%
clear-num94.7%
associate-/r*99.7%
frac-times99.6%
*-un-lft-identity99.6%
+-commutative99.6%
+-commutative99.6%
Applied egg-rr99.6%
Taylor expanded in y around 0 73.3%
+-commutative73.3%
Simplified73.3%
Taylor expanded in x around 0 73.3%
if -1.79999999999999987e-231 < x Initial program 73.7%
associate-*l*73.7%
+-commutative73.7%
+-commutative73.7%
+-commutative73.7%
associate-*l*73.7%
*-commutative73.7%
associate-*r/85.0%
*-commutative85.0%
distribute-rgt1-in77.2%
fma-def85.0%
+-commutative85.0%
+-commutative85.0%
cube-unmult85.0%
+-commutative85.0%
Simplified85.0%
associate-*r/73.7%
*-commutative73.7%
fma-udef66.4%
cube-mult66.4%
distribute-rgt1-in73.7%
*-commutative73.7%
+-commutative73.7%
associate-+r+73.7%
frac-times90.0%
*-commutative90.0%
clear-num89.9%
associate-/r*99.7%
frac-times99.4%
*-un-lft-identity99.4%
+-commutative99.4%
+-commutative99.4%
Applied egg-rr99.4%
Taylor expanded in y around -inf 59.4%
mul-1-neg59.4%
unsub-neg59.4%
neg-mul-159.4%
+-commutative59.4%
unsub-neg59.4%
distribute-lft-in59.4%
metadata-eval59.4%
neg-mul-159.4%
unsub-neg59.4%
Simplified59.4%
Final simplification66.8%
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ x (+ y x))))
(if (<= y 7.5e+29)
(* t_0 (/ (/ y (+ x 1.0)) (+ y x)))
(/ t_0 (+ y (+ x (+ x 1.0)))))))assert(x < y);
double code(double x, double y) {
double t_0 = x / (y + x);
double tmp;
if (y <= 7.5e+29) {
tmp = t_0 * ((y / (x + 1.0)) / (y + x));
} else {
tmp = t_0 / (y + (x + (x + 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) :: t_0
real(8) :: tmp
t_0 = x / (y + x)
if (y <= 7.5d+29) then
tmp = t_0 * ((y / (x + 1.0d0)) / (y + x))
else
tmp = t_0 / (y + (x + (x + 1.0d0)))
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double t_0 = x / (y + x);
double tmp;
if (y <= 7.5e+29) {
tmp = t_0 * ((y / (x + 1.0)) / (y + x));
} else {
tmp = t_0 / (y + (x + (x + 1.0)));
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): t_0 = x / (y + x) tmp = 0 if y <= 7.5e+29: tmp = t_0 * ((y / (x + 1.0)) / (y + x)) else: tmp = t_0 / (y + (x + (x + 1.0))) return tmp
x, y = sort([x, y]) function code(x, y) t_0 = Float64(x / Float64(y + x)) tmp = 0.0 if (y <= 7.5e+29) tmp = Float64(t_0 * Float64(Float64(y / Float64(x + 1.0)) / Float64(y + x))); else tmp = Float64(t_0 / Float64(y + Float64(x + Float64(x + 1.0)))); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
t_0 = x / (y + x);
tmp = 0.0;
if (y <= 7.5e+29)
tmp = t_0 * ((y / (x + 1.0)) / (y + x));
else
tmp = t_0 / (y + (x + (x + 1.0)));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_] := Block[{t$95$0 = N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 7.5e+29], N[(t$95$0 * N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 / N[(y + N[(x + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_0 := \frac{x}{y + x}\\
\mathbf{if}\;y \leq 7.5 \cdot 10^{+29}:\\
\;\;\;\;t_0 \cdot \frac{\frac{y}{x + 1}}{y + x}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_0}{y + \left(x + \left(x + 1\right)\right)}\\
\end{array}
\end{array}
if y < 7.49999999999999945e29Initial program 76.4%
associate-*l*76.4%
+-commutative76.4%
+-commutative76.4%
+-commutative76.4%
associate-*l*76.4%
*-commutative76.4%
associate-*r/87.7%
*-commutative87.7%
distribute-rgt1-in66.8%
fma-def87.7%
+-commutative87.7%
+-commutative87.7%
cube-unmult87.8%
+-commutative87.8%
Simplified87.8%
associate-*r/76.4%
*-commutative76.4%
fma-udef57.4%
cube-mult57.4%
distribute-rgt1-in76.4%
*-commutative76.4%
+-commutative76.4%
associate-+r+76.4%
frac-times91.1%
*-commutative91.1%
clear-num91.1%
associate-/r*99.6%
frac-times99.3%
*-un-lft-identity99.3%
+-commutative99.3%
+-commutative99.3%
Applied egg-rr99.3%
Taylor expanded in y around 0 85.5%
+-commutative85.5%
Simplified85.5%
clear-num86.0%
associate-/r/85.5%
associate-/r*86.0%
clear-num86.1%
+-commutative86.1%
Applied egg-rr86.1%
if 7.49999999999999945e29 < y Initial program 57.8%
associate-*l*57.8%
+-commutative57.8%
+-commutative57.8%
+-commutative57.8%
associate-*l*57.8%
*-commutative57.8%
associate-*r/73.7%
*-commutative73.7%
distribute-rgt1-in68.0%
fma-def73.7%
+-commutative73.7%
+-commutative73.7%
cube-unmult73.7%
+-commutative73.7%
Simplified73.7%
associate-*r/57.8%
*-commutative57.8%
fma-udef57.8%
cube-mult57.8%
distribute-rgt1-in57.8%
*-commutative57.8%
+-commutative57.8%
associate-+r+57.8%
frac-times80.0%
*-commutative80.0%
clear-num80.0%
associate-/r*99.9%
frac-times99.8%
*-un-lft-identity99.8%
+-commutative99.8%
+-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in y around -inf 80.6%
mul-1-neg80.6%
unsub-neg80.6%
neg-mul-180.6%
+-commutative80.6%
unsub-neg80.6%
distribute-lft-in80.6%
metadata-eval80.6%
neg-mul-180.6%
unsub-neg80.6%
Simplified80.6%
Final simplification84.9%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (/ (/ x (+ y x)) (* (+ y x) (/ (+ y (+ x 1.0)) y))))
assert(x < y);
double code(double x, double y) {
return (x / (y + x)) / ((y + x) * ((y + (x + 1.0)) / 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 + x)) / ((y + x) * ((y + (x + 1.0d0)) / y))
end function
assert x < y;
public static double code(double x, double y) {
return (x / (y + x)) / ((y + x) * ((y + (x + 1.0)) / y));
}
[x, y] = sort([x, y]) def code(x, y): return (x / (y + x)) / ((y + x) * ((y + (x + 1.0)) / y))
x, y = sort([x, y]) function code(x, y) return Float64(Float64(x / Float64(y + x)) / Float64(Float64(y + x) * Float64(Float64(y + Float64(x + 1.0)) / y))) end
x, y = num2cell(sort([x, y])){:}
function tmp = code(x, y)
tmp = (x / (y + x)) / ((y + x) * ((y + (x + 1.0)) / y));
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(N[(y + x), $MachinePrecision] * N[(N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\frac{\frac{x}{y + x}}{\left(y + x\right) \cdot \frac{y + \left(x + 1\right)}{y}}
\end{array}
Initial program 72.3%
associate-*l*72.3%
+-commutative72.3%
+-commutative72.3%
+-commutative72.3%
associate-*l*72.3%
*-commutative72.3%
associate-*r/84.7%
*-commutative84.7%
distribute-rgt1-in67.1%
fma-def84.7%
+-commutative84.7%
+-commutative84.7%
cube-unmult84.7%
+-commutative84.7%
Simplified84.7%
associate-*r/72.3%
*-commutative72.3%
fma-udef57.5%
cube-mult57.5%
distribute-rgt1-in72.3%
*-commutative72.3%
+-commutative72.3%
associate-+r+72.3%
frac-times88.7%
*-commutative88.7%
clear-num88.7%
associate-/r*99.7%
frac-times99.4%
*-un-lft-identity99.4%
+-commutative99.4%
+-commutative99.4%
Applied egg-rr99.4%
Final simplification99.4%
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 -8.5e-98)
(- (/ y x) y)
(if (<= x 1.9e-32) (/ x (* y (+ y 1.0))) (/ (/ x y) y)))))assert(x < y);
double code(double x, double y) {
double tmp;
if (x <= -1.0) {
tmp = (y / x) / x;
} else if (x <= -8.5e-98) {
tmp = (y / x) - y;
} else if (x <= 1.9e-32) {
tmp = x / (y * (y + 1.0));
} else {
tmp = (x / y) / 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 <= (-8.5d-98)) then
tmp = (y / x) - y
else if (x <= 1.9d-32) then
tmp = x / (y * (y + 1.0d0))
else
tmp = (x / y) / 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 <= -8.5e-98) {
tmp = (y / x) - y;
} else if (x <= 1.9e-32) {
tmp = x / (y * (y + 1.0));
} else {
tmp = (x / y) / y;
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): tmp = 0 if x <= -1.0: tmp = (y / x) / x elif x <= -8.5e-98: tmp = (y / x) - y elif x <= 1.9e-32: tmp = x / (y * (y + 1.0)) else: tmp = (x / y) / 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 <= -8.5e-98) tmp = Float64(Float64(y / x) - y); elseif (x <= 1.9e-32) tmp = Float64(x / Float64(y * Float64(y + 1.0))); else tmp = Float64(Float64(x / y) / 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 <= -8.5e-98)
tmp = (y / x) - y;
elseif (x <= 1.9e-32)
tmp = x / (y * (y + 1.0));
else
tmp = (x / y) / 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, -8.5e-98], N[(N[(y / x), $MachinePrecision] - y), $MachinePrecision], If[LessEqual[x, 1.9e-32], N[(x / N[(y * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / 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 -8.5 \cdot 10^{-98}:\\
\;\;\;\;\frac{y}{x} - y\\
\mathbf{elif}\;x \leq 1.9 \cdot 10^{-32}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y}\\
\end{array}
\end{array}
if x < -1Initial program 63.5%
associate-*l*63.5%
+-commutative63.5%
+-commutative63.5%
+-commutative63.5%
associate-*l*63.5%
*-commutative63.5%
associate-*r/79.3%
*-commutative79.3%
distribute-rgt1-in32.3%
fma-def79.3%
+-commutative79.3%
+-commutative79.3%
cube-unmult79.3%
+-commutative79.3%
Simplified79.3%
associate-*r/63.5%
fma-udef26.8%
cube-mult26.8%
distribute-rgt1-in63.5%
*-commutative63.5%
+-commutative63.5%
associate-+r+63.5%
frac-times80.9%
*-commutative80.9%
clear-num80.9%
associate-/r*99.7%
frac-times99.8%
*-un-lft-identity99.8%
+-commutative99.8%
+-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 80.9%
Taylor expanded in y around 0 80.6%
if -1 < x < -8.4999999999999997e-98Initial program 80.8%
times-frac99.6%
+-commutative99.6%
associate-+l+99.6%
Simplified99.6%
Taylor expanded in y around 0 37.2%
associate-/r*37.2%
+-commutative37.2%
Simplified37.2%
Taylor expanded in x around 0 37.2%
neg-mul-137.2%
+-commutative37.2%
unsub-neg37.2%
Simplified37.2%
if -8.4999999999999997e-98 < x < 1.90000000000000004e-32Initial program 75.8%
times-frac91.1%
+-commutative91.1%
associate-+l+91.1%
Simplified91.1%
Taylor expanded in x around 0 82.1%
+-commutative82.1%
Simplified82.1%
if 1.90000000000000004e-32 < x Initial program 72.4%
associate-*l*72.3%
+-commutative72.3%
+-commutative72.3%
+-commutative72.3%
*-commutative72.3%
associate-*l*72.4%
times-frac88.7%
+-commutative88.7%
+-commutative88.7%
associate-+l+88.7%
Simplified88.7%
Taylor expanded in y around inf 30.5%
associate-*l/30.6%
*-un-lft-identity30.6%
Applied egg-rr30.6%
Taylor expanded in y around inf 29.0%
Final simplification63.7%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (if (<= y 1.8e-170) (/ (/ y x) (+ x 1.0)) (if (<= y 1.35e+154) (/ x (* y (+ y (+ x 1.0)))) (/ (/ x y) (+ y x)))))
assert(x < y);
double code(double x, double y) {
double tmp;
if (y <= 1.8e-170) {
tmp = (y / x) / (x + 1.0);
} else if (y <= 1.35e+154) {
tmp = x / (y * (y + (x + 1.0)));
} else {
tmp = (x / y) / (y + x);
}
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 (y <= 1.8d-170) then
tmp = (y / x) / (x + 1.0d0)
else if (y <= 1.35d+154) then
tmp = x / (y * (y + (x + 1.0d0)))
else
tmp = (x / y) / (y + x)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double tmp;
if (y <= 1.8e-170) {
tmp = (y / x) / (x + 1.0);
} else if (y <= 1.35e+154) {
tmp = x / (y * (y + (x + 1.0)));
} else {
tmp = (x / y) / (y + x);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): tmp = 0 if y <= 1.8e-170: tmp = (y / x) / (x + 1.0) elif y <= 1.35e+154: tmp = x / (y * (y + (x + 1.0))) else: tmp = (x / y) / (y + x) return tmp
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (y <= 1.8e-170) tmp = Float64(Float64(y / x) / Float64(x + 1.0)); elseif (y <= 1.35e+154) tmp = Float64(x / Float64(y * Float64(y + Float64(x + 1.0)))); else tmp = Float64(Float64(x / y) / Float64(y + x)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
tmp = 0.0;
if (y <= 1.8e-170)
tmp = (y / x) / (x + 1.0);
elseif (y <= 1.35e+154)
tmp = x / (y * (y + (x + 1.0)));
else
tmp = (x / y) / (y + x);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := If[LessEqual[y, 1.8e-170], N[(N[(y / x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.35e+154], N[(x / N[(y * N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.8 \cdot 10^{-170}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + 1}\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + \left(x + 1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + x}\\
\end{array}
\end{array}
if y < 1.8000000000000002e-170Initial program 73.3%
times-frac89.9%
+-commutative89.9%
associate-+l+89.9%
Simplified89.9%
Taylor expanded in y around 0 53.7%
associate-/r*55.7%
+-commutative55.7%
Simplified55.7%
if 1.8000000000000002e-170 < y < 1.35000000000000003e154Initial program 76.3%
associate-*l*76.3%
+-commutative76.3%
+-commutative76.3%
+-commutative76.3%
*-commutative76.3%
associate-*l*76.3%
times-frac91.6%
+-commutative91.6%
+-commutative91.6%
associate-+l+91.6%
Simplified91.6%
Taylor expanded in y around inf 47.5%
frac-times54.3%
*-un-lft-identity54.3%
Applied egg-rr54.3%
if 1.35000000000000003e154 < y Initial program 58.5%
associate-*l*58.5%
+-commutative58.5%
+-commutative58.5%
+-commutative58.5%
associate-*l*58.5%
*-commutative58.5%
associate-*r/75.9%
*-commutative75.9%
distribute-rgt1-in75.8%
fma-def75.9%
+-commutative75.9%
+-commutative75.9%
cube-unmult75.9%
+-commutative75.9%
Simplified75.9%
associate-*r/58.5%
*-commutative58.5%
fma-udef58.5%
cube-mult58.5%
distribute-rgt1-in58.5%
*-commutative58.5%
+-commutative58.5%
associate-+r+58.5%
frac-times75.9%
associate-*l/75.9%
associate-/r*99.8%
clear-num99.9%
un-div-inv99.9%
+-commutative99.9%
+-commutative99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 95.4%
Final simplification60.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) x)
(if (<= x -5.7e-97)
(- (/ y x) y)
(if (<= x 2.25e-98) (/ x y) (/ (/ x y) y)))))assert(x < y);
double code(double x, double y) {
double tmp;
if (x <= -1.0) {
tmp = (y / x) / x;
} else if (x <= -5.7e-97) {
tmp = (y / x) - y;
} else if (x <= 2.25e-98) {
tmp = x / y;
} else {
tmp = (x / y) / 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 <= (-5.7d-97)) then
tmp = (y / x) - y
else if (x <= 2.25d-98) then
tmp = x / y
else
tmp = (x / y) / 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 <= -5.7e-97) {
tmp = (y / x) - y;
} else if (x <= 2.25e-98) {
tmp = x / y;
} else {
tmp = (x / y) / y;
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): tmp = 0 if x <= -1.0: tmp = (y / x) / x elif x <= -5.7e-97: tmp = (y / x) - y elif x <= 2.25e-98: tmp = x / y else: tmp = (x / y) / 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 <= -5.7e-97) tmp = Float64(Float64(y / x) - y); elseif (x <= 2.25e-98) tmp = Float64(x / y); else tmp = Float64(Float64(x / y) / 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 <= -5.7e-97)
tmp = (y / x) - y;
elseif (x <= 2.25e-98)
tmp = x / y;
else
tmp = (x / y) / 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, -5.7e-97], N[(N[(y / x), $MachinePrecision] - y), $MachinePrecision], If[LessEqual[x, 2.25e-98], N[(x / y), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / 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 -5.7 \cdot 10^{-97}:\\
\;\;\;\;\frac{y}{x} - y\\
\mathbf{elif}\;x \leq 2.25 \cdot 10^{-98}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y}\\
\end{array}
\end{array}
if x < -1Initial program 63.5%
associate-*l*63.5%
+-commutative63.5%
+-commutative63.5%
+-commutative63.5%
associate-*l*63.5%
*-commutative63.5%
associate-*r/79.3%
*-commutative79.3%
distribute-rgt1-in32.3%
fma-def79.3%
+-commutative79.3%
+-commutative79.3%
cube-unmult79.3%
+-commutative79.3%
Simplified79.3%
associate-*r/63.5%
fma-udef26.8%
cube-mult26.8%
distribute-rgt1-in63.5%
*-commutative63.5%
+-commutative63.5%
associate-+r+63.5%
frac-times80.9%
*-commutative80.9%
clear-num80.9%
associate-/r*99.7%
frac-times99.8%
*-un-lft-identity99.8%
+-commutative99.8%
+-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 80.9%
Taylor expanded in y around 0 80.6%
if -1 < x < -5.7000000000000001e-97Initial program 80.8%
times-frac99.6%
+-commutative99.6%
associate-+l+99.6%
Simplified99.6%
Taylor expanded in y around 0 37.2%
associate-/r*37.2%
+-commutative37.2%
Simplified37.2%
Taylor expanded in x around 0 37.2%
neg-mul-137.2%
+-commutative37.2%
unsub-neg37.2%
Simplified37.2%
if -5.7000000000000001e-97 < x < 2.24999999999999998e-98Initial program 72.2%
times-frac89.9%
+-commutative89.9%
associate-+l+89.9%
Simplified89.9%
Taylor expanded in x around 0 87.1%
+-commutative87.1%
Simplified87.1%
Taylor expanded in y around 0 71.6%
if 2.24999999999999998e-98 < x Initial program 76.9%
associate-*l*76.8%
+-commutative76.8%
+-commutative76.8%
+-commutative76.8%
*-commutative76.8%
associate-*l*76.9%
times-frac90.4%
+-commutative90.4%
+-commutative90.4%
associate-+l+90.4%
Simplified90.4%
Taylor expanded in y around inf 33.7%
associate-*l/33.7%
*-un-lft-identity33.7%
Applied egg-rr33.7%
Taylor expanded in y around inf 28.2%
Final simplification56.8%
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
:precision binary64
(if (<= y 1.8e-170)
(/ y (* x (+ x 1.0)))
(if (<= y 6.5e+130)
(/ x (* y (+ y 1.0)))
(if (<= y 1.66e+149) (/ (/ y x) x) (/ (/ x y) y)))))assert(x < y);
double code(double x, double y) {
double tmp;
if (y <= 1.8e-170) {
tmp = y / (x * (x + 1.0));
} else if (y <= 6.5e+130) {
tmp = x / (y * (y + 1.0));
} else if (y <= 1.66e+149) {
tmp = (y / x) / x;
} else {
tmp = (x / y) / 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 (y <= 1.8d-170) then
tmp = y / (x * (x + 1.0d0))
else if (y <= 6.5d+130) then
tmp = x / (y * (y + 1.0d0))
else if (y <= 1.66d+149) then
tmp = (y / x) / x
else
tmp = (x / y) / y
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double tmp;
if (y <= 1.8e-170) {
tmp = y / (x * (x + 1.0));
} else if (y <= 6.5e+130) {
tmp = x / (y * (y + 1.0));
} else if (y <= 1.66e+149) {
tmp = (y / x) / x;
} else {
tmp = (x / y) / y;
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): tmp = 0 if y <= 1.8e-170: tmp = y / (x * (x + 1.0)) elif y <= 6.5e+130: tmp = x / (y * (y + 1.0)) elif y <= 1.66e+149: tmp = (y / x) / x else: tmp = (x / y) / y return tmp
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (y <= 1.8e-170) tmp = Float64(y / Float64(x * Float64(x + 1.0))); elseif (y <= 6.5e+130) tmp = Float64(x / Float64(y * Float64(y + 1.0))); elseif (y <= 1.66e+149) tmp = Float64(Float64(y / x) / x); else tmp = Float64(Float64(x / y) / y); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
tmp = 0.0;
if (y <= 1.8e-170)
tmp = y / (x * (x + 1.0));
elseif (y <= 6.5e+130)
tmp = x / (y * (y + 1.0));
elseif (y <= 1.66e+149)
tmp = (y / x) / x;
else
tmp = (x / y) / 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[y, 1.8e-170], N[(y / N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.5e+130], N[(x / N[(y * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.66e+149], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / y), $MachinePrecision]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.8 \cdot 10^{-170}:\\
\;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{+130}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\mathbf{elif}\;y \leq 1.66 \cdot 10^{+149}:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y}\\
\end{array}
\end{array}
if y < 1.8000000000000002e-170Initial program 73.3%
times-frac89.9%
+-commutative89.9%
associate-+l+89.9%
Simplified89.9%
Taylor expanded in y around 0 53.7%
if 1.8000000000000002e-170 < y < 6.5e130Initial program 83.0%
times-frac92.1%
+-commutative92.1%
associate-+l+92.1%
Simplified92.1%
Taylor expanded in x around 0 49.8%
+-commutative49.8%
Simplified49.8%
if 6.5e130 < y < 1.6600000000000001e149Initial program 14.9%
associate-*l*14.9%
+-commutative14.9%
+-commutative14.9%
+-commutative14.9%
associate-*l*14.9%
*-commutative14.9%
associate-*r/72.9%
*-commutative72.9%
distribute-rgt1-in29.2%
fma-def72.9%
+-commutative72.9%
+-commutative72.9%
cube-unmult72.9%
+-commutative72.9%
Simplified72.9%
associate-*r/14.9%
fma-udef14.9%
cube-mult14.9%
distribute-rgt1-in14.9%
*-commutative14.9%
+-commutative14.9%
associate-+r+14.9%
frac-times86.6%
*-commutative86.6%
clear-num86.6%
associate-/r*100.0%
frac-times99.8%
*-un-lft-identity99.8%
+-commutative99.8%
+-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 73.4%
Taylor expanded in y around 0 73.2%
if 1.6600000000000001e149 < y Initial program 58.5%
associate-*l*58.5%
+-commutative58.5%
+-commutative58.5%
+-commutative58.5%
*-commutative58.5%
associate-*l*58.5%
times-frac75.9%
+-commutative75.9%
+-commutative75.9%
associate-+l+75.9%
Simplified75.9%
Taylor expanded in y around inf 95.4%
associate-*l/95.4%
*-un-lft-identity95.4%
Applied egg-rr95.4%
Taylor expanded in y around inf 95.3%
Final simplification58.3%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (if (<= x -1.65e+171) (/ (/ y x) x) (if (<= x -5.5e-98) (/ y (* x (+ x 1.0))) (/ (/ x y) (+ y 1.0)))))
assert(x < y);
double code(double x, double y) {
double tmp;
if (x <= -1.65e+171) {
tmp = (y / x) / x;
} else if (x <= -5.5e-98) {
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 <= (-1.65d+171)) then
tmp = (y / x) / x
else if (x <= (-5.5d-98)) 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 <= -1.65e+171) {
tmp = (y / x) / x;
} else if (x <= -5.5e-98) {
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 <= -1.65e+171: tmp = (y / x) / x elif x <= -5.5e-98: 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 <= -1.65e+171) tmp = Float64(Float64(y / x) / x); elseif (x <= -5.5e-98) 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 <= -1.65e+171)
tmp = (y / x) / x;
elseif (x <= -5.5e-98)
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, -1.65e+171], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, -5.5e-98], 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.65 \cdot 10^{+171}:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;x \leq -5.5 \cdot 10^{-98}:\\
\;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + 1}\\
\end{array}
\end{array}
if x < -1.64999999999999996e171Initial program 57.9%
associate-*l*57.9%
+-commutative57.9%
+-commutative57.9%
+-commutative57.9%
associate-*l*57.9%
*-commutative57.9%
associate-*r/77.4%
*-commutative77.4%
distribute-rgt1-in3.0%
fma-def77.4%
+-commutative77.4%
+-commutative77.4%
cube-unmult77.4%
+-commutative77.4%
Simplified77.4%
associate-*r/57.9%
fma-udef0.0%
cube-mult0.0%
distribute-rgt1-in57.9%
*-commutative57.9%
+-commutative57.9%
associate-+r+57.9%
frac-times77.4%
*-commutative77.4%
clear-num77.4%
associate-/r*99.9%
frac-times99.9%
*-un-lft-identity99.9%
+-commutative99.9%
+-commutative99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 87.8%
Taylor expanded in y around 0 87.6%
if -1.64999999999999996e171 < x < -5.4999999999999997e-98Initial program 76.8%
times-frac93.0%
+-commutative93.0%
associate-+l+93.0%
Simplified93.0%
Taylor expanded in y around 0 58.4%
if -5.4999999999999997e-98 < x Initial program 74.4%
associate-*l*74.4%
+-commutative74.4%
+-commutative74.4%
+-commutative74.4%
associate-*l*74.4%
*-commutative74.4%
associate-*r/85.3%
*-commutative85.3%
distribute-rgt1-in77.5%
fma-def85.3%
+-commutative85.3%
+-commutative85.3%
cube-unmult85.3%
+-commutative85.3%
Simplified85.3%
associate-*r/74.4%
fma-udef67.0%
cube-mult67.0%
distribute-rgt1-in74.4%
*-commutative74.4%
+-commutative74.4%
associate-+r+74.4%
frac-times90.2%
*-commutative90.2%
clear-num90.2%
associate-/r*99.7%
frac-times99.3%
*-un-lft-identity99.3%
+-commutative99.3%
+-commutative99.3%
Applied egg-rr99.3%
clear-num99.2%
inv-pow99.2%
Applied egg-rr99.2%
unpow-199.2%
Simplified99.2%
Taylor expanded in x around 0 59.3%
associate-/r*61.3%
+-commutative61.3%
Simplified61.3%
Final simplification64.8%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (if (<= x -2.9e+166) (/ (/ y x) x) (if (<= x -3.6e-96) (/ y (* x (+ x 1.0))) (/ (/ x (+ y 1.0)) y))))
assert(x < y);
double code(double x, double y) {
double tmp;
if (x <= -2.9e+166) {
tmp = (y / x) / x;
} else if (x <= -3.6e-96) {
tmp = y / (x * (x + 1.0));
} 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 <= (-2.9d+166)) then
tmp = (y / x) / x
else if (x <= (-3.6d-96)) then
tmp = y / (x * (x + 1.0d0))
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 <= -2.9e+166) {
tmp = (y / x) / x;
} else if (x <= -3.6e-96) {
tmp = y / (x * (x + 1.0));
} else {
tmp = (x / (y + 1.0)) / y;
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): tmp = 0 if x <= -2.9e+166: tmp = (y / x) / x elif x <= -3.6e-96: tmp = y / (x * (x + 1.0)) else: tmp = (x / (y + 1.0)) / y return tmp
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (x <= -2.9e+166) tmp = Float64(Float64(y / x) / x); elseif (x <= -3.6e-96) tmp = Float64(y / Float64(x * Float64(x + 1.0))); else tmp = Float64(Float64(x / Float64(y + 1.0)) / y); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
tmp = 0.0;
if (x <= -2.9e+166)
tmp = (y / x) / x;
elseif (x <= -3.6e-96)
tmp = y / (x * (x + 1.0));
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, -2.9e+166], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, -3.6e-96], N[(y / N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + 1.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.9 \cdot 10^{+166}:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;x \leq -3.6 \cdot 10^{-96}:\\
\;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + 1}}{y}\\
\end{array}
\end{array}
if x < -2.9000000000000001e166Initial program 57.9%
associate-*l*57.9%
+-commutative57.9%
+-commutative57.9%
+-commutative57.9%
associate-*l*57.9%
*-commutative57.9%
associate-*r/77.4%
*-commutative77.4%
distribute-rgt1-in3.0%
fma-def77.4%
+-commutative77.4%
+-commutative77.4%
cube-unmult77.4%
+-commutative77.4%
Simplified77.4%
associate-*r/57.9%
fma-udef0.0%
cube-mult0.0%
distribute-rgt1-in57.9%
*-commutative57.9%
+-commutative57.9%
associate-+r+57.9%
frac-times77.4%
*-commutative77.4%
clear-num77.4%
associate-/r*99.9%
frac-times99.9%
*-un-lft-identity99.9%
+-commutative99.9%
+-commutative99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 87.8%
Taylor expanded in y around 0 87.6%
if -2.9000000000000001e166 < x < -3.60000000000000008e-96Initial program 76.8%
times-frac93.0%
+-commutative93.0%
associate-+l+93.0%
Simplified93.0%
Taylor expanded in y around 0 58.4%
if -3.60000000000000008e-96 < x Initial program 74.4%
associate-*l*74.4%
+-commutative74.4%
+-commutative74.4%
+-commutative74.4%
*-commutative74.4%
associate-*l*74.4%
times-frac90.2%
+-commutative90.2%
+-commutative90.2%
associate-+l+90.2%
Simplified90.2%
Taylor expanded in y around inf 61.5%
associate-*l/61.6%
*-un-lft-identity61.6%
Applied egg-rr61.6%
Taylor expanded in x around 0 61.3%
+-commutative61.3%
Simplified61.3%
Final simplification64.8%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (if (<= y 1.8e-170) (/ (/ y x) (+ x 1.0)) (/ (/ x (+ y x)) (+ y 1.0))))
assert(x < y);
double code(double x, double y) {
double tmp;
if (y <= 1.8e-170) {
tmp = (y / x) / (x + 1.0);
} else {
tmp = (x / (y + x)) / (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 (y <= 1.8d-170) then
tmp = (y / x) / (x + 1.0d0)
else
tmp = (x / (y + x)) / (y + 1.0d0)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double tmp;
if (y <= 1.8e-170) {
tmp = (y / x) / (x + 1.0);
} else {
tmp = (x / (y + x)) / (y + 1.0);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): tmp = 0 if y <= 1.8e-170: tmp = (y / x) / (x + 1.0) else: tmp = (x / (y + x)) / (y + 1.0) return tmp
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (y <= 1.8e-170) tmp = Float64(Float64(y / x) / Float64(x + 1.0)); else tmp = Float64(Float64(x / Float64(y + x)) / Float64(y + 1.0)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
tmp = 0.0;
if (y <= 1.8e-170)
tmp = (y / x) / (x + 1.0);
else
tmp = (x / (y + x)) / (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[y, 1.8e-170], N[(N[(y / x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.8 \cdot 10^{-170}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + x}}{y + 1}\\
\end{array}
\end{array}
if y < 1.8000000000000002e-170Initial program 73.3%
times-frac89.9%
+-commutative89.9%
associate-+l+89.9%
Simplified89.9%
Taylor expanded in y around 0 53.7%
associate-/r*55.7%
+-commutative55.7%
Simplified55.7%
if 1.8000000000000002e-170 < y Initial program 71.0%
associate-*l*71.0%
+-commutative71.0%
+-commutative71.0%
+-commutative71.0%
associate-*l*71.0%
*-commutative71.0%
associate-*r/83.5%
*-commutative83.5%
distribute-rgt1-in75.6%
fma-def83.5%
+-commutative83.5%
+-commutative83.5%
cube-unmult83.5%
+-commutative83.5%
Simplified83.5%
associate-*r/71.0%
*-commutative71.0%
fma-udef66.1%
cube-mult66.2%
distribute-rgt1-in71.0%
*-commutative71.0%
+-commutative71.0%
associate-+r+71.0%
frac-times86.9%
*-commutative86.9%
clear-num86.9%
associate-/r*99.7%
frac-times99.8%
*-un-lft-identity99.8%
+-commutative99.8%
+-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 62.1%
+-commutative62.1%
Simplified62.1%
Final simplification58.3%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (if (<= y 1.8e-170) (/ (/ y x) (+ x 1.0)) (/ (/ x (+ y (+ x 1.0))) y)))
assert(x < y);
double code(double x, double y) {
double tmp;
if (y <= 1.8e-170) {
tmp = (y / x) / (x + 1.0);
} else {
tmp = (x / (y + (x + 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 (y <= 1.8d-170) then
tmp = (y / x) / (x + 1.0d0)
else
tmp = (x / (y + (x + 1.0d0))) / y
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double tmp;
if (y <= 1.8e-170) {
tmp = (y / x) / (x + 1.0);
} else {
tmp = (x / (y + (x + 1.0))) / y;
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): tmp = 0 if y <= 1.8e-170: tmp = (y / x) / (x + 1.0) else: tmp = (x / (y + (x + 1.0))) / y return tmp
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (y <= 1.8e-170) tmp = Float64(Float64(y / x) / Float64(x + 1.0)); else tmp = Float64(Float64(x / Float64(y + Float64(x + 1.0))) / y); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
tmp = 0.0;
if (y <= 1.8e-170)
tmp = (y / x) / (x + 1.0);
else
tmp = (x / (y + (x + 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[y, 1.8e-170], N[(N[(y / x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.8 \cdot 10^{-170}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y}\\
\end{array}
\end{array}
if y < 1.8000000000000002e-170Initial program 73.3%
times-frac89.9%
+-commutative89.9%
associate-+l+89.9%
Simplified89.9%
Taylor expanded in y around 0 53.7%
associate-/r*55.7%
+-commutative55.7%
Simplified55.7%
if 1.8000000000000002e-170 < y Initial program 71.0%
associate-*l*71.0%
+-commutative71.0%
+-commutative71.0%
+-commutative71.0%
*-commutative71.0%
associate-*l*71.0%
times-frac86.9%
+-commutative86.9%
+-commutative86.9%
associate-+l+86.9%
Simplified86.9%
Taylor expanded in y around inf 61.9%
associate-*l/62.0%
*-un-lft-identity62.0%
Applied egg-rr62.0%
Final simplification58.2%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (if (<= y 7.5e-176) (/ (/ y (+ y x)) (+ x 1.0)) (/ (/ x (+ y (+ x 1.0))) y)))
assert(x < y);
double code(double x, double y) {
double tmp;
if (y <= 7.5e-176) {
tmp = (y / (y + x)) / (x + 1.0);
} else {
tmp = (x / (y + (x + 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 (y <= 7.5d-176) then
tmp = (y / (y + x)) / (x + 1.0d0)
else
tmp = (x / (y + (x + 1.0d0))) / y
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double tmp;
if (y <= 7.5e-176) {
tmp = (y / (y + x)) / (x + 1.0);
} else {
tmp = (x / (y + (x + 1.0))) / y;
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): tmp = 0 if y <= 7.5e-176: tmp = (y / (y + x)) / (x + 1.0) else: tmp = (x / (y + (x + 1.0))) / y return tmp
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (y <= 7.5e-176) tmp = Float64(Float64(y / Float64(y + x)) / Float64(x + 1.0)); else tmp = Float64(Float64(x / Float64(y + Float64(x + 1.0))) / y); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
tmp = 0.0;
if (y <= 7.5e-176)
tmp = (y / (y + x)) / (x + 1.0);
else
tmp = (x / (y + (x + 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[y, 7.5e-176], N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 7.5 \cdot 10^{-176}:\\
\;\;\;\;\frac{\frac{y}{y + x}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y}\\
\end{array}
\end{array}
if y < 7.5e-176Initial program 73.7%
associate-*l*73.7%
+-commutative73.7%
+-commutative73.7%
+-commutative73.7%
associate-*l*73.7%
*-commutative73.7%
associate-*r/86.0%
*-commutative86.0%
distribute-rgt1-in61.8%
fma-def86.0%
+-commutative86.0%
+-commutative86.0%
cube-unmult86.0%
+-commutative86.0%
Simplified86.0%
associate-*r/73.7%
fma-udef52.0%
cube-mult52.0%
distribute-rgt1-in73.7%
*-commutative73.7%
+-commutative73.7%
associate-+r+73.7%
frac-times90.6%
*-commutative90.6%
clear-num90.6%
associate-/r*99.7%
frac-times99.4%
*-un-lft-identity99.4%
+-commutative99.4%
+-commutative99.4%
Applied egg-rr99.4%
Taylor expanded in y around 0 56.5%
+-commutative56.5%
Simplified56.5%
if 7.5e-176 < y Initial program 70.3%
associate-*l*70.3%
+-commutative70.3%
+-commutative70.3%
+-commutative70.3%
*-commutative70.3%
associate-*l*70.3%
times-frac86.1%
+-commutative86.1%
+-commutative86.1%
associate-+l+86.1%
Simplified86.1%
Taylor expanded in y around inf 62.3%
associate-*l/62.4%
*-un-lft-identity62.4%
Applied egg-rr62.4%
Final simplification58.9%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (if (<= y 1.7e-170) (- (/ y x) y) (if (<= y 0.76) (- (/ x y) x) (/ (/ x y) y))))
assert(x < y);
double code(double x, double y) {
double tmp;
if (y <= 1.7e-170) {
tmp = (y / x) - y;
} else if (y <= 0.76) {
tmp = (x / y) - x;
} else {
tmp = (x / y) / 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 (y <= 1.7d-170) then
tmp = (y / x) - y
else if (y <= 0.76d0) then
tmp = (x / y) - x
else
tmp = (x / y) / y
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double tmp;
if (y <= 1.7e-170) {
tmp = (y / x) - y;
} else if (y <= 0.76) {
tmp = (x / y) - x;
} else {
tmp = (x / y) / y;
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): tmp = 0 if y <= 1.7e-170: tmp = (y / x) - y elif y <= 0.76: tmp = (x / y) - x else: tmp = (x / y) / y return tmp
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (y <= 1.7e-170) tmp = Float64(Float64(y / x) - y); elseif (y <= 0.76) tmp = Float64(Float64(x / y) - x); else tmp = Float64(Float64(x / y) / y); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
tmp = 0.0;
if (y <= 1.7e-170)
tmp = (y / x) - y;
elseif (y <= 0.76)
tmp = (x / y) - x;
else
tmp = (x / y) / 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[y, 1.7e-170], N[(N[(y / x), $MachinePrecision] - y), $MachinePrecision], If[LessEqual[y, 0.76], N[(N[(x / y), $MachinePrecision] - x), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.7 \cdot 10^{-170}:\\
\;\;\;\;\frac{y}{x} - y\\
\mathbf{elif}\;y \leq 0.76:\\
\;\;\;\;\frac{x}{y} - x\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y}\\
\end{array}
\end{array}
if y < 1.70000000000000006e-170Initial program 73.3%
times-frac89.9%
+-commutative89.9%
associate-+l+89.9%
Simplified89.9%
Taylor expanded in y around 0 53.7%
associate-/r*55.7%
+-commutative55.7%
Simplified55.7%
Taylor expanded in x around 0 18.4%
neg-mul-118.4%
+-commutative18.4%
unsub-neg18.4%
Simplified18.4%
if 1.70000000000000006e-170 < y < 0.76000000000000001Initial program 87.5%
times-frac96.7%
+-commutative96.7%
associate-+l+96.7%
Simplified96.7%
Taylor expanded in x around 0 46.7%
+-commutative46.7%
Simplified46.7%
Taylor expanded in y around 0 46.3%
neg-mul-146.3%
+-commutative46.3%
unsub-neg46.3%
Simplified46.3%
if 0.76000000000000001 < y Initial program 59.2%
associate-*l*59.2%
+-commutative59.2%
+-commutative59.2%
+-commutative59.2%
*-commutative59.2%
associate-*l*59.2%
times-frac79.8%
+-commutative79.8%
+-commutative79.8%
associate-+l+79.8%
Simplified79.8%
Taylor expanded in y around inf 72.6%
associate-*l/72.7%
*-un-lft-identity72.7%
Applied egg-rr72.7%
Taylor expanded in y around inf 72.3%
Final simplification35.7%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (if (<= x -1.35e-97) (/ (/ y x) (+ x 1.0)) (/ (/ x (+ y 1.0)) y)))
assert(x < y);
double code(double x, double y) {
double tmp;
if (x <= -1.35e-97) {
tmp = (y / x) / (x + 1.0);
} 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.35d-97)) then
tmp = (y / x) / (x + 1.0d0)
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.35e-97) {
tmp = (y / x) / (x + 1.0);
} else {
tmp = (x / (y + 1.0)) / y;
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): tmp = 0 if x <= -1.35e-97: tmp = (y / x) / (x + 1.0) else: tmp = (x / (y + 1.0)) / y return tmp
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (x <= -1.35e-97) tmp = Float64(Float64(y / x) / Float64(x + 1.0)); else tmp = Float64(Float64(x / Float64(y + 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.35e-97)
tmp = (y / x) / (x + 1.0);
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.35e-97], N[(N[(y / x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + 1.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.35 \cdot 10^{-97}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + 1}}{y}\\
\end{array}
\end{array}
if x < -1.34999999999999993e-97Initial program 67.8%
times-frac85.6%
+-commutative85.6%
associate-+l+85.6%
Simplified85.6%
Taylor expanded in y around 0 67.4%
associate-/r*71.0%
+-commutative71.0%
Simplified71.0%
if -1.34999999999999993e-97 < x Initial program 74.4%
associate-*l*74.4%
+-commutative74.4%
+-commutative74.4%
+-commutative74.4%
*-commutative74.4%
associate-*l*74.4%
times-frac90.2%
+-commutative90.2%
+-commutative90.2%
associate-+l+90.2%
Simplified90.2%
Taylor expanded in y around inf 61.5%
associate-*l/61.6%
*-un-lft-identity61.6%
Applied egg-rr61.6%
Taylor expanded in x around 0 61.3%
+-commutative61.3%
Simplified61.3%
Final simplification64.4%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (if (<= y 1.8e-170) (- (/ y x) y) (/ x y)))
assert(x < y);
double code(double x, double y) {
double tmp;
if (y <= 1.8e-170) {
tmp = (y / x) - y;
} 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 (y <= 1.8d-170) then
tmp = (y / x) - y
else
tmp = x / y
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double tmp;
if (y <= 1.8e-170) {
tmp = (y / x) - y;
} else {
tmp = x / y;
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): tmp = 0 if y <= 1.8e-170: tmp = (y / x) - y else: tmp = x / y return tmp
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (y <= 1.8e-170) tmp = Float64(Float64(y / x) - y); 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 (y <= 1.8e-170)
tmp = (y / x) - y;
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[y, 1.8e-170], N[(N[(y / x), $MachinePrecision] - y), $MachinePrecision], N[(x / y), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.8 \cdot 10^{-170}:\\
\;\;\;\;\frac{y}{x} - y\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
if y < 1.8000000000000002e-170Initial program 73.3%
times-frac89.9%
+-commutative89.9%
associate-+l+89.9%
Simplified89.9%
Taylor expanded in y around 0 53.7%
associate-/r*55.7%
+-commutative55.7%
Simplified55.7%
Taylor expanded in x around 0 18.4%
neg-mul-118.4%
+-commutative18.4%
unsub-neg18.4%
Simplified18.4%
if 1.8000000000000002e-170 < y Initial program 71.0%
times-frac86.9%
+-commutative86.9%
associate-+l+86.9%
Simplified86.9%
Taylor expanded in x around 0 55.8%
+-commutative55.8%
Simplified55.8%
Taylor expanded in y around 0 32.9%
Final simplification24.2%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (/ 0.5 y))
assert(x < y);
double code(double x, double y) {
return 0.5 / 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 = 0.5d0 / y
end function
assert x < y;
public static double code(double x, double y) {
return 0.5 / y;
}
[x, y] = sort([x, y]) def code(x, y): return 0.5 / y
x, y = sort([x, y]) function code(x, y) return Float64(0.5 / y) end
x, y = num2cell(sort([x, y])){:}
function tmp = code(x, y)
tmp = 0.5 / y;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := N[(0.5 / y), $MachinePrecision]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\frac{0.5}{y}
\end{array}
Initial program 72.3%
associate-*l*72.3%
+-commutative72.3%
+-commutative72.3%
+-commutative72.3%
associate-*l*72.3%
*-commutative72.3%
associate-*r/84.7%
*-commutative84.7%
distribute-rgt1-in67.1%
fma-def84.7%
+-commutative84.7%
+-commutative84.7%
cube-unmult84.7%
+-commutative84.7%
Simplified84.7%
associate-*r/72.3%
fma-udef57.5%
cube-mult57.5%
distribute-rgt1-in72.3%
*-commutative72.3%
+-commutative72.3%
associate-+r+72.3%
frac-times88.8%
*-commutative88.8%
clear-num88.7%
associate-/r*99.7%
frac-times99.5%
*-un-lft-identity99.5%
+-commutative99.5%
+-commutative99.5%
Applied egg-rr99.5%
Taylor expanded in x around -inf 50.4%
mul-1-neg50.4%
unsub-neg50.4%
neg-mul-150.4%
+-commutative50.4%
unsub-neg50.4%
distribute-lft-in50.4%
metadata-eval50.4%
neg-mul-150.4%
unsub-neg50.4%
Simplified50.4%
Taylor expanded in y around inf 4.0%
Final simplification4.0%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (/ 1.0 x))
assert(x < y);
double code(double x, double y) {
return 1.0 / x;
}
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 / x
end function
assert x < y;
public static double code(double x, double y) {
return 1.0 / x;
}
[x, y] = sort([x, y]) def code(x, y): return 1.0 / x
x, y = sort([x, y]) function code(x, y) return Float64(1.0 / x) end
x, y = num2cell(sort([x, y])){:}
function tmp = code(x, y)
tmp = 1.0 / x;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := N[(1.0 / x), $MachinePrecision]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\frac{1}{x}
\end{array}
Initial program 72.3%
associate-*l*72.3%
+-commutative72.3%
+-commutative72.3%
+-commutative72.3%
associate-*l*72.3%
*-commutative72.3%
associate-*r/84.7%
*-commutative84.7%
distribute-rgt1-in67.1%
fma-def84.7%
+-commutative84.7%
+-commutative84.7%
cube-unmult84.7%
+-commutative84.7%
Simplified84.7%
associate-*r/72.3%
fma-udef57.5%
cube-mult57.5%
distribute-rgt1-in72.3%
*-commutative72.3%
+-commutative72.3%
associate-+r+72.3%
frac-times88.8%
*-commutative88.8%
clear-num88.7%
associate-/r*99.7%
frac-times99.5%
*-un-lft-identity99.5%
+-commutative99.5%
+-commutative99.5%
Applied egg-rr99.5%
Taylor expanded in x around inf 38.3%
Taylor expanded in y around inf 4.3%
Final simplification4.3%
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 72.3%
times-frac88.7%
+-commutative88.7%
associate-+l+88.7%
Simplified88.7%
Taylor expanded in x around 0 48.2%
+-commutative48.2%
Simplified48.2%
Taylor expanded in y around 0 29.6%
Final simplification29.6%
(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 2023336
(FPCore (x y)
:name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, A"
:precision binary64
:herbie-target
(/ (/ (/ x (+ (+ y 1.0) x)) (+ y x)) (/ 1.0 (/ y (+ y x))))
(/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))