
(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 19 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}
(FPCore (x y) :precision binary64 (* (/ y (+ y x)) (/ (/ x (+ y x)) (+ (+ y x) 1.0))))
double code(double x, double y) {
return (y / (y + x)) * ((x / (y + x)) / ((y + x) + 1.0));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (y / (y + x)) * ((x / (y + x)) / ((y + x) + 1.0d0))
end function
public static double code(double x, double y) {
return (y / (y + x)) * ((x / (y + x)) / ((y + x) + 1.0));
}
def code(x, y): return (y / (y + x)) * ((x / (y + x)) / ((y + x) + 1.0))
function code(x, y) return Float64(Float64(y / Float64(y + x)) * Float64(Float64(x / Float64(y + x)) / Float64(Float64(y + x) + 1.0))) end
function tmp = code(x, y) tmp = (y / (y + x)) * ((x / (y + x)) / ((y + x) + 1.0)); end
code[x_, y_] := N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(N[(y + x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{y}{y + x} \cdot \frac{\frac{x}{y + x}}{\left(y + x\right) + 1}
\end{array}
Initial program 67.8%
*-commutative67.8%
associate-*l*67.8%
times-frac92.1%
+-commutative92.1%
+-commutative92.1%
associate-+r+92.1%
+-commutative92.1%
associate-+l+92.1%
Applied egg-rr92.1%
add-exp-log63.9%
associate-/r*56.5%
log-div41.8%
+-commutative41.8%
+-commutative41.8%
associate-+l+41.8%
+-commutative41.8%
log1p-undefine41.8%
+-commutative41.8%
Applied egg-rr41.8%
exp-diff41.8%
rem-exp-log59.9%
log1p-undefine59.9%
rem-exp-log99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y)
:precision binary64
(if (<= y 2.7e-165)
(/ (/ y x) (+ x 1.0))
(if (<= y 2.95e+103)
(* x (/ y (* (* (+ y x) (+ y x)) (+ x (+ y 1.0)))))
(* (/ y (+ y x)) (* (/ x (+ y x)) (/ 1.0 y))))))
double code(double x, double y) {
double tmp;
if (y <= 2.7e-165) {
tmp = (y / x) / (x + 1.0);
} else if (y <= 2.95e+103) {
tmp = x * (y / (((y + x) * (y + x)) * (x + (y + 1.0))));
} else {
tmp = (y / (y + x)) * ((x / (y + x)) * (1.0 / y));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 2.7d-165) then
tmp = (y / x) / (x + 1.0d0)
else if (y <= 2.95d+103) then
tmp = x * (y / (((y + x) * (y + x)) * (x + (y + 1.0d0))))
else
tmp = (y / (y + x)) * ((x / (y + x)) * (1.0d0 / y))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 2.7e-165) {
tmp = (y / x) / (x + 1.0);
} else if (y <= 2.95e+103) {
tmp = x * (y / (((y + x) * (y + x)) * (x + (y + 1.0))));
} else {
tmp = (y / (y + x)) * ((x / (y + x)) * (1.0 / y));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 2.7e-165: tmp = (y / x) / (x + 1.0) elif y <= 2.95e+103: tmp = x * (y / (((y + x) * (y + x)) * (x + (y + 1.0)))) else: tmp = (y / (y + x)) * ((x / (y + x)) * (1.0 / y)) return tmp
function code(x, y) tmp = 0.0 if (y <= 2.7e-165) tmp = Float64(Float64(y / x) / Float64(x + 1.0)); elseif (y <= 2.95e+103) tmp = Float64(x * Float64(y / Float64(Float64(Float64(y + x) * Float64(y + x)) * Float64(x + Float64(y + 1.0))))); else tmp = Float64(Float64(y / Float64(y + x)) * Float64(Float64(x / Float64(y + x)) * Float64(1.0 / y))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 2.7e-165) tmp = (y / x) / (x + 1.0); elseif (y <= 2.95e+103) tmp = x * (y / (((y + x) * (y + x)) * (x + (y + 1.0)))); else tmp = (y / (y + x)) * ((x / (y + x)) * (1.0 / y)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 2.7e-165], N[(N[(y / x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.95e+103], N[(x * N[(y / N[(N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.7 \cdot 10^{-165}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + 1}\\
\mathbf{elif}\;y \leq 2.95 \cdot 10^{+103}:\\
\;\;\;\;x \cdot \frac{y}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(x + \left(y + 1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{y + x} \cdot \left(\frac{x}{y + x} \cdot \frac{1}{y}\right)\\
\end{array}
\end{array}
if y < 2.6999999999999998e-165Initial program 68.9%
associate-/l*78.5%
associate-+l+78.5%
Simplified78.5%
Taylor expanded in y around 0 57.2%
associate-/r*57.6%
+-commutative57.6%
Simplified57.6%
if 2.6999999999999998e-165 < y < 2.9499999999999999e103Initial program 78.4%
associate-/l*89.1%
associate-+l+89.1%
Simplified89.1%
if 2.9499999999999999e103 < y Initial program 47.5%
*-commutative47.5%
associate-*l*47.5%
times-frac74.3%
+-commutative74.3%
+-commutative74.3%
associate-+r+74.3%
+-commutative74.3%
associate-+l+74.3%
Applied egg-rr74.3%
associate-/r*99.8%
div-inv99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 80.1%
Final simplification68.3%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ x (+ y x))))
(if (<= x -7.2e+42)
(* (/ t_0 (+ (+ y x) 1.0)) (/ y x))
(if (<= x 4.35e+15)
(* x (/ (/ y (* (+ y x) (+ y (+ x 1.0)))) (+ y x)))
(* (/ y (+ y x)) (* t_0 (/ 1.0 y)))))))
double code(double x, double y) {
double t_0 = x / (y + x);
double tmp;
if (x <= -7.2e+42) {
tmp = (t_0 / ((y + x) + 1.0)) * (y / x);
} else if (x <= 4.35e+15) {
tmp = x * ((y / ((y + x) * (y + (x + 1.0)))) / (y + x));
} else {
tmp = (y / (y + x)) * (t_0 * (1.0 / y));
}
return tmp;
}
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 <= (-7.2d+42)) then
tmp = (t_0 / ((y + x) + 1.0d0)) * (y / x)
else if (x <= 4.35d+15) then
tmp = x * ((y / ((y + x) * (y + (x + 1.0d0)))) / (y + x))
else
tmp = (y / (y + x)) * (t_0 * (1.0d0 / y))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x / (y + x);
double tmp;
if (x <= -7.2e+42) {
tmp = (t_0 / ((y + x) + 1.0)) * (y / x);
} else if (x <= 4.35e+15) {
tmp = x * ((y / ((y + x) * (y + (x + 1.0)))) / (y + x));
} else {
tmp = (y / (y + x)) * (t_0 * (1.0 / y));
}
return tmp;
}
def code(x, y): t_0 = x / (y + x) tmp = 0 if x <= -7.2e+42: tmp = (t_0 / ((y + x) + 1.0)) * (y / x) elif x <= 4.35e+15: tmp = x * ((y / ((y + x) * (y + (x + 1.0)))) / (y + x)) else: tmp = (y / (y + x)) * (t_0 * (1.0 / y)) return tmp
function code(x, y) t_0 = Float64(x / Float64(y + x)) tmp = 0.0 if (x <= -7.2e+42) tmp = Float64(Float64(t_0 / Float64(Float64(y + x) + 1.0)) * Float64(y / x)); elseif (x <= 4.35e+15) tmp = Float64(x * Float64(Float64(y / Float64(Float64(y + x) * Float64(y + Float64(x + 1.0)))) / Float64(y + x))); else tmp = Float64(Float64(y / Float64(y + x)) * Float64(t_0 * Float64(1.0 / y))); end return tmp end
function tmp_2 = code(x, y) t_0 = x / (y + x); tmp = 0.0; if (x <= -7.2e+42) tmp = (t_0 / ((y + x) + 1.0)) * (y / x); elseif (x <= 4.35e+15) tmp = x * ((y / ((y + x) * (y + (x + 1.0)))) / (y + x)); else tmp = (y / (y + x)) * (t_0 * (1.0 / y)); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -7.2e+42], N[(N[(t$95$0 / N[(N[(y + x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.35e+15], N[(x * N[(N[(y / N[(N[(y + x), $MachinePrecision] * N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(t$95$0 * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{y + x}\\
\mathbf{if}\;x \leq -7.2 \cdot 10^{+42}:\\
\;\;\;\;\frac{t\_0}{\left(y + x\right) + 1} \cdot \frac{y}{x}\\
\mathbf{elif}\;x \leq 4.35 \cdot 10^{+15}:\\
\;\;\;\;x \cdot \frac{\frac{y}{\left(y + x\right) \cdot \left(y + \left(x + 1\right)\right)}}{y + x}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{y + x} \cdot \left(t\_0 \cdot \frac{1}{y}\right)\\
\end{array}
\end{array}
if x < -7.2000000000000002e42Initial program 61.1%
*-commutative61.1%
associate-*l*61.1%
times-frac81.3%
+-commutative81.3%
+-commutative81.3%
associate-+r+81.3%
+-commutative81.3%
associate-+l+81.3%
Applied egg-rr81.3%
Taylor expanded in y around 0 75.9%
add-exp-log44.0%
associate-/r*3.1%
log-div0.0%
+-commutative0.0%
+-commutative0.0%
associate-+l+0.0%
+-commutative0.0%
log1p-undefine0.0%
+-commutative0.0%
Applied egg-rr0.0%
exp-diff0.0%
rem-exp-log8.6%
log1p-undefine8.6%
rem-exp-log99.8%
Simplified85.8%
if -7.2000000000000002e42 < x < 4.35e15Initial program 72.1%
associate-/l*82.8%
associate-+l+82.8%
Simplified82.8%
*-un-lft-identity82.8%
associate-+r+82.8%
associate-*l*82.8%
times-frac99.5%
+-commutative99.5%
+-commutative99.5%
associate-+r+99.5%
+-commutative99.5%
associate-+l+99.5%
Applied egg-rr99.5%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
Simplified99.5%
if 4.35e15 < x Initial program 64.4%
*-commutative64.4%
associate-*l*64.4%
times-frac84.5%
+-commutative84.5%
+-commutative84.5%
associate-+r+84.5%
+-commutative84.5%
associate-+l+84.5%
Applied egg-rr84.5%
associate-/r*99.8%
div-inv99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 50.2%
Final simplification86.2%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ x (+ y x))))
(if (<= x -3.75e+168)
(* (/ t_0 (+ (+ y x) 1.0)) (/ y x))
(if (<= x 4.2e-86)
(* t_0 (/ y (* (+ y x) (+ y (+ x 1.0)))))
(* (/ y (+ y x)) (* t_0 (/ 1.0 y)))))))
double code(double x, double y) {
double t_0 = x / (y + x);
double tmp;
if (x <= -3.75e+168) {
tmp = (t_0 / ((y + x) + 1.0)) * (y / x);
} else if (x <= 4.2e-86) {
tmp = t_0 * (y / ((y + x) * (y + (x + 1.0))));
} else {
tmp = (y / (y + x)) * (t_0 * (1.0 / y));
}
return tmp;
}
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 <= (-3.75d+168)) then
tmp = (t_0 / ((y + x) + 1.0d0)) * (y / x)
else if (x <= 4.2d-86) then
tmp = t_0 * (y / ((y + x) * (y + (x + 1.0d0))))
else
tmp = (y / (y + x)) * (t_0 * (1.0d0 / y))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x / (y + x);
double tmp;
if (x <= -3.75e+168) {
tmp = (t_0 / ((y + x) + 1.0)) * (y / x);
} else if (x <= 4.2e-86) {
tmp = t_0 * (y / ((y + x) * (y + (x + 1.0))));
} else {
tmp = (y / (y + x)) * (t_0 * (1.0 / y));
}
return tmp;
}
def code(x, y): t_0 = x / (y + x) tmp = 0 if x <= -3.75e+168: tmp = (t_0 / ((y + x) + 1.0)) * (y / x) elif x <= 4.2e-86: tmp = t_0 * (y / ((y + x) * (y + (x + 1.0)))) else: tmp = (y / (y + x)) * (t_0 * (1.0 / y)) return tmp
function code(x, y) t_0 = Float64(x / Float64(y + x)) tmp = 0.0 if (x <= -3.75e+168) tmp = Float64(Float64(t_0 / Float64(Float64(y + x) + 1.0)) * Float64(y / x)); elseif (x <= 4.2e-86) tmp = Float64(t_0 * Float64(y / Float64(Float64(y + x) * Float64(y + Float64(x + 1.0))))); else tmp = Float64(Float64(y / Float64(y + x)) * Float64(t_0 * Float64(1.0 / y))); end return tmp end
function tmp_2 = code(x, y) t_0 = x / (y + x); tmp = 0.0; if (x <= -3.75e+168) tmp = (t_0 / ((y + x) + 1.0)) * (y / x); elseif (x <= 4.2e-86) tmp = t_0 * (y / ((y + x) * (y + (x + 1.0)))); else tmp = (y / (y + x)) * (t_0 * (1.0 / y)); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.75e+168], N[(N[(t$95$0 / N[(N[(y + x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.2e-86], N[(t$95$0 * N[(y / N[(N[(y + x), $MachinePrecision] * N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(t$95$0 * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{y + x}\\
\mathbf{if}\;x \leq -3.75 \cdot 10^{+168}:\\
\;\;\;\;\frac{t\_0}{\left(y + x\right) + 1} \cdot \frac{y}{x}\\
\mathbf{elif}\;x \leq 4.2 \cdot 10^{-86}:\\
\;\;\;\;t\_0 \cdot \frac{y}{\left(y + x\right) \cdot \left(y + \left(x + 1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{y + x} \cdot \left(t\_0 \cdot \frac{1}{y}\right)\\
\end{array}
\end{array}
if x < -3.75e168Initial program 55.1%
*-commutative55.1%
associate-*l*55.1%
times-frac73.9%
+-commutative73.9%
+-commutative73.9%
associate-+r+73.9%
+-commutative73.9%
associate-+l+73.9%
Applied egg-rr73.9%
Taylor expanded in y around 0 73.9%
add-exp-log73.9%
associate-/r*2.9%
log-div0.0%
+-commutative0.0%
+-commutative0.0%
associate-+l+0.0%
+-commutative0.0%
log1p-undefine0.0%
+-commutative0.0%
Applied egg-rr0.0%
exp-diff0.0%
rem-exp-log5.4%
log1p-undefine5.4%
rem-exp-log100.0%
Simplified92.2%
if -3.75e168 < x < 4.2e-86Initial program 69.2%
associate-*l*69.2%
times-frac97.9%
+-commutative97.9%
+-commutative97.9%
associate-+r+97.9%
+-commutative97.9%
associate-+l+97.9%
Applied egg-rr97.9%
if 4.2e-86 < x Initial program 71.3%
*-commutative71.3%
associate-*l*71.3%
times-frac88.0%
+-commutative88.0%
+-commutative88.0%
associate-+r+88.0%
+-commutative88.0%
associate-+l+88.0%
Applied egg-rr88.0%
associate-/r*99.7%
div-inv99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 51.9%
Final simplification85.1%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ y (+ y x))) (t_1 (/ x (+ y x))))
(if (<= x -5.9e+168)
(* (/ t_1 (+ (+ y x) 1.0)) (/ y x))
(if (<= x 9e-11)
(* t_0 (/ x (* (+ y x) (+ y (+ x 1.0)))))
(* t_0 (* t_1 (/ 1.0 y)))))))
double code(double x, double y) {
double t_0 = y / (y + x);
double t_1 = x / (y + x);
double tmp;
if (x <= -5.9e+168) {
tmp = (t_1 / ((y + x) + 1.0)) * (y / x);
} else if (x <= 9e-11) {
tmp = t_0 * (x / ((y + x) * (y + (x + 1.0))));
} else {
tmp = t_0 * (t_1 * (1.0 / y));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = y / (y + x)
t_1 = x / (y + x)
if (x <= (-5.9d+168)) then
tmp = (t_1 / ((y + x) + 1.0d0)) * (y / x)
else if (x <= 9d-11) then
tmp = t_0 * (x / ((y + x) * (y + (x + 1.0d0))))
else
tmp = t_0 * (t_1 * (1.0d0 / y))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = y / (y + x);
double t_1 = x / (y + x);
double tmp;
if (x <= -5.9e+168) {
tmp = (t_1 / ((y + x) + 1.0)) * (y / x);
} else if (x <= 9e-11) {
tmp = t_0 * (x / ((y + x) * (y + (x + 1.0))));
} else {
tmp = t_0 * (t_1 * (1.0 / y));
}
return tmp;
}
def code(x, y): t_0 = y / (y + x) t_1 = x / (y + x) tmp = 0 if x <= -5.9e+168: tmp = (t_1 / ((y + x) + 1.0)) * (y / x) elif x <= 9e-11: tmp = t_0 * (x / ((y + x) * (y + (x + 1.0)))) else: tmp = t_0 * (t_1 * (1.0 / y)) return tmp
function code(x, y) t_0 = Float64(y / Float64(y + x)) t_1 = Float64(x / Float64(y + x)) tmp = 0.0 if (x <= -5.9e+168) tmp = Float64(Float64(t_1 / Float64(Float64(y + x) + 1.0)) * Float64(y / x)); elseif (x <= 9e-11) tmp = Float64(t_0 * Float64(x / Float64(Float64(y + x) * Float64(y + Float64(x + 1.0))))); else tmp = Float64(t_0 * Float64(t_1 * Float64(1.0 / y))); end return tmp end
function tmp_2 = code(x, y) t_0 = y / (y + x); t_1 = x / (y + x); tmp = 0.0; if (x <= -5.9e+168) tmp = (t_1 / ((y + x) + 1.0)) * (y / x); elseif (x <= 9e-11) tmp = t_0 * (x / ((y + x) * (y + (x + 1.0)))); else tmp = t_0 * (t_1 * (1.0 / y)); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.9e+168], N[(N[(t$95$1 / N[(N[(y + x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9e-11], N[(t$95$0 * N[(x / N[(N[(y + x), $MachinePrecision] * N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(t$95$1 * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y}{y + x}\\
t_1 := \frac{x}{y + x}\\
\mathbf{if}\;x \leq -5.9 \cdot 10^{+168}:\\
\;\;\;\;\frac{t\_1}{\left(y + x\right) + 1} \cdot \frac{y}{x}\\
\mathbf{elif}\;x \leq 9 \cdot 10^{-11}:\\
\;\;\;\;t\_0 \cdot \frac{x}{\left(y + x\right) \cdot \left(y + \left(x + 1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(t\_1 \cdot \frac{1}{y}\right)\\
\end{array}
\end{array}
if x < -5.89999999999999986e168Initial program 55.1%
*-commutative55.1%
associate-*l*55.1%
times-frac73.9%
+-commutative73.9%
+-commutative73.9%
associate-+r+73.9%
+-commutative73.9%
associate-+l+73.9%
Applied egg-rr73.9%
Taylor expanded in y around 0 73.9%
add-exp-log73.9%
associate-/r*2.9%
log-div0.0%
+-commutative0.0%
+-commutative0.0%
associate-+l+0.0%
+-commutative0.0%
log1p-undefine0.0%
+-commutative0.0%
Applied egg-rr0.0%
exp-diff0.0%
rem-exp-log5.4%
log1p-undefine5.4%
rem-exp-log100.0%
Simplified92.2%
if -5.89999999999999986e168 < x < 8.9999999999999999e-11Initial program 70.8%
*-commutative70.8%
associate-*l*70.8%
times-frac98.2%
+-commutative98.2%
+-commutative98.2%
associate-+r+98.2%
+-commutative98.2%
associate-+l+98.2%
Applied egg-rr98.2%
if 8.9999999999999999e-11 < x Initial program 66.9%
*-commutative66.9%
associate-*l*66.9%
times-frac85.5%
+-commutative85.5%
+-commutative85.5%
associate-+r+85.5%
+-commutative85.5%
associate-+l+85.5%
Applied egg-rr85.5%
associate-/r*99.7%
div-inv99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 48.5%
Final simplification86.7%
(FPCore (x y)
:precision binary64
(if (<= x -2.4e+64)
(* (/ y x) (/ 1.0 x))
(if (<= x -5e-119)
(/ y (* x (+ x 1.0)))
(if (<= x 4.2e-86) (/ x (* y (+ y 1.0))) (/ (/ x y) (+ y x))))))
double code(double x, double y) {
double tmp;
if (x <= -2.4e+64) {
tmp = (y / x) * (1.0 / x);
} else if (x <= -5e-119) {
tmp = y / (x * (x + 1.0));
} else if (x <= 4.2e-86) {
tmp = x / (y * (y + 1.0));
} else {
tmp = (x / y) / (y + x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-2.4d+64)) then
tmp = (y / x) * (1.0d0 / x)
else if (x <= (-5d-119)) then
tmp = y / (x * (x + 1.0d0))
else if (x <= 4.2d-86) then
tmp = x / (y * (y + 1.0d0))
else
tmp = (x / y) / (y + x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -2.4e+64) {
tmp = (y / x) * (1.0 / x);
} else if (x <= -5e-119) {
tmp = y / (x * (x + 1.0));
} else if (x <= 4.2e-86) {
tmp = x / (y * (y + 1.0));
} else {
tmp = (x / y) / (y + x);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -2.4e+64: tmp = (y / x) * (1.0 / x) elif x <= -5e-119: tmp = y / (x * (x + 1.0)) elif x <= 4.2e-86: tmp = x / (y * (y + 1.0)) else: tmp = (x / y) / (y + x) return tmp
function code(x, y) tmp = 0.0 if (x <= -2.4e+64) tmp = Float64(Float64(y / x) * Float64(1.0 / x)); elseif (x <= -5e-119) tmp = Float64(y / Float64(x * Float64(x + 1.0))); elseif (x <= 4.2e-86) tmp = Float64(x / Float64(y * Float64(y + 1.0))); else tmp = Float64(Float64(x / y) / Float64(y + x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -2.4e+64) tmp = (y / x) * (1.0 / x); elseif (x <= -5e-119) tmp = y / (x * (x + 1.0)); elseif (x <= 4.2e-86) tmp = x / (y * (y + 1.0)); else tmp = (x / y) / (y + x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -2.4e+64], N[(N[(y / x), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -5e-119], N[(y / N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.2e-86], N[(x / N[(y * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.4 \cdot 10^{+64}:\\
\;\;\;\;\frac{y}{x} \cdot \frac{1}{x}\\
\mathbf{elif}\;x \leq -5 \cdot 10^{-119}:\\
\;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\
\mathbf{elif}\;x \leq 4.2 \cdot 10^{-86}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + x}\\
\end{array}
\end{array}
if x < -2.39999999999999999e64Initial program 59.2%
*-commutative59.2%
associate-*l*59.2%
times-frac80.4%
+-commutative80.4%
+-commutative80.4%
associate-+r+80.4%
+-commutative80.4%
associate-+l+80.4%
Applied egg-rr80.4%
Taylor expanded in y around 0 74.8%
Taylor expanded in x around inf 81.7%
if -2.39999999999999999e64 < x < -4.99999999999999993e-119Initial program 82.3%
associate-/l*85.6%
associate-+l+85.6%
Simplified85.6%
Taylor expanded in y around 0 48.1%
if -4.99999999999999993e-119 < x < 4.2e-86Initial program 63.6%
associate-/l*77.6%
associate-+l+77.6%
Simplified77.6%
Taylor expanded in x around 0 84.1%
+-commutative84.1%
Simplified84.1%
if 4.2e-86 < x Initial program 71.3%
*-commutative71.3%
associate-*l*71.3%
times-frac88.0%
+-commutative88.0%
+-commutative88.0%
associate-+r+88.0%
+-commutative88.0%
associate-+l+88.0%
Applied egg-rr88.0%
associate-/r*99.7%
div-inv99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
Applied egg-rr99.8%
associate-*l/99.8%
un-div-inv99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
associate-/r*88.1%
clear-num87.8%
un-div-inv87.9%
associate-+r+87.9%
+-commutative87.9%
*-commutative87.9%
*-un-lft-identity87.9%
times-frac99.5%
+-commutative99.5%
/-rgt-identity99.5%
+-commutative99.5%
Applied egg-rr99.5%
Taylor expanded in y around inf 30.3%
Final simplification63.1%
(FPCore (x y) :precision binary64 (if (<= y 4.5e-144) (/ (/ y x) (+ x 1.0)) (if (<= y 2.7e+146) (/ x (* (+ y x) (+ y (+ x 1.0)))) (/ (/ x y) (+ y x)))))
double code(double x, double y) {
double tmp;
if (y <= 4.5e-144) {
tmp = (y / x) / (x + 1.0);
} else if (y <= 2.7e+146) {
tmp = x / ((y + x) * (y + (x + 1.0)));
} else {
tmp = (x / y) / (y + x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 4.5d-144) then
tmp = (y / x) / (x + 1.0d0)
else if (y <= 2.7d+146) then
tmp = x / ((y + x) * (y + (x + 1.0d0)))
else
tmp = (x / y) / (y + x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 4.5e-144) {
tmp = (y / x) / (x + 1.0);
} else if (y <= 2.7e+146) {
tmp = x / ((y + x) * (y + (x + 1.0)));
} else {
tmp = (x / y) / (y + x);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 4.5e-144: tmp = (y / x) / (x + 1.0) elif y <= 2.7e+146: tmp = x / ((y + x) * (y + (x + 1.0))) else: tmp = (x / y) / (y + x) return tmp
function code(x, y) tmp = 0.0 if (y <= 4.5e-144) tmp = Float64(Float64(y / x) / Float64(x + 1.0)); elseif (y <= 2.7e+146) tmp = Float64(x / Float64(Float64(y + x) * Float64(y + Float64(x + 1.0)))); else tmp = Float64(Float64(x / y) / Float64(y + x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 4.5e-144) tmp = (y / x) / (x + 1.0); elseif (y <= 2.7e+146) tmp = x / ((y + x) * (y + (x + 1.0))); else tmp = (x / y) / (y + x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 4.5e-144], N[(N[(y / x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.7e+146], N[(x / N[(N[(y + x), $MachinePrecision] * N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 4.5 \cdot 10^{-144}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + 1}\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{+146}:\\
\;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(y + \left(x + 1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + x}\\
\end{array}
\end{array}
if y < 4.4999999999999998e-144Initial program 68.9%
associate-/l*78.4%
associate-+l+78.4%
Simplified78.4%
Taylor expanded in y around 0 57.4%
associate-/r*57.8%
+-commutative57.8%
Simplified57.8%
if 4.4999999999999998e-144 < y < 2.69999999999999989e146Initial program 72.0%
*-commutative72.0%
associate-*l*72.0%
times-frac92.8%
+-commutative92.8%
+-commutative92.8%
associate-+r+92.8%
+-commutative92.8%
associate-+l+92.8%
Applied egg-rr92.8%
Taylor expanded in y around inf 68.7%
if 2.69999999999999989e146 < y Initial program 52.6%
*-commutative52.6%
associate-*l*52.6%
times-frac68.7%
+-commutative68.7%
+-commutative68.7%
associate-+r+68.7%
+-commutative68.7%
associate-+l+68.7%
Applied egg-rr68.7%
associate-/r*99.9%
div-inv99.9%
+-commutative99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
Applied egg-rr99.9%
associate-*l/99.9%
un-div-inv99.9%
+-commutative99.9%
+-commutative99.9%
associate-+r+99.9%
associate-/r*68.7%
clear-num68.7%
un-div-inv68.7%
associate-+r+68.7%
+-commutative68.7%
*-commutative68.7%
*-un-lft-identity68.7%
times-frac99.9%
+-commutative99.9%
/-rgt-identity99.9%
+-commutative99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 81.0%
Final simplification63.2%
(FPCore (x y) :precision binary64 (if (<= x -3.6e-149) (* (/ (/ x (+ y x)) (+ (+ y x) 1.0)) (/ y x)) (/ (/ x (+ y 1.0)) (+ y x))))
double code(double x, double y) {
double tmp;
if (x <= -3.6e-149) {
tmp = ((x / (y + x)) / ((y + x) + 1.0)) * (y / x);
} else {
tmp = (x / (y + 1.0)) / (y + x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-3.6d-149)) then
tmp = ((x / (y + x)) / ((y + x) + 1.0d0)) * (y / x)
else
tmp = (x / (y + 1.0d0)) / (y + x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -3.6e-149) {
tmp = ((x / (y + x)) / ((y + x) + 1.0)) * (y / x);
} else {
tmp = (x / (y + 1.0)) / (y + x);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -3.6e-149: tmp = ((x / (y + x)) / ((y + x) + 1.0)) * (y / x) else: tmp = (x / (y + 1.0)) / (y + x) return tmp
function code(x, y) tmp = 0.0 if (x <= -3.6e-149) tmp = Float64(Float64(Float64(x / Float64(y + x)) / Float64(Float64(y + x) + 1.0)) * Float64(y / x)); else tmp = Float64(Float64(x / Float64(y + 1.0)) / Float64(y + x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -3.6e-149) tmp = ((x / (y + x)) / ((y + x) + 1.0)) * (y / x); else tmp = (x / (y + 1.0)) / (y + x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -3.6e-149], N[(N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(N[(y + x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.6 \cdot 10^{-149}:\\
\;\;\;\;\frac{\frac{x}{y + x}}{\left(y + x\right) + 1} \cdot \frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + 1}}{y + x}\\
\end{array}
\end{array}
if x < -3.6000000000000002e-149Initial program 70.1%
*-commutative70.1%
associate-*l*70.1%
times-frac89.1%
+-commutative89.1%
+-commutative89.1%
associate-+r+89.1%
+-commutative89.1%
associate-+l+89.1%
Applied egg-rr89.1%
Taylor expanded in y around 0 70.2%
add-exp-log50.1%
associate-/r*26.3%
log-div13.6%
+-commutative13.6%
+-commutative13.6%
associate-+l+13.6%
+-commutative13.6%
log1p-undefine13.6%
+-commutative13.6%
Applied egg-rr12.8%
exp-diff13.6%
rem-exp-log30.9%
log1p-undefine30.9%
rem-exp-log99.8%
Simplified76.0%
if -3.6000000000000002e-149 < x Initial program 66.1%
*-commutative66.1%
associate-*l*66.1%
times-frac94.4%
+-commutative94.4%
+-commutative94.4%
associate-+r+94.4%
+-commutative94.4%
associate-+l+94.4%
Applied egg-rr94.4%
associate-/r*99.8%
div-inv99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
Applied egg-rr99.8%
associate-*l/99.8%
un-div-inv99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
associate-/r*94.5%
clear-num94.1%
un-div-inv94.2%
associate-+r+94.2%
+-commutative94.2%
*-commutative94.2%
*-un-lft-identity94.2%
times-frac99.5%
+-commutative99.5%
/-rgt-identity99.5%
+-commutative99.5%
Applied egg-rr99.5%
Taylor expanded in x around 0 59.3%
+-commutative59.3%
Simplified59.3%
Final simplification66.5%
(FPCore (x y) :precision binary64 (if (<= x -1.0) (* (/ y x) (/ 1.0 x)) (if (<= x -5e-119) (/ y x) (/ x (* y (+ y 1.0))))))
double code(double x, double y) {
double tmp;
if (x <= -1.0) {
tmp = (y / x) * (1.0 / x);
} else if (x <= -5e-119) {
tmp = y / x;
} else {
tmp = x / (y * (y + 1.0));
}
return tmp;
}
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-119)) then
tmp = y / x
else
tmp = x / (y * (y + 1.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -1.0) {
tmp = (y / x) * (1.0 / x);
} else if (x <= -5e-119) {
tmp = y / x;
} else {
tmp = x / (y * (y + 1.0));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -1.0: tmp = (y / x) * (1.0 / x) elif x <= -5e-119: tmp = y / x else: tmp = x / (y * (y + 1.0)) return tmp
function code(x, y) tmp = 0.0 if (x <= -1.0) tmp = Float64(Float64(y / x) * Float64(1.0 / x)); elseif (x <= -5e-119) tmp = Float64(y / x); else tmp = Float64(x / Float64(y * Float64(y + 1.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -1.0) tmp = (y / x) * (1.0 / x); elseif (x <= -5e-119) tmp = y / x; else tmp = x / (y * (y + 1.0)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -1.0], N[(N[(y / x), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -5e-119], N[(y / x), $MachinePrecision], N[(x / N[(y * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1:\\
\;\;\;\;\frac{y}{x} \cdot \frac{1}{x}\\
\mathbf{elif}\;x \leq -5 \cdot 10^{-119}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\end{array}
\end{array}
if x < -1Initial program 62.4%
*-commutative62.4%
associate-*l*62.4%
times-frac83.8%
+-commutative83.8%
+-commutative83.8%
associate-+r+83.8%
+-commutative83.8%
associate-+l+83.8%
Applied egg-rr83.8%
Taylor expanded in y around 0 75.3%
Taylor expanded in x around inf 77.0%
if -1 < x < -4.99999999999999993e-119Initial program 84.3%
associate-/l*89.2%
associate-+l+89.2%
Simplified89.2%
Taylor expanded in y around 0 45.3%
associate-/r*45.3%
+-commutative45.3%
Simplified45.3%
Taylor expanded in x around 0 40.9%
if -4.99999999999999993e-119 < x Initial program 67.0%
associate-/l*80.2%
associate-+l+80.2%
Simplified80.2%
Taylor expanded in x around 0 58.3%
+-commutative58.3%
Simplified58.3%
Final simplification61.5%
(FPCore (x y) :precision binary64 (if (<= x -1.5e+64) (* (/ y x) (/ 1.0 x)) (if (<= x -2.1e-125) (/ y (* x (+ x 1.0))) (/ x (* y (+ y 1.0))))))
double code(double x, double y) {
double tmp;
if (x <= -1.5e+64) {
tmp = (y / x) * (1.0 / x);
} else if (x <= -2.1e-125) {
tmp = y / (x * (x + 1.0));
} else {
tmp = x / (y * (y + 1.0));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-1.5d+64)) then
tmp = (y / x) * (1.0d0 / x)
else if (x <= (-2.1d-125)) then
tmp = y / (x * (x + 1.0d0))
else
tmp = x / (y * (y + 1.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -1.5e+64) {
tmp = (y / x) * (1.0 / x);
} else if (x <= -2.1e-125) {
tmp = y / (x * (x + 1.0));
} else {
tmp = x / (y * (y + 1.0));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -1.5e+64: tmp = (y / x) * (1.0 / x) elif x <= -2.1e-125: tmp = y / (x * (x + 1.0)) else: tmp = x / (y * (y + 1.0)) return tmp
function code(x, y) tmp = 0.0 if (x <= -1.5e+64) tmp = Float64(Float64(y / x) * Float64(1.0 / x)); elseif (x <= -2.1e-125) tmp = Float64(y / Float64(x * Float64(x + 1.0))); else tmp = Float64(x / Float64(y * Float64(y + 1.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -1.5e+64) tmp = (y / x) * (1.0 / x); elseif (x <= -2.1e-125) tmp = y / (x * (x + 1.0)); else tmp = x / (y * (y + 1.0)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -1.5e+64], N[(N[(y / x), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.1e-125], 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}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.5 \cdot 10^{+64}:\\
\;\;\;\;\frac{y}{x} \cdot \frac{1}{x}\\
\mathbf{elif}\;x \leq -2.1 \cdot 10^{-125}:\\
\;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\end{array}
\end{array}
if x < -1.5000000000000001e64Initial program 59.2%
*-commutative59.2%
associate-*l*59.2%
times-frac80.4%
+-commutative80.4%
+-commutative80.4%
associate-+r+80.4%
+-commutative80.4%
associate-+l+80.4%
Applied egg-rr80.4%
Taylor expanded in y around 0 74.8%
Taylor expanded in x around inf 81.7%
if -1.5000000000000001e64 < x < -2.1e-125Initial program 82.3%
associate-/l*85.6%
associate-+l+85.6%
Simplified85.6%
Taylor expanded in y around 0 48.1%
if -2.1e-125 < x Initial program 67.0%
associate-/l*80.2%
associate-+l+80.2%
Simplified80.2%
Taylor expanded in x around 0 58.3%
+-commutative58.3%
Simplified58.3%
Final simplification62.1%
(FPCore (x y) :precision binary64 (if (<= x -1.2e+64) (* (/ y x) (/ 1.0 x)) (if (<= x -1.1e-120) (/ y (* x (+ x 1.0))) (/ (/ x y) (+ y 1.0)))))
double code(double x, double y) {
double tmp;
if (x <= -1.2e+64) {
tmp = (y / x) * (1.0 / x);
} else if (x <= -1.1e-120) {
tmp = y / (x * (x + 1.0));
} else {
tmp = (x / y) / (y + 1.0);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-1.2d+64)) then
tmp = (y / x) * (1.0d0 / x)
else if (x <= (-1.1d-120)) then
tmp = y / (x * (x + 1.0d0))
else
tmp = (x / y) / (y + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -1.2e+64) {
tmp = (y / x) * (1.0 / x);
} else if (x <= -1.1e-120) {
tmp = y / (x * (x + 1.0));
} else {
tmp = (x / y) / (y + 1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -1.2e+64: tmp = (y / x) * (1.0 / x) elif x <= -1.1e-120: tmp = y / (x * (x + 1.0)) else: tmp = (x / y) / (y + 1.0) return tmp
function code(x, y) tmp = 0.0 if (x <= -1.2e+64) tmp = Float64(Float64(y / x) * Float64(1.0 / x)); elseif (x <= -1.1e-120) tmp = Float64(y / Float64(x * Float64(x + 1.0))); else tmp = Float64(Float64(x / y) / Float64(y + 1.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -1.2e+64) tmp = (y / x) * (1.0 / x); elseif (x <= -1.1e-120) tmp = y / (x * (x + 1.0)); else tmp = (x / y) / (y + 1.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -1.2e+64], N[(N[(y / x), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.1e-120], 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}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.2 \cdot 10^{+64}:\\
\;\;\;\;\frac{y}{x} \cdot \frac{1}{x}\\
\mathbf{elif}\;x \leq -1.1 \cdot 10^{-120}:\\
\;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + 1}\\
\end{array}
\end{array}
if x < -1.2e64Initial program 59.2%
*-commutative59.2%
associate-*l*59.2%
times-frac80.4%
+-commutative80.4%
+-commutative80.4%
associate-+r+80.4%
+-commutative80.4%
associate-+l+80.4%
Applied egg-rr80.4%
Taylor expanded in y around 0 74.8%
Taylor expanded in x around inf 81.7%
if -1.2e64 < x < -1.10000000000000006e-120Initial program 82.3%
associate-/l*85.6%
associate-+l+85.6%
Simplified85.6%
Taylor expanded in y around 0 48.1%
if -1.10000000000000006e-120 < x Initial program 67.0%
associate-/l*80.2%
associate-+l+80.2%
Simplified80.2%
Taylor expanded in x around 0 58.2%
associate-/r*58.3%
+-commutative58.3%
Simplified58.3%
associate-*r/60.0%
div-inv60.1%
Applied egg-rr60.1%
Final simplification63.1%
(FPCore (x y) :precision binary64 (if (<= x -1.35e-120) (/ (/ y x) (+ x 1.0)) (/ (/ x (+ y 1.0)) (+ y x))))
double code(double x, double y) {
double tmp;
if (x <= -1.35e-120) {
tmp = (y / x) / (x + 1.0);
} else {
tmp = (x / (y + 1.0)) / (y + x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-1.35d-120)) then
tmp = (y / x) / (x + 1.0d0)
else
tmp = (x / (y + 1.0d0)) / (y + x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -1.35e-120) {
tmp = (y / x) / (x + 1.0);
} else {
tmp = (x / (y + 1.0)) / (y + x);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -1.35e-120: tmp = (y / x) / (x + 1.0) else: tmp = (x / (y + 1.0)) / (y + x) return tmp
function code(x, y) tmp = 0.0 if (x <= -1.35e-120) tmp = Float64(Float64(y / x) / Float64(x + 1.0)); else tmp = Float64(Float64(x / Float64(y + 1.0)) / Float64(y + x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -1.35e-120) tmp = (y / x) / (x + 1.0); else tmp = (x / (y + 1.0)) / (y + x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -1.35e-120], N[(N[(y / x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.35 \cdot 10^{-120}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + 1}}{y + x}\\
\end{array}
\end{array}
if x < -1.3499999999999999e-120Initial program 69.0%
associate-/l*76.0%
associate-+l+76.0%
Simplified76.0%
Taylor expanded in y around 0 62.3%
associate-/r*67.4%
+-commutative67.4%
Simplified67.4%
if -1.3499999999999999e-120 < x Initial program 67.0%
*-commutative67.0%
associate-*l*67.0%
times-frac94.6%
+-commutative94.6%
+-commutative94.6%
associate-+r+94.6%
+-commutative94.6%
associate-+l+94.6%
Applied egg-rr94.6%
associate-/r*99.8%
div-inv99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
Applied egg-rr99.8%
associate-*l/99.8%
un-div-inv99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
associate-/r*94.6%
clear-num94.3%
un-div-inv94.3%
associate-+r+94.3%
+-commutative94.3%
*-commutative94.3%
*-un-lft-identity94.3%
times-frac99.5%
+-commutative99.5%
/-rgt-identity99.5%
+-commutative99.5%
Applied egg-rr99.5%
Taylor expanded in x around 0 60.4%
+-commutative60.4%
Simplified60.4%
Final simplification63.3%
(FPCore (x y) :precision binary64 (if (<= x -4.8e-119) (/ (/ y (+ y x)) (+ x 1.0)) (/ (/ x (+ y 1.0)) (+ y x))))
double code(double x, double y) {
double tmp;
if (x <= -4.8e-119) {
tmp = (y / (y + x)) / (x + 1.0);
} else {
tmp = (x / (y + 1.0)) / (y + x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-4.8d-119)) then
tmp = (y / (y + x)) / (x + 1.0d0)
else
tmp = (x / (y + 1.0d0)) / (y + x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -4.8e-119) {
tmp = (y / (y + x)) / (x + 1.0);
} else {
tmp = (x / (y + 1.0)) / (y + x);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -4.8e-119: tmp = (y / (y + x)) / (x + 1.0) else: tmp = (x / (y + 1.0)) / (y + x) return tmp
function code(x, y) tmp = 0.0 if (x <= -4.8e-119) tmp = Float64(Float64(y / Float64(y + x)) / Float64(x + 1.0)); else tmp = Float64(Float64(x / Float64(y + 1.0)) / Float64(y + x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -4.8e-119) tmp = (y / (y + x)) / (x + 1.0); else tmp = (x / (y + 1.0)) / (y + x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -4.8e-119], N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.8 \cdot 10^{-119}:\\
\;\;\;\;\frac{\frac{y}{y + x}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + 1}}{y + x}\\
\end{array}
\end{array}
if x < -4.80000000000000017e-119Initial program 69.0%
*-commutative69.0%
associate-*l*69.0%
times-frac88.6%
+-commutative88.6%
+-commutative88.6%
associate-+r+88.6%
+-commutative88.6%
associate-+l+88.6%
Applied egg-rr88.6%
Taylor expanded in y around 0 67.8%
+-commutative67.8%
Simplified67.8%
un-div-inv67.8%
+-commutative67.8%
Applied egg-rr67.8%
if -4.80000000000000017e-119 < x Initial program 67.0%
*-commutative67.0%
associate-*l*67.0%
times-frac94.6%
+-commutative94.6%
+-commutative94.6%
associate-+r+94.6%
+-commutative94.6%
associate-+l+94.6%
Applied egg-rr94.6%
associate-/r*99.8%
div-inv99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
Applied egg-rr99.8%
associate-*l/99.8%
un-div-inv99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
associate-/r*94.6%
clear-num94.3%
un-div-inv94.3%
associate-+r+94.3%
+-commutative94.3%
*-commutative94.3%
*-un-lft-identity94.3%
times-frac99.5%
+-commutative99.5%
/-rgt-identity99.5%
+-commutative99.5%
Applied egg-rr99.5%
Taylor expanded in x around 0 60.4%
+-commutative60.4%
Simplified60.4%
Final simplification63.4%
(FPCore (x y) :precision binary64 (if (<= x -1.0) (* (/ y x) (/ 1.0 x)) (if (<= x -7e-151) (/ y x) (/ x y))))
double code(double x, double y) {
double tmp;
if (x <= -1.0) {
tmp = (y / x) * (1.0 / x);
} else if (x <= -7e-151) {
tmp = y / x;
} else {
tmp = x / y;
}
return tmp;
}
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 <= (-7d-151)) then
tmp = y / x
else
tmp = x / y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -1.0) {
tmp = (y / x) * (1.0 / x);
} else if (x <= -7e-151) {
tmp = y / x;
} else {
tmp = x / y;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -1.0: tmp = (y / x) * (1.0 / x) elif x <= -7e-151: tmp = y / x else: tmp = x / y return tmp
function code(x, y) tmp = 0.0 if (x <= -1.0) tmp = Float64(Float64(y / x) * Float64(1.0 / x)); elseif (x <= -7e-151) tmp = Float64(y / x); else tmp = Float64(x / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -1.0) tmp = (y / x) * (1.0 / x); elseif (x <= -7e-151) tmp = y / x; else tmp = x / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -1.0], N[(N[(y / x), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -7e-151], N[(y / x), $MachinePrecision], N[(x / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1:\\
\;\;\;\;\frac{y}{x} \cdot \frac{1}{x}\\
\mathbf{elif}\;x \leq -7 \cdot 10^{-151}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
if x < -1Initial program 62.4%
*-commutative62.4%
associate-*l*62.4%
times-frac83.8%
+-commutative83.8%
+-commutative83.8%
associate-+r+83.8%
+-commutative83.8%
associate-+l+83.8%
Applied egg-rr83.8%
Taylor expanded in y around 0 75.3%
Taylor expanded in x around inf 77.0%
if -1 < x < -6.99999999999999991e-151Initial program 83.8%
associate-/l*90.5%
associate-+l+90.5%
Simplified90.5%
Taylor expanded in y around 0 42.0%
associate-/r*42.1%
+-commutative42.1%
Simplified42.1%
Taylor expanded in x around 0 38.3%
if -6.99999999999999991e-151 < x Initial program 66.5%
associate-/l*79.5%
associate-+l+79.5%
Simplified79.5%
Taylor expanded in x around 0 57.6%
+-commutative57.6%
Simplified57.6%
Taylor expanded in y around 0 40.3%
Final simplification50.6%
(FPCore (x y) :precision binary64 (if (<= x -3.6e-122) (/ (/ y x) (+ x 1.0)) (/ (/ x y) (+ y 1.0))))
double code(double x, double y) {
double tmp;
if (x <= -3.6e-122) {
tmp = (y / x) / (x + 1.0);
} else {
tmp = (x / y) / (y + 1.0);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-3.6d-122)) then
tmp = (y / x) / (x + 1.0d0)
else
tmp = (x / y) / (y + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -3.6e-122) {
tmp = (y / x) / (x + 1.0);
} else {
tmp = (x / y) / (y + 1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -3.6e-122: tmp = (y / x) / (x + 1.0) else: tmp = (x / y) / (y + 1.0) return tmp
function code(x, y) tmp = 0.0 if (x <= -3.6e-122) tmp = Float64(Float64(y / x) / Float64(x + 1.0)); else tmp = Float64(Float64(x / y) / Float64(y + 1.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -3.6e-122) tmp = (y / x) / (x + 1.0); else tmp = (x / y) / (y + 1.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -3.6e-122], 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}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.6 \cdot 10^{-122}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + 1}\\
\end{array}
\end{array}
if x < -3.59999999999999994e-122Initial program 69.0%
associate-/l*76.0%
associate-+l+76.0%
Simplified76.0%
Taylor expanded in y around 0 62.3%
associate-/r*67.4%
+-commutative67.4%
Simplified67.4%
if -3.59999999999999994e-122 < x Initial program 67.0%
associate-/l*80.2%
associate-+l+80.2%
Simplified80.2%
Taylor expanded in x around 0 58.2%
associate-/r*58.3%
+-commutative58.3%
Simplified58.3%
associate-*r/60.0%
div-inv60.1%
Applied egg-rr60.1%
Final simplification63.1%
(FPCore (x y) :precision binary64 (if (<= y 1.36e-148) (/ y x) (/ x y)))
double code(double x, double y) {
double tmp;
if (y <= 1.36e-148) {
tmp = y / x;
} else {
tmp = x / y;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 1.36d-148) then
tmp = y / x
else
tmp = x / y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 1.36e-148) {
tmp = y / x;
} else {
tmp = x / y;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 1.36e-148: tmp = y / x else: tmp = x / y return tmp
function code(x, y) tmp = 0.0 if (y <= 1.36e-148) tmp = Float64(y / x); else tmp = Float64(x / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 1.36e-148) tmp = y / x; else tmp = x / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 1.36e-148], N[(y / x), $MachinePrecision], N[(x / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.36 \cdot 10^{-148}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
if y < 1.36e-148Initial program 68.9%
associate-/l*78.4%
associate-+l+78.4%
Simplified78.4%
Taylor expanded in y around 0 57.4%
associate-/r*57.8%
+-commutative57.8%
Simplified57.8%
Taylor expanded in x around 0 39.0%
if 1.36e-148 < y Initial program 66.1%
associate-/l*78.6%
associate-+l+78.6%
Simplified78.6%
Taylor expanded in x around 0 55.8%
+-commutative55.8%
Simplified55.8%
Taylor expanded in y around 0 29.2%
Final simplification35.3%
(FPCore (x y) :precision binary64 (/ 1.0 y))
double code(double x, double y) {
return 1.0 / y;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 / y
end function
public static double code(double x, double y) {
return 1.0 / y;
}
def code(x, y): return 1.0 / y
function code(x, y) return Float64(1.0 / y) end
function tmp = code(x, y) tmp = 1.0 / y; end
code[x_, y_] := N[(1.0 / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{y}
\end{array}
Initial program 67.8%
*-commutative67.8%
associate-*l*67.8%
times-frac92.1%
+-commutative92.1%
+-commutative92.1%
associate-+r+92.1%
+-commutative92.1%
associate-+l+92.1%
Applied egg-rr92.1%
Taylor expanded in y around 0 56.0%
Taylor expanded in y around inf 3.5%
mul-1-neg3.5%
unsub-neg3.5%
*-commutative3.5%
Simplified3.5%
Taylor expanded in y around inf 4.0%
Final simplification4.0%
(FPCore (x y) :precision binary64 (/ x y))
double code(double x, double y) {
return x / y;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = x / y
end function
public static double code(double x, double y) {
return x / y;
}
def code(x, y): return x / y
function code(x, y) return Float64(x / y) end
function tmp = code(x, y) tmp = x / y; end
code[x_, y_] := N[(x / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y}
\end{array}
Initial program 67.8%
associate-/l*78.5%
associate-+l+78.5%
Simplified78.5%
Taylor expanded in x around 0 46.1%
+-commutative46.1%
Simplified46.1%
Taylor expanded in y around 0 25.7%
Final simplification25.7%
(FPCore (x y) :precision binary64 1.0)
double code(double x, double y) {
return 1.0;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0
end function
public static double code(double x, double y) {
return 1.0;
}
def code(x, y): return 1.0
function code(x, y) return 1.0 end
function tmp = code(x, y) tmp = 1.0; end
code[x_, y_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 67.8%
*-commutative67.8%
associate-*l*67.8%
times-frac92.1%
+-commutative92.1%
+-commutative92.1%
associate-+r+92.1%
+-commutative92.1%
associate-+l+92.1%
Applied egg-rr92.1%
Taylor expanded in y around 0 51.6%
+-commutative51.6%
Simplified51.6%
Taylor expanded in x around 0 3.3%
Final simplification3.3%
(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 2024130
(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))))